Skip to content

Commit

Permalink
fix(nifs): bits count for protogalaxy challenges
Browse files Browse the repository at this point in the history
  • Loading branch information
cyphersnake committed Nov 4, 2024
1 parent e1a569e commit 19cc6e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/nifs/protogalaxy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use tracing::{debug, instrument, warn};
use super::*;
use crate::{
commitment::CommitmentKey,
constants::{MAX_BITS, NUM_CHALLENGE_BITS},
constants::MAX_BITS,
ff::PrimeField,
halo2_proofs::arithmetic::{self, CurveAffine, Field},
nifs::protogalaxy::poly::PolyContext,
Expand Down Expand Up @@ -358,7 +358,7 @@ impl<C: CurveAffine, const L: usize> FoldingScheme<C, L> for ProtoGalaxy<C, L> {

let alpha = ro_acc
.absorb_field_iter(poly_F.iter().map(|v| C::scalar_to_base(v).unwrap()))
.squeeze::<C>(NUM_CHALLENGE_BITS);
.squeeze::<C>(MAX_BITS);

let betas_stroke = poly::PolyChallenges {
betas: accumulator.betas.clone(),
Expand All @@ -378,7 +378,7 @@ impl<C: CurveAffine, const L: usize> FoldingScheme<C, L> for ProtoGalaxy<C, L> {

let gamma = ro_acc
.absorb_field_iter(poly_K.iter().map(|v| C::scalar_to_base(v).unwrap()))
.squeeze::<C>(NUM_CHALLENGE_BITS);
.squeeze::<C>(MAX_BITS);

debug!(
"
Expand Down
5 changes: 1 addition & 4 deletions src/nifs/protogalaxy/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,7 @@ impl<C: Circuit<Scalar>> Mock<C> {

let accumulator_inst_from_prove = AccumulatorInstance::from(accumulator_from_prove);

assert_eq!(
accumulator_inst_from_prove,
accumulator_from_verify,
);
assert_eq!(accumulator_inst_from_prove, accumulator_from_verify,);
}
}

Expand Down

0 comments on commit 19cc6e5

Please sign in to comment.