ethereum.berlin.blocksethereum.london.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.

Header

Header portion of a block on the chain.

23
@slotted_freezable
24
@dataclass
class Header:

parent_hash

30
    parent_hash: Hash32

ommers_hash

31
    ommers_hash: Hash32

coinbase

32
    coinbase: Address

state_root

33
    state_root: Root

transactions_root

34
    transactions_root: Root

receipt_root

35
    receipt_root: Root

bloom

36
    bloom: Bloom

difficulty

37
    difficulty: Uint

number

38
    number: Uint

gas_limit

39
    gas_limit: Uint

gas_used

40
    gas_used: Uint

timestamp

41
    timestamp: U256

extra_data

42
    extra_data: Bytes

mix_digest

43
    mix_digest: Bytes32

nonce

44
    nonce: Bytes8

base_fee_per_gas

45
    base_fee_per_gas: Uint

Block

A complete block.

48
@slotted_freezable
49
@dataclass
class Block:

header

55
    header: Header

transactions

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

ommers

57
    ommers: Tuple[Header, ...]

Log

Data record produced during the execution of a transaction.

60
@slotted_freezable
61
@dataclass
class Log:

address

67
    address: Address

topics

68
    topics: Tuple[Hash32, ...]

data

69
    data: bytes

Receipt

Result of a transaction.

72
@slotted_freezable
73
@dataclass
class Receipt:

succeeded

79
    succeeded: bool

cumulative_gas_used

80
    cumulative_gas_used: Uint

bloom

81
    bloom: Bloom

logs

82
    logs: Tuple[Log, ...]