Skip to content

Conversation

@mirgee
Copy link
Contributor

@mirgee mirgee commented Oct 23, 2025

Currently, when empty account clearing is active and transaction fees are zero, the coinbase is not included in the touched accounts of the WorldUpdater, and hence is not deleted during empty account clearing:

  default void clearAccountsThatAreEmpty() {
    new ArrayList<>(getTouchedAccounts())
        .stream().filter(Account::isEmpty).forEach(a -> deleteAccount(a.getAddress()));
  }

However, the account clearing EIP-158 states:

If an address is “touched” and that address contains an empty account, then it is deleted. A “touch” is defined as any situation where if the account at the given address were nonexistent it would be created.
...
The cases where a “touch” takes place can be enumerated as follows:
...

  • Miners receiving transaction fees (note the case where the gasprice is zero, and the account does not yet exist because it only receives the block/uncle/nephew rewards after processing every transaction)

This means that in the case that coinbase account exists, is empty and is transferred zero fees, it is incorrectly NOT deleted after transaction processing.

This is especially relevant in the context of the recent EIP-7928 changes, where coinbase must be included in the BAL even when the transaction fees are zero.

TODO

  • Investigate block processing integration test failures (caused mainly by Do not create unchanged accounts in BlockAccessListStateRootHashCalculator #9361 and missing coinbase addresses in BAL-related assertions)
  • Investigate failing EthSimulateV1BySpecTest.jsonRPCCallWithSpecFile (the coinbase starts non-empty and is transferred 0 fees, so it's now newly included in the trie log as a read)
  • Run against EIP-7928 coinbase-related spec tests when released

@mirgee mirgee marked this pull request as draft October 23, 2025 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant