Available on crate feature
trie only.Expand description
Re-exported reth trie types
Modules§
- changesets
- Trie changeset computation. Trie changeset computation.
- forward_
cursor - The implementation of forward-only in-memory cursor.
- hash_
builder - The implementation of hash builder. MPT hash builder implementation.
- hashed_
cursor - The cursor implementations for navigating hashed state.
- metrics
metrics - Trie calculation metrics.
- mock
test-utils - Collection of mock types for testing.
- node_
iter - The iterators for traversing existing intermediate hashes and updated trie leaves.
- ordered_
root - Incremental ordered trie root computation. Incremental ordered trie root computation for append-only streams.
- prefix_
set - The implementation of a container for storing intermediate changes to a trie. The container indicates when the trie has been modified.
- proof
- Merkle proof generation.
- proof_
v2 - Merkle proof generation v2 (leaf-only implementation). Proof calculation version 2 using leaf data and cached branch hashes.
- range_
proof - Merkle Patricia trie range-proof verification. Merkle Patricia trie range-proof verification.
- root
- Common root computation functions.
- serde_
bincode_ compat serde-bincode-compatandserde - Bincode-compatible serde implementations for trie types.
- stats
- Trie calculation stats.
- target_
v2 - V2 proof targets and chunking. V2 proof targets and chunking.
- test_
utils test-utils - Collection of trie-related test utilities.
- trie_
cursor - The cursor implementations for navigating account and storage tries.
- triehash
test-utils - Implementation of hasher using our keccak256 hashing function
for compatibility with
triehashcrate. - updates
- Buffer for trie updates.
- verify
- Verification of existing stored trie nodes against state data.
- walker
- The trie walker for iterating over the trie nodes.
- witness
- Trie witness generation.
Macros§
- with_
adapter trie-db - Dispatches a trie operation using the correct
TrieKeyAdapterbased on storage settings.
Structs§
- Account
Proof - The merkle proof with the relevant account info.
- Branch
Node - Re-export A branch node in an Ethereum Merkle Patricia Trie.
- Branch
Node Compact - Re-export A struct representing a branch node in an Ethereum trie.
- Branch
Node Masks - Branch node masks containing
hash_maskandtree_mask. - Branch
Node Ref - Re-export A reference to BranchNode and its state mask. NOTE: The stack may contain more items that specified in the state mask.
- Branch
Node V2 - A branch node in an Ethereum Merkle Patricia Trie.
- Chunked
Hashed Post State - An iterator that yields chunks of the state updates of at most
sizeaccount and storage targets. - Chunked
Multi Proof Targets - An iterator that yields chunks of the proof targets of at most
sizeaccount and storage targets. - Chunked
Multi Proof Targets V2 - An iterator that yields chunks of V2 proof targets of at most
sizeaccount and storage targets. - Database
Account Trie Cursor trie-db - A cursor over the account trie.
- Database
Hashed Account Cursor trie-db - A struct wrapping database cursor over hashed accounts implementing
HashedCursorfor iterating over accounts. - Database
Hashed Cursor Factory trie-db - A struct wrapping database transaction that implements
HashedCursorFactory. - Database
Hashed Storage Cursor trie-db - The structure wrapping a database cursor for hashed storage and
a target hashed address. Implements
HashedCursorandHashedStorageCursorfor iterating over hashed storage. - Database
Storage Trie Cursor trie-db - A cursor over the storage tries stored in the database.
- Database
Trie Cursor Factory trie-db - Wrapper struct for database transaction implementing trie cursor factory trait.
- Decoded
Account Proof - The merkle proof with the relevant account info.
- Decoded
Multi Proof - This is a type of
MultiProofthat uses decoded proofs, meaning these proofs are stored as a collection ofTrieNodes instead of RLP-encoded bytes. - Decoded
Multi Proof V2 - V2 decoded multiproof which contains the results of both account and storage V2 proof calculations.
- Decoded
Storage Multi Proof - The decoded merkle multiproof for a storage trie.
- Decoded
Storage Proof - The merkle proof of the storage entry, using decoded proofs.
- Extension
Node - Re-export An extension node in an Ethereum Merkle Patricia Trie.
- Extension
Node Ref - Re-export Reference to the extension node. See ExtensionNode from more information.
- Hash
Builder - Re-export A component used to construct the root hash of the trie.
- Hashed
Post State - In-memory hashed state that stores account and storage changes with keccak256-hashed keys in hash maps.
- Hashed
Post State Sorted - Sorted hashed post state optimized for iterating during state trie calculation.
- Hashed
Storage - Representation of in-memory hashed storage.
- Hashed
Storage Sorted - Sorted hashed storage optimized for iterating during state trie calculation.
- Intermediate
State Root State - The intermediate state of the state root computation.
- Intermediate
Storage Root State - The intermediate state of a storage root computation along with the account.
- Keccak
KeyHasher - A key hasher that uses the Keccak-256 hash function.
- Lazy
Trie Data - Lazily initialized trie data containing sorted hashed state and trie updates.
- Leaf
Node - Re-export A leaf node represents the endpoint or terminal node in the trie. In other words, a leaf node is where actual values are stored.
- Leaf
Node Ref - Re-export Reference to the leaf node. See LeafNode from more information.
- Legacy
KeyAdapter trie-db - Legacy (v1) nibble encoding: 1 nibble per byte, 65-byte subkeys.
- Multi
Proof - The state multiproof of target accounts and multiproofs of their storage tries. Multiproof is effectively a state subtrie that only contains the nodes in the paths of target accounts.
- Multi
Proof Targets - Proof targets map.
- Multi
Proof Targets V2 - A set of account and storage V2 proof targets. The account and storage targets do not need to necessarily overlap.
- Nibbles
- Structure representing a sequence of nibbles.
- Packed
Accounts Trie trie-db - Packed-encoding view of the
AccountsTrietable. - Packed
KeyAdapter trie-db - Packed (v2) nibble encoding: 2 nibbles per byte, 33-byte subkeys.
- Packed
Storage Trie Entry - Account storage trie node with packed nibble encoding (storage v2).
- Packed
Storages Trie trie-db - Packed-encoding view of the
StoragesTrietable. - Packed
Stored Nibbles - Packed representation of nibbles for the
AccountsTrie(storage v2). - Packed
Stored Nibbles SubKey - Packed representation of nibbles as a
DupSortsubkey forStoragesTrie(storage v2). - Proof
Trie Node - Carries all information needed by a sparse trie to reveal a particular node.
- Proof
Trie Node V2 - Carries all information needed by a sparse trie to reveal a particular node.
- Proof
V2Target - Target describes a proof target. For every proof target given, a proof calculator will calculate
and return all nodes whose path is a prefix of the target’s
key_nibbles. - Proof
V2Target Parent - The already-revealed parent branch of a
ProofV2Target. - RlpNode
- Re-export An RLP-encoded node.
- Sorted
Trie Data - Container for sorted trie data: hashed state and trie updates.
- State
Root StateRootis used to compute the root node of a state trie.- Storage
Multi Proof - The merkle multiproof of storage trie.
- Storage
Proof - The merkle proof of the storage entry.
- Storage
Root StorageRootis used to compute the root node of an account storage trie.- Storage
Trie Entry - Account storage trie node.
- Stored
Nibbles - The representation of nibbles of the merkle trie stored in the database.
- Stored
Nibbles SubKey - The representation of nibbles of the merkle trie stored in the database.
- Stored
SubNode - Walker sub node for storing intermediate state root calculation state in the database.
- Trie
Account ethereum - Re-export for convenience. Represents an TrieAccount in the account trie.
- Trie
Input - Inputs for trie-related computations.
- Trie
Input Sorted - Sorted variant of
TrieInputfor efficient proof generation. - Trie
Mask - Re-export A struct representing a mask of 16 bits, used for Ethereum trie operations.
- Trie
Mask Iter - Re-export
An iterator over the set bit indices of a
TrieMask.
Enums§
- Execution
Witness Mode - Controls how execution witnesses are generated.
- State
Root Progress - The progress of the state root computation.
- Storage
Root Progress - The progress of a storage root calculation.
- Trie
Node - Re-export Enum representing an MPT trie node.
- Trie
Node V2 - Enum representing an MPT trie node.
- Trie
Type - Trie type for differentiating between various trie calculations.
Constants§
- CHILD_
INDEX_ RANGE - Re-export The range of valid child indexes.
- EMPTY_
ROOT_ HASH - Re-export Root hash of an empty trie.
- TRIE_
ACCOUNT_ RLP_ MAX_ SIZE - The maximum size of RLP encoded trie account in bytes. 2 (header) + 4 * 1 (field lens) + 8 (nonce) + 32 * 3 (balance, storage root, code hash)
Traits§
- Database
Hashed Post State trie-db - Extends
HashedPostStateSortedwith operations specific for working with a database transaction. - Database
Proof trie-db - Extends
Proofwith operations specific for working with a database transaction. - Database
State Root trie-db - Extends
StateRootwith operations specific for working with a database transaction. - Database
Storage Proof trie-db - Extends
StorageProofwith operations specific for working with a database transaction. - Database
Storage Root trie-db - Extends
StorageRootwith operations specific for working with a database transaction. - KeyHasher
- Trait for hashing keys in state.
- Storage
Trie Entry Like trie-db - Trait for storage trie entry types that carry a subkey and node.
- Trie
KeyAdapter trie-db - Trait abstracting nibble encoding for trie keys.
- Trie
Table Adapter trie-db - Maps a
TrieKeyAdapterto account and storage trie tables using its key and value types.
Functions§
- compute_
block_ trie_ changesets trie-db - Computes trie changesets for a block.
- compute_
range_ trie_ changesets trie-db - Computes aggregate trie changesets for an inclusive block range.
- depth_
first_ cmp - Compares two
Nibblesin depth-first order. - encode_
path_ leaf - Re-export Encodes a given path leaf as a compact array of bytes.
- hashed_
storage_ from_ reverts_ with_ provider trie-db - Initializes
HashedStoragefrom reverts using a provider. - load_
prefix_ sets_ with_ provider trie-db - Load prefix sets using a provider that implements
ChangeSetReader. This function can read changesets from both static files and database. - rlp_
node Deprecated - Re-export
Given an RLP-encoded node, returns it either as
rlp(node)orrlp(keccak(rlp(node))). - word_
rlp Deprecated - Re-export Optimization for quick RLP-encoding of a 32-byte word.
Type Aliases§
- Branch
Node Masks Map - Map from nibble path to branch node masks.