From 4bc06deed82448a938205f1c4c9188d93259eb1f Mon Sep 17 00:00:00 2001 From: wborgeaud Date: Thu, 15 Jul 2021 10:59:53 +0200 Subject: [PATCH] `zs_root` -> `zs_partial_products_root` --- src/fri/recursive_verifier.rs | 2 +- src/fri/verifier.rs | 2 +- src/proof.rs | 4 ++-- src/prover.rs | 2 +- src/recursive_verifier.rs | 11 +++++++---- src/verifier.rs | 4 ++-- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/fri/recursive_verifier.rs b/src/fri/recursive_verifier.rs index 5bbd5e80..056cc78d 100644 --- a/src/fri/recursive_verifier.rs +++ b/src/fri/recursive_verifier.rs @@ -165,7 +165,7 @@ impl, const D: usize> CircuitBuilder { // - one for polynomials opened at `x` and `g x` // - one for polynomials opened at `x` and `x.frobenius()` - // Polynomials opened at `x`, i.e., the constants, sigmas and quotient polynomials. + // Polynomials opened at `x`, i.e., the constants, sigmas, quotient and partial products polynomials. let single_evals = [ PlonkPolynomials::CONSTANTS_SIGMAS, PlonkPolynomials::QUOTIENT, diff --git a/src/fri/verifier.rs b/src/fri/verifier.rs index 5ff068b6..90fc907f 100644 --- a/src/fri/verifier.rs +++ b/src/fri/verifier.rs @@ -163,7 +163,7 @@ fn fri_combine_initial, const D: usize>( // - one for Zs, which are opened at `x` and `g x` // - one for wire polynomials, which are opened at `x` and `x.frobenius()` - // Polynomials opened at `x`, i.e., the constants, sigmas and quotient polynomials. + // Polynomials opened at `x`, i.e., the constants, sigmas, quotient and partial products polynomials. let single_evals = [ PlonkPolynomials::CONSTANTS_SIGMAS, PlonkPolynomials::QUOTIENT, diff --git a/src/proof.rs b/src/proof.rs index 353a0080..b5875927 100644 --- a/src/proof.rs +++ b/src/proof.rs @@ -66,7 +66,7 @@ pub struct Proof, const D: usize> { /// Merkle root of LDEs of wire values. pub wires_root: Hash, /// Merkle root of LDEs of Z, in the context of Plonk's permutation argument. - pub plonk_zs_root: Hash, + pub plonk_zs_partial_products_root: Hash, /// Merkle root of LDEs of the quotient polynomial components. pub quotient_polys_root: Hash, /// Purported values of each polynomial at the challenge point. @@ -77,7 +77,7 @@ pub struct Proof, const D: usize> { pub struct ProofTarget { pub wires_root: HashTarget, - pub plonk_zs_root: HashTarget, + pub plonk_zs_partial_products_root: HashTarget, pub quotient_polys_root: HashTarget, pub openings: OpeningSetTarget, pub opening_proof: OpeningProofTarget, diff --git a/src/prover.rs b/src/prover.rs index cefe165f..0411ce09 100644 --- a/src/prover.rs +++ b/src/prover.rs @@ -180,7 +180,7 @@ pub(crate) fn prove, const D: usize>( Proof { wires_root: wires_commitment.merkle_tree.root, - plonk_zs_root: zs_partial_products_commitment.merkle_tree.root, + plonk_zs_partial_products_root: zs_partial_products_commitment.merkle_tree.root, quotient_polys_root: quotient_polys_commitment.merkle_tree.root, openings, opening_proof, diff --git a/src/recursive_verifier.rs b/src/recursive_verifier.rs index 3e48850e..ed28c73f 100644 --- a/src/recursive_verifier.rs +++ b/src/recursive_verifier.rs @@ -36,7 +36,7 @@ impl, const D: usize> CircuitBuilder { let betas = challenger.get_n_challenges(self, num_challenges); let gammas = challenger.get_n_challenges(self, num_challenges); - challenger.observe_hash(&proof.plonk_zs_root); + challenger.observe_hash(&proof.plonk_zs_partial_products_root); let alphas = challenger.get_n_challenges(self, num_challenges); challenger.observe_hash(&proof.quotient_polys_root); @@ -93,7 +93,7 @@ impl, const D: usize> CircuitBuilder { let merkle_roots = &[ inner_verifier_data.constants_sigmas_root, proof.wires_root, - proof.plonk_zs_root, + proof.plonk_zs_partial_products_root, proof.quotient_polys_root, ]; @@ -201,7 +201,7 @@ mod tests { ProofTarget { wires_root, - plonk_zs_root, + plonk_zs_partial_products_root: plonk_zs_root, quotient_polys_root, openings, opening_proof, @@ -215,7 +215,10 @@ mod tests { pw: &mut PartialWitness, ) { pw.set_hash_target(pt.wires_root, proof.wires_root); - pw.set_hash_target(pt.plonk_zs_root, proof.plonk_zs_root); + pw.set_hash_target( + pt.plonk_zs_partial_products_root, + proof.plonk_zs_partial_products_root, + ); pw.set_hash_target(pt.quotient_polys_root, proof.quotient_polys_root); for (&t, &x) in pt.openings.wires.iter().zip(&proof.openings.wires) { diff --git a/src/verifier.rs b/src/verifier.rs index ce438449..6b4df627 100644 --- a/src/verifier.rs +++ b/src/verifier.rs @@ -26,7 +26,7 @@ pub(crate) fn verify, const D: usize>( let betas = challenger.get_n_challenges(num_challenges); let gammas = challenger.get_n_challenges(num_challenges); - challenger.observe_hash(&proof.plonk_zs_root); + challenger.observe_hash(&proof.plonk_zs_partial_products_root); let alphas = challenger.get_n_challenges(num_challenges); challenger.observe_hash(&proof.quotient_polys_root); @@ -78,7 +78,7 @@ pub(crate) fn verify, const D: usize>( let merkle_roots = &[ verifier_data.constants_sigmas_root, proof.wires_root, - proof.plonk_zs_root, + proof.plonk_zs_partial_products_root, proof.quotient_polys_root, ];