forked from privacy-scaling-explorations/zkevm-circuits
-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: copy circuit support overlap copy range (#1255)
* draft buss mapping for mcopy * rename to mcopy.rs * add mcopy.rs * add helper gen_copy_steps_for_memory_to_memory * add MCOPY in opcode_ids * handle opcode_id others as_u8, constant_gas etc. * draft mcopy gadgets * add gadget to execution config * remove unused fields * update buss mapping test * update gadget tests * remove unnecessary testing stuff * update ExecutionState * add cancun config * update buss mapping test * remove commented codes * enable multi copy case * fix buss mapping tests * update gas cost * remove tx id lookup * fix memory_word_size * update word size if no copy happens * add copy circuit test * remove debug log * fmt align * minor update * add OOGMemoryCopy test for mcopy * make oog memorycopy include mcopy opcode * revert temp debug changes * add more test data * minor updates * fmt adjust * fix clippy * add testool * fix memory word * increase fix table rows detected by ci * update testool * remove unused import * clippy update * fix large dest memory addr * refactor to use memory_expansion for dest_addr * handle dest_addr < src_addr * update per cargo check * intermediate clean up * fix testool * fix u64 overflow * update oog memorycopy to cover src_offset overflow case * fix clippy; fix codehash.txt * remove debug codes * fix clippy * reverted commented for testing * remove outdated comment and todo for overlap case * add unit test for overlap copy range case * add is_memory_copy column * assign is_memory_copy * change rw_counter of copy table * add is_memory_copy condition for rw_counter constraint * update constraint for rwc_inc_left * fix rwc_inc_left constraint for mcopy * enable other tests * fix clippy * fix bussmapping test * add is_copy_id_equals checking id changes * add constraint for is_memory_copy condition * remove comments * fix is_copy_id_equals_chip * format comment * remove old id_next * rename is_copy_id_equals to is_id_unchange_chip * merge combine_copy_slot_bytes_mcopy to combine_copy_slot_bytes * clean up * update comments * fmt align * add constraint: is_memory_copy is bool --------- Co-authored-by: Zhuo Zhang <mycinbrin@gmail.com>
- Loading branch information
1 parent
1cb76ea
commit 85c773e
Showing
6 changed files
with
208 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.