diff --git a/halo2_backend/Cargo.toml b/halo2_backend/Cargo.toml index 7b24994c3..1c47e39a3 100644 --- a/halo2_backend/Cargo.toml +++ b/halo2_backend/Cargo.toml @@ -28,7 +28,7 @@ rustdoc-args = ["--cfg", "docsrs", "--html-in-header", "katex-header.html"] backtrace = { version = "0.3", optional = true } ff = "0.13" group = "0.13" -halo2curves = { version = "0.6.1", default-features = false } +halo2curves = { version = "0.7.0", default-features = false } rand_core = { version = "0.6", default-features = false } tracing = "0.1" blake2b_simd = "1" # MSRV 1.66.0 diff --git a/halo2_debug/Cargo.toml b/halo2_debug/Cargo.toml index 3af6c761d..28b4467f3 100644 --- a/halo2_debug/Cargo.toml +++ b/halo2_debug/Cargo.toml @@ -22,7 +22,7 @@ rustdoc-args = ["--cfg", "docsrs", "--html-in-header", "katex-header.html"] [dependencies] ff = "0.13" -halo2curves = { version = "0.6.1", default-features = false } +halo2curves = { version = "0.7.0", default-features = false } num-bigint = "0.4.5" halo2_middleware = { path = "../halo2_middleware" } tiny-keccak = { version = "2.0.2", features=["keccak"] } diff --git a/halo2_frontend/Cargo.toml b/halo2_frontend/Cargo.toml index 1dd4a2a2d..0fbf33e12 100644 --- a/halo2_frontend/Cargo.toml +++ b/halo2_frontend/Cargo.toml @@ -28,7 +28,7 @@ rustdoc-args = ["--cfg", "docsrs", "--html-in-header", "katex-header.html"] backtrace = { version = "0.3", optional = true } ff = "0.13" group = "0.13" -halo2curves = { version = "0.6.1", default-features = false } +halo2curves = { version = "0.7.0", default-features = false } tracing = "0.1" blake2b_simd = "1" # MSRV 1.66.0 serde = { version = "1", optional = true, features = ["derive"] } diff --git a/halo2_middleware/Cargo.toml b/halo2_middleware/Cargo.toml index 1c24c77c6..f37aceefc 100644 --- a/halo2_middleware/Cargo.toml +++ b/halo2_middleware/Cargo.toml @@ -26,7 +26,7 @@ rustdoc-args = ["--cfg", "docsrs", "--html-in-header", "katex-header.html"] [dependencies] ff = "0.13" -halo2curves = { version = "0.6.1", default-features = false } +halo2curves = { version = "0.7.0", default-features = false } serde = { version = "1", optional = true, features = ["derive"] } serde_derive = { version = "1", optional = true} rayon = "1.8" diff --git a/halo2_middleware/src/zal.rs b/halo2_middleware/src/zal.rs index 5d376e3e5..b6cf37229 100644 --- a/halo2_middleware/src/zal.rs +++ b/halo2_middleware/src/zal.rs @@ -110,7 +110,7 @@ pub mod impls { use std::marker::PhantomData; use crate::zal::traits::MsmAccel; - use halo2curves::msm::best_multiexp; + use halo2curves::msm::msm_best; use halo2curves::CurveAffine; // Halo2curve Backend @@ -134,7 +134,7 @@ pub mod impls { impl MsmAccel for H2cEngine { fn msm(&self, coeffs: &[C::Scalar], bases: &[C]) -> C::Curve { - best_multiexp(coeffs, bases) + msm_best(coeffs, bases) } // Caching API @@ -156,7 +156,7 @@ pub mod impls { coeffs: &Self::CoeffsDescriptor<'_>, base: &[C], ) -> C::Curve { - best_multiexp(coeffs.raw, base) + msm_best(coeffs.raw, base) } fn msm_with_cached_base( @@ -164,7 +164,7 @@ pub mod impls { coeffs: &[C::Scalar], base: &Self::BaseDescriptor<'_>, ) -> C::Curve { - best_multiexp(coeffs, base.raw) + msm_best(coeffs, base.raw) } fn msm_with_cached_inputs( @@ -172,7 +172,7 @@ pub mod impls { coeffs: &Self::CoeffsDescriptor<'_>, base: &Self::BaseDescriptor<'_>, ) -> C::Curve { - best_multiexp(coeffs.raw, base.raw) + msm_best(coeffs.raw, base.raw) } } @@ -251,7 +251,7 @@ mod test { use crate::zal::impls::{H2cEngine, PlonkEngineConfig}; use crate::zal::traits::MsmAccel; use halo2curves::bn256::G1Affine; - use halo2curves::msm::best_multiexp; + use halo2curves::msm::msm_best; use halo2curves::CurveAffine; use ark_std::{end_timer, start_timer}; @@ -282,7 +282,7 @@ mod test { let scalars = &scalars[..1 << k]; let t0 = start_timer!(|| format!("freestanding msm k={}", k)); - let e0 = best_multiexp(scalars, points); + let e0 = msm_best(scalars, points); end_timer!(t0); let engine = PlonkEngineConfig::build_default::(); @@ -323,7 +323,7 @@ mod test { let scalars = &scalars[..1 << k]; let t0 = start_timer!(|| format!("freestanding msm k={}", k)); - let e0 = best_multiexp(scalars, points); + let e0 = msm_best(scalars, points); end_timer!(t0); let engine = PlonkEngineConfig::new() diff --git a/halo2_proofs/Cargo.toml b/halo2_proofs/Cargo.toml index e5607f6b9..80cb6ec27 100644 --- a/halo2_proofs/Cargo.toml +++ b/halo2_proofs/Cargo.toml @@ -44,7 +44,7 @@ harness = false halo2_middleware = { path = "../halo2_middleware" } halo2_backend = { path = "../halo2_backend", default-features = false } halo2_frontend = { path = "../halo2_frontend", default-features = false } -halo2curves = { version = "0.6.1", default-features = false } +halo2curves = { version = "0.7.0", default-features = false } rand_core = { version = "0.6", default-features = false, features = ["getrandom"] } plotters = { version = "0.3.0", default-features = false, optional = true } group = "0.13" diff --git a/halo2_proofs/tests/compress_selectors.rs b/halo2_proofs/tests/compress_selectors.rs index 99cacab9a..b335634f7 100644 --- a/halo2_proofs/tests/compress_selectors.rs +++ b/halo2_proofs/tests/compress_selectors.rs @@ -484,17 +484,17 @@ fn test_compress_gates() { } #[test] -fn test_success() -> Result<(), halo2_proofs::plonk::Error> { - // vk & pk keygen both WITH compress +fn test_key_compression() -> Result<(), halo2_proofs::plonk::Error> { + // vk & pk keygen both WITH compression test_result( || test_mycircuit(true, true).expect("should pass"), - "8326140d1873a91630d439a8812d1f104667144e03e0cd5c59eb358ae5d1a4eb", + "acae50508de5ead584170dd83b139daf40e1026b6debbb78eb05d515173fc2dd", ); - // vk & pk keygen both WITHOUT compress + // vk & pk keygen both WITHOUT compression test_result( || test_mycircuit(false, false).expect("should pass"), - "73dd4c3c9c51d55dc8cf68ca2b5d8acdb40ed44bc8a88d718325bc0023688f64", + "f9c99bd341705ac6a13724a526dd28df0bac1c745e0cde40ab39cab3e1b95309", ); Ok(()) @@ -502,14 +502,14 @@ fn test_success() -> Result<(), halo2_proofs::plonk::Error> { #[should_panic] #[test] -fn test_failure_1() { +fn test_key_compression_failure_1() { // vk keygen WITH compress // pk keygen WITHOUT compress assert!(test_mycircuit(false, true).is_err()); } #[test] -fn test_failure_2() { +fn test_key_compression_failure_2() { // vk keygen WITHOUT compress // pk keygen WITH compress assert!(test_mycircuit(true, false).is_err()); diff --git a/halo2_proofs/tests/frontend_backend_split.rs b/halo2_proofs/tests/frontend_backend_split.rs index 6238a13e3..a3b461afb 100644 --- a/halo2_proofs/tests/frontend_backend_split.rs +++ b/halo2_proofs/tests/frontend_backend_split.rs @@ -539,7 +539,7 @@ fn test_mycircuit_full_legacy() { proof }, - "427e55eafeaafd9f4dfc7ec6f782ec7464251c749bb08e23efb663790c0419ed", + "78aadfd46b5cc58b90d832ee47e4df57af3dfc28d1457c4ceeb5d0323a72f130", ); } @@ -619,6 +619,6 @@ fn test_mycircuit_full_split() { proof }, - "427e55eafeaafd9f4dfc7ec6f782ec7464251c749bb08e23efb663790c0419ed", + "78aadfd46b5cc58b90d832ee47e4df57af3dfc28d1457c4ceeb5d0323a72f130", ); } diff --git a/halo2_proofs/tests/plonk_api.rs b/halo2_proofs/tests/plonk_api.rs index d454d0292..aa7fc0809 100644 --- a/halo2_proofs/tests/plonk_api.rs +++ b/halo2_proofs/tests/plonk_api.rs @@ -601,7 +601,7 @@ fn plonk_api() { proof }, - "b749dfa90ac3bc3d45f994cc8bf527928a274c2225e4e87668eece79938e6d12", + "f87ba1010dede5a2148ed94403ca12a566d3154ebb12ccb6c20a330e9b280af8", ); } @@ -638,7 +638,7 @@ fn plonk_api() { proof }, - "284001f93f86a5d18ad9ebff6da81031e5ad9f799ea1dc2606271a6ff240fbd3", + "0fc67d890faef0ef8ea7ef680cc566b2ab7dabef12fcceb74d3655a0fb08c708", ); } diff --git a/halo2_proofs/tests/serialization.rs b/halo2_proofs/tests/serialization.rs index 54e350d7d..becb80d86 100644 --- a/halo2_proofs/tests/serialization.rs +++ b/halo2_proofs/tests/serialization.rs @@ -202,6 +202,6 @@ fn test_serialization() { proof }, - "0d3baeea90249588c3939dc2f64b071b24b7e4744c4ca8442fe4b2553aae9167", + "b51ea51140e9fbd1f0c665c788bab9e4b3e648ac674b6d07a24ca0844f0962ad", ); } diff --git a/p3_frontend/Cargo.toml b/p3_frontend/Cargo.toml index 7a7e1972c..ffd2b4290 100644 --- a/p3_frontend/Cargo.toml +++ b/p3_frontend/Cargo.toml @@ -28,7 +28,7 @@ serde = { version = "1.0", default-features = false, features = ["derive", "allo num-bigint = { version = "0.4.3", default-features = false } [dev-dependencies] -halo2curves = { version = "0.6.0", default-features = false } +halo2curves = { version = "0.7.0", default-features = false } rand_core = { version = "0.6", default-features = false, features = ["getrandom"] } halo2_backend = { path = "../halo2_backend" } serde_test = { version = "1.0" }