From e7607a50a2b62eae5a9ad6d7a9346d4d0baa9b62 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Thu, 2 Nov 2023 14:07:46 -0700 Subject: [PATCH 1/3] chore: add `cargo audit` and update dependencies disabling zkevm benches due to versioning issues --- .github/workflows/ci.yaml | 3 +++ snark-verifier-sdk/Cargo.toml | 36 +++++++++++++++++------------------ snark-verifier/Cargo.toml | 6 +++--- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cd98b964..74d96520 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -52,3 +52,6 @@ jobs: - name: Run clippy run: cargo clippy --all --all-targets -- -D warnings + + - name: Run cargo audit + uses: actions-rs/audit-check@v1 diff --git a/snark-verifier-sdk/Cargo.toml b/snark-verifier-sdk/Cargo.toml index 899c2cbb..09f24e8d 100644 --- a/snark-verifier-sdk/Cargo.toml +++ b/snark-verifier-sdk/Cargo.toml @@ -17,7 +17,7 @@ serde_json = "1.0" serde_with = { version = "2.2", optional = true } bincode = "1.3.3" ark-std = { version = "0.3.0", features = ["print-trace"], optional = true } -halo2-base = { git = "https://github.com/axiom-crypto/halo2-lib.git", branch = "release-0.4.0-rc0", default-features = false } +halo2-base = { git = "https://github.com/axiom-crypto/halo2-lib.git", branch = "release-0.4.0-rc", default-features = false } snark-verifier = { path = "../snark-verifier", default-features = false } getset = "0.1.2" @@ -27,22 +27,22 @@ ethereum-types = { version = "0.14.1", default-features = false, features = [ ], optional = true } # zkevm benchmarks -zkevm-circuits = { git = "https://github.com/privacy-scaling-explorations/zkevm-circuits.git", rev = "f834e61", features = [ - "test", -], optional = true } -bus-mapping = { git = "https://github.com/privacy-scaling-explorations/zkevm-circuits.git", rev = "f834e61", optional = true } -eth-types = { git = "https://github.com/privacy-scaling-explorations/zkevm-circuits.git", rev = "f834e61", optional = true } -mock = { git = "https://github.com/privacy-scaling-explorations/zkevm-circuits.git", rev = "f834e61", optional = true } +# zkevm-circuits = { git = "https://github.com/privacy-scaling-explorations/zkevm-circuits.git", rev = "f834e61", features = [ +# "test", +# ], optional = true } +# bus-mapping = { git = "https://github.com/privacy-scaling-explorations/zkevm-circuits.git", rev = "f834e61", optional = true } +# eth-types = { git = "https://github.com/privacy-scaling-explorations/zkevm-circuits.git", rev = "f834e61", optional = true } +# mock = { git = "https://github.com/privacy-scaling-explorations/zkevm-circuits.git", rev = "f834e61", optional = true } [dev-dependencies] ark-std = { version = "0.3.0", features = ["print-trace"] } paste = "1.0.7" -pprof = { version = "0.11", features = ["criterion", "flamegraph"] } -criterion = "0.4" +pprof = { version = "0.13", features = ["criterion", "flamegraph"] } +criterion = "0.5.1" criterion-macro = "0.4" # loader_evm crossterm = { version = "0.25" } -tui = { version = "0.19", default-features = false, features = ["crossterm"] } +ratatui = { version = "0.24", default-features = false, features = ["crossterm"] } [features] default = [ @@ -67,15 +67,15 @@ name = "standard_plonk" required-features = ["loader_halo2"] harness = false -[[bench]] -name = "zkevm" -required-features = ["loader_halo2", "loader_evm", "zkevm", "halo2-pse"] -harness = false +# [[bench]] +# name = "zkevm" +# required-features = ["loader_halo2", "loader_evm", "zkevm", "halo2-pse"] +# harness = false -[[bench]] -name = "zkevm_plus_state" -required-features = ["loader_halo2", "loader_evm", "zkevm", "halo2-pse"] -harness = false +# [[bench]] +# name = "zkevm_plus_state" +# required-features = ["loader_halo2", "loader_evm", "zkevm", "halo2-pse"] +# harness = false [[bench]] name = "read_pk" diff --git a/snark-verifier/Cargo.toml b/snark-verifier/Cargo.toml index a9072edd..8c437a2e 100644 --- a/snark-verifier/Cargo.toml +++ b/snark-verifier/Cargo.toml @@ -15,7 +15,7 @@ serde = { version = "1.0", features = ["derive"] } pairing = { version = "0.23" } # Use halo2-base as non-optional dependency because it re-exports halo2_proofs, halo2curves, and poseidon, using different repos based on feature flag "halo2-axiom" or "halo2-pse" -halo2-base = { git = "https://github.com/axiom-crypto/halo2-lib.git", branch = "release-0.4.0-rc0", default-features = false } +halo2-base = { git = "https://github.com/axiom-crypto/halo2-lib.git", branch = "release-0.4.0-rc", default-features = false } # parallel rayon = { version = "1.7", optional = true } @@ -25,7 +25,7 @@ sha3 = { version = "0.10", optional = true } revm = { version = "3.3.0", optional = true } # loader_halo2 -halo2-ecc = { git = "https://github.com/axiom-crypto/halo2-lib.git", branch = "release-0.4.0-rc0", default-features = false, optional = true } +halo2-ecc = { git = "https://github.com/axiom-crypto/halo2-lib.git", branch = "release-0.4.0-rc", default-features = false, optional = true } [dev-dependencies] ark-std = { version = "0.3.0", features = ["print-trace"] } @@ -35,7 +35,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" # loader_evm crossterm = { version = "0.25" } -tui = { version = "0.19", default-features = false, features = ["crossterm"] } +ratatui = { version = "0.24", default-features = false, features = ["crossterm"] } [features] default = ["loader_evm", "loader_halo2", "halo2-axiom", "display"] From 2342e259cd5d8c1fb28aca60a49c970cfdc2fe2b Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Thu, 2 Nov 2023 14:17:03 -0700 Subject: [PATCH 2/3] chore: autobenches false --- snark-verifier-sdk/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/snark-verifier-sdk/Cargo.toml b/snark-verifier-sdk/Cargo.toml index 09f24e8d..5bfb6a21 100644 --- a/snark-verifier-sdk/Cargo.toml +++ b/snark-verifier-sdk/Cargo.toml @@ -2,6 +2,7 @@ name = "snark-verifier-sdk" version = "0.1.6" edition = "2021" +autobenches = false [dependencies] itertools = "0.10.5" From af862515a3f35d578f6d6221c7312713133fd81d Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Thu, 2 Nov 2023 14:30:27 -0700 Subject: [PATCH 3/3] fix: audit-check CI --- .github/workflows/ci.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 74d96520..97e72b2e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -53,5 +53,10 @@ jobs: - name: Run clippy run: cargo clippy --all --all-targets -- -D warnings + - name: Generate Cargo.lock + run: cargo generate-lockfile + - name: Run cargo audit uses: actions-rs/audit-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }}