Expand description
Stateless block validation utilities.
This module provides pure validation functions that can be used without storage dependencies, making them suitable for use in zkVM guest programs.
Functions§
- get_
total_ blob_ gas - Calculates the blob gas required by a transaction.
- validate_
block_ access_ list_ hash - Validates that the block access list hash matches the block header (Amsterdam+). Also validates that all BlockAccessIndex values are within valid bounds per EIP-7928, and that the BAL size does not exceed the gas-derived limit.
- validate_
block_ access_ list_ size - Validates that the block access list does not exceed the maximum allowed size (Amsterdam+). Per EIP-7928: bal_items <= block_gas_limit // GAS_BLOCK_ACCESS_LIST_ITEM
- validate_
block_ pre_ execution - Performs pre-execution validation of the block’s header values in reference to the parent_header. Verifies that blob gas fields in the header are correct in reference to the block’s body. If a block passes this check, execution will still fail with execute_block when a transaction runs out of gas.
- validate_
gas_ used - Validates that the block gas used matches the block header. For Amsterdam+ (EIP-7778), block_gas_used is PRE-REFUND and differs from receipt cumulative_gas_used which is POST-REFUND.
- validate_
header_ bal_ indices - Validates that all indices in the header BAL are within valid bounds (Amsterdam+). This is a subset of the full hash check — used in the parallel execution path where we have the header BAL but do not build a new BAL during execution. Per EIP-7928: valid indices are 0 (pre-exec) through len(transactions)+1 (post-exec).
- validate_
receipts_ root_ and_ logs_ bloom - Validates both the receipts root and the header
logs_bloomagainst the executed receipts in a single pass. - validate_
requests_ hash - Validates that the requests hash matches the block header (Prague+).