reth_blockchain_tree/lib.rs
1//! Implementation of a tree-like structure for blockchains.
2//!
3//! The [`BlockchainTree`] can validate, execute, and revert blocks in multiple competing
4//! sidechains. This structure is used for Reth's sync mode at the tip instead of the pipeline, and
5//! is the primary executor and validator of payloads sent from the consensus layer.
6//!
7//! Blocks and their resulting state transitions are kept in-memory until they are persisted.
8//!
9//! ## Feature Flags
10//!
11//! - `test-utils`: Export utilities for testing
12
13#![doc(
14 html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
15 html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
16 issue_tracker_base_url = "https://github.com/SeismicSystems/seismic-reth/issues/"
17)]
18#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
19#![cfg_attr(not(test), warn(unused_crate_dependencies))]
20
21/// Re-export of the blockchain tree API.
22pub use reth_blockchain_tree_api::*;
23
24pub mod blockchain_tree;
25pub use blockchain_tree::BlockchainTree;
26
27pub mod block_indices;
28pub use block_indices::BlockIndices;
29
30pub mod chain;
31pub use chain::AppendableChain;
32
33pub mod config;
34pub use config::BlockchainTreeConfig;
35
36pub mod externals;
37pub use externals::TreeExternals;
38
39pub mod shareable;
40pub use shareable::ShareableBlockchainTree;
41
42mod bundle;
43pub use bundle::{BundleStateDataRef, ExecutionData};
44
45/// Buffer of not executed blocks.
46pub mod block_buffer;
47mod canonical_chain;
48
49/// Common blockchain tree metrics.
50pub mod metrics;
51
52pub use block_buffer::BlockBuffer;
53
54/// Implementation of Tree traits that does nothing.
55pub mod noop;
56
57mod state;
58
59use aquamarine as _;