reth_blockchain_tree/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Implementation of a tree-like structure for blockchains.
//!
//! The [`BlockchainTree`] can validate, execute, and revert blocks in multiple competing
//! sidechains. This structure is used for Reth's sync mode at the tip instead of the pipeline, and
//! is the primary executor and validator of payloads sent from the consensus layer.
//!
//! Blocks and their resulting state transitions are kept in-memory until they are persisted.
//!
//! ## Feature Flags
//!
//! - `test-utils`: Export utilities for testing

#![doc(
    html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
    html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
    issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]

/// Re-export of the blockchain tree API.
pub use reth_blockchain_tree_api::*;

pub mod blockchain_tree;
pub use blockchain_tree::BlockchainTree;

pub mod block_indices;
pub use block_indices::BlockIndices;

pub mod chain;
pub use chain::AppendableChain;

pub mod config;
pub use config::BlockchainTreeConfig;

pub mod externals;
pub use externals::TreeExternals;

pub mod shareable;
pub use shareable::ShareableBlockchainTree;

mod bundle;
pub use bundle::{BundleStateDataRef, ExecutionData};

/// Buffer of not executed blocks.
pub mod block_buffer;
mod canonical_chain;

/// Common blockchain tree metrics.
pub mod metrics;

pub use block_buffer::BlockBuffer;

/// Implementation of Tree traits that does nothing.
pub mod noop;

mod state;

use aquamarine as _;