EIP-8037: State Creation Gas Cost Increase

tl;dr: as long as same-tx SELFDESTRUCT stays in the EVM (and there’s no alternative for ephemeral contracts), the account charge should be refilled when no state was created.

Coming back to the same-tx SELFDESTRUCT refill since @Helkomine’s question in #26 never got an answer.

As far as I can reconstruct: this was issue 4 in the spec review, Repricings #6 decided in favor of refunding (“Self-destruct refunds all state gas at transaction end”), it got implemented, and then execution-specs#2845 dropped it again for bal-devnet-7. The only rationale I found is in the tests-bal v7.1.0 release notes (Release tests-bal@v7.1.0 · ethereum/execution-specs · GitHub): deprecated opcode, small win on state, complicates the accounting. (def not a small win as there’s a practical use case)

The deprecation argument seems off to me here. The same-tx case is the one behavior 6780 deliberately kept. These contracts never enter the trie, so there’s nothing for a future removal to break, and a refill can’t exceed what the tx just paid.

The complexity objection is reasonable, but it seems aimed at the full version (end-of-tx, per-slot tallies). Would a minimal one work, refill just the fixed account-creation charge, at SELFDESTRUCT, within the creating frame? There’s no loop and LIFO stays intact.

Also, whatever the answer: could the rationale go into the EIP’s Rationale section? Right now the exclusion is there with no explanation, and the spec review itself said it should be documented if kept.

For context on why we should care:

Ephemeral executors behind deposit-address sweeps pay the full 183.6k for an account that never exists. It might be OK at today’s gas (tho spikes make it quite expensive), but it’s a fixed cost per sweep, and CPSB scales with the gas limit. So this gets worse as L1 scales, and the pattern just moves to L2s

4 Likes