forked from privacy-scaling-explorations/zkevm-circuits
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy Circuit (privacy-scaling-explorations#584)
* init copy table & circuit * fix: compilation and fmt/clippy * fix: rebase, fmt, clippy * feat(copy-table): constraints for verifying row and step * feat: add copy pairs to fixed table * chore: refactor and docs * feat: busmapping updates with new copy event/step * wip: api for assigning block to copy table * feat: assigning copy event to copy table * fix: log_id and tx_id both needed for TxLog * tests: bus-mapping (calldatacopy root) * tests: bus-mapping calldatacopy internal * tests: bus-mapping codecopy * fix: is_code is handled for bytecode copying * tests: busmapping for logs * fix: box copy circuit * feat: lt gadget to constrain is_pad for copy circuit * add todos * add lookup into copy table * feat(copy-table): lookup copy-pair | fmt | clippy * feat(evm_circuit): setup api for copy table lookup * fix(calldatacopy): copy table lookup instead of constraining internal state * fix: use condition instead of select for looking up copy table * chore: remove redundant auxiliary data fields/structs * fix(busmapping): add RW (memory) entries * fix(tests): busmapping calldatacopy root RW memory writes * fix(tests): busmapping for codecopy, add RW memory writes * fix(tests): busmapping logs, add RW entries and txlog data entries * add copy lookup from codecopy op exec * add copy lookup for logs op exec * fix: copy rwc inc assignment in bus-mapping and table * chore: remove redundant copy pairs fixed lookup * calldatacopy gadget tests are passed now * chore: formatting, linting * fix: codecopy tests passing (code hash is LE bytes) * fix(copy-table): addr assignment for tx log * fix: copy events by pc handles multiple copy events in a block * fix opcode for log * feat: use binary number chip instead of iszerochip for tag constraining * fix: compilation after rebasing * chore: comments on the iszero gadget * chore: refactor (1 - x) to not(x) * chore: rebase and fix compilation * chore: docs and renaming -> copy circuit * Update zkevm-circuits/src/evm_circuit/execution/calldatacopy.rs Co-authored-by: Eduard S. <[email protected]> * chore: remove duplication of code() and to_vec() * fix: resolve collision possibility in hashmap for copy events * fix: separate out constraints of copy circuit from evm circuit * chore: describe separate fields in the copy lookup instead of one vec * chore(bus-mapping): refactor copy steps generation in logs * tests(copy_circuit): valid and invalid values for calldatacopy/codecopy * refactor: use tuple instead of u256 for simplicity as key * fix: move constraint to correct condition * refactor(tests): remove code duplication, perturb different possible fields * fix: stack(rlc) while copy_circuit assignments are not Co-authored-by: Haichen Shen <[email protected]> Co-authored-by: Eduard S. <[email protected]>
- Loading branch information
1 parent
3a6f02a
commit b375530
Showing
42 changed files
with
2,007 additions
and
2,045 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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.