-
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 mecha… #8979
Conversation
File
|
@g11tech @ralexstokes The A different issue is the problem of price jumps when setting a non-symmetrical target, like you alluded to. Let Under these parameters w/ existing One solution to make things cleaner is to use relative error instead of raw error.Then, we can select a single Since relative error is bounded at -1, but unbounded above, the zero blob space response works exactly as before. Full Blob Space will have a different response than before, but proportionate to the relative error and still appropriate imo. For any target >= max/2, full blob space will result in lt the EIP-4844 |
@bkellerman can you open permissions to you hackmd post please? |
correct, thats why we need block by block updates and simple excessGas accumulation will not work because CL can possibly alter target block by block
so we accumulate not excess gas but "normalized excess gas": ((blobGasUsed-targetBlobGas)/targetBlobGas) * C (some factor) , to have a uint field and then we exponentiate it as e^(excessGas/C*normalizedUpdateFraction) this way we accumulate a normalized excess gas doesn't matter if target even changes block to block, which we must assume it can |
@siladu it's open now |
Here's a candidate
This multiplier function meets the needs of Edit: Since full blob space can theoretically create relative error > 1(if target < max/2), we bound the raw relative error to 1 or bound the multiplier afterwards. |
we don't need to add 1 and then divide multiplier by 1.125 since normalizedExcessGas would be accumulator >0 since we don't wanna drop below min, i.e. multiplier >=1 at all times i.e. normalizedExcessGas>=0 (as is the current mechanism) since normalizedExcessGas_N = max(normalizedExcessGas_N-1 + (used-T)/T * Factor, 0) right? |
I thought we preferred to get rid of the excess accumulator and "return to the normal pricing mechanism like basefee"? The implementation I posted above operates on a single block's error and applies the resulting multiplier to previous base fee. It doesn't use an excess accumulator. My personal intuition is to remove the excess and have the explicit base fee, which is much better for dev UX and resilient across parameter changes. Edit: But we can make a version that accumulates the normalized error if needed. Edit: I added the |
For an
Then accumulate raw norm error. Raw norm error having the range So
where If we want
wdyt? |
yes this is what i finally suggested: |
i have pushed an alternate PR @bkellerman : #8994 as per our last discussion |
closing in favor of #8994 |
from: ethereum/execution-apis#574 (comment)
we might need to add baseFeePerBlobGas in beacon's execution header and hence the api field, because the blob gas price can't just be now : minFee* e^(ecessBlobGasg/blobGasPriceUpdateFraction) since blobGasPriceUpdateFraction (for limiting change 1+-1.125 factor) could change block to block.
so we should return to the normal pricing mechanism like basefee, so blobBaseFee = parent.blobBaseFee * e^((blobGasUsed - targetBlobGas)/blockAdjustedTargetFraction))
where blockAdjustedTargetFraction makes sure fee doesn't "change" by 1.125 either direction and is calculated block to block.
so in EL block header, we now remove excessBlobGas and add three fields: baseFeePerBlobGas, targetBlobGas and maxBlobGas (since we don't want this to be a hardfork based setting anymore as well, and don't want to keep a static fraction between target and max for better control over the blob throughput and bandwidth params), and beacon execution header we just add baseFeePerBlobGas
if it makes sense i could update the EIP 7742 with the gas calc changes and introducing the new fields
(I am ok to replace target gas/max gas with target count/max count in the EL header and gas calcs, whatever seem more convenient)