Expand description
Types and traits for validating blocks and payloads.
§Validation pipeline
When the engine processes a new payload (engine_newPayload), validation happens in phases:
§Phase 1 – Payload conversion
PayloadValidator::convert_payload_to_block decodes the execution payload (RLP, hashing)
into a SealedBlock. This runs on a background thread concurrently with state setup.
§Phase 2 – Pre-execution consensus
HeaderValidator::validate_header— standalone header checks (hash, gas, base fee, fork-specific fields)Consensus::validate_block_pre_execution— body vs header (tx root, ommer hash, withdrawals root)HeaderValidator::validate_header_against_parent— sequential checks (block number, timestamp, gas limit, base fee vs parent)
§Phase 3 – Execution
Block transactions are executed via the EVM. Receipt roots are computed incrementally.
§Phase 4 – Post-execution consensus
FullConsensus::validate_block_post_execution— gas used, receipt root, logs bloom, requests hashPayloadValidator::validate_block_post_execution_with_hashed_state— network-specific (no-op on L1, used by OP Stack)
§Payload attributes validation (engine_forkchoiceUpdated)
When the CL provides payload attributes to start building a block:
PayloadValidator::validate_payload_attributes_against_header— ensures timestamp ordering
If validation passes, a payload build job is started. If it fails,
INVALID_PAYLOAD_ATTRIBUTES is returned without rolling back the forkchoice update.
Structs§
- Basic
Engine Validator - A helper type that provides reusable payload validation logic for network-specific validators.
- TreeCtx
- Context providing access to tree state during validation.
Enums§
- Block
OrPayload - Enum representing either block or payload being validated.
Traits§
- Engine
Validator - Type that validates the payloads processed by the engine.
Type Aliases§
- Validation
Outcome - Output of block or payload validation.