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

Add EXTCODEHASH witnes information to resolve Empty() #420

Open
wants to merge 1 commit into
base: kaustinen-with-shapella
Choose a base branch
from

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

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