Expand description
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
Re-exports§
pub use blockchain_tree::BlockchainTree;
pub use block_indices::BlockIndices;
pub use chain::AppendableChain;
pub use config::BlockchainTreeConfig;
pub use externals::TreeExternals;
pub use block_buffer::BlockBuffer;
Modules§
- Buffer of not executed blocks.
- Implementation of
BlockIndices
related tosuper::BlockchainTree
- Implementation of
BlockchainTree
- A chain in a
BlockchainTree
. - Blockchain tree configuration
- Re-export of the blockchain tree API. Error handling for the blockchain tree
- Blockchain tree externals.
- Common blockchain tree metrics.
- Implementation of Tree traits that does nothing.
- Wrapper around
BlockchainTree
that allows for it to be shared.
Structs§
- Structure that combines references of required data to be a [
ExecutionDataProvider
]. - Structure that owns the relevant data needs to be a [
ExecutionDataProvider
]
Enums§
- Re-export of the blockchain tree API. Represents what kind of block is being executed and validated.
- Re-export of the blockchain tree API. From Engine API spec, block inclusion can be valid, accepted or invalid. Invalid case is already covered by error, but we need to make distinction between valid blocks that extend canonical chain and the ones that fork off into side chains (see
BlockAttachment
). If we don’t know the block parent we are returning Disconnected status as we can’t make a claim if block is valid or not. - Re-export of the blockchain tree API. Block inclusion can be valid, accepted, or invalid. Invalid blocks are returned as an error variant.
- Re-export of the blockchain tree API. Represents the kind of validation that should be performed when inserting a block.
- Re-export of the blockchain tree API. All possible outcomes of a canonicalization attempt of
BlockchainTreeEngine::make_canonical
. - Re-export of the blockchain tree API. How a payload was inserted if it was valid.
- Re-export of the blockchain tree API. How a payload was inserted if it was valid.
Traits§
- Re-export of the blockchain tree API.
- Re-export of the blockchain tree API. Allows read only functionality on the blockchain tree.