Expand description
Standalone crate for Reth configuration and builder types.
§features
js-tracer
: Enable theJavaScript
tracer for thedebug_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.
- AddOns
Context - Context passed to
NodeAddOns::launch_add_ons
, - AnyNode
Types - A
NodeTypes
type builder. - AnyNode
Types With Engine - A
NodeTypesWithEngine
type builder. - Beacon
Consensus Engine Handle - A clonable sender type that can be used to send engine API messages.
- Builder
Context - Captures the necessary context for building the components of the node.
- Debug
Node Launcher - Node launcher with support for launching various debugging utilities.
- Engine
Node Launcher - The engine node launcher.
- ExEx
Launcher - Can launch execution extensions.
- Forkchoice
State Tracker - The struct that keeps track of the received forkchoice state and their status.
- Full
Node Types Adapter - An adapter type that adds the builtin provider type to the user configured node types.
- Launch
Context - Reusable setup for launching a node.
- Next
Block EnvAttributes - 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.) - Node
Adapter - Container for the node’s types and the components and other internals that can be used by addons of the node.
- Node
Builder - Declaratively construct a node.
- Node
Builder With Components - A fully type configured node builder.
- Node
Builder With Types - A node builder that also has the configured types.
- Node
Config - This includes all necessary configuration to launch the node. The individual configuration options can be overwritten before launching the node.
- Node
Handle - A Handle to the launched node.
- Node
Types Adapter - Container for the node’s types and the database the node uses.
- 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.
- Tree
Config - The configuration of the engine tree.
- With
Launch Context - A
NodeBuilder
with it’s launch context already configured.
Enums§
- Beacon
Consensus Engine Event - Events emitted by the consensus engine.
- Beacon
Engine Message - A message for the beacon engine from other components of the node (engine RPC API invoked by the consensus layer).
- Beacon
Fork Choice Update Error - Represents error cases for an applied forkchoice update.
- Beacon
OnNew Payload Error - Represents all error cases when handling a new payload.
- Consensus
Engine Live Sync Progress - Progress of the consensus engine during live sync.
- 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.
- NewPayload
Error - Error validating payload received over
newPayload
API. - Payload
Builder Error - Possible error variants during payload building.
- Payload
Kind - Determines how we should choose the payload to return.
- Payload
OrAttributes - Either a type that implements the
ExecutionPayload
or a type that implements thePayloadAttributes
trait. - Version
Specific Validation Error - 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.
- 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 - A complete configuration of EVM for Reth.
- Debug
Node Node
extension with support for debugging utilities, seeDebugNodeLauncher
for more context.- Engine
Types - This type defines the versioned types of the engine API.
- Engine
Validator - Type that validates the payloads processed by the engine.
- Execution
Payload - An execution payload.
- Full
Block - Helper trait that unifies all behaviour required by block to support full node operations.
- Full
Node Components - Encapsulates all types and components of the node.
- Full
Node Primitives - Helper trait that sets trait bounds on
NodePrimitives
. - Full
Node Types - A helper trait that is downstream of the
NodeTypesWithEngine
trait and adds stateful components to the node. - 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.
- Launch
Node - A general purpose trait that launches a new node of any kind.
- Node
AddOns - Customizable node add-on types.
- 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 Attributes - This can be implemented by types that describe a currently running payload job.
- Payload
Builder Config - Re-export the core configuration traits. A trait that provides payload builder settings.
- Payload
Builder For - Helper trait to bound [
PayloadBuilder
] to the node’s engine types. - Payload
Types - The types that are used by the engine API.
- Payload
Validator - Type that validates an
ExecutionPayload
. - Reth
Network Config - Re-export the core configuration traits. A trait that represents the configured network and can be used to apply additional configuration to the network.
- Reth
Transaction Pool Config - 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 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
. - KeyHasher
Ty - Helper type for getting the
Primitives
associated type from aNodeTypes
. - Primitives
Ty - Helper type for getting the
Primitives
associated type from aNodeTypes
. - Receipt
Ty - Helper adapter type for accessing
NodePrimitives::Receipt
onNodeTypes
. - Reth
Full Adapter - The adapter type for a reth node with the builtin provider type
- TxTy
- Helper adapter type for accessing
NodePrimitives::SignedTx
onNodeTypes
.