Skip to content

Commit

Permalink
update: Compatibility with Halo2 0.4 and Halo2curves 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mratsim committed Sep 25, 2024
1 parent b850dc7 commit b89135e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions constantine-rust/constantine-halo2-zal/benches/msm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use constantine_halo2_zal::CttEngine;

use halo2curves::bn256::{Fr as Scalar, G1Affine as Point};
use halo2curves::ff::Field;
use halo2curves::msm::best_multiexp;
use halo2curves::msm::msm_best;
use halo2curves::zal::MsmAccel;

use rayon::current_thread_index;
Expand Down Expand Up @@ -94,7 +94,7 @@ fn msm(c: &mut Criterion) {
assert!(k < 64);
let n: usize = 1 << k;
b.iter(|| {
best_multiexp(&coeffs[..n], &bases[..n]);
msm_best(&coeffs[..n], &bases[..n]);
})
})
.sample_size(SAMPLE_SIZE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use halo2_middleware::halo2curves::bn256;
use halo2_middleware::halo2curves::ff::Field;
use halo2_middleware::halo2curves::group::prime::PrimeCurveAffine;
use halo2_middleware::halo2curves::group::{Curve, Group};
use halo2_middleware::halo2curves::msm::best_multiexp;
use halo2_middleware::halo2curves::msm::msm_best;
use halo2_middleware::zal::traits::MsmAccel;

#[test]
Expand All @@ -42,7 +42,7 @@ fn run_msm_zal(min_k: usize, max_k: usize) {
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 = CttEngine::new(hardware::get_num_threads_os());
Expand Down
6 changes: 3 additions & 3 deletions docs/zk_accel_layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ mod tests {
use halo2curves::ff::Field;
use halo2curves::group::prime::PrimeCurveAffine;
use halo2curves::group::{Curve, Group};
use halo2curves::msm::best_multiexp;
use halo2curves::msm::msm_best;
use halo2curves::zal::MsmAccel;

#[test]
Expand All @@ -181,7 +181,7 @@ mod tests {
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 = CttEngine::new(num_cpus::get());
Expand Down Expand Up @@ -232,4 +232,4 @@ mod tests {
prj.z *= jac.z
```
Coordinates are ordered (X, Y, Z)
- Result requires 96 bytes
- Result requires 96 bytes

0 comments on commit b89135e

Please sign in to comment.