ethereum.shanghai.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

Block

A complete block.

62
@slotted_freezable
63
@dataclass
class Block:

header

69
    header: Header

transactions

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

ommers

71
    ommers: Tuple[Header, ...]

withdrawals

72
    withdrawals: Tuple[Withdrawal, ...]

Log

Data record produced during the execution of a transaction.

75
@slotted_freezable
76
@dataclass
class Log:

address

82
    address: Address

topics

83
    topics: Tuple[Hash32, ...]

data

84
    data: bytes

Receipt

Result of a transaction.

87
@slotted_freezable
88
@dataclass
class Receipt:

succeeded

94
    succeeded: bool

cumulative_gas_used

95
    cumulative_gas_used: Uint

bloom

96
    bloom: Bloom

logs

97
    logs: Tuple[Log, ...]