-
Notifications
You must be signed in to change notification settings - Fork 70
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
Implement Pectra Eip-7623 #2634
base: master
Are you sure you want to change the base?
Conversation
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.
The pectra-devnet-5 tests has a bug where they apply the final floor cost adjustment before applying gas refunds while it should be done before.
if (rev >= EVMC_PRAGUE) { | ||
// EIP-7623: Increase calldata cost | ||
const intx::uint128 floor_cost = fee::kGTransaction + (zero_bytes + non_zero_bytes * 4) * fee::kTotalCostFloorPerToken; | ||
gas = std::max(gas, floor_cost); |
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.
This is not exactly correct. The floor cost is not a part of intrinsic cost. However, the transaction gas limit must be big enough to cover the floor cost just in case.
After the transaction execution you need another modification: if the gas used by the transaction is lower than the floor cost, bump it to the floor cost.
See: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7623.md
This has become a part of the devnet-5.