Module api

Source
Expand description

Re-exported from reth_node_api.

Modules§

engine
Traits, validation methods, and helper types used to abstract over engine types.
node
Traits for configuring a node.
payload
Abstractions for working with execution payloads.
payload_builder
This crate defines abstractions to create and update payloads (blocks)

Structs§

AddOnsContext
Context passed to NodeAddOns::launch_add_ons,
AnyNodeTypes
A NodeTypes type builder.
AnyNodeTypesWithEngine
A NodeTypes type builder.
BeaconConsensusEngineHandle
A cloneable sender type that can be used to send engine API messages.
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.
NextBlockEnvAttributes
Represents additional attributes required to configure the next block.
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.

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
A unified type for handling both execution payloads and payload attributes.
VersionSpecificValidationError
Thrown when validating an execution payload OR payload attributes fails due to:

Constants§

DEFAULT_MAX_PROOF_TASK_CONCURRENCY
Default maximum concurrency for proof tasks
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.
DEFAULT_RESERVED_CPU_CORES
Default number of reserved CPU cores for non-reth processes.

Traits§

Block
Abstraction of block data type.
BlockBody
Abstraction for block’s body.
BuiltPayload
Represents a successfully built execution payload (block).
ConfigureEvm
A complete configuration of EVM for Reth.
EngineTypes
This type defines the versioned types of the engine API based on the ethereum engine API.
EngineValidator
Type that validates the payloads processed by the engine.
ExecutionPayload
Represents the core data structure of 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 NodeTypes 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.
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 NodeTypes trait and adds database to the node.
PayloadAttributes
Basic attributes required to initiate payload construction.
PayloadAttributesBuilder
Factory trait for creating payload attributes.
PayloadBuilderAttributes
Attributes used to guide the construction of a new execution payload.
PayloadBuilderFor
Helper trait to bound [PayloadBuilder] to the node’s engine types.
PayloadTypes
Core trait that defines the associated types for working with execution payloads.
PayloadValidator
Type that validates an ExecutionPayload.

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.
PayloadAttrTy
Helper adapter type for accessing PayloadTypes::PayloadAttributes on NodeTypes.
PrimitivesTy
Helper type for getting the Primitives associated type from a NodeTypes.
ReceiptTy
Helper adapter type for accessing NodePrimitives::Receipt on NodeTypes.
TxTy
Helper adapter type for accessing NodePrimitives::SignedTx on NodeTypes.