Skip to content

Commit

Permalink
chore: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpwang committed Feb 1, 2024
1 parent b684c37 commit d94d6f3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions halo2_proofs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ batch = ["rand/getrandom"]
profile = ["dep:ark-std"]
asm = ["halo2curves/asm"]
circuit-params = []
counter = ["lazy_static"]
logup_skip_inv = []

[lib]
Expand Down
6 changes: 4 additions & 2 deletions halo2_proofs/src/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ impl<F: FromUniformBytes<64> + Ord> MockProver<F> {
let config = ConcreteCircuit::configure_with_params(&mut cs, circuit.params());
#[cfg(not(feature = "circuit-params"))]
let config = ConcreteCircuit::configure(&mut cs);
let cs = cs;
let cs = cs.chunk_lookups();

assert!(
n >= cs.minimum_rows(),
Expand All @@ -620,7 +620,9 @@ impl<F: FromUniformBytes<64> + Ord> MockProver<F> {
k,
);

assert_eq!(instance.len(), cs.num_instance_columns);
if instance.len() != cs.num_instance_columns {
return Err(Error::InvalidInstances);
}

let instance = instance
.into_iter()
Expand Down
6 changes: 4 additions & 2 deletions halo2_proofs/src/plonk/evaluation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#[cfg(feature = "profile")]
use ark_std::{end_timer, start_timer};
#[cfg(not(feature = "logup_skip_inv"))]
use ff::BatchInvert;
use ff::{Field, PrimeField, WithSmallOrderMulGroup};

use crate::multicore::{self, IntoParallelIterator, ParallelIterator};

Check warning on line 9 in halo2_proofs/src/plonk/evaluation.rs

View workflow job for this annotation

GitHub Actions / Build target wasm32-wasi

unused import: `ParallelIterator`

Check warning on line 9 in halo2_proofs/src/plonk/evaluation.rs

View workflow job for this annotation

GitHub Actions / Build target wasm32-wasi

unused import: `ParallelIterator`
Expand Down Expand Up @@ -545,7 +547,7 @@ impl<C: CurveAffine> Evaluator<C> {
&gamma,
&theta,
&y,
&C::ScalarExt::zero(),
&C::ScalarExt::ZERO,
idx,
rot_scale,
isize,
Expand All @@ -572,7 +574,7 @@ impl<C: CurveAffine> Evaluator<C> {
inputs_values_for_extended_domain
[i * inputs_len..(i + 1) * inputs_len]
.iter()
.fold(C::Scalar::zero(), |acc, x| acc + x)
.fold(C::Scalar::ZERO, |acc, x| acc + x)
})
.collect::<Vec<_>>()
})
Expand Down
6 changes: 3 additions & 3 deletions halo2_proofs/src/plonk/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ where
// Sample theta challenge for keeping lookup columns linearly independent
let theta: ChallengeTheta<_> = transcript.squeeze_challenge_scalar();

let lookups_permuted = (0..num_proofs)
let lookups_prepared = (0..num_proofs)
.map(|_| -> Result<Vec<_>, _> {
// Hash each lookup permuted commitment
// Hash each lookup prepared commitment
vk.cs
.lookups
.iter()
Expand All @@ -146,7 +146,7 @@ where
})
.collect::<Result<Vec<_>, _>>()?;

let lookups_committed = lookups_permuted
let lookups_committed = lookups_prepared
.into_iter()
.map(|lookups| {
// Hash each lookup sum commitment
Expand Down

0 comments on commit d94d6f3

Please sign in to comment.