Skip to content

Commit

Permalink
apply feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Nov 3, 2024
1 parent 97c0ea0 commit 80cd4a1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions EIPS/eip-7742.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,29 @@ Furthermore `get_base_fee_per_blob_gas` as specified by [EIP-4844](./eip-4844.md


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

def get_base_fee_per_blob_gas(header: Header) -> int:
update_fraction = BLOB_BASE_FEE_UPDATE_FRACTION_PER_TARGET_BLOB * header.target_blob_count

return fake_exponential(
MIN_BASE_FEE_PER_BLOB_GAS,
header.excess_blob_gas,
update_fraction
)
```

Rest the specification of EIP-4844 is not changed
Rest of the [EIP-4844](./eip-4844.md) specification is not changed

### Block construction

To kickstart block construction, CL will now provide EL a target and a maximum blob count. 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 done as specified above.

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 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 purposes of this EIP, the target blob count at genesis is set equivalent to [EIP-4844](./eip-4844.md)'s `TARGET_BLOB_GAS_PER_BLOCK`.

## Rationale

Expand Down

0 comments on commit 80cd4a1

Please sign in to comment.