Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EVM Circuit and trait OpGadget (privacy-scaling-explorations#26)
* feat: draft on evm circuit and trait for op gadget * feat: draft more on evm circuit with minimal working example * fix: improve comment about EIP3541 (EOF) Co-authored-by: Chih Cheng Liang <[email protected]> * feat: add fixed table and Range256 lookup support * feat: refactor with param.rs to place layout parameters * feat: implement qs_byte_lookup to reduce byte lookup * fix: avoid non-independent lookup by requiring selector to be only a queried cell * fix: rename exp to expr to avoid ambiguity and make vars shorter * fix: update rotation of cells_next * feat: add stack and memory BusMappingLookup support * Implement PushGadget responsible for opcode PUSH* (privacy-scaling-explorations#45) * PUSH first version * Push gadget constraint added * fix: fix PushGadget op execution transition constraint * feat: add BusMappingLookup in PUSH and handle negative offset in EvmCircuit * feat: add some PUSH before AddGadget's test to make it reasonable Co-authored-by: han0110 <[email protected]> * chore: rename will_resume to will_halt to be consistent to geth * feat: replace u8 with OpcodeId and fix PushGadget's stack_overflow constraint * chore: simplify macro construct_op_gadget and add comment * fix: fix Range32 table to correct range 0..32 * fix: fix bus mapping inconsistency and fix SUB's minuend to second popped item * feat: refactor with trait Expr and add struct GasCost for convenient usage * lt opcode updated * fix rebase * update lt && gt opcode * accept result 0 for lt && gt opcode ,add more tests * fixed some explanation * fix * update test * fix lt gadget * update add/sub test case * eol * lint * fix clippy * fix: add AddGadget's carry range check (should be 0 or 1) * fix: add constraint on qs_byte_lookups for cases to enable byte lookup * fix clippy and address comments * fix more comments * fix: fix typo and comment * fix: remove witness selector boolean constraint cause OpGadget enforces it * chore: remove commented implementation on PushGadget and move to issue privacy-scaling-explorations#73 Co-authored-by: Chih Cheng Liang <[email protected]> Co-authored-by: Miha Stopar <[email protected]> Co-authored-by: ghostfly23333 <[email protected]> Co-authored-by: gaswhat <[email protected]>
- Loading branch information