Crate sp_trie[−][src]
Expand description
Utility functions to interact with Substrate’s Base-16 Modified Merkle Patricia tree (“trie”).
Modules
Various re-exports from the trie-db
crate.
This module is for non generic definition of trie type.
Only the Hasher
trait is generic in this case.
Structs
Storage proof in compact form.
HashDB
implementation that append a encoded prefix (unique id bytes) in addition to the
prefix of every key value.
HashDBMut
implementation that append a encoded prefix (unique id bytes) in addition to the
prefix of every key value.
substrate trie layout
Concrete implementation of a NodeCodec
with Parity Codec encoding, generic over the Hasher
Various re-exports from the trie-db
crate.
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.
Various re-exports from the trie-db
crate.
Codec-flavored TrieStream.
Enums
Error for trie node decoding.
Error for trie node decoding.
Errors that may occur during proof verification. Most of the errors types simply indicate that the proof is invalid with respect to the statement being verified, and the exact error type can be used for debugging.
Statics
Various re-exports from the hash-db
crate.
Traits
Reexport from hash_db
, with genericity set for Hasher
trait.
Various re-exports from the hash-db
crate.
Various re-exports from the memory-db
crate.
Various re-exports from the trie-db
crate.
Various re-exports from the trie-db
crate.
Various re-exports from the trie-db
crate.
Various re-exports from the trie-db
crate.
Various re-exports from the trie-db
crate.
Functions
Determine a child trie root given a hash DB and delta values. H is the default hasher, but a generic implementation may ignore this type parameter and use other hashers.
Determine a child trie root given its ordered contents, closed form. H is the default hasher, but a generic implementation may ignore this type parameter and use other hashers.
Decode a compact proof.
Determine a trie root given a hash DB and delta values.
Determine the empty child trie root.
Determine the empty trie root.
Encode a compact proof.
Create a proof for a subset of keys in a trie.
Derive a database key from hash value of the node (key) and the node prefix.
Read a value from the child trie.
Read a value from the child trie with given query.
Read a value from the trie.
Read a value from the trie with given Query.
Record all keys for a given root.
Verify a set of key-value pairs against a trie root and a proof.
Type Definitions
Various re-exports from the trie-db
crate.
Various re-exports from the trie-db
crate.
Reexport from hash_db
, with genericity set for Hasher
trait.
Reexport from hash_db
, with genericity set for Hasher
trait.
Querying interface, as in trie_db
but less generic.
Reexport from hash_db
, with genericity set for Hasher
trait.
This uses a noops KeyFunction
(key addressing must be hashed or using
an encoding scheme that avoid key conflict).
Reexport from hash_db
, with genericity set for Hasher
trait.
This uses a KeyFunction
for prefixing keys internally (avoiding
key conflict for non random keys).
Persistent trie database read-access interface for the a given hasher.
Persistent trie database write-access interface for the a given hasher.
TrieDB error over TrieConfiguration
trait.
Hash type for a trie layout.