This repository was archived by the owner on Jul 5, 2024. It is now read-only.
feat(state): constrain non-exist proof for account and storage#1046
Merged
Conversation
44acc27 to
ea91f0c
Compare
ea91f0c to
45d2285
Compare
af4df08 to
e3d5b23
Compare
han0110
approved these changes
Jan 12, 2023
Contributor
han0110
left a comment
There was a problem hiding this comment.
All LGTM! Nice work! Only left some nitpicks.
5813447 to
f599330
Compare
Contributor
Author
|
@icemelon @z2trillion could someone from scroll do a second review to this PR? Thanks! |
10 tasks
z2trillion
suggested changes
Jan 12, 2023
Contributor
z2trillion
left a comment
There was a problem hiding this comment.
Only had some minor changes requested. Overall this looks great.
f599330 to
8c84bc3
Compare
Add BatchedIsZeroChip in gadgets Accept degree <= 13 in state circuit
8c84bc3 to
b7d4243
Compare
Closed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Add BatchedIsZeroChip in gadgets
Update the following opcode gadgets to handle non-existing accounts via code_hash == 0:
Missing:
Important note: By handling the non-existence proofs from the state circuit (which requires detecting the special case of storage 0->0 or account,code_hash 0->0 to swap the proof type to non existence in the MPT lookup), the state circuit degree has increased from 9 to 12. I could keep it at 9 by introducing an intermediate column and splitting the degree >9 expression. Is it a problem to keep the degree at 12? Should I keep it at 9 in an update to this PR?
Update: I've brought back the degree to 9, at the cost of introducing a new column in the State circuit (to hold an intermediary witness and splitting the highest degree expression).
Corresponding specs PR privacy-ethereum/zkevm-specs#354