-
Notifications
You must be signed in to change notification settings - Fork 125
Circuit tools with refactored CellManager #96
base: mpt-sync
Are you sure you want to change the base?
Commits on Apr 10, 2023
-
fix a typo in comment (privacy-scaling-explorations#1351)
### Description Fix a typo found by another community developer ### Issue Link N/A ### Type of change - [ ] 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 N/A ### How Has This Been Tested? N/A
Configuration menu - View commit details
-
Copy full SHA for 8aed587 - Browse repository at this point
Copy the full SHA 8aed587View commit details -
Gather all test-related into test mod. (privacy-scaling-explorations#…
…1300) ### Issue Link * First mentioned in privacy-scaling-explorations#953 * Pr link This is the second pr for this. The older one privacy-scaling-explorations#1003 is abandoned as there are too much conflicts. ### Contents * Gather test related into test mod. * Gather most of the `impl Circuit` into `dev.mod` This is for distinct the `test-circuits` and the test features. privacy-scaling-explorations#1144
Configuration menu - View commit details
-
Copy full SHA for 0e76d2b - Browse repository at this point
Copy the full SHA 0e76d2bView commit details
Commits on Apr 11, 2023
-
bus-mapping: more robust access parsing (privacy-scaling-explorations…
…#1311) ### Description When building AccessSet, we read stack input of opcode(eg: read last element of stack when processing BALANCE opcode). But this method will encounter error when dealing with some ill-formed bytecode(BALANCE when empty stack). So in this PR, when access parsing for a single step encounters errors, the error is printed, the access parsing procedure will continue instead of being interrupted and return. ### Issue Link [_link issue here_] ### 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 - [_item_] ### Rationale [_design decisions and extended information_] ### How Has This Been Tested? "StackUnderFlowContractCreation_d0_g0_v0" in testool can pass with this PR <hr> ## How to fill a PR description Please give a concise description of your PR. The target readers could be future developers, reviewers, and auditors. By reading your description, they should easily understand the changes proposed in this pull request. MUST: Reference the issue to resolve ### Single responsability Is RECOMMENDED to create single responsibility commits, but not mandatory. Anyway, you MUST enumerate the changes in a unitary way, e.g. ``` This PR contains: - Cleanup of xxxx, yyyy - Changed xxxx to yyyy in order to bla bla - Added xxxx function to ... - Refactored .... ``` ### Design choices RECOMMENDED to: - What types of design choices did you face? - What decisions you have made? - Any valuable information that could help reviewers to think critically Co-authored-by: Ming <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4e5e78a - Browse repository at this point
Copy the full SHA 4e5e78aView commit details
Commits on Apr 12, 2023
-
Remove code duplication between returndatacopy and others (privacy-sc…
…aling-explorations#1340) ### Description Remove code duplication between returndatacopy and others as they use similar test codes to construct bytecode for testing. ### Issue Link privacy-scaling-explorations#1324 ### Type of change - [x] Refactor code ### Contents Remove code duplication in unit tests between returndatacopy, balance, calldataload and others. The unit tests should behave the same. ### Rationale It's easier to manage the mock bytecode when we move similar code into one place. ### How Has This Been Tested? Use the command `make test` to run unit tests <hr> --------- Co-authored-by: Brecht Devos <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fa320ea - Browse repository at this point
Copy the full SHA fa320eaView commit details
Commits on Apr 13, 2023
-
Fix
redundant constraint in StateCircuit
(privacy-scaling-explorati……ons#1339) ### Description Refer to comment in [privacy-scaling-explorations#1161](privacy-scaling-explorations#1161 (comment)) ### Issue Link [privacy-scaling-explorations#1308](privacy-scaling-explorations#1308) ### 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 ### This PR contains: - Deleted [L401-402](https://github.com/privacy-scaling-explorations/zkevm-circuits/blob/7e9603a28a818819c071c81fd2f4f6b58737dea6/zkevm-circuits/src/state_circuit/constraint_builder.rs#L402) in StateCircuit
Configuration menu - View commit details
-
Copy full SHA for 896cd94 - Browse repository at this point
Copy the full SHA 896cd94View commit details -
feat/privacy-scaling-explorations#1186 Unify restore_ctx and handle_r…
…eturn in bus_mapping (privacy-scaling-explorations#1342) ### Description - unify handle_restore_context and gen_restore_context_ops ### Issue Link fix privacy-scaling-explorations#1186 ### Type of change - [x] refactor (non-breaking change which adds functionality) ### Contents - merge `gen_restore_context_ops` into `handle_restore_context`
Configuration menu - View commit details
-
Copy full SHA for b476ef4 - Browse repository at this point
Copy the full SHA b476ef4View commit details -
disable optimization for solc compiling (privacy-scaling-explorations…
…#1341) fix privacy-scaling-explorations#1302 --------- Co-authored-by: Zhang Zhuo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8f4f55c - Browse repository at this point
Copy the full SHA 8f4f55cView commit details
Commits on Apr 14, 2023
-
Bytecode soundness patch on last byte (privacy-scaling-explorations#1333
) ### Description Fixes bug soundness in bytecode circuit, where an attacker can insert as many bytes after the last byte (row where `q_last`=1). ### Issue Link privacy-scaling-explorations#1332 ### 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 - Bug fix 1: Add a constraint that forces the next state to be "Header" when the current state is "Byte" and `index == length - 1` - Bug fix 2: set `q_enable=1` for the row where `q_last=1` ### Rationale This would patch the possibility of an attacker inserting false bytes that extend beyond the correct bytecode. ### How Has This Been Tested? Created a test called `bytecode_soundness_bug_1` that overwrites the last rows with`tag=Byte`. `cargo test --features test --package zkevm-circuits --lib -- bytecode_circuit::circuit::tests::bytecode_soundness_bug_1 --exact --nocapture` Also ran other unit tests to check correctness was maintained. --------- Co-authored-by: Eduard S <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6b890d5 - Browse repository at this point
Copy the full SHA 6b890d5View commit details -
Fix
ExecutionState::halts_in_exception
(privacy-scaling-exploration……s#1299) ### Description This PR aims to remove `ExecutionState::{ErrorDepth,InsufficientBalance ,ErrorContractAddressCollision}` from `ExecutionState::halts_in_exception` and handle `InsufficientBalance` properly by `CallOpGadget` ### Issue Link privacy-scaling-explorations#1298 ### 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 Some exception states happen right in the moment when we are doing `*CALL*` or `CREATE*`, including: - `ErrorDepth` - `ErrorInsufficientBalance` - `ErrorContractAddressCollision` Which will only be treated as failure of sub-call, and won't halt current call. ```mermaid stateDiagram-v2 state fork <<fork>> state join <<join>> state NextCall { ...* --> join } state CurrentCall { ... --> fork fork --> CALL|CREATE fork --> ErrorDepth fork --> ErrorInsufficientBalance fork --> ErrorContractAddressCollision CALL|CREATE --> NextCall ErrorDepth --> join ErrorInsufficientBalance --> join ErrorContractAddressCollision --> join join --> NextStep } ``` However, if we want to handle these as a separate state we'd have many constraint duplicated (e.g. gas cost calculation), so `ErrorInsufficientBalance` is merged into `CALL` in privacy-scaling-explorations#998 without too much overhead. For the other 2 states we could apply the same strategy to avoid confusion. ### Rationale ### How Has This Been Tested? ### Design choices
Configuration menu - View commit details
-
Copy full SHA for c88d82d - Browse repository at this point
Copy the full SHA c88d82dView commit details
Commits on Apr 17, 2023
-
create tx by mock crate (privacy-scaling-explorations#1360)
### Description Fix issue privacy-scaling-explorations#1192 ### Issue Link Issue privacy-scaling-explorations#1192 ### Type of change - [ ] 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 - [_item_] ### Rationale [_design decisions and extended information_] ### How Has This Been Tested? [_explanation_] <hr> ## How to fill a PR description Please give a concise description of your PR. The target readers could be future developers, reviewers, and auditors. By reading your description, they should easily understand the changes proposed in this pull request. MUST: Reference the issue to resolve ### Single responsability Is RECOMMENDED to create single responsibility commits, but not mandatory. Anyway, you MUST enumerate the changes in a unitary way, e.g. ``` This PR contains: - Cleanup of xxxx, yyyy - Changed xxxx to yyyy in order to bla bla - Added xxxx function to ... - Refactored .... ``` ### Design choices RECOMMENDED to: - What types of design choices did you face? - What decisions you have made? - Any valuable information that could help reviewers to think critically
Configuration menu - View commit details
-
Copy full SHA for 3aa36a2 - Browse repository at this point
Copy the full SHA 3aa36a2View commit details
Commits on Apr 18, 2023
-
Update geth dependency from v1.10.18 to v1.11.5 (privacy-scaling-expl…
…orations#1363) ### Description Updates the geth dependency in geth-utils to latest release. Pulled this out from privacy-scaling-explorations#1361. ### Issue Link Related to privacy-scaling-explorations#1362. ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] 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 - Update geth dependency (and ran `go mod tidy` to update sub-dependencies) - Update code bindings to struct changes ### Rationale N/A ### How Has This Been Tested? Using the testing suite in the repo.
Configuration menu - View commit details
-
Copy full SHA for 3429f83 - Browse repository at this point
Copy the full SHA 3429f83View commit details
Commits on Apr 20, 2023
-
Implement circuit for
ErrorOutOfGasMemoryCopy
state (privacy-scalin……g-explorations#1288) ### Description Spec Markdown PR privacy-scaling-explorations/zkevm-specs#397 #### Summary 1. Merge OOG error `ExtCodeCopy` into `MemoryCopy`. 2. Implement bus-mapping and circuit for this OOG error of `CALLDATACOPY`, `CODECOPY`, `EXTCODECOPY` and `RETURNDATACOPY` opcodes. 3. OOG error executions of `CALLDATACOPY`, `CODECOPY` and `RETURNDATACOPY` are same. 4. `EXTCODECOPY` has extra `1` stack pop, and constant gas costs are different for cold (2600) and warm (100) accounts according to EIP-2929 (could reference [go-etherum gasExtCodeCopyEIP2929 function](https://github.com/ethereum/go-ethereum/blob/master/core/vm/operations_acl.go#L116)). 5. Fix `memory_copier_gas_cost` function to not calculate memory expansion for zero copy size in gas utils of `eth-types`. ### Issue Link Close privacy-scaling-explorations#1266 ### Type of change - [X] New feature (non-breaking change which adds functionality) ### How Has This Been Tested? Add new unit-test cases for this error state.
Configuration menu - View commit details
-
Copy full SHA for e55ba06 - Browse repository at this point
Copy the full SHA e55ba06View commit details
Commits on Apr 21, 2023
-
[refactor] refactor and add more helper in Bytecode (privacy-scaling-…
…explorations#1365) ### Description Refactor and add more helper functions to Bytecode: - Removed several functions such as `call`, `balance`, `mstore`, `calldatacopy`, and `return_bytecode` - Added `op_jumpdest` function - Implemented `impl_push_n` macro to generate functions for `op_push1` to `op_push32` - Implemented `impl_other_opcodes` macro to generate functions for various opcodes like `op_stop`, `op_add`, `op_mul`, `op_sub`, and so on - Renamed opcode helper functions to `op_{opcode}` for consistency and clarity ### Issue Link N/A ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] 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 - Removal of several functions - Addition of `op_jumpdest` function - Implementation of `impl_push_n` macro to generate functions for `op_push1` to `op_push32` - Implementation of `impl_other_opcodes` macro to generate functions for various opcodes - Renaming of opcode helper functions ### Rationale This refactor improves the code by removing unused functions, adding a new function, and implementing macros to generate functions for opcodes. The renaming of the opcode helper functions to `op_{opcode}` provides consistency and clarity to the codebase. ### How Has This Been Tested? https://github.com/scroll-tech/zkevm-circuits/actions/runs/4751119765
Configuration menu - View commit details
-
Copy full SHA for 4e64bdb - Browse repository at this point
Copy the full SHA 4e64bdbView commit details
Commits on Apr 26, 2023
-
[chore] upgrade toolchain to nightly-2023-04-24 (privacy-scaling-expl…
…orations#1373) ### Description Upgrade toolchain to nightly-2023-04-24 for future compatibilities. ### Issue Link N/A ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] 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 - Toolchain upgrade to nightly-2023-04-24 - Fix lint errors ### Rationale The toolchain currently in use is outdated and lacks stable features. Issue privacy-scaling-explorations#1372 requires GAT, which has been stabilized since version `1.65.0`. Meanwhile, the current stable Rust version is `1.69.0`. ### How Has This Been Tested? N/A
Configuration menu - View commit details
-
Copy full SHA for 757d1ee - Browse repository at this point
Copy the full SHA 757d1eeView commit details -
Deduplicate code between evm ConstraintBuilder and BaseConstraintBuil…
…der (privacy-scaling-explorations#1318) ### Description evm ConstraintBuilder and BaseConstraintBuilder have: require_zero require_equal require_boolean require_in_set condition add_constraints add_constraint validate_degree all with very similar implementation. Deduplicate them ### Issue Link privacy-scaling-explorations#1202 ### Type of change - Refactor ### Contents - Created a trait for common code. ### Rationale DRY ### How Has This Been Tested? Run tests. ### Notes (TODO?) - condition and validate_degree use the state, I don't know what could be the rusty way of making this code common. - Perhaps we should rethought the names of the trait and structs, BaseConstraintBuilder seems to be used mostly outside EVM circuit, while ConstraintBuilder is used in the EVM circuit exclusively. --------- Co-authored-by: adria0.eth <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3902437 - Browse repository at this point
Copy the full SHA 3902437View commit details
Commits on Apr 27, 2023
-
[feat] add memory reconstruction for precompile (privacy-scaling-expl…
…orations#1372) ### Description Added memory reconstruction for call to precompile contracts. ### Issue Link No issue is associated with this pull request. ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] 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 - Added a new function `is_precompiled` to check if the address of the contract is a precompiled contract. - Added a new function `execute_precompiled` to execute a precompiled contract. - Added a new helper function `code_address` associated with `Call` struct to get the actual address of code execution. - Reconstruct memory for call to precompile address. ### Rationale The addition of support for call to precompiled contracts in bus-mapping allows no-memory exec trace. ### How Has This Been Tested? This PR only includes the memory reconstruction part. It has been test locally via `bus_mapping::evm::opcodes::callop::tests::test_precompiled_call`. --------- Co-authored-by: Zhang Zhuo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e687615 - Browse repository at this point
Copy the full SHA e687615View commit details -
Add
SubCircuit::unusable_rows
and tests for eachSubCircuit
(priv……acy-scaling-explorations#1282) ### Description To remove magic numbers for blinding factors, this PR adds an associated function `unusable_rows` for `SubCircuit` to returns their `unusable_rows`, which should be `meta.blinding_factors() + 1`. Tests are also added to make sure the returned values are correct. Note that currently `KeccakCircuit` could be configured by environment variable `KECCAK_ROWS` to decide how many rows a round would take, which affect the different rotation queried, and it's unfortunately not a easy way to compute how many different rotations are used, so this PR hardcodes the unusable rows from `KECCAK_ROWS = 1` to `20` for easy lookup. ### Issue Link privacy-scaling-explorations#949 ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] 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 - [_item_] ### Rationale [_design decisions and extended information_] ### How Has This Been Tested? [_explanation_] --------- Co-authored-by: David Nevado <[email protected]> Co-authored-by: "adria0.eth" <[email protected]> Co-authored-by: Eduard S <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ab6a91a - Browse repository at this point
Copy the full SHA ab6a91aView commit details
Commits on Apr 28, 2023
-
Fix to handle successful run with Uint64 overflow for multiple opcodes (
privacy-scaling-explorations#1317) ### Description Fix successful run cases with Uint64 overflow for multiple opcodes. 1. Add `WordByteRangeGadget` to constrain if Word is within the specified byte range. 2. Add `WordByteCapGadget` to constrain if Word is within the specified byte range (implemented by WordByteRangeGadget) and less than a maximum cap (used to replace a WordByteRangeGadget and LtGadget). 3. Fix bus-mapping and zkevm-circuits to handle overflow cases. And add unit-tests for these cases. TODO: will try to handle memory offset overflow with zero length in another PR (try to rebase for this local PR scroll-tech#393) and related issue privacy-scaling-explorations#1301. ### Rationale Reference detailed code in `go-etherum` as: . [BLOCKHASH](https://github.com/ethereum/go-ethereum/blob/master/core/vm/instructions.go#L438) . [CALLDATALOAD](https://github.com/ethereum/go-ethereum/blob/master/core/vm/instructions.go#L285) . [CALLDATACOPY](https://github.com/ethereum/go-ethereum/blob/master/core/vm/instructions.go#L306) . [CODECOPY](https://github.com/ethereum/go-ethereum/blob/master/core/vm/instructions.go#L364) . [EXTCODECOPY](https://github.com/ethereum/go-ethereum/blob/master/core/vm/instructions.go#L382) . [JUMPI](https://github.com/ethereum/go-ethereum/blob/master/core/vm/instructions.go#L550) ### Issue Link Close privacy-scaling-explorations#1276 ### Type of change - [X] Bug fix (non-breaking change which fixes an issue) ### How Has This Been Tested? Add unit-test cases for Uint64 overflow values. --------- Co-authored-by: Zhang Zhuo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 22dd263 - Browse repository at this point
Copy the full SHA 22dd263View commit details -
Configuration menu - View commit details
-
Copy full SHA for e6096ca - Browse repository at this point
Copy the full SHA e6096caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 77bc7e5 - Browse repository at this point
Copy the full SHA 77bc7e5View commit details
Commits on May 1, 2023
-
Add Byte Range Checks in
LtChip
(privacy-scaling-explorations#1364)### Description Add Byte Range Checks in `LtChip`. This PR modifies the `LtChip`: - Added Fixed Column `u8` to the configuration of the chip - Added a lookup constraint between each `diff` advice column and the `u8` column - Added `load` function that assigns each integer from 0 to 255 (8bits) to the `u8` column Furthermore, the following have been applied to the tests: - In `less_than` testing, the circuit now takes `k = 9` to support a higher number of rows - In `copy_circuit` testing, the `assign_copy_events` function now calls `load` on the `lt_chip` to load the `u8` column ### Issue Link Related to privacy-scaling-explorations#916 ### Type of change - [x] Bug fix (non-breaking change which fixes an issue) ### How Has This Been Tested? `make test-all` --------- Co-authored-by: adria0.eth <[email protected]> Co-authored-by: Chih Cheng Liang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4669a87 - Browse repository at this point
Copy the full SHA 4669a87View commit details
Commits on May 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7abf752 - Browse repository at this point
Copy the full SHA 7abf752View commit details -
Configuration menu - View commit details
-
Copy full SHA for 16f4e16 - Browse repository at this point
Copy the full SHA 16f4e16View commit details
Commits on May 4, 2023
-
feat/ privacy-scaling-explorations#1180 refactor gen_begin_tx_ops and…
… gen_end_tx_ops (privacy-scaling-explorations#1336) ### Description fix privacy-scaling-explorations#1180 ### Issue Link privacy-scaling-explorations#1180 ### Type of change - [x] New feature (non-breaking change which adds functionality) ### Contents see privacy-scaling-explorations#1180 ### Rationale [_design decisions and extended information_] ### How Has This Been Tested? Pass all the existing test cases --------- Co-authored-by: Han <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5b6c250 - Browse repository at this point
Copy the full SHA 5b6c250View commit details -
Configuration menu - View commit details
-
Copy full SHA for a04940c - Browse repository at this point
Copy the full SHA a04940cView commit details -
Prune tx struct fields and rm witness Call (privacy-scaling-explorati…
…ons#1378) ### Description We tried to remove some unused tx structs. ### Issue Link privacy-scaling-explorations#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
Configuration menu - View commit details
-
Copy full SHA for 68e3d98 - Browse repository at this point
Copy the full SHA 68e3d98View commit details -
zellic-fix-1: fix typo in multiplied terms (privacy-scaling-explorati…
…ons#1389) ### Description An important typo. ### Type of change - [x] Bug fix (non-breaking change which fixes an issue) ### Contents - Add term `a[3] * b[1]` (was written as `b[2]`). Co-authored-by: Aurélien Nicolas <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 37b8aca - Browse repository at this point
Copy the full SHA 37b8acaView commit details -
Update halo2 dependency to v2023_04_20 (privacy-scaling-explorations#…
…1374) ### Description Update halo2 to the latest dependency, which contains some changes affecting the `ff` trait. ### Issue Link Resolve privacy-scaling-explorations#1366 ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] 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 ### Rationale I've extended the `Field` trait we define in `eth_types` to contain the common traits used in different places, to avoid having a custom list of traits in each function.
Configuration menu - View commit details
-
Copy full SHA for b8ae7af - Browse repository at this point
Copy the full SHA b8ae7afView commit details
Commits on May 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 82c7942 - Browse repository at this point
Copy the full SHA 82c7942View commit details -
Configuration menu - View commit details
-
Copy full SHA for a43f688 - Browse repository at this point
Copy the full SHA a43f688View commit details
Commits on May 6, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 6d0e84f - Browse repository at this point
Copy the full SHA 6d0e84fView commit details
Commits on May 9, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4ee4a27 - Browse repository at this point
Copy the full SHA 4ee4a27View commit details
Commits on May 10, 2023
-
Simplify bytecode circuit assignment (privacy-scaling-explorations#1397)
### Description We simplify the assignment logic in the bytecode circuit by reducing the number of function arguments. The reduction is achieved by 1. Construct IsZero Chips early and make them a part of the circuit struct so that they don't stay with the function arguments. 2. Create a new row struct that carries all the relevant data. ### Issue Link This would be part of privacy-scaling-explorations#1391. ### 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 ### Rationale - I avoid using `BytecodeRow` in the `bytecode_unroller` since they are part of the future simplification plan. ### How Has This Been Tested? Sent to the CI and pray.
Configuration menu - View commit details
-
Copy full SHA for fbbe1bd - Browse repository at this point
Copy the full SHA fbbe1bdView commit details -
fix(testool): fix coinbase, solves privacy-scaling-explorations#1160 (p…
…rivacy-scaling-explorations#1400) ### Description When running `testool --oneliner`, set the coinbase to `MOCK_COINBASE` and top up with 1 wei to register it into the state db. ### Issue Link privacy-scaling-explorations#1160 ### 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 Co-authored-by: adria0 <adria0@nowhere>
Configuration menu - View commit details
-
Copy full SHA for a807754 - Browse repository at this point
Copy the full SHA a807754View commit details
Commits on May 11, 2023
-
Use halo2 circuit-params feature (privacy-scaling-explorations#1399)
Refactor SuperCircuit and PiCircuit to use circuit parameters instead of associated constants. Resolve privacy-scaling-explorations#1393 ### Type of change - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) ### Contents Using the `circuit-params` feature recently introduced in our fork of halo2 allows simplifying the code for circuits that require runtime parameters at configuration time. It removes the annoying associated const of the circuit types, and also allows having a single circuit type (no need for an extra circuit test type).
Configuration menu - View commit details
-
Copy full SHA for 14bd7c9 - Browse repository at this point
Copy the full SHA 14bd7c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 32d81d9 - Browse repository at this point
Copy the full SHA 32d81d9View commit details
Commits on May 12, 2023
-
Configuration menu - View commit details
-
Copy full SHA for bfdf4d4 - Browse repository at this point
Copy the full SHA bfdf4d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 156f847 - Browse repository at this point
Copy the full SHA 156f847View commit details -
Replace Witness.rs's ExecStep with CIP's (privacy-scaling-exploration…
…s#1403) ### Description - We replace ExecStep struct in witness.rs with the one in the Circuit Input Builder. - We add some convenient methods in CIP's ExecStep so that we don't create extra struct fields. - Add `get_rws` method to `witness::Block` to streamline the logic of getting Read-Write records. ### Issue Link Part of privacy-scaling-explorations#1391 ### 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 ### Rationale - Notes for reviewers, one place that might be error-prone would be the rw_indices. After the cleanup in this PR, we can replace the manual counting of rw indices with something like `evm_circuit::utils::StepRws`. --------- Co-authored-by: Eduard S. <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0e1d230 - Browse repository at this point
Copy the full SHA 0e1d230View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6923a9 - Browse repository at this point
Copy the full SHA d6923a9View commit details
Commits on May 15, 2023
-
Set keccak logs to debug level (privacy-scaling-explorations#1405)
### Description Keccak circuit logs messages that make CI logs hard to reason. We can set it from "INFO" level to "DEBUG" level to suppress the messages in the CI output but still keep it for develoepers. https://github.com/privacy-scaling-explorations/zkevm-circuits/actions/runs/4955284960/jobs/8864549606#step:13:50 <details><summary>Details</summary> <p> ``` test mock_prover::serial_test_exp_circuit_multiple_transfers_0 ... ok [2023-05-12T05:00:22Z INFO integration_tests::integration_test_circuits] test Keccak circuit, block: #1 - Transfer 0 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] - Post absorb: [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Lookups: 2 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Columns: 7 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] - Post padding: [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Lookups: 1 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Columns: 10 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] - Post theta: [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Lookups: 14 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Columns: 38 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] - Post rho/pi: [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Lookups: 53 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Columns: 191 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] - Post chi: [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Lookups: [52](https://github.com/privacy-scaling-explorations/zkevm-circuits/actions/runs/4955284960/jobs/8864549606#step:13:53) [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Columns: 195 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] - Post squeeze: [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Lookups: 1 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Columns: 198 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Degree: 4 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Minimum rows: [61](https://github.com/privacy-scaling-explorations/zkevm-circuits/actions/runs/4955284960/jobs/8864549606#step:13:62) [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Total Lookups: 123 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] Total Columns: 198 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] num unused cells: 229 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] part_size absorb: 4 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] part_size theta: 2 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] part_size theta c: 2 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] part_size theta t: 3 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] part_size rho/pi: 3 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] part_size chi base: 3 [2023-05-12T05:00:22Z INFO zkevm_circuits::keccak_circuit] uniform part sizes: [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2] ``` </p> </details> ### Issue Link ### 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
Configuration menu - View commit details
-
Copy full SHA for 5dba7f7 - Browse repository at this point
Copy the full SHA 5dba7f7View commit details
Commits on May 16, 2023
-
Move stats to bin (privacy-scaling-explorations#1407)
### Description We have 4 utility commands that show us statistics of different circuits. Currently, these features were compiled with the tests, causing dependency and feature flags management troubles. The commands also cause confusion with the ignored test flags. We can enjoy many benefits if we keep these commands in binary executables. - We can compile them on demand. We remove compilation overheads for the main components and tests. - Stats commands are confined in the `bin` directory, so we don't have confusing testing code. ### Issue Link It was privacy-scaling-explorations#1246. After exploring, I found room for improving the status quo. ### 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 - Move the underlying logics of `make stats_state_circuit`, `make stats_evm_circuit`, `make stats_copy_circuit`, and `make evm_exec_steps_occupancy` to `bin` directory. - Add a feature flag, `stats` for these specific tools. - Remove `DisplayTable` and replace all its use with `cli-table`'s feature. This has the benefit that the line of codes in the codebase reflects more on the core zkevm functionality. After we used `cli-table`, the table also rendered differently, see images below. - Move `cli-table` from `dev-dependency` to `dependency`, but as an optional dependency. - Remove dead dependency `subtle` and `criterion` After: <img width="508" alt="Screenshot 2023-05-14 at 3 26 43 PM" src="https://github.com/privacy-scaling-explorations/zkevm-circuits/assets/3391420/a4d32ce1-3559-4057-852e-b9b358f18553"> Before: <img width="471" alt="Screenshot 2023-05-14 at 3 27 53 PM" src="https://github.com/privacy-scaling-explorations/zkevm-circuits/assets/3391420/a073763d-71e1-4c15-876b-7e4252970875"> ### Rationale - Some undesirable results were introduced. - We left the Instrument struct unchanged. The `Instrument` is buried deep in the ExecutionConfig. We intend to deal with it in future PRs to keep the diff of this one slim. - We changed some visibilities of structs and functions in evm circuits from `pub(crate)` to `pub` ### How Has This Been Tested? Manual run `make stats_state_circuit`, `make stats_evm_circuit`, `make stats_copy_circuit`, and `make evm_exec_steps_occupancy` and see if they work.
Configuration menu - View commit details
-
Copy full SHA for ead0b3d - Browse repository at this point
Copy the full SHA ead0b3dView commit details -
Rm dead code except of zkevm circuits (privacy-scaling-explorations#1408
) ### Description We remove `#![allow(dead_code)]` everywhere in the codebases other than `zkevm-circuits`. This PR should be merged after privacy-scaling-explorations#1407 ### Issue Link No issue yet ### 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 - Removed `#![allow(dead_code)]` everywhere other than `zkevm-circuits`. - Make test utility functions like `Block::get_test_degree` and `Sha3CodeGen` public functions so that they don't cause `cargo build -p zkevm-circuits` to fail. This might come with the cost of extra compilation time. - Refactor `gen_sha3_code` into `Sha3CodeGen` so that we don't have to import `MemoryKind` to use it.
Configuration menu - View commit details
-
Copy full SHA for ef13927 - Browse repository at this point
Copy the full SHA ef13927View commit details -
Add
rustdocflags
config for macos inMakefile
(privacy-scaling-ex……plorations#1412) ### Description Add `rustdocflags` override in `Makefile` when it's macos to make doc test work. Note that `config.toml` doesn't support to specify `rustdocflags` under `[target.'cfg(target_os = "macos")']` (see rust-lang/cargo#11323) so we have to use command line override to add it manually. ### Issue Link Resolves privacy-scaling-explorations#1410 ### 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 ### How Has This Been Tested? On macos, run `make test_doc`. Co-authored-by: Chih Cheng Liang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 255a9bc - Browse repository at this point
Copy the full SHA 255a9bcView commit details -
Retype Gas limit and nonce to u64 (privacy-scaling-explorations#1409)
### Description - Gas limit from Word to u64 - Nonce from Word to u64 ### Issue Link Fix privacy-scaling-explorations#1377 ### 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 - change geth_type Account's nonce and gas_limit to eth_core::U64. We can not use simple u64 because we need to serialize nonce and gas_limit to hex value with 0x prefix for Geth RPC to use. - simple u64 is used in rest of the places. ### Rationale
Configuration menu - View commit details
-
Copy full SHA for d21952d - Browse repository at this point
Copy the full SHA d21952dView commit details
Commits on May 17, 2023
-
Split table into files (privacy-scaling-explorations#1402)
### Description Split table into files. * prior This is one the new pr of privacy-scaling-explorations#1061 --------- Co-authored-by: Chih Cheng Liang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 438bac5 - Browse repository at this point
Copy the full SHA 438bac5View commit details -
Remove RwTableTag (privacy-scaling-explorations#1406)
### Description `RwTableTag` can be fully replaced by `Target`. ### Issue Link Part of privacy-scaling-explorations#1391 ### 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 We add EnumIter, Hash, Expr to Target to let it serve different needs. Note to reviewers: the `impl From<Target> for usize` is required by BinaryNumberConfig.
Configuration menu - View commit details
-
Copy full SHA for 69cb8a9 - Browse repository at this point
Copy the full SHA 69cb8a9View commit details
Commits on May 19, 2023
-
Fix infinite loop (privacy-scaling-explorations#1421)
### Description Fix an infinite loop from a `From` implementation calling itself. ### Issue Link Resolve privacy-scaling-explorations#1420 Related privacy-scaling-explorations#1417 ### Type of change - [x] Bug fix (non-breaking change which fixes an issue) ### Contents @ChihChengLiang found that this issue was introduced in privacy-scaling-explorations#1406 and by debugging on the debug build I found the infinite loop (which caused the stack to overflow which terminated the program with a segfault). The segfault is not observed in the release build, I guess the compiler optimizes the recursive call into an infinite loop, so the stack is never exhausted.
Configuration menu - View commit details
-
Copy full SHA for 70d7da4 - Browse repository at this point
Copy the full SHA 70d7da4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 244fe70 - Browse repository at this point
Copy the full SHA 244fe70View commit details
Commits on May 20, 2023
-
Bug: fix to truncate offset from Word to Uint64 when length is zero f…
…or some opcodes (privacy-scaling-explorations#1415) ### Description Reference go-ethereum function [calcMemSize64WithUint](https://github.com/ethereum/go-ethereum/blob/84c3799e21d61d677965715fe09f8209660b4009/core/vm/common.go#L38), ignore to check Uint64 overflow for memory offset if length is zero. it is also called by [calcMemSize64](https://github.com/ethereum/go-ethereum/blob/84c3799e21d61d677965715fe09f8209660b4009/core/vm/common.go#LL31C9-L31C30). And both are used for opcodes in [memory_table.go](https://github.com/ethereum/go-ethereum/blob/84c3799e21d61d677965715fe09f8209660b4009/core/vm/memory_table.go#L20) as `memorySize` in [jump_table.go](https://github.com/ethereum/go-ethereum/blob/84c3799e21d61d677965715fe09f8209660b4009/core/vm/jump_table.go#L387). For Call opcodes, in offset and size are truncated to Uint64 as [opCall](https://github.com/ethereum/go-ethereum/blob/84c3799e21d61d677965715fe09f8209660b4009/core/vm/instructions.go#LL672C60-L672C60). ### Issue Link Related issue privacy-scaling-explorations#1301 Original local PR scroll-tech#393 ### Type of change - [X] Bug fix (non-breaking change which fixes an issue) ### How Has This Been Tested? 1. Fix `testool` case `randomStatetest85_d0_g0_v0`. 2. Add test cases of overflow offset and zero length for related opcodes.
Configuration menu - View commit details
-
Copy full SHA for 43c67c9 - Browse repository at this point
Copy the full SHA 43c67c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for bcfd2d5 - Browse repository at this point
Copy the full SHA bcfd2d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c5f3c5 - Browse repository at this point
Copy the full SHA 2c5f3c5View commit details
Commits on May 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 5508767 - Browse repository at this point
Copy the full SHA 5508767View commit details -
Configuration menu - View commit details
-
Copy full SHA for c498841 - Browse repository at this point
Copy the full SHA c498841View commit details -
Fix EXTCODECOPY with empty account (privacy-scaling-explorations#1429)
### Description We treat empty accounts by storing their code_hash in the RwTable as 0. EXTCODECOPY was obtaining the bytecode length by querying the bytecode table with code_hash=0 on existing accounts, but that entry should be invalid (there's no bytecode with code_hash=0). Skip the bytecode table length lookup when code_hash=0. I've also reintroduced the `Block::debug_print_txs_steps_rw_ops` function, updated to use the new `Block::get_rws` API. This function is not used in the code, but it's very convenient to call it when debugging. ### Issue Link Resolve privacy-scaling-explorations#1190 ### Type of change - [x] Bug fix (non-breaking change which fixes an issue)
Configuration menu - View commit details
-
Copy full SHA for 626f4b9 - Browse repository at this point
Copy the full SHA 626f4b9View commit details
Commits on May 25, 2023
-
[CREATE Part A (updated)] Modification to Copy Circuit (privacy-scali…
…ng-explorations#1419) ### Description NOTE: This is an updated version of privacy-scaling-explorations#1356 This is Part A of a 3 part pull request to add support for `CREATE`/`CREATE2` opcodes. Part A: privacy-scaling-explorations#1356 Part B: privacy-scaling-explorations#1357 Part C: privacy-scaling-explorations#1358 ### Issue Link privacy-scaling-explorations#1130 ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] 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 As part of the bigger additions needed for the `CREATE`/`CREATE2` opcodes' gadget, this PR adds support for the copy circuit to "always" have a value accumulator field `value_acc`. ### Rationale We need a value accumulator (of the random linear combination) in order to get the `RLC(bytes)` for the bytes copied from `Memory` to `Bytecode` (specifically the init code). This RLC is later used to do a lookup to the Keccak table to check the value of `keccak256(init_code)`. ### How Has This Been Tested? The existing tests for copy circuit pass for the updated constraints on the copy circuit. --------- Co-authored-by: Rohit Narurkar <[email protected]> Co-authored-by: KimiWu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dbe67c8 - Browse repository at this point
Copy the full SHA dbe67c8View commit details
Commits on May 26, 2023
-
Feat/CREATE Part B - Error cases that will be handled within opcode g…
…adgets (privacy-scaling-explorations#1425) ### Description **NOTE: This is an updated version of privacy-scaling-explorations#1357 This PR is actually based on top of privacy-scaling-explorations#1419 ### Issue Link privacy-scaling-explorations#1130 ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] 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 Error types for insufficient balance and nonce overflow. These are supporting changes required for the CREATE/CREATE2 opcodes' gadget. ### Rationale The above errors will be handled within the CREATE/CREATE2 opcodes' gadget. In case of insufficient balance, it is also handled in the CallOp gadget for call related opcodes. --------- Co-authored-by: Rohit Narurkar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5e1d35e - Browse repository at this point
Copy the full SHA 5e1d35eView commit details
Commits on May 29, 2023
-
Remove release drafter (privacy-scaling-explorations#1436)
### Description The release drafter was used to create a list of changes in the release note. As Github now provides this functionality by native, there's no need to maintain this CI script. ### Issue Link [_link issue here_] ### 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
Configuration menu - View commit details
-
Copy full SHA for 96d2e3c - Browse repository at this point
Copy the full SHA 96d2e3cView commit details
Commits on May 30, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7bfe635 - Browse repository at this point
Copy the full SHA 7bfe635View commit details
Commits on May 31, 2023
-
Configuration menu - View commit details
-
Copy full SHA for bc1d2e1 - Browse repository at this point
Copy the full SHA bc1d2e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9488ddd - Browse repository at this point
Copy the full SHA 9488dddView commit details -
Remove keccak256 crate and migrate keccak plain to eth-types (privacy…
…-scaling-explorations#1440) ### Description - We remove the keccak256 crate. - We migrate the keccak256 plain implementation to the eth-types crate. As we migrate keccak circuit to the zkevm-crate, most of the functions left in keccak256 crate are unused except of the plain keccak hash implementation. Most of the crates in the codebase depend on keccak256 crate because they use the plain keccak hash. The plain keccak hash is only 300 lines big. It would be beneficial to keep a plain implementation for people to audit the optimized keccak circuit. ### Type of change Bug fix (non-breaking change which fixes an issue)
Configuration menu - View commit details
-
Copy full SHA for 73b2aeb - Browse repository at this point
Copy the full SHA 73b2aebView commit details
Commits on Jun 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1ec2fe8 - Browse repository at this point
Copy the full SHA 1ec2fe8View commit details -
Sync MPT to main (privacy-scaling-explorations#1444)
### Description This PR simply merges the current `main` into the MPT branch `mpt2`. This is the first step to get some further MPT changes merged into the MPT branch without making the PRs too big. ``` This PR contains: - Merge `main` into `mpt2` with the necessary changes to the MPT circuit ``` ### Issue Link [_link issue here_] ### Type of change - [ ] 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 - [_item_] ### Rationale [_design decisions and extended information_] ### How Has This Been Tested? Intermediate step, so limited testing --------- Signed-off-by: smtmfft <[email protected]> Signed-off-by: smtmfft <[email protected]> Co-authored-by: pinkiebell <[email protected]> Co-authored-by: Haichen Shen <[email protected]> Co-authored-by: z2trillion <[email protected]> Co-authored-by: Eduard S <[email protected]> Co-authored-by: adria0.eth <[email protected]> Co-authored-by: Han <[email protected]> Co-authored-by: smtmfft <[email protected]> Co-authored-by: smtmfft <[email protected]> Co-authored-by: Chih Cheng Liang <[email protected]> Co-authored-by: DreamWuGit <[email protected]> Co-authored-by: Rohit Narurkar <[email protected]> Co-authored-by: Zhang Zhuo <[email protected]> Co-authored-by: Ming <[email protected]> Co-authored-by: Wu Sung Ming <[email protected]> Co-authored-by: xiaodino <[email protected]> Co-authored-by: Mason Liang <[email protected]> Co-authored-by: Steven <[email protected]> Co-authored-by: Carlos Pérez <[email protected]> Co-authored-by: Paul <[email protected]> Co-authored-by: AronisAt79 <[email protected]> Co-authored-by: Mason Liang <[email protected]> Co-authored-by: JohnWick2ETH <[email protected]> Co-authored-by: kunxian xia <[email protected]> Co-authored-by: Leo Lara <[email protected]> Co-authored-by: zengzengzenghuy <[email protected]> Co-authored-by: john xu <[email protected]> Co-authored-by: Miha Stopar <[email protected]> Co-authored-by: aguzmant103 <[email protected]> Co-authored-by: Richord <[email protected]> Co-authored-by: Kimi Wu <[email protected]> Co-authored-by: Mickey <[email protected]> Co-authored-by: Luozhu <[email protected]> Co-authored-by: DoHoon Kim <[email protected]> Co-authored-by: jeong0982 <[email protected]> Co-authored-by: Andy Arditi <[email protected]> Co-authored-by: David Nevado <[email protected]> Co-authored-by: omahs <[email protected]> Co-authored-by: Richord <[email protected]> Co-authored-by: ntampakas <[email protected]> Co-authored-by: ashWhiteHat <[email protected]> Co-authored-by: naure <[email protected]> Co-authored-by: Aurélien Nicolas <[email protected]> Co-authored-by: testuser-at-490752553772 <[email protected]> Co-authored-by: xiaodino <[email protected]> Co-authored-by: Thomas Pan <[email protected]> Co-authored-by: Akase Cho <[email protected]> Co-authored-by: Vu <[email protected]> Co-authored-by: Alex Beregszaszi <[email protected]> Co-authored-by: Enrico Bottazzi <[email protected]> Co-authored-by: adria0 <adria0@nowhere>
Configuration menu - View commit details
-
Copy full SHA for 439a389 - Browse repository at this point
Copy the full SHA 439a389View commit details -
Configuration menu - View commit details
-
Copy full SHA for c95cd91 - Browse repository at this point
Copy the full SHA c95cd91View commit details -
Configuration menu - View commit details
-
Copy full SHA for 47b46f8 - Browse repository at this point
Copy the full SHA 47b46f8View commit details
Commits on Jun 2, 2023
-
Replace Gas, GasCost and ProgramCounter by u64. (privacy-scaling-expl…
…orations#1448) ### Description This is a very small MRs removing some overhead. It replaces the types/structures for Gas, GasCost and ProgramCounter by u64. ### Issue Link Issue privacy-scaling-explorations#1404 ### 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 ### Rationale Keeping the existing code but removing the structures. ### How Has This Been Tested? No tests were added. --------- Co-authored-by: adria0.eth <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 092ab1f - Browse repository at this point
Copy the full SHA 092ab1fView commit details -
Add PiCircuit to integration tests (privacy-scaling-explorations#1447)
### Description This is a very small PR. While investigating privacy-scaling-explorations#1439 I noticed we don't have an integration test for the Public Inputs Circuit, so I just added it. ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] 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
Configuration menu - View commit details
-
Copy full SHA for 7715ef2 - Browse repository at this point
Copy the full SHA 7715ef2View commit details -
feat: add
shanghai
feature and make CI pass with Shanghai geth trac……es (privacy-scaling-explorations#1424) ### Description 1. Add Shanghai related fields to chain config in geth-utils. 2. EIP-3651 (Warm COINBASE): add a new access-list write for coinbase to Begin TX. 3. Part of EIP-3860 (Limit and meter initcode): only add gas cost of init code to Begin TX (missing gas cost changes in Create and OOG Create). ### Issue Link Issue privacy-scaling-explorations#1362 Local related PRs: scroll-tech#497 scroll-tech#500 scroll-tech#507 Reference previous PR: privacy-scaling-explorations#1361 ### Type of change - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) ### How Has This Been Tested? Unit test cases of CI could pass with Shanghai geth traces. --------- Co-authored-by: Zhang Zhuo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for de9f845 - Browse repository at this point
Copy the full SHA de9f845View commit details -
Fix RLC is_lt_128 (privacy-scaling-explorations#1449)
### Description In the RLC gadget, the indicator `is_lt_128` must be equivalent to `value < 128`. However, currently only the `true` case is handled. This PR handles both `true` and `false` cases. ### Issue Link Scroll internal. ### Type of change - [x] Bug fix (non-breaking change which fixes an issue) --------- Co-authored-by: Aurélien Nicolas <[email protected]> Co-authored-by: Han <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7b77f9c - Browse repository at this point
Copy the full SHA 7b77f9cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f09702a - Browse repository at this point
Copy the full SHA f09702aView commit details
Commits on Jun 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 64a0d81 - Browse repository at this point
Copy the full SHA 64a0d81View commit details -
Configuration menu - View commit details
-
Copy full SHA for 80d97b9 - Browse repository at this point
Copy the full SHA 80d97b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03f0f74 - Browse repository at this point
Copy the full SHA 03f0f74View commit details
Commits on Jun 4, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 5f8c754 - Browse repository at this point
Copy the full SHA 5f8c754View commit details -
Configuration menu - View commit details
-
Copy full SHA for 40dc38e - Browse repository at this point
Copy the full SHA 40dc38eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7346463 - Browse repository at this point
Copy the full SHA 7346463View commit details
Commits on Jun 5, 2023
-
# Conflicts: # Cargo.lock # circuit-benchmarks/Cargo.toml # eth-types/src/geth_types.rs # gadgets/src/util.rs # keccak256/Cargo.toml # keccak256/src/arith_helpers.rs # keccak256/src/keccak_arith.rs # keccak256/src/lib.rs # keccak256/src/plain.rs # testool/src/compiler.rs # zkevm-circuits/Cargo.toml # zkevm-circuits/src/evm_circuit.rs # zkevm-circuits/src/pi_circuit.rs # zkevm-circuits/src/state_circuit.rs # zkevm-circuits/src/state_circuit/constraint_builder.rs # zkevm-circuits/src/table.rs # zkevm-circuits/src/table/keccak_table.rs # zkevm-circuits/src/table/mpt_table.rs # zkevm-circuits/src/tx_circuit/dev.rs # zkevm-circuits/src/tx_circuit/sign_verify.rs # zkevm-circuits/src/util.rs # zkevm-circuits/src/witness/mpt.rs
Configuration menu - View commit details
-
Copy full SHA for 53c8cdb - Browse repository at this point
Copy the full SHA 53c8cdbView commit details -
Configuration menu - View commit details
-
Copy full SHA for f4f33a1 - Browse repository at this point
Copy the full SHA f4f33a1View commit details -
Merge remote-tracking branch 'upstream/mpt2' into circuit-tools-wip
# Conflicts: # Cargo.lock # gadgets/src/util.rs # rust-toolchain # zkevm-circuits/Cargo.toml # zkevm-circuits/src/bytecode_circuit/circuit.rs # zkevm-circuits/src/bytecode_circuit/dev.rs # zkevm-circuits/src/circuit_tools/gadgets.rs # zkevm-circuits/src/evm_circuit.rs # zkevm-circuits/src/evm_circuit/step.rs # zkevm-circuits/src/evm_circuit/util.rs # zkevm-circuits/src/evm_circuit/util/instrumentation.rs # zkevm-circuits/src/keccak_circuit/cell_manager.rs # zkevm-circuits/src/lib.rs # zkevm-circuits/src/mpt_circuit.rs # zkevm-circuits/src/mpt_circuit/account_leaf.rs # zkevm-circuits/src/mpt_circuit/branch.rs # zkevm-circuits/src/mpt_circuit/extension.rs # zkevm-circuits/src/mpt_circuit/helpers.rs # zkevm-circuits/src/mpt_circuit/rlp_gadgets.rs # zkevm-circuits/src/mpt_circuit/start.rs # zkevm-circuits/src/mpt_circuit/storage_leaf.rs # zkevm-circuits/src/table.rs # zkevm-circuits/src/tx_circuit.rs
Configuration menu - View commit details
-
Copy full SHA for 76b69bd - Browse repository at this point
Copy the full SHA 76b69bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a59b4c - Browse repository at this point
Copy the full SHA 3a59b4cView commit details
Commits on Jun 6, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 8ec4362 - Browse repository at this point
Copy the full SHA 8ec4362View commit details
Commits on Jun 7, 2023
-
Configuration menu - View commit details
-
Copy full SHA for d3ed9ce - Browse repository at this point
Copy the full SHA d3ed9ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 71ff2c2 - Browse repository at this point
Copy the full SHA 71ff2c2View commit details
Commits on Jun 8, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 6dad45a - Browse repository at this point
Copy the full SHA 6dad45aView commit details
Commits on Jun 16, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4abbbe5 - Browse repository at this point
Copy the full SHA 4abbbe5View commit details
Commits on Jun 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 101be36 - Browse repository at this point
Copy the full SHA 101be36View commit details -
Configuration menu - View commit details
-
Copy full SHA for 709c923 - Browse repository at this point
Copy the full SHA 709c923View commit details -
Configuration menu - View commit details
-
Copy full SHA for 15b3794 - Browse repository at this point
Copy the full SHA 15b3794View commit details -
Configuration menu - View commit details
-
Copy full SHA for d330654 - Browse repository at this point
Copy the full SHA d330654View commit details
Commits on Jun 18, 2023
-
is_split implemented from spliting at insertion time
condition excluded, would be better if optimize condition as well
Configuration menu - View commit details
-
Copy full SHA for 4f7790e - Browse repository at this point
Copy the full SHA 4f7790eView commit details
Commits on Jun 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7e141c4 - Browse repository at this point
Copy the full SHA 7e141c4View commit details
Commits on Jun 28, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 0ebd57f - Browse repository at this point
Copy the full SHA 0ebd57fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 51ef3f9 - Browse repository at this point
Copy the full SHA 51ef3f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 502eb86 - Browse repository at this point
Copy the full SHA 502eb86View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4fdd8e7 - Browse repository at this point
Copy the full SHA 4fdd8e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fe1e7d - Browse repository at this point
Copy the full SHA 0fe1e7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 487f570 - Browse repository at this point
Copy the full SHA 487f570View commit details -
Configuration menu - View commit details
-
Copy full SHA for 626ca59 - Browse repository at this point
Copy the full SHA 626ca59View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0632daf - Browse repository at this point
Copy the full SHA 0632dafView commit details
Commits on Jun 29, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b8ae87c - Browse repository at this point
Copy the full SHA b8ae87cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e43ed9 - Browse repository at this point
Copy the full SHA 0e43ed9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3632f83 - Browse repository at this point
Copy the full SHA 3632f83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97e7c2a - Browse repository at this point
Copy the full SHA 97e7c2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f9dc002 - Browse repository at this point
Copy the full SHA f9dc002View commit details -
Merge pull request #14 from CeciliaZ030/challenge-api
Challenge api
Configuration menu - View commit details
-
Copy full SHA for d58d793 - Browse repository at this point
Copy the full SHA d58d793View commit details -
Configuration menu - View commit details
-
Copy full SHA for 531a020 - Browse repository at this point
Copy the full SHA 531a020View commit details