This repository was archived by the owner on Apr 18, 2025. It is now read-only.
forked from privacy-scaling-explorations/zkevm-circuits
-
Notifications
You must be signed in to change notification settings - Fork 391
Conversation
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
* word_rlc: introduce value_prev in copy circuit * memory_opt_word_rlc: verify word RLCs --------- Co-authored-by: Aurélien Nicolas <info@nau.re>
* memory_opt_length: track both source and destination lengths. Simplify constraints * memory_opt_length: constrain the shape of the mask --------- Co-authored-by: Aurélien Nicolas <info@nau.re>
* memory_opt_rwc: fix and simplify RW counter logic * memory_opt_rwc: simplify CopyEvent rw functions --------- Co-authored-by: Aurélien Nicolas <info@nau.re>
\b run testool |
Succeed to run testool: |
* memory_opt_check_align: require aligned memory addresses in State * memory_opt_check_align: tests --------- Co-authored-by: Aurélien Nicolas <info@nau.re>
* memory_opt_rm_ltchip: replace LessThan with IsEqual * memory_opt_rm_ltchip: support other rotations in IsEqualChip * memory_opt_rm_ltchip: constrain is_pad from is_src_end_next * memory_opt_rm_ltchip: remove the old chip * memory_opt_rm_ltchip: add doc and assertion --------- Co-authored-by: Aurélien Nicolas <info@nau.re>
Co-authored-by: Aurélien Nicolas <info@nau.re>
* memory_opt_gadgets: move code into a function * memory_opt_gadgets: move code into constrain_word_rlc() * memory_opt_gadgets: move code into constrain_value_rlc() * memory_opt_gadgets: move code into constrain_event_rlc_acc() * memory_opt_gadgets: constrain_bytes_left * memory_opt_gadgets: doc * memory_opt_gadgets: move code into constrain_rw_counter. rustfmt works again! * memory_opt_gadgets: constrain_forward_parameters and constrain_address * memory_opt_gadgets: move code to constrain_mask() * memory_opt_gadgets: move code to constrain_is_pad() * memory_opt_gadgets: move code to constrain_non_pad_non_mask() * memory_opt_gadgets: move code to constrain_first_last * memory_opt_gadgets: constrain_masked_value and constrain_must_terminate * memory_opt_gadgets: reorg is_pad and is_last * memory_opt_gadgets: reorder gadgets to match the circuit * memory_opt_gadgets: move code into constrain_tag. Done! --------- Co-authored-by: Aurélien Nicolas <info@nau.re>
Co-authored-by: Aurélien Nicolas <info@nau.re>
* Avoid whole memory clone for CODECOPY and EXTCODECOPY. * Update * Fix to extend memory as range(begin_slot, full_length), and update `src_addr_end`. * Delete unused function `write_memory_words` in callop. * Delete memory clone in callop. * Fix lint. * Delete memory clone in calldatacopy. * Update returndatacopy, and extract to a common function. * Fix lint. * Update bytecode copy. * Small fix.
\b run testool |
Succeed to run testool: |
lispc
reviewed
Jul 17, 2023
lispc
reviewed
Jul 17, 2023
lispc
approved these changes
Jul 17, 2023
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 refer to privacy-scaling-explorations/zkevm-specs#407
copy circuit design https://hackmd.io/_bMS2rvjQK23efyMkoHbkw
memory to memory design: https://hackmd.io/tuqJYr-DT3eqXvSM_6AHGQ?view
Refactor
EVM circuit
state circuit
Copy circuit
rows[0].addr + 1 == rows[2].addr, rows[0].rw_counter + rw_diff == rows[1].rw_counter
,write value == read value
,value_acc(2) == value_acc(0) * r + value(2)
, constraint etc.addr_slot
starts with zero and increase by 32 ?