Skip to content

Commit

Permalink
Fix degree bits in batch verifier (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
sai-deng committed Jul 18, 2024
1 parent 1c8255c commit 5387fbb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions plonky2/src/fri/batch_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ fn batch_fri_verifier_query_round<
&round_proof.initial_trees_proof,
initial_merkle_caps,
)?;
let mut n = degree_bits[0] + params.config.rate_bits;
let mut n = degree_bits[0];
// `subgroup_x` is `subgroup[x_index]`, i.e., the actual field element in the domain.
let mut subgroup_x = F::MULTIPLICATIVE_GROUP_GENERATOR
* F::primitive_root_of_unity(n).exp_u64(reverse_bits(x_index, n) as u64);
Expand Down Expand Up @@ -218,9 +218,7 @@ fn batch_fri_verifier_query_round<
x_index = coset_index;
n -= arity_bits;

if batch_index < degree_bits.len()
&& n == degree_bits[batch_index] + params.config.rate_bits
{
if batch_index < degree_bits.len() && n == degree_bits[batch_index] {
let subgroup_x_init = F::MULTIPLICATIVE_GROUP_GENERATOR
* F::primitive_root_of_unity(n).exp_u64(reverse_bits(x_index, n) as u64);
let eval = batch_fri_combine_initial::<F, C, D>(
Expand Down

0 comments on commit 5387fbb

Please sign in to comment.