Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address collision when storage exists: spec vs impl mismatch #1028

Open
xrchz opened this issue Nov 2, 2024 · 3 comments · May be fixed by #1065
Open

Address collision when storage exists: spec vs impl mismatch #1028

xrchz opened this issue Nov 2, 2024 · 3 comments · May be fixed by #1065
Labels
A-spec Area: specification C-bug Category: this is a bug, deviation, or other problem. E-easy Experience: easy, good for newcomers

Comments

@xrchz
Copy link

xrchz commented Nov 2, 2024

Metadata

  • Hardfork: Cancun

What was wrong?

The Python execution specs consider a create message to fail due to address collision if the account in question has nonce or code:

is_collision = account_has_code_or_nonce(

But the tests and client implementation seems to consider it a collision also if the account has non-empty storage.

Sources

EIP specifying the geth behaviour: https://eips.ethereum.org/EIPS/eip-7610

Geth check: https://github.com/ethereum/go-ethereum/blob/a1093d98eb3260f2abf340903c2d968b2b891c11/core/vm/evm.go#L460

Test relying on the geth behaviour: https://github.com/ethereum/tests/blob/4c87ebbf024a3e9ec842bcce90564f629a3bcd82/BlockchainTests/GeneralStateTests/stRevertTest/RevertInCreateInInit_Paris.json

Additional Context

If the python spec is corrected, there are a few simplifications also possible, e.g. no need to delete the storage when creating an account nor to keep track of created accounts.

@xrchz xrchz added A-spec Area: specification C-bug Category: this is a bug, deviation, or other problem. labels Nov 2, 2024
@d-xo
Copy link

d-xo commented Nov 3, 2024

Looks this this was only merged into the prague hard fork branch: #999.

I guess since this EIP was retroactively applied it would be better to merge it directly to master (as was done for the 3607 implementation).

@SamWilsn
Copy link
Collaborator

SamWilsn commented Nov 4, 2024

EIP-7610 doesn't seem to be Final yet. Has this been agreed upon by ACD?

@chfast
Copy link
Member

chfast commented Nov 4, 2024

EIP-7610 doesn't seem to be Final yet. Has this been agreed upon by ACD?

It was, I confirmed this multiple times. However, I have issues with implementing this in Erigon, where its difficult to answer the question if an account has any storage.

@SamWilsn SamWilsn added the E-easy Experience: easy, good for newcomers label Nov 14, 2024
@gurukamath gurukamath linked a pull request Dec 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-spec Area: specification C-bug Category: this is a bug, deviation, or other problem. E-easy Experience: easy, good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants