-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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: update the required EL headers and the gas fee mechanism #8994
base: master
Are you sure you want to change the base?
Conversation
File
|
LGTM! |
If I understand it correctly, the proposed mechanism doesn't ensure that the max positive and negative deviation from the target lead to the (more or less) same percentage increase in base fee. Instead, the mechanism scales faster down than up. Check this for details: |
…nism cleanup cleanup cleanup cleanup cleanup fixes cleanup fee fn cleanup fee fn cleanup fee fn cleanup some more cleanup some more cleanup some more cleanup track max apply feedback for excess blob gas on parent gas usage params as in 4844 resolve typo better variable naming cleanup text bring get base fee to eip 4844 definition level as well w.r.t. header arg apply feedback clarification simplify the entire proposal cleanup cleanup apply feedback language cleanup restore previous langauge further cleanup Update EIPS/eip-7742.md Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com> apply feedback rename to blobs per block
80cd4a1
to
5b82513
Compare
fyi: |
```python | ||
def calc_excess_blob_gas(parent: Header) -> int: | ||
parent_target_blob_gas = parent.target_blobs_per_block * GAS_PER_BLOB | ||
if parent.excess_blob_gas + parent.blob_gas_used < parent_target_blob_gas: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 4 lines can be replaced with
return max(parent.excess_blob_gas + parent.blob_gas_used - parent_target_blob_gas, 0)
IMO, this also more intuitively captures the essence of excess_gas, a non-negative accumulation of error, where error=parent.blob_gas_used - parent_target_blob_gas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess we can leave it as it is inline with 4844 style
#### Updated Fee calculations | ||
|
||
With the changing target, we also need to scale the `BLOB_BASE_FEE_UPDATE_FRACTION` from [EIP-4844](./eip-4844.md) accordingly to bound the price jumps by +-12.5%. But this introduces some irregularity on the fork block because excess blob gas is effectively scaled down by this changed factor in the fee calculations. | ||
|
||
However we consider the target change events to be few and far between and hence not a cause of concern. The likely effect of this factor update will be to bring down the base fee on the fork block and hence would not negatively impact the transactions in txpool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't touch the base fee update fraction in 7742 as the EIP is about something very different (even though it can be combined). Instead, there should be a separate change (going into the eip that changes the target) that we ship on as soon as we agree on changing the blob target. This way it's much cleaner.
an alternate and more simplified proposal to #8979
based on the discussion with @bkellerman here: