reth_trie/
lib.rs

1//! The implementation of Merkle Patricia Trie, a cryptographically
2//! authenticated radix trie that is used to store key-value bindings.
3//! <https://ethereum.org/en/developers/docs/data-structures-and-encoding/patricia-merkle-trie/>
4//!
5//! ## Feature Flags
6//!
7//! - `test-utils`: Export utilities for testing
8
9#![doc(
10    html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
11    html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
12    issue_tracker_base_url = "https://github.com/SeismicSystems/seismic-reth/issues/"
13)]
14#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
15
16/// The implementation of forward-only in-memory cursor.
17pub mod forward_cursor;
18
19/// The cursor implementations for navigating account and storage tries.
20pub mod trie_cursor;
21
22/// The cursor implementations for navigating hashed state.
23pub mod hashed_cursor;
24
25/// The trie walker for iterating over the trie nodes.
26pub mod walker;
27
28/// The iterators for traversing existing intermediate hashes and updated trie leaves.
29pub mod node_iter;
30
31/// In-memory hashed state.
32mod state;
33pub use state::*;
34
35/// Input for trie computation.
36mod input;
37pub use input::TrieInput;
38
39/// Merkle proof generation.
40pub mod proof;
41
42/// Trie witness generation.
43pub mod witness;
44
45/// The implementation of the Merkle Patricia Trie.
46mod trie;
47pub use trie::{StateRoot, StorageRoot};
48
49/// Utilities for state root checkpoint progress.
50mod progress;
51pub use progress::{IntermediateStateRootState, StateRootProgress};
52
53/// Trie calculation stats.
54pub mod stats;
55
56// re-export for convenience
57pub use reth_trie_common::*;
58
59/// Trie calculation metrics.
60#[cfg(feature = "metrics")]
61pub mod metrics;
62
63/// Collection of trie-related test utilities.
64#[cfg(any(test, feature = "test-utils"))]
65pub mod test_utils;