This repository was archived by the owner on Apr 18, 2025. It is now read-only.
Circuit for ErrorInvalidOpcode state#257
Closed
silathdiir wants to merge 5 commits into
Closed
Conversation
cd431ba to
9f6bf28
Compare
9f6bf28 to
4b74a1b
Compare
ErrorInvalidOpcode stateErrorInvalidOpcode state
80d1891 to
237fcbc
Compare
ab45107 to
a39f838
Compare
DreamWuGit
reviewed
Jan 17, 2023
|
|
||
| fn configure(cb: &mut ConstraintBuilder<F>) -> Self { | ||
| let invalid_opcode = cb.query_cell(); | ||
| cb.opcode_lookup(invalid_opcode.expr(), 1.expr()); |
There was a problem hiding this comment.
not sure if invalid code here, op code lookup with is_code can succeed ?
Author
|
After synchronizing with @DreamWuGit , make the fixes as below:
|
…pect`, cleanup (#1070)
* add pr template * apply feedback from @adria0 Co-authored-by: adria0.eth <5526331+adria0@users.noreply.github.com>
* try to constrain rw_counter_end_of_reversion * fix by minus one for rw_counter_end_of_reversion * verify rwcounter end of reversion both for root and internal call * make all errors with rw_counter_end_of_reversion check * apply review suggestion * fix typing
…circuit sizes (#1064) * fix: Include Padding tag for `CopyDataType` This includes a new tag `Padding` for `CopyDataType` enum which enables applying conditions when we need to pad the number of copies to be fixed (ie: avoiding variadic size circuits). Co-authored-by: Eduard S<eduardsanou@posteo.net> * fix: Include `max_copy_rows` in `CircuitsParams` We need some way to set a fixed size for the ammount of rows of copy we can have in our `CopyCircuit` so that we don't fall into variadic circuits & also, we can set a hard cap for the padding etc.. Co-authored-by: Eduard S <eduardsanou@posteo.net> * fix: Introduce padding in the copy_circuit assignation This includes checks of `CopyDataType::Padding` within the constraints of the CopyCircuit to enable padding up to `CircuitsParams::max_copy_rows`. Also adds assertions to guarantee that the `max_copy_rows` value is never surpassed during witness assignation. Finally, it also adds explanations for the `+2` final rows that the circuit requires due to the `Rotation(2)` usage within it. Co-authored-by: Eduard S <eduardsanou@posteo.net> * fix: include variadic-permutation check in CopyCircuit tests * chore: Remove next_halo2_tag tests from copy_circuit * chore: Fix rebase conflicts` * chore: Fix clippy lints * chore: Apply Han's suggestions Co-authored-by: Eduard S <eduardsanou@posteo.net>
b2a9f2f to
a35a3c6
Compare
Author
|
Thanks for dream's code review. Moved to upstream privacy-ethereum#1089 |
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.
Spec PR scroll-tech/zkevm-specs#54
Summary
Add
ErrorInvalidOpcodeGadgetfor invalid opcode error.It verifies invalid bytes in any condition of
op > 0x20 && op < 0x30,op > 0x48 && op < 0x50,op > 0xa4 && op < 0xf0, and any separate bytes inSEPARATE_INVALID_OPCODES array.