-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Remove x/y scaling in EIP1559 calculation #13556
Comments
If we want to ensure:
We end up with both x and y scaling factors, inevitably :) |
I think the y scaling can be avoided (I haven't done the math, so take with a grain of salt). To target
|
I suggest that we keep it as-is to reduce risk. Removing y-scale still ends up with the same number of storage slots that we have to write (1 for now), the only small downside is that we have an extra DIV opcode to be optimized away, it's too small of a gain I think. |
Compared to the prover fee calculation (which largely does the same thing) it's quite a bit more complex I feel which makes it trickier to understand I think. Code that could be removed for example: taiko-mono/packages/protocol/contracts/L2/TaikoL2.sol Lines 108 to 118 in ad75cd5
taiko-mono/packages/protocol/contracts/libs/Lib1559Math.sol Lines 20 to 43 in ad75cd5
I don't think there's a significant performance gain to be made, just keeping things as simple as possible. |
Describe the feature request
From Brecht:
The text was updated successfully, but these errors were encountered: