From a64330710821cf5735d7013111b29a8e53618eed Mon Sep 17 00:00:00 2001 From: Uma Roy Date: Thu, 7 Sep 2023 17:41:52 -0700 Subject: [PATCH] Fixes --- plonky2/src/plonk/circuit_builder.rs | 11 ++++++----- plonky2/src/plonk/circuit_data.rs | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/plonky2/src/plonk/circuit_builder.rs b/plonky2/src/plonk/circuit_builder.rs index 5a9eb3b2..bd436f2c 100644 --- a/plonky2/src/plonk/circuit_builder.rs +++ b/plonky2/src/plonk/circuit_builder.rs @@ -1026,18 +1026,19 @@ impl, const D: usize> CircuitBuilder { let max_fft_points = 1 << (degree_bits + max(rate_bits, log2_ceil(quotient_degree_factor))); let fft_root_table = fft_root_table(max_fft_points); - let mut constants_sigmas_commitment = PolynomialBatch::::default(); - if commit_to_sigma { + let constants_sigmas_commitment = if commit_to_sigma { let constants_sigmas_vecs = [constant_vecs, sigma_vecs.clone()].concat(); - constants_sigmas_commitment = PolynomialBatch::::from_values( + PolynomialBatch::::from_values( constants_sigmas_vecs, rate_bits, PlonkOracle::CONSTANTS_SIGMAS.blinding, cap_height, &mut timing, Some(&fft_root_table), - ); - } + ) + } else { + PolynomialBatch::::default() + }; // Map between gates where not all generators are used and the gate's number of used generators. let incomplete_gates = self diff --git a/plonky2/src/plonk/circuit_data.rs b/plonky2/src/plonk/circuit_data.rs index 0b96c527..26094679 100644 --- a/plonky2/src/plonk/circuit_data.rs +++ b/plonky2/src/plonk/circuit_data.rs @@ -111,7 +111,7 @@ impl CircuitConfig { } } -/// Circuit data required by the prover or the verifier. +/// Mock circuit data to only do witness generation without generating a proof. #[derive(Eq, PartialEq, Debug)] pub struct MockCircuitData, C: GenericConfig, const D: usize> {