Skip to content

Commit

Permalink
Update EIP-4788: explicitly specify header schema for 4788
Browse files Browse the repository at this point in the history
Merged by EIP-Bot.
  • Loading branch information
ralexstokes committed Jul 7, 2023
1 parent b075e98 commit 4350732
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions EIPS/eip-4788.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,33 @@ To bound the amount of storage this construction consumes, a ring buffer is used
Beginning at the execution timestamp `FORK_TIMESTAMP`, execution clients **MUST** extend the header schema with an additional field: the `parent_beacon_block_root`.
This root consumes 32 bytes and is exactly the [hash tree root](https://github.com/ethereum/consensus-specs/blob/fa09d896484bbe240334fa21ffaa454bafe5842e/ssz/simple-serialize.md#merkleization) of the parent beacon block for the given execution block.

The resulting RLP encoding of the header is therefore:

```python
rlp([
parent_hash,
0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347, # ommers hash
coinbase,
state_root,
txs_root,
receipts_root,
logs_bloom,
0, # difficulty
number,
gas_limit,
gas_used,
timestamp,
extradata,
prev_randao,
0x0000000000000000, # nonce
base_fee_per_gas,
withdrawals_root,
data_gas_used,
excess_data_gas,
parent_beacon_block_root,
])
```

Validity of the parent beacon block root is guaranteed from the consensus layer, much like how withdrawals are handled.

When verifying a block, execution clients **MUST** ensure the root value in the block header matches the one provided by the consensus client.
Expand Down

0 comments on commit 4350732

Please sign in to comment.