Exclude Discounts & Refunds for Block GasLimit Enforcement
Complementary to to
Prevent the circumvention of the block gas limit by excluding certain gas discounts and refunds from block gas accounting, except for those reflecting actual reductions in computational work.
This proposal aims to align the block gas usage with the Ethereum Virtual Machine’s (EVM) real workload, preventing “block gas smuggling.” It complements EIP-7623 by further reducing the maximum block size and its variance, enhancing network stability and efficiency.
Regarding receipt encoding, what should be encoded in the receipt of the tx? We have a cumulative gas used field there. I think the encoded cumulative gas used here should reflect what gas was used in the block, i.e. evm_gas_used?
It should be the gas used without refunds (i.e. the value used for the block gaslimit/target check); so would be higher than the sum of the gas charged per tx
Right now, even though this is not very clearly spec’d in the EIP, the gas_used in the receipt would represent the gas used after applying the refund.
For validating the block gas limit using the receipts, you would need to keep track of the refund of each transaction during execution and when doing the cumulative sum, add every refund to the gas used of the respective transaction.
Thanks for bringing this up. I’ll make a PR to clarify that in the EIP.