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
andexcess_blob_gas
fields exist in the child header, and that theexcess_blob_gas
field matches the expectedexcess_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