[−][src]Crate sp_state_machine
Substrate state machine implementation.
Reexports
pub use crate::backend::Backend; 
Modules
backend  State machine backends. These manage the code and storage of contracts. 
Macros
debug  Logs a message at the debug level. 
log_error  Logs a message at the error level. 
trace  Logs a message at the trace level. 
warn  Logs a message at the warn level. 
Structs
BasicExternalities  Simple Mapbased Externalities impl. 
ChangesTrieAnchorBlockId  Block identifier that could be used to determine fork of this block. 
ChangesTrieBuildCache  Changes trie build cache. 
ChangesTrieConfigurationRange  Blocks range where configuration has been constant. 
ChangesTrieState  Changes tries state at some block. 
Ext  Wraps a readonly backend, call executor, and current overlayed changes. 
InMemoryChangesTrieStorage  Inmemory implementation of changes trie storage. 
OverlayedChanges  The set of changes that are overlaid onto the backend. 
ProvingBackend  Patricia triebased backend which also tracks all touched storage trie values. These can be sent to remote node and used as a proof of execution. 
ProvingBackendRecorder  Patricia triebased backend specialized in get value proofs. 
ReadOnlyExternalities  Simple readonly externalities for any backend. 
StateMachine  The substrate state machine. 
StateMachineStats  Accumulated usage statistics specific to state machine crate. 
StorageChanges  A storage changes structure that can be generated by the data collected in 
StorageProof  A proof that some set of keyvalue pairs are included in the storage trie. The proof contains the storage values so that the partial storage backend can be reconstructed by a verifier that does not already have access to the keyvalue pairs. 
StorageTransactionCache  The storage transaction are calculated as part of the 
TestExternalities  Simple HashMapbased Externalities impl. 
TrieBackend  Patricia triebased backend. Transaction type is an overlay of changes to commit. 
UsageInfo  Usage statistics for state backend. 
UsageUnit  Measured count of operations and total bytes. 
Enums
BackendTrustLevel  Storage backend trust level. 
ChangesTrieCacheAction  The action to perform when blockwithchangestrie is imported. 
ExecutionError  Externalities Error. 
ExecutionManager  Like 
ExecutionStrategy  Strategy for executing a call into the runtime. 
Traits
ChangesTrieBlockNumber  Requirements for block number that can be used with changes tries. 
ChangesTrieRootsStorage  Changes trie storage. Provides access to trie roots and trie nodes. 
ChangesTrieStorage  Changes trie storage. Provides access to trie roots and trie nodes. 
Error  State Machine Error bound. 
InspectState  Trait for inspecting state in any backend. 
Storage  Patricia triebased storage trait. 
TrieBackendStorage  Keyvalue pairs storage that is used by trie backend essence. 
TrieMut  A keyvalue datastore implemented as a databasebacked modified Merkle tree. 
Functions
create_proof_check_backend  Create proof check backend. 
disabled_changes_trie_state  Create state where changes tries are disabled. 
execution_proof_check  Check execution proof, generated by 
execution_proof_check_on_trie_backend  Check execution proof on proving backend, generated by 
key_changes  Return changes of given key at given blocks range.

key_changes_proof  Returns proof of changes of given key at given blocks range.

key_changes_proof_check  Check key changes proof and return changes of the key at given blocks range.

key_changes_proof_check_with_db  Similar to the 
native_else_wasm  Evaluate to ExecutionManager::NativeElseWasm, without having to figure out the type. 
new_in_mem  Create a new empty instance of inmemory backend. 
prove_child_read  Generate child storage read proof. 
prove_child_read_on_trie_backend  Generate storage read proof on precreated trie backend. 
prove_execution  Prove execution using the given state backend, overlayed changes, and call executor. 
prove_execution_on_trie_backend  Prove execution using the given trie backend, overlayed changes, and call executor. Produces a statebackendspecific "transaction" which can be used to apply the changes to the backing store, such as the disk. Execution proof is the set of all 'touched' storage DBValues from the backend. 
prove_read  Generate storage read proof. 
prove_read_on_trie_backend  Generate storage read proof on precreated trie backend. 
prune_changes_tries  Prune obsolete changes tries. Pruning happens at the same block, where highest
level digest is created. Pruning guarantees to save changes tries for last

read_child_proof_check  Check child storage read proof, generated by 
read_child_proof_check_on_proving_backend  Check child storage read proof on precreated proving backend. 
read_proof_check  Check storage read proof, generated by 
read_proof_check_on_proving_backend  Check storage read proof on precreated proving backend. 
Type Definitions
ChangesTrieTransaction  Type of changes trie transaction. 
ChildStorageCollection  In memory arrays of storage values for multiple child tries. 
DBValue  Database value 
DefaultError  Default error type to use with state machine trie backend. 
DefaultHandler  Default handler of the execution manager. 
InMemoryBackend  Trie backend with inmemory storage. 
Layout  
MemoryDB  Reexport from 
ProofRecorder  Global proof recorder, act as a layer over a hash db for recording queried data. 
StorageCollection  In memory array of storage values. 
StorageKey  Storage key. 
StorageValue  Storage value. 
TrieDBMut  Persistent trie database writeaccess interface for the a given hasher. 