From 1ecdb96a6b9d7da42d6df4efe83cad25247bb63e Mon Sep 17 00:00:00 2001 From: Daniel Lubarov Date: Tue, 3 Jan 2023 11:03:20 -0800 Subject: [PATCH] Power of two length --- plonky2/src/fri/oracle.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plonky2/src/fri/oracle.rs b/plonky2/src/fri/oracle.rs index 09635d11..90890134 100644 --- a/plonky2/src/fri/oracle.rs +++ b/plonky2/src/fri/oracle.rs @@ -3,6 +3,7 @@ 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; @@ -188,7 +189,8 @@ impl, C: GenericConfig, 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; }