Headers

BlockHeader

class eth.rlp.headers.BlockHeader(**kwargs: int | None | BlockNumber | bytes | Address | Hash32)
class eth.rlp.headers.BlockHeader(difficulty: int, block_number: BlockNumber, gas_limit: int, timestamp: int = None, coinbase: Address = ZERO_ADDRESS, parent_hash: Hash32 = ZERO_HASH32, uncles_hash: Hash32 = EMPTY_UNCLE_HASH, state_root: Hash32 = BLANK_ROOT_HASH, transaction_root: Hash32 = BLANK_ROOT_HASH, receipt_root: Hash32 = BLANK_ROOT_HASH, bloom: int = 0, gas_used: int = 0, extra_data: bytes = b'', mix_hash: Hash32 = ZERO_HASH32, nonce: bytes = GENESIS_NONCE)
property base_fee_per_gas: int

Return the base fee per gas of the block.

Set to None in pre-EIP-1559 (London) header.

property blob_gas_used: int

Return blob gas used.

property block_number
property bloom
property coinbase
property difficulty
property excess_blob_gas: int

Return excess blob gas.

property extra_data
property gas_limit
property gas_used
property hash: Hash32

Return the hash of the block header.

property hex_hash: str

Return the hash as a hex string.

property is_genesis: bool

Return True if this header represents the genesis block of the chain, otherwise False.

property mining_hash: Hash32

Return the mining hash of the block header.

property mix_hash
property nonce
property parent_beacon_block_root: Hash32 | None

Return the hash of the parent beacon block.

property parent_hash
property receipt_root
property state_root
property timestamp
property transaction_root
property uncles_hash
property withdrawals_root: Hash32 | None

Return the withdrawals root of the block.

Set to None in pre-Shanghai header.