From b1df84891a8b95582b13b88343a4d6e14fabbe02 Mon Sep 17 00:00:00 2001 From: Martun Karapetyan Date: Fri, 13 Sep 2024 17:34:48 +0400 Subject: [PATCH] Renaming structures. --- .../crypto3/zk/commitments/polynomial/lpc.hpp | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/libs/zk/include/nil/crypto3/zk/commitments/polynomial/lpc.hpp b/libs/zk/include/nil/crypto3/zk/commitments/polynomial/lpc.hpp index c1e2fc590..53f5c1474 100644 --- a/libs/zk/include/nil/crypto3/zk/commitments/polynomial/lpc.hpp +++ b/libs/zk/include/nil/crypto3/zk/commitments/polynomial/lpc.hpp @@ -63,8 +63,8 @@ namespace nil { using basic_fri = typename LPCScheme::fri_type; using proof_type = typename LPCScheme::proof_type; using aggregated_proof_type = typename LPCScheme::aggregated_proof_type; - using initial_proof_type = typename LPCScheme::initial_proof_type; - using round_proof_type = typename LPCScheme::round_proof_type; + using lpc_proof_type = typename LPCScheme::lpc_proof_type; + using fri_proof_type = typename LPCScheme::fri_proof_type; using transcript_type = typename LPCScheme::transcript_type; using transcript_hash_type = typename LPCScheme::transcript_hash_type; using polynomial_type = PolynomialType; @@ -174,7 +174,7 @@ namespace nil { * \param[in] transcript - This transcript is initialized from a challenge sent from the "Main" prover, on which the round proof was created for the polynomial F(x) = Sum(combined_Q). */ - initial_proof_type proof_eval_initial_proof( + lpc_proof_type proof_eval_lpc_proof( const polynomial_type& combined_Q, transcript_type &transcript) { this->eval_polys(); @@ -202,7 +202,7 @@ namespace nil { * \param[in] transcript - This transcript is initialized on the main prover, which has digested challenges from all the other provers. */ - round_proof_type proof_eval_round_proof(const polynomial_type& sum_poly, transcript_type &transcript) { + fri_proof_type proof_eval_FRI_proof(const polynomial_type& sum_poly, transcript_type &transcript) { // TODO(martun): this function belongs to FRI, not here, will move later. // Precommit to sum_poly. if (sum_poly.size() != _fri_params.D[0]->size()) { @@ -231,7 +231,7 @@ namespace nil { std::vector challenges = transcript.template challenges(this->_fri_params.lambda); - round_proof_type result; + fri_proof_type result; result.fri_round_proof = nil::crypto3::zk::algorithms::query_phase_round_proofs< fri_type, polynomial_type>( @@ -534,27 +534,27 @@ namespace nil { }; // Represents an initial proof, which must be created for each of the N provers. - struct initial_proof_type { - bool operator==(const initial_proof_type &rhs) const { - return initial_fri_proof == rhs.initial_fri_proof && z == rhs.z; + struct lpc_proof_type { + bool operator==(const lpc_proof_type &rhs) const { + return initial_fri_proofs == rhs.initial_fri_proofs && z == rhs.z; } - bool operator!=(const initial_proof_type &rhs) const { + bool operator!=(const lpc_proof_type &rhs) const { return !(rhs == *this); } eval_storage_type z; - typename basic_fri::initial_proofs_batch_type initial_fri_proof; + typename basic_fri::initial_proofs_batch_type initial_fri_proofs; }; // Represents a round proof, which must be created just once on the main prover. - struct round_proof_type { - bool operator==(const round_proof_type &rhs) const { + struct fri_proof_type { + bool operator==(const fri_proof_type &rhs) const { return fri_round_proof == rhs.fri_round_proof && fri_commitments_proof_part == rhs.fri_commitments_proof_part; } - bool operator!=(const round_proof_type &rhs) const { + bool operator!=(const fri_proof_type &rhs) const { return !(rhs == *this); } @@ -569,7 +569,7 @@ namespace nil { // when aggregated FRI is used. struct aggregated_proof_type { bool operator==(const aggregated_proof_type &rhs) const { - return round_proofs == rhs.round_proofs && + return fri_proof == rhs.fri_proof && intial_proofs_per_prover == rhs.intial_proofs_per_prover && proof_of_work == rhs.proof_of_work; } @@ -579,10 +579,10 @@ namespace nil { } // We have a single round proof for checking that F(X) is a low degree polynomial. - round_proof_type round_proofs; + fri_proof_type fri_proof; // For each prover we have an initial proof. - std::vector intial_proofs_per_prover; + std::vector intial_proofs_per_prover; typename LPCParams::grinding_type::output_type proof_of_work; };