Crate reth_blockchain_tree

source
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§

Modules§

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§