diff --git a/halo2_backend/src/plonk/keygen.rs b/halo2_backend/src/plonk/keygen.rs index 71766b01c..3d701149a 100644 --- a/halo2_backend/src/plonk/keygen.rs +++ b/halo2_backend/src/plonk/keygen.rs @@ -108,7 +108,6 @@ where } // Compute fixeds - let fixed_polys: Vec<_> = circuit .preprocessing .fixed @@ -161,11 +160,16 @@ where }; // Compute denominators. - let mut acc = zeta; - l0.iter_mut().for_each(|e| { - *e = acc - one; - acc *= w; - }); + // (X-1) in {z, zw, zw^2,... zw^(extended_n)} equals + // (zX-1) in {1, w, ... w^{extended_n} wich can be computed with fft. + l0[0] = -one; + l0[1] = zeta; + halo2curves::fft::best_fft( + &mut l0, + vk.domain.get_extended_omega(), + vk.domain.extended_k(), + ); + l0.batch_invert(); // Compute numinators.