execution/tests, genesiswrite: pin the EIP-7610 storage-only CREATE2 collision - #23600
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Pins EIP-7610 CREATE2 collision behavior for storage-only genesis accounts.
Changes:
- Adds collision and successful-deployment test cases.
- Treats nil genesis balances as zero during commitment calculation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
execution/tests/eip7610_storage_collision_test.go |
Tests storage-only CREATE2 collisions and control deployment. |
execution/state/genesiswrite/genesis_write.go |
Safely handles nil genesis balances. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
AskAlexSharov
approved these changes
Aug 27, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 27, 2026
Member
|
fyi, EIP-7610 got dropped in favour of EIP-8253 - I will remove all code associated with it next week (need to merge some other things first and update some test fixtures before that). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hasCreateCollisionrejects a CREATE whose destination holds storage, which is EIP-7610's clause on top of EIP-684. Nothing covered it. The shape is reachable only through a genesis alloc — post-EIP-161 no execution path produces an account with zero nonce, empty code and non-empty storage — so it never appeared in a generated chain, and dropping the storage term from the check broke no test in the package.Found while working the PBT devnet, where geth and besu both apply a different rule: geth replaces the runtime probe with a mainnet-only address list (ethereum/go-ethereum#34718), besu drops the check under
BINARY_TRIEin anticipation of EIP-8253's nonce bump, which no client implements. Erigon keeps the probe —HasPrefix(kv.StorageDomain, addr)over flat state, so the storage root BAL removes was never involved. This pins the behaviour so a later move is deliberate rather than silent.Removing the storage term is also not a one-line change. With
targetHasStoragedropped, the chain generator and the executor compute different roots for the same block —wrong trie root: block 1,BadBlock: invalid state root hash— because the creation then proceeds onto an account that already holds storage, which is the account-reset case EIP-7610 exists to remove.Changes
execution/tests: three arms over one CREATE2 — destination carrying a storage slot at zero balance, the same at nil balance, and a control with the destination absent that deploys 2 bytes. The control is what makes the first two mean anything; without it they pass on a deployment that never worked.execution/state/genesiswrite:uint256.FromBig(account.Balance)had no nil guard, so aGenesisAllocentry without a balance panicked inComputeGenesisCommitment. Not reachable from a genesis file, wherebalanceisgencodec:"required", but reachable from any Go caller building an alloc — which is how the nil arm hit it. go-ethereum guards the same call atcore/genesis.go:155.