You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this correction should be applied *after* the gas refund is applied. Argumentation and spec clarification here: https://github.com/ethereum/EIPs/pull/9227.
Hi there, I'm late to the party, but I spent the last night debugging 7623. I think EELS implemented it incorrectly and EEST followed with incorrect tests.
I believe the evm_gas_used from the spec should include the gas refund (i.e. evm_gas_used should have the refund subtracted from). Otherwise the total tx gas used don't adds up. So the "floor" gas correction should be applied after gas refunds. However, EELS implements it before and EEST has dedicated tests for this behavior. I plan to send an update to the EIP to clarify this.
But for you to quickly verify this claim is to move the "floor" gas application before the gas refund. You should pass much more tests this way.
I'm not super sure now when thinking about applying the refunds. Here is a situation:
Simple tx which calls into a contract which sets a nonzero storage slot to zero: PUSH 0 PUSH 0 SSTORE. This yields a net gas of 13003 for me.
If we instead do the new rule (apply refunds before calculating the floor), this now means that I pay 21k gas. (there is no calldata, but we still apply this new floor rule).
Originally posted by @chfast in #966 (comment)
The text was updated successfully, but these errors were encountered: