Expand description
Utility functions to interact with Tetcore’s Base-16 Modified Merkle Patricia tree (“trie”).
Modules§
- nibble_
ops - Various re-exports from the
tetsy-trie-db
crate. Utility methods to work on radix 16 nibble. - trie_
types - This module is for non generic definition of trie type.
Only the
Hasher
trait is generic in this case.
Structs§
- KeySpacedDB
HashDB
implementation that append a encoded prefix (unique id bytes) in addition to the prefix of every key value.- KeySpacedDB
Mut HashDBMut
implementation that append a encoded prefix (unique id bytes) in addition to the prefix of every key value.- Layout
- tetcore trie layout
- Node
Codec - The Tetcore format implementation of
NodeCodec
. Concrete implementation of aNodeCodec
with Parity Codec encoding, generic over theHasher
- Recorder
- Various re-exports from the
tetsy-trie-db
crate. Records trie nodes as they pass it. - Storage
Proof - 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.
- TrieDB
Iterator - Various re-exports from the
tetsy-trie-db
crate. Iterator for going through all values in the trie in pre-order traversal order. - Trie
Stream - The Tetcore format implementation of
TrieStream
. Codec-flavored TrieStream.
Enums§
- Error
- Our
NodeCodec
-specific error. Error for trie node decoding. - Verify
Error - 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§
- EMPTY_
PREFIX - Various re-exports from the
tetsy-hash-db
crate. An empty prefix constant. Can be use when the prefix is not use internally or for root nodes.
Traits§
- AsHashDB
- Reexport from
hash_db
, with genericity set forHasher
trait. - HashDBT
- Various re-exports from the
tetsy-hash-db
crate. Trait modelling datastore keyed by a hash defined by theHasher
. - KeyFunction
- Various re-exports from the
memory-db
crate. - Query
- Various re-exports from the
tetsy-trie-db
crate. Description of what kind of query will be made to the trie. - Trie
- Various re-exports from the
tetsy-trie-db
crate. A key-value datastore implemented as a database-backed modified Merkle tree. - Trie
Configuration - Various re-exports from the
tetsy-trie-db
crate. This trait associates a trie definition with preferred methods. It also contains own default implementations and can be used to allow switching implementation. - Trie
Layout - Various re-exports from the
tetsy-trie-db
crate. Trait with definition of trie layout. Contains all associated trait needed for a trie definition or implementation. - TrieMut
- Various re-exports from the
tetsy-trie-db
crate. A key-value datastore implemented as a database-backed modified Merkle tree.
Functions§
- child_
delta_ trie_ root - 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.
- child_
trie_ root - 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.
- delta_
trie_ root - Determine a trie root given a hash DB and delta values.
- empty_
child_ trie_ root - Determine the empty child trie root.
- empty_
trie_ root - Determine the empty trie root.
- for_
keys_ in_ child_ trie - Call
f
for all keys in a child trie. Aborts as soon asf
returns false. - generate_
trie_ proof - Create a proof for a subset of keys in a trie.
- prefixed_
key - Derive a database key from hash value of the node (key) and the node prefix.
- read_
child_ trie_ value - Read a value from the child trie.
- read_
child_ trie_ value_ with - Read a value from the child trie with given query.
- read_
trie_ value - Read a value from the trie.
- read_
trie_ value_ with - Read a value from the trie with given Query.
- record_
all_ keys - Record all keys for a given root.
- verify_
trie_ proof - Verify a set of key-value pairs against a trie root and a proof.
Type Aliases§
- CError
- Various re-exports from the
tetsy-trie-db
crate. Alias accessor toNodeCodec
associatedError
type from aTrieLayout
. - DBValue
- Various re-exports from the
tetsy-trie-db
crate. Database value - Generic
MemoryDB - Reexport from
hash_db
, with genericity set forHasher
trait. - HashDB
- Reexport from
hash_db
, with genericity set forHasher
trait. - Lookup
- Querying interface, as in
tetsy_trie_db
but less generic. - MemoryDB
- Reexport from
hash_db
, with genericity set forHasher
trait. This uses a noopsKeyFunction
(key addressing must be hashed or using an encoding scheme that avoid key conflict). - Prefixed
MemoryDB - Reexport from
hash_db
, with genericity set forHasher
trait. This uses aKeyFunction
for prefixing keys internally (avoiding key conflict for non random keys). - TrieDB
- Persistent trie database read-access interface for the a given hasher.
- TrieDB
Mut - Persistent trie database write-access interface for the a given hasher.
- Trie
Error - TrieDB error over
TrieConfiguration
trait. - Trie
Hash - Hash type for a trie layout.