Module validation

Module validation 

Source
Available on crate feature consensus only.
Expand description

Consensus rule checks.

Modules§

canyon
Canyon consensus rule checks.
isthmus
Block verification w.r.t. consensus rules new in Isthmus hardfork.

Constants§

MAX_RLP_BLOCK_SIZE
The maximum RLP length of a block, defined in EIP-7934.

Functions§

decode_holocene_base_fee
Extracts the Holocene 1599 parameters from the encoded extra data from the parent header.
post_merge_hardfork_fields
Validates the ommers hash and other fork-specific fields.
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_post_execution
Validate a block with regard to execution results:
validate_block_pre_execution
Validate a block without regard for state:
validate_body_against_header
Ensures the block response data matches the header.
validate_body_against_header_op
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