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: update the required EL headers and the gas fee mechanism #8994

Closed

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Oct 23, 2024

an alternate and more simplified proposal to #8979

based on the discussion with @bkellerman here:

@github-actions github-actions bot added c-update Modifies an existing proposal s-review This EIP is in Review t-core labels Oct 23, 2024
@eth-bot
Copy link
Collaborator

eth-bot commented Oct 23, 2024

File EIPS/eip-7742.md

Requires 1 more reviewers from @ralexstokes

@bkellerman
Copy link
Contributor

bkellerman commented Oct 25, 2024

LGTM!

EIPS/eip-7742.md Outdated Show resolved Hide resolved
EIPS/eip-7742.md Outdated Show resolved Hide resolved
EIPS/eip-7742.md Outdated Show resolved Hide resolved
EIPS/eip-7742.md Outdated Show resolved Hide resolved
EIPS/eip-7742.md Outdated Show resolved Hide resolved
EIPS/eip-7742.md Outdated Show resolved Hide resolved
EIPS/eip-7742.md Outdated Show resolved Hide resolved
@nerolation
Copy link
Contributor

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.
What we could to is introduce a scaling factor $s$ ($s = T/(M-T)$) and scale the excess gas with it.

Check this for details:
https://hackmd.io/@Nerolation/HJSGsd1Wkl

@g11tech g11tech marked this pull request as ready for review October 30, 2024 17:03
@g11tech g11tech requested a review from eth-bot as a code owner October 30, 2024 17:03
EIPS/eip-7742.md Outdated Show resolved Hide resolved
EIPS/eip-7742.md Outdated Show resolved Hide resolved
EIPS/eip-7742.md Outdated Show resolved Hide resolved
EIPS/eip-7742.md Outdated Show resolved Hide resolved
EIPS/eip-7742.md Outdated Show resolved Hide resolved
EIPS/eip-7742.md Outdated Show resolved Hide resolved
EIPS/eip-7742.md Show resolved Hide resolved
EIPS/eip-7742.md Outdated Show resolved Hide resolved
@klkvr klkvr mentioned this pull request Oct 31, 2024
3 tasks
EIPS/eip-7742.md Outdated Show resolved Hide resolved
…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 <[email protected]>

apply feedback

rename to blobs per block
@g11tech g11tech force-pushed the eip7742-blobbasefee-alternative2 branch from 80cd4a1 to 5b82513 Compare November 3, 2024 04:09
@g11tech
Copy link
Contributor Author

g11tech commented Nov 3, 2024

fyi: target_blob_count has been renamed to target_blobs_per_block to resolve conflict with the master EIP change (a9c9d36)

```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:
Copy link
Contributor

@bkellerman bkellerman Nov 4, 2024

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

Copy link
Contributor Author

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

Comment on lines +59 to +63
#### 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.
Copy link
Contributor

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.

@g11tech
Copy link
Contributor Author

g11tech commented Nov 25, 2024

closing in favor of #9047

@g11tech g11tech closed this Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-review Waiting on author to review c-update Modifies an existing proposal s-review This EIP is in Review t-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants