diff --git a/Cargo.lock b/Cargo.lock index 4131777e..77d897fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -181,6 +181,19 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +[[package]] +name = "bls12_381" +version = "0.8.0" +source = "git+https://github.com/scroll-tech/bls12_381?branch=feat/impl_scalar_field#2c515f73a2462fef8681c8e884edf1710f52b22a" +dependencies = [ + "ff 0.13.0", + "group 0.13.0", + "pairing", + "pasta_curves 0.5.1", + "rand_core", + "subtle", +] + [[package]] name = "bumpalo" version = "3.14.0" @@ -670,7 +683,7 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "halo2-base" version = "0.2.2" -source = "git+https://github.com/scroll-tech/halo2-lib?branch=develop#40ba7e3bbf013b55c59283534c9489701f9212d0" +source = "git+https://github.com/scroll-tech/halo2-lib?branch=ecc_double_p256#f533846c55602aea51cfacbb7b30cf46479c1446" dependencies = [ "ff 0.13.0", "halo2_proofs 0.2.0", @@ -686,7 +699,7 @@ dependencies = [ [[package]] name = "halo2-ecc" version = "0.2.2" -source = "git+https://github.com/scroll-tech/halo2-lib?branch=develop#40ba7e3bbf013b55c59283534c9489701f9212d0" +source = "git+https://github.com/scroll-tech/halo2-lib?branch=ecc_double_p256#f533846c55602aea51cfacbb7b30cf46479c1446" dependencies = [ "ff 0.13.0", "group 0.13.0", @@ -745,15 +758,17 @@ dependencies = [ [[package]] name = "halo2curves" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b1142bd1059aacde1b477e0c80c142910f1ceae67fc619311d6a17428007ab" +source = "git+https://github.com/scroll-tech/halo2curves?branch=v0.1.0#a495a7b11ad13e5cd0cca7ca5d737b398cfaf1b7" dependencies = [ "blake2b_simd", + "bls12_381", "ff 0.13.0", "group 0.13.0", "lazy_static", + "maybe-rayon", "num-bigint", "num-traits", + "pairing", "pasta_curves 0.5.1", "paste", "rand", @@ -1206,6 +1221,15 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +[[package]] +name = "pairing" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" +dependencies = [ + "group 0.13.0", +] + [[package]] name = "parity-scale-codec" version = "3.6.9" diff --git a/Cargo.toml b/Cargo.toml index 88fd46e0..e5b26cb2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,3 +41,9 @@ halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "v1. [patch."https://github.com/privacy-scaling-explorations/poseidon.git"] poseidon = { git = "https://github.com/scroll-tech/poseidon.git", branch = "main" } + +[patch."https://github.com/privacy-scaling-explorations/bls12_381"] +bls12_381 = { git = "https://github.com/scroll-tech/bls12_381", branch = "feat/impl_scalar_field" } + +[patch.crates-io] +halo2curves = { git = "https://github.com/scroll-tech/halo2curves", branch = "v0.1.0" } \ No newline at end of file diff --git a/snark-verifier-sdk/Cargo.toml b/snark-verifier-sdk/Cargo.toml index 3a4d3c8e..943105f7 100644 --- a/snark-verifier-sdk/Cargo.toml +++ b/snark-verifier-sdk/Cargo.toml @@ -19,7 +19,7 @@ ark-std = { version = "0.3.0", features = ["print-trace"], optional = true } ff = "0.13" # halo2-base = { git = "https://github.com/axiom-crypto/halo2-lib.git", tag = "v0.2.2", default-features = false } -halo2-base = { git = "https://github.com/scroll-tech/halo2-lib.git", branch = "develop" } +halo2-base = { git = "https://github.com/scroll-tech/halo2-lib.git", branch = "ecc_double_p256" } snark-verifier = { path = "../snark-verifier", default-features = false } # loader_evm diff --git a/snark-verifier/Cargo.toml b/snark-verifier/Cargo.toml index 59b4ea5c..8e8276e6 100644 --- a/snark-verifier/Cargo.toml +++ b/snark-verifier/Cargo.toml @@ -14,7 +14,7 @@ rustc-hash = "1.1.0" serde = { version = "1.0", features = ["derive"] } # 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/scroll-tech/halo2-lib", branch = "develop", default-features=false, features=["halo2-pse","display"] } +halo2-base = { git = "https://github.com/scroll-tech/halo2-lib", branch = "ecc_double_p256", default-features=false, features=["halo2-pse","display"] } # This poseidon is identical to PSE (for now) but uses axiom's halo2curves; otherwise would require patching poseidon-axiom = { git = "https://github.com/axiom-crypto/halo2.git", branch = "axiom/dev", package = "poseidon", optional = true } poseidon = { git = "https://github.com/privacy-scaling-explorations/poseidon", optional = true } @@ -30,7 +30,7 @@ bytes = { version = "1.2", optional = true } rlp = { version = "0.5", default-features = false, features = ["std"], optional = true } # loader_halo2 -halo2-ecc = { git = "https://github.com/scroll-tech/halo2-lib", branch = "develop", optional = true, default-features=false, features=["halo2-pse","display"] } +halo2-ecc = { git = "https://github.com/scroll-tech/halo2-lib", branch = "ecc_double_p256", optional = true, default-features=false, features=["halo2-pse","display"] } [dev-dependencies] ark-std = { version = "0.3.0", features = ["print-trace"] }