Skip to main content

Module merklized_state

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
Errors surfaced to clients from a Merklized state API.
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 API 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