Module merklized_state

Source
Expand description

Api for querying merklized state

The state API provides an interface for serving queries against arbitrarily old snapshots of the state. This allows a full Merkle tree to be reconstructed from storage. If any parent state is missing then the partial snapshot can not be queried.

Modulesยง

data_source ๐Ÿ”’
Data for the merklized_state API.

Structsยง

CustomSnafu ๐Ÿ”’
SNAFU context selector for the Error::Custom variant
Options
QuerySnafu ๐Ÿ”’
SNAFU context selector for the Error::Query variant
RequestSnafu ๐Ÿ”’
SNAFU context selector for the Error::Request variant

Enumsยง

Error
Snapshot
Snapshot can be queried by block height (index) or merkle tree commitment

Traitsยง

MerklizedState
This trait should be implemented by the MerkleTree that the module is initialized for. It defines methods utilized by the module.
MerklizedStateDataSource
This trait defines methods that a data source should implement It enables retrieval of the membership path for a leaf node, which can be used to reconstruct the Merkle tree state.
MerklizedStateHeightPersistence
UpdateStateData
This trait defines methods for updating the storage with the merkle tree state.

Functionsยง

define_api