mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-08 08:43:06 +00:00
Merge pull request #857 from mir-protocol/non_tight_degree_bound
Allow non-tight degree bound
This commit is contained in:
commit
e4a5c2c968
@ -3,12 +3,12 @@ use alloc::vec::Vec;
|
||||
|
||||
use itertools::Itertools;
|
||||
use maybe_rayon::*;
|
||||
use plonky2_field::types::Field;
|
||||
|
||||
use crate::field::extension::Extendable;
|
||||
use crate::field::fft::FftRootTable;
|
||||
use crate::field::packed::PackedField;
|
||||
use crate::field::polynomial::{PolynomialCoeffs, PolynomialValues};
|
||||
use crate::field::types::Field;
|
||||
use crate::fri::proof::FriProof;
|
||||
use crate::fri::prover::fri_proof;
|
||||
use crate::fri::structure::{FriBatchInfo, FriInstanceInfo};
|
||||
@ -189,13 +189,11 @@ impl<F: RichField + Extendable<D>, C: GenericConfig<D, F = F>, const D: usize>
|
||||
&format!("reduce batch of {} polynomials", polynomials.len()),
|
||||
alpha.reduce_polys_base(polys_coeff)
|
||||
);
|
||||
let quotient = composition_poly.divide_by_linear(*point);
|
||||
let mut quotient = composition_poly.divide_by_linear(*point);
|
||||
quotient.coeffs.push(F::Extension::ZERO); // pad back to power of two
|
||||
alpha.shift_poly(&mut final_poly);
|
||||
final_poly += quotient;
|
||||
}
|
||||
// Multiply the final polynomial by `X`, so that `final_poly` has the maximum degree for
|
||||
// which the LDT will pass. See github.com/mir-protocol/plonky2/pull/436 for details.
|
||||
final_poly.coeffs.insert(0, F::Extension::ZERO);
|
||||
|
||||
let lde_final_poly = final_poly.lde(fri_params.config.rate_bits);
|
||||
let lde_final_values = timed!(
|
||||
|
||||
@ -262,9 +262,7 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
sum = self.div_add_extension(numerator, denominator, sum);
|
||||
}
|
||||
|
||||
// Multiply the final polynomial by `X`, so that `final_poly` has the maximum degree for
|
||||
// which the LDT will pass. See github.com/mir-protocol/plonky2/pull/436 for details.
|
||||
self.mul_extension(sum, subgroup_x)
|
||||
sum
|
||||
}
|
||||
|
||||
fn fri_verifier_query_round<C: GenericConfig<D, F = F>>(
|
||||
|
||||
@ -157,9 +157,7 @@ pub(crate) fn fri_combine_initial<
|
||||
sum += numerator / denominator;
|
||||
}
|
||||
|
||||
// Multiply the final polynomial by `X`, so that `final_poly` has the maximum degree for
|
||||
// which the LDT will pass. See github.com/mir-protocol/plonky2/pull/436 for details.
|
||||
sum * subgroup_x
|
||||
sum
|
||||
}
|
||||
|
||||
fn fri_verifier_query_round<
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user