Expand description
Standalone crate for Reth configuration traits and builder types.
Re-exports§
pub use reth_engine_primitives as engine;
pub use reth_payload_primitives as payload;
pub use reth_payload_builder_primitives as payload_builder;
pub use node::*;
Modules§
- node
- Traits for configuring a node.
Structs§
- AnyNode
Types - A
NodeTypes
type builder. - AnyNode
Types With Engine - A
NodeTypesWithEngine
type builder. - Forkchoice
State Tracker - The struct that keeps track of the received forkchoice state and their status.
- Next
Block EnvAttributes - Traits and helper types used to abstract over EVM methods and types.
Represents additional attributes required to configure the next block.
This is used to configure the next block’s environment
ConfigureEvmEnv::next_cfg_and_block_env
and contains fields that can’t be derived from the parent header alone (attributes that are determined by the CL.) - Node
Types WithDB Adapter - An adapter type combining
NodeTypes
and db intoNodeTypesWithDB
. - OnFork
Choice Updated - Represents the outcome of forkchoice update.
- Payload
Events - Represents a receiver for various payload events.
Enums§
- Beacon
Engine Message - A message for the beacon engine from other components of the node (engine RPC API invoked by the consensus layer).
- Beacon
OnNew Payload Error - Represents all error cases when handling a new payload.
- Engine
ApiMessage Version - The version of Engine API message.
- Engine
Object Validation Error - Thrown when the payload or attributes are known to be invalid before processing.
- Events
- Payload builder events.
- Forkchoice
State Hash - A helper type to check represent hashes of a [
ForkchoiceState
] - Forkchoice
Status - A simplified representation of [
PayloadStatusEnum
] specifically for FCU. - Invalid
Payload Attributes Error - Thrown when validating the correctness of a payloadattributes object.
- Message
Validation Kind - A type that represents whether or not we are validating a payload or payload attributes.
- Payload
Builder Error - Possible error variants during payload building.
- Payload
Kind - Determines how we should choose the payload to return.
- Payload
OrAttributes - Either an [
ExecutionPayload
] or a types that implements thePayloadAttributes
trait. - Version
Specific Validation Error - Thrown when validating an execution payload OR payload attributes fails due to:
Traits§
- Block
- Abstraction of block data type.
- Block
Body - Abstraction for block’s body.
- Built
Payload - Represents a built payload type that contains a built [
SealedBlock
] and can be converted into engine API execution payloads. - Configure
Evm - Traits and helper types used to abstract over EVM methods and types. Trait for configuring the EVM for executing full blocks.
- Configure
EvmEnv - Traits and helper types used to abstract over EVM methods and types. This represents the set of methods used to configure the EVM’s environment before block execution.
- Engine
Types - This type defines the versioned types of the engine API.
- Engine
Validator - Type that validates the payloads processed by the engine.
- Full
Block - Helper trait that unifies all behaviour required by block to support full node operations.
- Full
Node Primitives - Helper trait that sets trait bounds on
NodePrimitives
. - Full
Provider - Helper trait to unify all provider traits for simplicity.
- Full
Receipt - Helper trait that unifies all behaviour required by receipt to support full node operations.
- Full
Signed Tx - Helper trait that unifies all behaviour required by block to support full node operations.
- Invalid
Block Hook - An invalid block hook.
- Node
Primitives - Configures all the primitive types of the node.
- Node
Types - The type that configures the essential types of an Ethereum-like node.
- Node
Types WithDB - A helper trait that is downstream of the
NodeTypesWithEngine
trait and adds database to the node. - Node
Types With Engine - The type that configures an Ethereum-like node with an engine for consensus.
- Payload
Attributes - The execution payload attribute type the CL node emits via the engine API. This trait should be implemented by types that could be used to spawn a payload job.
- Payload
Attributes Builder - A builder that can return the current payload attribute.
- Payload
Builder - A type that can request, subscribe to and resolve payloads.
- Payload
Builder Attributes - This can be implemented by types that describe a currently running payload job.
- Payload
Store Ext - A helper trait for internal usage to retrieve and resolve payloads.
- Payload
Types - The types that are used by the engine API.
- Payload
Validator - Type that validates an [
ExecutionPayload
].
Functions§
- validate_
parent_ beacon_ block_ root_ presence - Validate the presence of the
parentBeaconBlockRoot
field according to the given timestamp. This method is meant to be used with either apayloadAttributes
field or a full payload, with theengine_forkchoiceUpdated
andengine_newPayload
methods respectively. - validate_
payload_ timestamp - Validates the timestamp depending on the version called:
- validate_
version_ specific_ fields - Validates the presence or exclusion of fork-specific fields based on the ethereum execution payload, or payload attributes, and the message version.
- validate_
withdrawals_ presence - Validates the presence of the
withdrawals
field according to the payload timestamp. After Shanghai, withdrawals field must be Some. Before Shanghai, withdrawals field must be None;
Type Aliases§
- BlockTy
- Helper adapter type for accessing
NodePrimitives::Block
onNodeTypes
. - BodyTy
- Helper adapter type for accessing
NodePrimitives::BlockBody
onNodeTypes
. - Header
Ty - Helper adapter type for accessing
NodePrimitives::BlockHeader
onNodeTypes
. - Receipt
Ty - Helper adapter type for accessing
NodePrimitives::Receipt
onNodeTypes
. - TxTy
- Helper adapter type for accessing
NodePrimitives::SignedTx
onNodeTypes
.