This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 856
Merge matching structs between circuit input builder and evm circuit witness (where possible) #528
Labels
crate-bus-mapping
Issues related to the bus-mapping workspace member
crate-zkevm-circuits
Issues related to the zkevm-circuits workspace member
T-refactor
Type: cleanup/refactor
T-tech-debt
Type: tech-debt generated or cleaned up
Milestone
Comments
2 tasks
Really good idea to reduce redundant structs !!! |
ed255
added
crate-bus-mapping
Issues related to the bus-mapping workspace member
T-refactor
Type: cleanup/refactor
crate-zkevm-circuits
Issues related to the zkevm-circuits workspace member
T-tech-debt
Type: tech-debt generated or cleaned up
labels
May 25, 2022
I can take this one. |
4 tasks
4 tasks
ChihChengLiang
added a commit
that referenced
this issue
May 4, 2023
### Description We tried to remove some unused tx structs. ### Issue Link #528 ### Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ### Contents - Remove zkevm-circuits/src/witness/call.rs and the `Call` struct - Remove fields in circuit_input_builder Transaction struct. Reuse Geth type Transaction struct whenever possible - Remove duplicated call data gas cost computation - Add APIs to get "To" address so that we know when we want contract address or zero address. ### Rationale We try to start the de-duplication from the low-hanging fruits. So I didn't remove the witness.rs Transaction struct in this PR. ### How Has This Been Tested? Local build tests and quick tests
There are still some structs that can be de-duplicated after the PR #1378 @ChihChengLiang will open a new issue to track those. |
5 tasks
Created #1391 to continue the work. |
jonathanpwang
pushed a commit
to axiom-crypto/zkevm-circuits
that referenced
this issue
Aug 1, 2023
…rivacy-scaling-explorations#528) * wip * wip 22 * wip 3 * wip 4 * wip 5 * wip 6 * wip 7 * wip 8 * wip 9 * wip 10 * wip 11 * wip 12 * wip 13 * wip 14 * wip 15 * wip 16 * wip 17 * wip 18 * wip 19 * add macros * addressing some comments * rewrite constraint (part 1) * reduce condition degree * rewrite constraint (part 2) * rewrite constraint (part 3) * rewrite constraint (part 4) * rewrite constraint (part 5) * add docs * docs * data table assignments * add witness gen part 1 * add more fields for supporting pre-eip155 tx * add witness gen part 2 * add witness gen part 3 * finish gen_sm_witness * pass eip1559 rlp witness test * refactor * add pre-eip155 test case * add unit test in rlp_circuit_fsm * pass pre-eip155 tx unit test in rlp circuit * fix constraint errors part 1 * fix witness gen bug * update unit test * fix constraint errors (part 2) * add eip155 tx test * make witness gen more precise * update data table checks * fix clippy errors * fix clippy * fix clippy * fmt * update sm checks * reduce degree to 9 * add eip1559 test and add constraints on DecodeTagStart -> End * finish padding * move away RLP internal tables from table.rs * remove old rlp circuit * re-organize tests in rlp_circuit_fsm into its own dir * clean * clean * disable tx circuit * fmt * clippy * fix typo * fix a bug in keccak circuit's min_num_rows_block * move q_enable to RlpTable * finish rom of l1_msg_hash * add sm init checks * remove old RlpTable * fix typos and refine comments * bug-fix: use max_length to select b to accumulate bytes' value * update tx_data_gas_cost calc rule * clean * ignore tx_l1_fee unit tests in evm_circuit * refactor tx_circuit * add empty row * turn on the tx_circuit * fix clippy errors * fmt * fix * assign padding_tx in rlp circuit * clean * pass pre-eip155 tx test * clippy and add constraints on sig.v * ignore null signature * add ChainID * dep: use scroll tech's fork of ethers-rs * refactor * add l1 msg tx test in rlp circuit * pass l1 msg unit test in tx circuit * finish * update Cargo.lock * fix * refactor: move is_zero to util/ * add doc --------- Co-authored-by: Rohit Narurkar <rohit.narurkar@protonmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
crate-bus-mapping
Issues related to the bus-mapping workspace member
crate-zkevm-circuits
Issues related to the zkevm-circuits workspace member
T-refactor
Type: cleanup/refactor
T-tech-debt
Type: tech-debt generated or cleaned up
The idea of having duplicate structs between circuit input builder and evm witness generation was to allow the development of the circuit input builder in parallel with the circuits while minimizing the changes that one implies to the other. But once things stabilize, I think we can merge those.
Related to #484 (comment)
See the latest discussions upon that:
Also see:
The text was updated successfully, but these errors were encountered: