From 6b47987805ca5801d00f7f904f9b635b97a048e3 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Thu, 18 Jan 2024 14:34:31 -0500 Subject: [PATCH] chore: use released halo2-lib v0.4.1 Turns off halo2-pse for crates.io release --- Cargo.lock | 91 ++++++----------------------------- snark-verifier-sdk/Cargo.toml | 17 ++++--- snark-verifier/Cargo.toml | 8 +-- 3 files changed, 32 insertions(+), 84 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9f7a723d..f54a549d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -367,16 +367,6 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding", - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -386,12 +376,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "blst" version = "0.3.11" @@ -912,7 +896,7 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "const-oid", "crypto-common", "subtle", @@ -1149,17 +1133,18 @@ dependencies = [ "rand", "rand_core", "rustc-hash", - "sha3 0.10.8", + "sha3", "tracing", ] [[package]] name = "halo2-base" version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2045beb3860227b7d354419f2b25a17ad05b2cd68d553dbb9cbbf35daef9d0" dependencies = [ "getset", "halo2-axiom", - "halo2_proofs", "itertools 0.11.0", "jemallocator", "log", @@ -1177,9 +1162,11 @@ dependencies = [ [[package]] name = "halo2-ecc" version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeba4bd49c6eb05815a9809e749f1db525b26b17f5cafb40c5d9a9a4d483f541" dependencies = [ "halo2-base", - "itertools 0.10.5", + "itertools 0.11.0", "num-bigint", "num-integer", "num-traits", @@ -1192,42 +1179,6 @@ dependencies = [ "test-case", ] -[[package]] -name = "halo2_proofs" -version = "0.2.0" -source = "git+https://github.com/privacy-scaling-explorations/halo2.git?rev=7a21656#7a2165617195d8baa422ca7b2b364cef02380390" -dependencies = [ - "blake2b_simd", - "ff", - "group", - "halo2curves", - "maybe-rayon", - "rand_chacha", - "rand_core", - "sha3 0.9.1", - "tracing", -] - -[[package]] -name = "halo2curves" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b1142bd1059aacde1b477e0c80c142910f1ceae67fc619311d6a17428007ab" -dependencies = [ - "blake2b_simd", - "ff", - "group", - "lazy_static", - "num-bigint", - "num-traits", - "pasta_curves", - "paste", - "rand", - "rand_core", - "static_assertions", - "subtle", -] - [[package]] name = "halo2curves-axiom" version = "0.5.0" @@ -1763,12 +1714,6 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - [[package]] name = "pairing" version = "0.23.0" @@ -2516,18 +2461,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug", -] - [[package]] name = "sha3" version = "0.10.8" @@ -2623,7 +2556,7 @@ dependencies = [ "ruint", "serde", "serde_json", - "sha3 0.10.8", + "sha3", ] [[package]] @@ -3281,3 +3214,11 @@ dependencies = [ "quote", "syn 2.0.38", ] + +[[patch.unused]] +name = "halo2-base" +version = "0.4.1" + +[[patch.unused]] +name = "halo2-ecc" +version = "0.4.1" diff --git a/snark-verifier-sdk/Cargo.toml b/snark-verifier-sdk/Cargo.toml index ff1e909a..ae48fee6 100644 --- a/snark-verifier-sdk/Cargo.toml +++ b/snark-verifier-sdk/Cargo.toml @@ -1,7 +1,13 @@ [package] name = "snark-verifier-sdk" version = "0.1.7" +authors = ["Privacy Scaling Explorations Team", "Intrinsic Technologies"] +license = "MIT" edition = "2021" +repository = "https://github.com/axiom-crypto/snark-verifier" +readme = "../README.md" +description = "SDK for using snark-verifier." +rust-version = "1.73.0" autobenches = false [dependencies] @@ -18,14 +24,13 @@ 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.1-rc", default-features = false } -snark-verifier = { path = "../snark-verifier", default-features = false } +halo2-base = { version = "=0.4.1", default-features = false } +#halo2-base = { git = "https://github.com/axiom-crypto/halo2-lib.git", branch = "main", default-features = false } +snark-verifier = { version = "=0.1.7", path = "../snark-verifier", default-features = false } getset = "0.1.2" # loader_evm -ethereum-types = { version = "=0.14.1", default-features = false, features = [ - "std", -], optional = true } +ethereum-types = { version = "=0.14.1", default-features = false, features = ["std"], optional = true } # zkevm benchmarks # zkevm-circuits = { git = "https://github.com/privacy-scaling-explorations/zkevm-circuits.git", rev = "f834e61", features = [ @@ -53,7 +58,7 @@ loader_evm = ["snark-verifier/loader_evm", "dep:ethereum-types"] revm = ["snark-verifier/revm"] parallel = ["snark-verifier/parallel"] # EXACTLY one of halo2-pse / halo2-axiom should always be turned on; not sure how to enforce this with Cargo -halo2-pse = ["snark-verifier/halo2-pse", "dep:serde_with"] +# halo2-pse = ["snark-verifier/halo2-pse", "dep:serde_with"] halo2-axiom = ["snark-verifier/halo2-axiom"] # zkevm = ["dep:zkevm-circuits", "dep:bus-mapping", "dep:mock", "dep:eth-types"] diff --git a/snark-verifier/Cargo.toml b/snark-verifier/Cargo.toml index 5b082dc9..87c17546 100644 --- a/snark-verifier/Cargo.toml +++ b/snark-verifier/Cargo.toml @@ -15,10 +15,12 @@ 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.1-rc", default-features = false } +halo2-base = { version = "=0.4.1", default-features = false } +# halo2-base = { git = "https://github.com/axiom-crypto/halo2-lib.git", branch = "main", default-features = false } # loader_halo2 -halo2-ecc = { git = "https://github.com/axiom-crypto/halo2-lib.git", branch = "release-0.4.1-rc", default-features = false, optional = true } +halo2-ecc = { version = "=0.4.1", default-features = false, optional = true } +# halo2-ecc = { git = "https://github.com/axiom-crypto/halo2-lib.git", branch = "main", default-features = false, optional = true } # parallel rayon = { version = "1.8", optional = true } @@ -48,7 +50,7 @@ loader_evm = ["dep:sha3", "dep:ruint"] revm = ["loader_evm", "dep:revm"] parallel = ["dep:rayon"] # EXACTLY one of halo2-pse / halo2-axiom should always be turned on; not sure how to enforce this with Cargo -halo2-pse = ["halo2-base/halo2-pse", "halo2-ecc?/halo2-pse"] +# halo2-pse = ["halo2-base/halo2-pse", "halo2-ecc?/halo2-pse"] halo2-axiom = ["halo2-base/halo2-axiom", "halo2-ecc?/halo2-axiom"] [[example]]