ethereum.shanghai.blocksethereum.cancun.blocks

A Block is a single link in the chain that is Ethereum. Each Block contains a Header and zero or more transactions. Each Header contains associated metadata like the block number, parent block hash, and how much gas was consumed by its transactions.

Together, these blocks form a cryptographically secure journal recording the history of all state transitions that have happened since the genesis of the chain.

Withdrawal

Withdrawals that have been validated on the consensus layer.

23
@slotted_freezable
24
@dataclass
class Withdrawal:

index

30
    index: U64

validator_index

31
    validator_index: U64

address

32
    address: Address

amount

33
    amount: U256

Header

Header portion of a block on the chain.

36
@slotted_freezable
37
@dataclass
class Header:

parent_hash

43
    parent_hash: Hash32

ommers_hash

44
    ommers_hash: Hash32

coinbase

45
    coinbase: Address

state_root

46
    state_root: Root

transactions_root

47
    transactions_root: Root

receipt_root

48
    receipt_root: Root

bloom

49
    bloom: Bloom

difficulty

50
    difficulty: Uint

number

51
    number: Uint

gas_limit

52
    gas_limit: Uint

gas_used

53
    gas_used: Uint

timestamp

54
    timestamp: U256

extra_data

55
    extra_data: Bytes

prev_randao

56
    prev_randao: Bytes32

nonce

57
    nonce: Bytes8

base_fee_per_gas

58
    base_fee_per_gas: Uint

withdrawals_root

59
    withdrawals_root: Root

blob_gas_used

60
    blob_gas_used: U64

excess_blob_gas

61
    excess_blob_gas: U64

parent_beacon_block_root

62
    parent_beacon_block_root: Root

Block

A complete block.

65
@slotted_freezable
66
@dataclass
class Block:

header

72
    header: Header

transactions

73
    transactions: Tuple[Union[Bytes, LegacyTransaction], ...]

ommers

74
    ommers: Tuple[Header, ...]

withdrawals

75
    withdrawals: Tuple[Withdrawal, ...]

Log

Data record produced during the execution of a transaction.

78
@slotted_freezable
79
@dataclass
class Log:

address

85
    address: Address

topics

86
    topics: Tuple[Hash32, ...]

data

87
    data: bytes

Receipt

Result of a transaction.

90
@slotted_freezable
91
@dataclass
class Receipt:

succeeded

97
    succeeded: bool

cumulative_gas_used

98
    cumulative_gas_used: Uint

bloom

99
    bloom: Bloom

logs

100
    logs: Tuple[Log, ...]