Skip to content

Commit

Permalink
bump halo2curves to 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
kilic committed Aug 31, 2024
1 parent 26fc7c2 commit 7322de1
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion halo2_backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion halo2_debug/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
2 changes: 1 addition & 1 deletion halo2_frontend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
2 changes: 1 addition & 1 deletion halo2_middleware/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 8 additions & 8 deletions halo2_middleware/src/zal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -134,7 +134,7 @@ pub mod impls {

impl<C: CurveAffine> MsmAccel<C> for H2cEngine {
fn msm(&self, coeffs: &[C::Scalar], bases: &[C]) -> C::Curve {
best_multiexp(coeffs, bases)
msm_best(coeffs, bases)
}

// Caching API
Expand All @@ -156,23 +156,23 @@ 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(
&self,
coeffs: &[C::Scalar],
base: &Self::BaseDescriptor<'_>,
) -> C::Curve {
best_multiexp(coeffs, base.raw)
msm_best(coeffs, base.raw)
}

fn msm_with_cached_inputs(
&self,
coeffs: &Self::CoeffsDescriptor<'_>,
base: &Self::BaseDescriptor<'_>,
) -> C::Curve {
best_multiexp(coeffs.raw, base.raw)
msm_best(coeffs.raw, base.raw)
}
}

Expand Down Expand Up @@ -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};
Expand Down Expand Up @@ -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::<C>();
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion halo2_proofs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion p3_frontend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down

0 comments on commit 7322de1

Please sign in to comment.