Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update EIP-7742: use parent target blob count for excess blob gas calculation #9122

Merged
Merged
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
12 changes: 11 additions & 1 deletion EIPS/eip-7742.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,17 @@ target blob count given by that genesis block's protocol rule set.
Upon activating this EIP (i.e. before processing any transactions),
the verification of the blob maximum as given in EIP-4844 can be skipped. Concretely, this means any logic relating
to `MAX_BLOB_GAS_PER_BLOCK` as given in EIP-4844 can be deprecated.
Additionally, any reference to `TARGET_BLOB_GAS_PER_BLOCK` from EIP-4844 can be derived by taking the `target_blobs_per_block` from the CL and multiplying by `GAS_PER_BLOB` as given in EIP-4844.

Additionally, `calc_excess_blob_gas` is updated as follows:

```python
def calc_excess_blob_gas(parent: Header) -> int:
target_blob_gas = parent.target_blobs_per_block * GAS_PER_BLOB
if parent.excess_blob_gas + parent.blob_gas_used < target_blob_gas:
return 0
else:
return parent.excess_blob_gas + parent.blob_gas_used - target_blob_gas
```

Otherwise, the specification of EIP-4844 is not changed. For example, blob base fee accounting and excess blob gas tracking occur in the exact same way.

Expand Down
Loading