EIP-7523 Deprecating support for empty accounts (Empty accounts deprecation)
No call decision · EVM & execution · EIP status Last Call · created 2023-09-19
Explicitly prohibits the existence of empty accounts in the state of post-Merge networks. Since empty accounts have already all disappeared, actual behavior does not change. This only cleans up remaining technical debt.
Why it is needed
Empty accounts are a relic left over from Ethereum's early history. They are accounts with no code, no transaction count (nonce), and no balance, and they could only ever be created under old rules. The only networks that ever had such accounts are Ethereum mainnet, the now-defunct Ropsten testnet, and the Ethereum Classic family. The empty accounts remaining on mainnet were all removed at block 14049881. Even so, the complex rules set out in EIP-161 remain alive. Those rules require that an empty account be deleted when it is 'touched,' and every time the spec changes, new edge cases of the touch rule arise that must be discussed, implemented, tested, and documented. Even a new client that only aims to support post-Merge blocks must implement useless empty-account handling purely to pass tests. This EIP bans empty accounts on post-Merge networks so that future designers and implementers no longer need to think about this issue.
What changes
Today
- Even though empty accounts no longer actually exist, clients must still implement EIP-161's touch-and-delete rules
- Every time the spec changes, empty-account-related edge cases must be reconsidered
- Even new clients that only support post-Merge blocks must include empty-account code just to pass tests
After EIP-7523
- The spec now states explicitly that empty accounts cannot exist in the state of post-Merge networks
- A post-Merge situation with an empty account becomes undefined in the spec, and any such test case is invalidated
- New clients and designers of EVM-compatible chains and protocols no longer need to consider empty accounts
Who is affected
- Client teams: Clients that only support post-Merge blocks no longer need to implement empty-account handling code.
- EVM-compatible chain and protocol designers: When designing new features, there is no longer a need to consider edge cases of the empty-account touch rule.
- Test and tooling maintainers: Test cases featuring a post-Merge empty account can be treated as invalid and cleaned up.
- Ordinary users: Nothing about on-chain behavior changes, so there is no perceptible difference.
In depth
Definition of an empty account
An empty account is one with no code, a zero nonce, and a zero balance. This definition matches the one in EIP-161. All three conditions must hold for an account to be empty; if any one has a value, it does not qualify.
Prohibition rule: the Merge as the baseline
A network that has gone through the Merge transition must not include any empty accounts in the pre state of the Merge block. A network that starts directly from genesis in a post-Merge state must not have any empty accounts among its genesis accounts. In other words, it becomes a spec-level requirement that no empty account exists anywhere in the post-Merge range.
Chains where this can be assumed without scanning state
Rather than scanning the entire state, a client MAY assume the following chains have no post-Merge empty accounts: first, the mainnet chain, whose Merge block hash is 0x56a9bb0302da44b8c0b3df540781424684c3af04d0b7a38d72842b762076a664. Second, any chain with no empty accounts at genesis where every fork from Spurious Dragon onward has applied since genesis. Mainnet's remaining empty accounts were all removed in transaction 0xf955834bfa097458a9cf6b719705a443d32e7f43f20b9b0294098c205b4bcc3d at block 14049881. A similar transaction was also sent on Ethereum Classic.
Declaring undefined behavior and invalidating test cases
If an empty account exists in a post-Merge context, the Ethereum spec declares this undefined. Any test case involving a post-Merge empty account is invalid. This removes any obligation for clients to implement and verify EIP-161's touch rule for a situation that cannot actually occur.
Why the Merge was chosen as the cutoff
This EIP is designed as the simplest way to eliminate the long-standing technical debt left by empty accounts. The Merge was chosen as a natural, easily identifiable reference point. Alternatives considered included using an earlier cutoff such as block 14049881, or identifying and banning a broader range of edge-case behaviors that never actually occurred, but both were rejected as needlessly complex.
Compatibility and Security Considerations
This EIP does not change any behavior that could occur outside the test suite, so it raises no backward compatibility issues. However, the EIP's validity depends on the claim that all empty accounts on mainnet were removed before the Merge, and that claim should be properly verified. Also, a network that artificially introduces empty accounts will cause problems for tooling and clients.
Progress status
The original's status is Last Call, with a deadline of 2024-03-26. Last Call is the final comment period before finalization, and the content may still change based on feedback received during this period. The core developer call notes included in this material contain no decisions related to this EIP.