EIPs Explained

EIP-7807 · Draft · Core · 2024-10-28

EIP-7807: SSZ execution blocks

Proposes re-encoding execution blocks in SSZ instead of RLP, so the block hash becomes an SSZ hash_tree_root shared with the consensus layer and individual block fields become provable.

What problem does it solve?

Ethereum has two serialization worlds. The consensus layer uses SSZ (Simple Serialize) with Merkle hash_tree_root commitments. The execution layer encodes the block header in RLP, hashes it with keccak256, and commits to transactions, receipts and withdrawals with Merkle-Patricia tries. Every interaction between the two layers has to translate between them.

EIP-7807 moves the execution block to SSZ. The spec lists four benefits:

  1. The consensus layer can compute and check the execution block hash on its own, without asking the execution client.
  2. The Engine API could switch from JSON to binary SSZ, which the spec estimates roughly halves message size.
  3. Individual block fields become provable with small Merkle proofs, and proofs stay valid as the block evolves.
  4. PoW-era leftovers and the logs bloom can be dropped.

How it works

  • A new SSZ ExecutionPayload replaces the RLP header plus body. It is a ProgressiveContainer (EIP-7495) with fields such as parent_hash, miner, state_root, transactions, receipts_root, number, gas_limits, gas_used, timestamp, base_fees_per_gas, withdrawals, excess_gas, requests_hash, block_access_list and slot_number.
  • Regular and blob gas are paired into one GasAmounts structure (and fees into BlobFeesPerGas) instead of separate header fields.
  • Lists use ProgressiveList (EIP-7916), so they have no hard-coded size limit and their Merkle positions stay stable.
  • Not changed: each transaction and receipt keeps its EIP-2718 typed-envelope bytes; withdrawals and the block access list keep RLP; the state trie is untouched.
  • The block hash becomes ExecutionPayload.hash_tree_root() everywhere: BLOCKHASH, JSON-RPC blockHash, devp2p and consensus-layer references.
  • A header is just an SSZ summary of the payload with the large lists replaced by their roots.
  • JSON-RPC blocks report logsBloom as all 0xff bytes, forcing consumers to check receipts instead of trusting a bloom that no longer exists.

Sample code

The core container from the spec, in the consensus-specs Python style:

class GasAmounts(ProgressiveContainer(active_fields=[1] * 2)):
    regular: GasAmount   # uint64
    blob: GasAmount

class ExecutionPayload(ProgressiveContainer(active_fields=[1] * 18)):
    parent_hash: Root
    miner: ExecutionAddress
    state_root: Bytes32
    transactions: ProgressiveList[ProgressiveByteList]
    receipts_root: Root
    number: uint64
    gas_limits: GasAmounts
    gas_used: GasAmounts
    timestamp: uint64
    # ... extra_data, mix_hash, base_fees_per_gas, withdrawals, excess_gas,
    #     parent_beacon_block_root, requests_hash, block_access_list, slot_number

block_hash = payload.hash_tree_root()   # replaces keccak256(rlp(header))

Things to know

  • Status is Draft. It is not in the scheduled list for Glamsterdam (EIP-7773).
  • Contracts that parse RLP block headers (for example to verify a header against BLOCKHASH) would break and need SSZ proof logic instead.
  • The new hash uses SHA-256 rather than keccak256. The spec considers collision risk with old keccak-based hashes negligible.
  • The receipt-level logsBloom is unaffected; only the block-level bloom is retired.
  • It builds on the Gloas payload envelope introduced with ePBS (EIP-7732).

#ssz #block #serialization #core #consensus

Details

Authors
Etan Kissling (@etan-status), Gajinder Singh (@g11tech)
Status
Draft
Type
Standards Track / Core
Created
2024-10-28
Requires
Required by

Machine-readable: Markdown · JSON