Module validation

Source
Available on crate feature consensus only.
Expand description

Collection of consensus validation methods. Collection of methods for block validation.

Functions§

validate_4844_header_standalone
Validates that the EIP-4844 header fields exist and conform to the spec. This ensures that:
validate_against_parent_4844
Validates that the EIP-4844 header fields are correct with respect to the parent block. This ensures that the blob_gas_used and excess_blob_gas fields exist in the child header, and that the excess_blob_gas field matches the expected excess_blob_gas calculated from the parent header fields.
validate_against_parent_eip1559_base_fee
Validates the base fee against the parent and EIP-1559 rules.
validate_against_parent_hash_number
Validates against the parent hash and number.
validate_against_parent_timestamp
Validates the timestamp against the parent to make sure it is in the past.
validate_block_pre_execution
Validate a block without regard for state:
validate_body_against_header
Ensures the block response data matches the header.
validate_cancun_gas
Validate that blob gas is present in the block if Cancun is active.
validate_header_base_fee
Ensure the EIP-1559 base fee is set if the London hardfork is active.
validate_header_extra_data
Validates the header’s extra data according to the beacon consensus rules.
validate_header_gas
Gas used needs to be less than gas limit. Gas used is going to be checked after execution.
validate_shanghai_withdrawals
Validate that withdrawals are present in Shanghai