diff --git a/hyperplonk/src/mock.rs b/hyperplonk/src/mock.rs index 7fa4372..75e4b4c 100644 --- a/hyperplonk/src/mock.rs +++ b/hyperplonk/src/mock.rs @@ -238,8 +238,8 @@ mod test { MultilinearKzgPCS::::gen_srs_for_testing(&mut rng, SUPPORTED_SIZE)?; let nv = MAX_NUM_VARS; - let vanilla_gate = CustomizedGates::vanilla_plonk_gate(); - test_mock_circuit_zkp_helper(nv, &vanilla_gate, &pcs_srs)?; + let turboplonk_gate = CustomizedGates::jellyfish_turbo_plonk_gate(); + test_mock_circuit_zkp_helper(nv, &turboplonk_gate, &pcs_srs)?; Ok(()) } diff --git a/subroutines/src/poly_iop/prod_check/util.rs b/subroutines/src/poly_iop/prod_check/util.rs index 0351e3d..be52ba2 100644 --- a/subroutines/src/poly_iop/prod_check/util.rs +++ b/subroutines/src/poly_iop/prod_check/util.rs @@ -2,7 +2,7 @@ use crate::poly_iop::{errors::PolyIOPErrors, structs::IOPProof, zero_check::ZeroCheck, PolyIOP}; use arithmetic::{get_index, VirtualPolynomial}; -use ark_ff::PrimeField; +use ark_ff::{batch_inversion, PrimeField}; use ark_poly::DenseMultilinearExtension; use ark_std::{end_timer, start_timer}; use std::sync::Arc; @@ -31,13 +31,15 @@ pub(super) fn compute_frac_poly( *g_eval *= gi; } } + batch_inversion(&mut g_evals[..]); + for (f_eval, g_eval) in f_evals.iter_mut().zip(g_evals.iter()) { if *g_eval == F::zero() { return Err(PolyIOPErrors::InvalidParameters( "gxs has zero entries in the boolean hypercube".to_string(), )); } - *f_eval /= g_eval; + *f_eval *= g_eval; } end_timer!(start);