Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

feat: update account non-existence handling#354

Merged
ed255 merged 1 commit into
masterfrom
feature/non-exist-code_hash
Jan 9, 2023
Merged

feat: update account non-existence handling#354
ed255 merged 1 commit into
masterfrom
feature/non-exist-code_hash

Conversation

@ed255
Copy link
Copy Markdown
Contributor

@ed255 ed255 commented Jan 6, 2023

Change the approach to handle non-existing accounts by

  1. Using code_hash = 0 as a non-existing account state
  2. Doing accont non-existence MPT proofs from the State Circuit on the where an account update is CodeHash and goes 0->0.

Resolve #259

except AssertionError as e:
ok = False
assert ok == success
exception = e
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I made this change so that when tests fail with success = True, the exception is raised so that it's presented to the user (instead of being captured and just seeing an AssertionError)

@ed255 ed255 requested a review from han0110 January 6, 2023 10:45
@ed255 ed255 force-pushed the feature/non-exist-code_hash branch from d6a0876 to 87a6be2 Compare January 6, 2023 10:45
@CPerezz CPerezz self-requested a review January 6, 2023 18:13
Copy link
Copy Markdown
Contributor

@han0110 han0110 left a comment

Choose a reason for hiding this comment

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

All LGTM! With the updated document it's much more clear now. Nice work!

Copy link
Copy Markdown
Contributor

@CPerezz CPerezz left a comment

Choose a reason for hiding this comment

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

Brilliant work @ed255! Thanks for it!!!!

Comment thread specs/evm-proof.md
Change the approach to handle non-existing accounts by
1. Using `code_hash = 0` as a non-existing account state
2. Doing accont non-existence MPT proofs from the State Circuit on the where an
account update is CodeHash and goes 0->0.

Resolve #259
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update account/storage lookups to check non-existence

3 participants