This repository was archived by the owner on Jul 5, 2024. It is now read-only.
Circuit for ErrorInvalidOpcode state#1089
Merged
han0110 merged 13 commits intoFeb 10, 2023
Merged
Conversation
This was referenced Jan 19, 2023
ae884cd to
221fc82
Compare
627edcd to
ebe7527
Compare
ebe7527 to
491ce31
Compare
lispc
reviewed
Feb 6, 2023
|
|
||
| // When it is an internal call, need to restore caller's state as finishing this | ||
| // call. Restore caller state to next StepState. | ||
| let restore_context = cb.condition(1.expr() - cb.curr.state.is_root.expr(), |cb| { |
Collaborator
There was a problem hiding this comment.
we prefer "not::expr" compared to "1.expr() - ". same thing, but more readable
Contributor
Author
There was a problem hiding this comment.
Replaced 1.expr() - with not::expr in 93ce388.
lispc
approved these changes
Feb 6, 2023
Collaborator
lispc
left a comment
There was a problem hiding this comment.
i noticed you have created a unified "constrain_error_state" in spec side. So i think after this PR, we can create another PR do the similar thing in rust side?
Contributor
Author
Yes. Discussed with @DreamWuGit , it will be refactored to common error gadget in another PR. |
DreamWuGit
reviewed
Feb 9, 2023
han0110
reviewed
Feb 9, 2023
… is greater than 255." This reverts commit 537748b.
… done in `get_step_err`.
…iated_ops`. And Move `fn_gen_associated_ops` to the end of `gen_associated_ops` (after `get_step_err`).
…lid opcode error." This reverts commit 759ed13.
han0110
approved these changes
Feb 10, 2023
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.
Close #1138
Spec PR privacy-ethereum/zkevm-specs#362 has been merged.
Summary
Add
ErrorInvalidOpcodeGadgetto handle invalid opcode error.Add
invalid_opcodesfunction for returning the all invalid opcodes in OpcodeId struct.Fix to handle ErrorInvalidOpcode to return the all invalid opcodes in
responsible_opcodesfunction. It should add the all invalid opcodes (with ErrorInvalidOpcode error state) intoFixedTableTag::ResponsibleOpcodevia this code. So the invalid opcode could be lookuped.