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
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_ 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