Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions EIPS/eip-7742.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,44 @@ additional 64-bit field: the `target_blobs_per_block`. This value is set to the
is modified along with this EIP to provide the `target_blobs_per_block` with each payload and implementations can use this
value to correctly set the block header field.

#### Header RLP encoding

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,
blob_gas_used,
excess_blob_gas,
parent_beacon_block_root,
target_blobs_per_block, # new 64-bit unsigned
])
```

The `target_blobs_per_block` is a 64-bit unsigned integer encoded in RLP using the minimal big-endian representation (consistent with other 64-bit header fields).

Validity of the `target_blobs_per_block` is guaranteed from the consensus layer, much like how withdrawals are handled.

When verifying a block, execution clients **MUST** ensure the target blob count in the block header matches the one
provided by the consensus client.

For a genesis block with no existing parent, the value should be set according to the agreed specification for the
target blob count given by that genesis block's protocol rule set.
For the first post-fork block, `parent.blob_gas_used` and `parent.excess_blob_gas` are evaluated as `0` as in EIP-4844, and the parent’s `target_blobs_per_block` is provided by the consensus layer and committed in the parent header per the RLP encoding above.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to need author confirmation
also the EIP is stagnant, unless you wanna revive it there is no point making material changes to the technical content


### Block processing

Expand All @@ -101,6 +132,8 @@ The Engine API is extended to provide both the `target_blobs_per_block` and the

These values should be used to ensure the correct number of blobs are included in any constructed payload, and to ensure that the blob base fee accounting is correctly computed.

Additionally, `ExecutionPayload`/`ExecutionPayloadHeader` are extended to include `target_blobs_per_block`. Consensus clients **MUST** provide this value to execution clients via Engine API, and execution clients **MUST** set and serialize it at the end of the header per the RLP encoding above.

## Rationale

### Why not have the CL also compute the blob base fee and remove any notion of blob counts from EL processing?
Expand Down