Skip to content

Add EXTCODEHASH witness information to resolve Empty()#420

Open
jsign wants to merge 1 commit intokaustinen-with-shapellafrom
jsign-extcodehash-empty
Open

Add EXTCODEHASH witness information to resolve Empty()#420
jsign wants to merge 1 commit intokaustinen-with-shapellafrom
jsign-extcodehash-empty

Conversation

@jsign
Copy link
Collaborator

@jsign jsign commented Apr 15, 2024

EXTCODEHASH instruction execution does an .Empty(address) check to early return a zero. This Empty(...) implies adding to the witness the nonce and balance.

Note: I added the version too to be coherent with the current status quo

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
@jsign jsign requested a review from gballet April 15, 2024 17:40
@jsign jsign marked this pull request as ready for review April 15, 2024 17:40
Comment on lines +68 to +70
codehashgas := evm.Accesses.TouchVersion(address[:], false)
codehashgas += evm.Accesses.TouchBalance(address[:], false)
codehashgas += evm.Accesses.TouchNonce(address[:], false)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New fields to resolve Empty(...) in witness.

@jsign jsign added this to the verkle-gen-devnet-7 milestone Apr 15, 2024
Copy link
Owner

@gballet gballet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec is quite clear that only the code hash should be touched. Which makes sense. The better approach would be to only check the code hash instead of the whole account. If that can't be done, then we would need a spec change. But we can't merge this as is.

Copy link

@g11tech g11tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@gballet gballet changed the title Add EXTCODEHASH witnes information to resolve Empty() Add EXTCODEHASH witness information to resolve Empty() Mar 24, 2025
@gballet gballet force-pushed the kaustinen-with-shapella branch from 4a2f6fb to e5d5e09 Compare February 24, 2026 14:09
@gballet gballet requested a review from holiman as a code owner February 24, 2026 14:09
@gballet gballet force-pushed the kaustinen-with-shapella branch from e5d5e09 to 4a2f6fb Compare February 24, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants