Ethereum's Leaky Gas Tank: Unveiling 13 Costly Gas Model Inconsistencies

THX for your reply.

I agree that EIP-4762 bridges the gap between the gas cost and real resource with fine-grained access/write events.

For (9), my point is that when the current value does not equal the new value, the protocol does not charge for the read required to check equality, and only charges for the write operation.

Here, an EOA first sends a transaction to contract A, which then makes an internal call to contract B. If contract B modifies its storage (e.g., by writing to a state variable), this first updates the MPT nodes for contract B, and subsequently changes contract B’s account state in the world state (as the storage root update).
In my view, the current gas cost model only charges for the write operation on contract B’s MPT nodes but doesn’t account for the write operation on contract B’s account state.


Thank you again for your reply, which gave me new insights into the philosophy of gas model design. From (6), I wonder if the gas model should consider the actual execution status of a transaction (whether it succeeds). From (9), should it account for resource consumption changes brought by optimizations in read operations? And from (12), should it consider the resource cost of verification itself?

We will explore to package some of the useful cases you mentioned into an EIP if necessary.