Crate sp_state_machine

source ·
Expand description

Substrate state machine implementation.

Re-exports

Modules

  • State machine backends. These manage the code and storage of contracts.

Macros

  • Logs a message at the debug level.
  • Logs a message at the error level.
  • Constructs an event at the trace level.
  • Logs a message at the warn level.

Structs

  • Simple Map-based Externalities impl.
  • Storage proof in compact form.
  • Wraps a read-only backend, call executor, and current overlayed changes.
  • Multiple key value state. States are ordered by root storage key.
  • A key value state at any storage level.
  • substrate trie layout
  • substrate trie layout, with external value nodes.
  • In-memory storage for offchain workers recoding changes for the actual offchain storage implementation.
  • The set of changes that are overlaid onto the backend.
  • Simple read-only externalities for any backend.
  • The substrate state machine.
  • Accumulated usage statistics specific to state machine crate.
  • A storage changes structure that can be generated by the data collected in OverlayedChanges.
  • A proof that some set of key-value 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 key-value pairs.
  • Storage transactions are calculated as part of the storage_root. These transactions can be reused for importing the block into the storage. So, we cache them to not require a recomputation of those transactions.
  • Simple HashMap-based Externalities impl.
  • Patricia trie-based backend. Transaction type is an overlay of changes to commit.
  • Builder for creating a TrieBackend.
  • Usage statistics for state backend.
  • Measured count of operations and total bytes.

Enums

Constants

Traits

  • State Machine Error bound.
  • Trait for inspecting state in any backend.
  • Patricia trie-based storage trait.
  • Key-value pairs storage that is used by trie backend essence.
  • A key-value datastore implemented as a database-backed modified Merkle tree.

Functions

Type Definitions