Expand description
Re-exported from reth_blockchain_tree
.
Modules§
- block_
buffer - Buffer of not executed blocks.
- block_
indices - Implementation of
BlockIndices
related tosuper::BlockchainTree
- blockchain_
tree - Implementation of
BlockchainTree
- chain
- A chain in a
BlockchainTree
. - config
- Blockchain tree configuration
- error
- Error handling for the blockchain tree
- externals
- Blockchain tree externals.
- metrics
- Common blockchain tree metrics.
- noop
- Implementation of Tree traits that does nothing.
- shareable
- Wrapper around
BlockchainTree
that allows for it to be shared.
Structs§
- Appendable
Chain - A chain in the blockchain tree that has functionality to execute blocks and append them to itself.
- Block
Buffer - Contains the tree of pending blocks that cannot be executed due to missing parent. It allows to store unconnected blocks for potential future inclusion.
- Block
Indices - Internal indices of the blocks and chains.
- Blockchain
Tree - A Tree of chains.
- Blockchain
Tree Config - The configuration for the blockchain tree.
- Bundle
State Data Ref - Structure that combines references of required data to be a
ExecutionDataProvider
. - Execution
Data - Structure that owns the relevant data needs to be a
ExecutionDataProvider
- Shareable
Blockchain Tree - Shareable blockchain tree that is behind a
RwLock
- Tree
Externals - A container for external components.
Enums§
- Block
Attachment - Represents what kind of block is being executed and validated.
- Block
Status - 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. - Block
Status2 - Block inclusion can be valid, accepted, or invalid. Invalid blocks are returned as an error variant.
- Block
Validation Kind - Represents the kind of validation that should be performed when inserting a block.
- Canonical
Outcome - All possible outcomes of a canonicalization attempt of
BlockchainTreeEngine::make_canonical
. - Insert
Payload Ok - How a payload was inserted if it was valid.
- Insert
Payload Ok2 - How a payload was inserted if it was valid.
Traits§
- Blockchain
Tree Engine BlockchainTreeEngine::insert_block
: Connect block to chain, execute it and if valid insert block inside tree.BlockchainTreeEngine::finalize_block
: Remove chains that join to now finalized block, as chain becomes invalid.BlockchainTreeEngine::make_canonical
: Check if we have the hash of block that we want to finalize and commit it to db. If we don’t have the block, syncing should start to fetch the blocks from p2p. Do reorg in tables if canonical chain if needed.- Blockchain
Tree Viewer - Allows read only functionality on the blockchain tree.