Skip to content

Commit

Permalink
Renaming structures.
Browse files Browse the repository at this point in the history
  • Loading branch information
martun committed Sep 13, 2024
1 parent 78bc854 commit b1df848
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions libs/zk/include/nil/crypto3/zk/commitments/polynomial/lpc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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()) {
Expand Down Expand Up @@ -231,7 +231,7 @@ namespace nil {
std::vector<typename fri_type::field_type::value_type> challenges =
transcript.template challenges<typename fri_type::field_type>(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>(
Expand Down Expand Up @@ -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);
}

Expand All @@ -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;
}
Expand All @@ -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<initial_proof_type> intial_proofs_per_prover;
std::vector<lpc_proof_type> intial_proofs_per_prover;

typename LPCParams::grinding_type::output_type proof_of_work;
};
Expand Down

0 comments on commit b1df848

Please sign in to comment.