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.

28
@slotted_freezable
29
@dataclass
class Withdrawal:

index

35
    index: U64

validator_index

36
    validator_index: U64

address

37
    address: Address

amount

38
    amount: U256

Header

Header portion of a block on the chain.

41
@slotted_freezable
42
@dataclass
class Header:

parent_hash

48
    parent_hash: Hash32

ommers_hash

49
    ommers_hash: Hash32

coinbase

50
    coinbase: Address

state_root

51
    state_root: Root

transactions_root

52
    transactions_root: Root

receipt_root

53
    receipt_root: Root

bloom

54
    bloom: Bloom

difficulty

55
    difficulty: Uint

number

56
    number: Uint

gas_limit

57
    gas_limit: Uint

gas_used

58
    gas_used: Uint

timestamp

59
    timestamp: U256

extra_data

60
    extra_data: Bytes

prev_randao

61
    prev_randao: Bytes32

nonce

62
    nonce: Bytes8

base_fee_per_gas

63
    base_fee_per_gas: Uint

withdrawals_root

64
    withdrawals_root: Root

Block

A complete block.

67
@slotted_freezable
68
@dataclass
class Block:

header

74
    header: Header

transactions

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

ommers

76
    ommers: Tuple[Header, ...]

withdrawals

77
    withdrawals: Tuple[Withdrawal, ...]

Log

Data record produced during the execution of a transaction.

80
@slotted_freezable
81
@dataclass
class Log:

address

87
    address: Address

topics

88
    topics: Tuple[Hash32, ...]

data

89
    data: bytes

Receipt

Result of a transaction.

92
@slotted_freezable
93
@dataclass
class Receipt:

succeeded

99
    succeeded: bool

cumulative_gas_used

100
    cumulative_gas_used: Uint

bloom

101
    bloom: Bloom

logs

102
    logs: Tuple[Log, ...]