From a6bc83217b4b4daf87b697f4c30f7002908a23da Mon Sep 17 00:00:00 2001 From: wborgeaud Date: Thu, 15 Jul 2021 10:55:18 +0200 Subject: [PATCH] Minor --- src/circuit_builder.rs | 4 ++-- src/recursive_verifier.rs | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/circuit_builder.rs b/src/circuit_builder.rs index db78819f..cc47d290 100644 --- a/src/circuit_builder.rs +++ b/src/circuit_builder.rs @@ -42,11 +42,11 @@ pub struct CircuitBuilder, const D: usize> { public_input_index: usize, /// The next available index for a `VirtualTarget`. - pub virtual_target_index: usize, + virtual_target_index: usize, copy_constraints: Vec, - /// A context string used to give context to copy constraints. + /// A string used to give context to copy constraints. context: String, /// A vector of marked targets. The values assigned to these targets will be displayed by the prover. diff --git a/src/recursive_verifier.rs b/src/recursive_verifier.rs index 1bd58c2a..3e48850e 100644 --- a/src/recursive_verifier.rs +++ b/src/recursive_verifier.rs @@ -73,12 +73,12 @@ impl, const D: usize> CircuitBuilder { self.set_context("Check vanishing and quotient polynomials."); let quotient_polys_zeta = &proof.openings.quotient_polys; let zeta_pow_deg = self.exp_u64_extension(zeta, 1 << inner_common_data.degree_bits as u64); + let mut scale = ReducingFactorTarget::new(zeta_pow_deg); let z_h_zeta = self.sub_extension(zeta_pow_deg, one); for (i, chunk) in quotient_polys_zeta .chunks(inner_common_data.quotient_degree_factor) .enumerate() { - let mut scale = ReducingFactorTarget::new(zeta_pow_deg); let mut rhs = scale.reduce(chunk, self); rhs = self.mul_extension(z_h_zeta, rhs); self.named_route_extension( @@ -123,6 +123,7 @@ mod tests { use crate::verifier::verify; use crate::witness::PartialWitness; + // Construct a `FriQueryRoundTarget` with the same dimensions as the ones in `proof`. fn get_fri_query_round, const D: usize>( proof: &Proof, builder: &mut CircuitBuilder, @@ -155,6 +156,7 @@ mod tests { query_round } + // Construct a `ProofTarget` with the same dimensions as `proof`. fn proof_to_proof_target, const D: usize>( proof: &Proof, builder: &mut CircuitBuilder, @@ -206,6 +208,7 @@ mod tests { } } + // Set the targets in a `ProofTarget` to their corresponding values in a `Proof`. fn set_proof_target, const D: usize>( proof: &Proof, pt: &ProofTarget, @@ -332,7 +335,7 @@ mod tests { let mut builder = CircuitBuilder::::new(config.clone()); let _two = builder.two(); let _two = builder.hash_n_to_hash(vec![_two], true).elements[0]; - for _ in 0..1000 { + for _ in 0..5000 { let _two = builder.mul(_two, _two); } let data = builder.build();