Crate reth_node_builder

Source
Expand description

Standalone crate for Reth configuration and builder types.

§features

  • js-tracer: Enable the JavaScript tracer for the debug_trace endpoints

Re-exports§

pub use components::NodeComponents;
pub use components::NodeComponentsBuilder;
pub use node::*;
pub use aliases::*;

Modules§

add_ons
Node add-ons. Depend on core NodeComponents.
aliases
Type aliases for traits that are often used together
common
Helper types that can be used by launchers.
components
Support for configuring the components of a node. Support for configuring the components of a node.
config
Engine tree configuration.
exex
Support for installing the ExExs (execution extensions) in a node. Types for launching execution extensions (ExEx).
hooks
Node event hooks.
node
Support for configuring the higher level node types.
payload
This crate defines abstractions to create and update payloads (blocks)
payload_builder
This crate defines abstractions to create and update payloads (blocks)
rpc
Builder support for rpc components.
setup
Helpers for setting up parts of the node.

Structs§

AddOns
Additional node extensions.
AddOnsContext
Context passed to NodeAddOns::launch_add_ons,
AnyNodeTypes
A NodeTypes type builder.
AnyNodeTypesWithEngine
A NodeTypesWithEngine type builder.
BeaconConsensusEngineHandle
A clonable sender type that can be used to send engine API messages.
BuilderContext
Captures the necessary context for building the components of the node.
DebugNodeLauncher
Node launcher with support for launching various debugging utilities.
EngineNodeLauncher
The engine node launcher.
ExExLauncher
Can launch execution extensions.
ForkchoiceStateTracker
The struct that keeps track of the received forkchoice state and their status.
FullNodeTypesAdapter
An adapter type that adds the builtin provider type to the user configured node types.
LaunchContext
Reusable setup for launching a node.
NextBlockEnvAttributes
Represents additional attributes required to configure the next block. This is used to configure the next block’s environment ConfigureEvm::next_evm_env and contains fields that can’t be derived from the parent header alone (attributes that are determined by the CL.)
NodeAdapter
Container for the node’s types and the components and other internals that can be used by addons of the node.
NodeBuilder
Declaratively construct a node.
NodeBuilderWithComponents
A fully type configured node builder.
NodeBuilderWithTypes
A node builder that also has the configured types.
NodeConfig
This includes all necessary configuration to launch the node. The individual configuration options can be overwritten before launching the node.
NodeHandle
A Handle to the launched node.
NodeTypesAdapter
Container for the node’s types and the database the node uses.
NodeTypesWithDBAdapter
An adapter type combining NodeTypes and db into NodeTypesWithDB.
OnForkChoiceUpdated
Represents the outcome of forkchoice update.
PayloadEvents
Represents a receiver for various payload events.
TreeConfig
The configuration of the engine tree.
WithLaunchContext
A NodeBuilder with it’s launch context already configured.

Enums§

BeaconConsensusEngineEvent
Events emitted by the consensus engine.
BeaconEngineMessage
A message for the beacon engine from other components of the node (engine RPC API invoked by the consensus layer).
BeaconForkChoiceUpdateError
Represents error cases for an applied forkchoice update.
BeaconOnNewPayloadError
Represents all error cases when handling a new payload.
ConsensusEngineLiveSyncProgress
Progress of the consensus engine during live sync.
EngineApiMessageVersion
The version of Engine API message.
EngineObjectValidationError
Thrown when the payload or attributes are known to be invalid before processing.
Events
Payload builder events.
ForkchoiceStateHash
A helper type to check represent hashes of a [ForkchoiceState]
ForkchoiceStatus
A simplified representation of [PayloadStatusEnum] specifically for FCU.
InvalidPayloadAttributesError
Thrown when validating the correctness of a payloadattributes object.
MessageValidationKind
A type that represents whether or not we are validating a payload or payload attributes.
NewPayloadError
Error validating payload received over newPayload API.
PayloadBuilderError
Possible error variants during payload building.
PayloadKind
Determines how we should choose the payload to return.
PayloadOrAttributes
Either a type that implements the ExecutionPayload or a type that implements the PayloadAttributes trait.
VersionSpecificValidationError
Thrown when validating an execution payload OR payload attributes fails due to:

Constants§

DEFAULT_MEMORY_BLOCK_BUFFER_TARGET
How close to the canonical head we persist blocks.
DEFAULT_PERSISTENCE_THRESHOLD
Triggers persistence when the number of canonical blocks in memory exceeds this threshold.

Traits§

Block
Abstraction of block data type.
BlockBody
Abstraction for block’s body.
BuiltPayload
Represents a built payload type that contains a built SealedBlock and can be converted into engine API execution payloads.
ConfigureEvm
A complete configuration of EVM for Reth.
DebugNode
Node extension with support for debugging utilities, see DebugNodeLauncher for more context.
EngineTypes
This type defines the versioned types of the engine API.
EngineValidator
Type that validates the payloads processed by the engine.
ExecutionPayload
An execution payload.
FullBlock
Helper trait that unifies all behaviour required by block to support full node operations.
FullNodeComponents
Encapsulates all types and components of the node.
FullNodePrimitives
Helper trait that sets trait bounds on NodePrimitives.
FullNodeTypes
A helper trait that is downstream of the NodeTypesWithEngine trait and adds stateful components to the node.
FullProvider
Helper trait to unify all provider traits for simplicity.
FullReceipt
Helper trait that unifies all behaviour required by receipt to support full node operations.
FullSignedTx
Helper trait that unifies all behaviour required by block to support full node operations.
InvalidBlockHook
An invalid block hook.
LaunchNode
A general purpose trait that launches a new node of any kind.
NodeAddOns
Customizable node add-on types.
NodePrimitives
Configures all the primitive types of the node.
NodeTypes
The type that configures the essential types of an Ethereum-like node.
NodeTypesWithDB
A helper trait that is downstream of the NodeTypesWithEngine trait and adds database to the node.
NodeTypesWithEngine
The type that configures an Ethereum-like node with an engine for consensus.
PayloadAttributes
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.
PayloadAttributesBuilder
A builder that can return the current payload attribute.
PayloadBuilderAttributes
This can be implemented by types that describe a currently running payload job.
PayloadBuilderConfig
Re-export the core configuration traits. A trait that provides payload builder settings.
PayloadBuilderFor
Helper trait to bound [PayloadBuilder] to the node’s engine types.
PayloadTypes
The types that are used by the engine API.
PayloadValidator
Type that validates an ExecutionPayload.
RethNetworkConfig
Re-export the core configuration traits. A trait that represents the configured network and can be used to apply additional configuration to the network.
RethTransactionPoolConfig
Re-export the core configuration traits. A trait that provides all basic config values for the transaction pool and is implemented by the TxPoolArgs type.

Functions§

has_enough_parallelism
Determines if the host has enough parallelism to run the payload processor.
validate_execution_requests
Validates that execution requests are valid according to Engine API specification.
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 a payloadAttributes field or a full payload, with the engine_forkchoiceUpdated and engine_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 on NodeTypes.
BodyTy
Helper adapter type for accessing NodePrimitives::BlockBody on NodeTypes.
HeaderTy
Helper adapter type for accessing NodePrimitives::BlockHeader on NodeTypes.
KeyHasherTy
Helper type for getting the Primitives associated type from a NodeTypes.
PrimitivesTy
Helper type for getting the Primitives associated type from a NodeTypes.
ReceiptTy
Helper adapter type for accessing NodePrimitives::Receipt on NodeTypes.
RethFullAdapter
The adapter type for a reth node with the builtin provider type
TxTy
Helper adapter type for accessing NodePrimitives::SignedTx on NodeTypes.