Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

Commit e4b3319

Browse files
ed255adria0
andauthored
Implementation of tx circuit (shortcut 1) (#484)
* Implement Tx Circuit (shortcut 1) Implement the Tx Circuit as specified in https://github.com/appliedzkp/zkevm-specs/blob/master/specs/transactions-proof.md#circuit-behaviour-shortcut-1 This implementation uses ~205 columns and ~170k rows per transaction. New dependencies to the zkevm-circuits subcrate: - `halo2wrong` subcrates. This is where the ECDSA verification chip is implemented. This dependency uses `halo2` and this means that we'll require the version of `halo2` used in `halo2wrong` and `zkevm-circuits` to match. - `group`: Required for field and curve traits - `libsecp256k1`: Requiered to perform the ECDSA public key recovery with access to the public key coordinates. - `rlp`: Required to calculate the RLP of the transaction to get the transaction hash (to sign) - `num-bigint`: Used to hold an integer bigger than the field, to latter apply mod Fq (this is required for the message hash in the ECDSA signature operation) - `subtle`: Used to map `CtOption` to `Result` * Split light and heavy tests; run heavy tests serially * Address some comments from Carlos * Document power of randomness expression trick * Reuse geth_types::Transaction in tx_circuit * Remove unused function * Move random_linear_combine fn to utils * Address comments from Adria * Remove unused function * Address comments from Adria v2 * Address comments from ChihChengLiang * Address comments from ChihChengLiang v2 * Fix * Add more tests Co-authored-by: adria0.eth <5526331+adria0@users.noreply.github.com>
1 parent 394f3d6 commit e4b3319

File tree

11 files changed

+1855
-30
lines changed

11 files changed

+1855
-30
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,16 @@ jobs:
4747
~/.cargo/git/db/
4848
target/
4949
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
50-
- name: Run tests
50+
- name: Run light tests # light tests are run in parallel
5151
uses: actions-rs/cargo@v1
5252
with:
5353
command: test
5454
args: --verbose --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks
55+
- name: Run heavy tests # heavy tests are run serially to avoid OOM
56+
uses: actions-rs/cargo@v1
57+
with:
58+
command: test
59+
args: --verbose --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks serial_ -- --ignored --test-threads 1
5560

5661
build:
5762
if: github.event.pull_request.draft == false

0 commit comments

Comments
 (0)