barretenberg
Loading...
Searching...
No Matches
eccvm_prover.hpp
1#pragma once
2#include "barretenberg/commitment_schemes/gemini/gemini.hpp"
3#include "barretenberg/commitment_schemes/shplonk/shplonk.hpp"
4#include "barretenberg/flavor/ecc_vm.hpp"
5#include "barretenberg/goblin/translation_evaluations.hpp"
6#include "barretenberg/plonk/proof_system/types/proof.hpp"
7#include "barretenberg/relations/relation_parameters.hpp"
8#include "barretenberg/sumcheck/sumcheck_output.hpp"
9#include "barretenberg/transcript/transcript.hpp"
10
11namespace proof_system::honk {
12
13// We won't compile this class with honk::flavor::Standard, but we will like want to compile it (at least for testing)
14// with a flavor that uses the curve Grumpkin, or a flavor that does/does not have zk, etc.
15template <ECCVMFlavor Flavor> class ECCVMProver_ {
16
17 using FF = typename Flavor::FF;
18 using PCS = typename Flavor::PCS;
19 using PCSCommitmentKey = typename Flavor::CommitmentKey;
20 using ProvingKey = typename Flavor::ProvingKey;
21 using Polynomial = typename Flavor::Polynomial;
22 using ProverPolynomials = typename Flavor::ProverPolynomials;
23 using CommitmentLabels = typename Flavor::CommitmentLabels;
24 using Curve = typename Flavor::Curve;
25 using Transcript = typename Flavor::Transcript;
27
28 public:
29 explicit ECCVMProver_(const std::shared_ptr<ProvingKey>& input_key,
30 const std::shared_ptr<PCSCommitmentKey>& commitment_key,
31 const std::shared_ptr<Transcript>& transcript = std::make_shared<Transcript>());
32
44
45 plonk::proof& export_proof();
46 plonk::proof& construct_proof();
47
48 std::shared_ptr<Transcript> transcript;
49
50 TranslationEvaluations translation_evaluations;
51
52 std::vector<FF> public_inputs;
53
54 proof_system::RelationParameters<FF> relation_parameters;
55
56 std::shared_ptr<ProvingKey> key;
57
58 // Container for spans of all polynomials required by the prover (i.e. all multivariates evaluated by Sumcheck).
59 ProverPolynomials prover_polynomials;
60
61 CommitmentLabels commitment_labels;
62
63 // Container for d + 1 Fold polynomials produced by Gemini
64 std::vector<Polynomial> gemini_polynomials;
65
66 Polynomial batched_quotient_Q; // batched quotient poly computed by Shplonk
67 FF nu_challenge; // needed in both Shplonk rounds
68
69 Polynomial quotient_W;
70
71 FF evaluation_challenge_x;
72 FF translation_batching_challenge_v; // to be rederived by the translator verifier
73
77 std::shared_ptr<PCSCommitmentKey> commitment_key;
78
81
82 private:
83 plonk::proof proof;
84};
85
86extern template class ECCVMProver_<honk::flavor::ECCVM>;
87
88} // namespace proof_system::honk
Definition: polynomial.hpp:12
Definition: bn254.hpp:10
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
Definition: transcript.hpp:62
Definition: eccvm_prover.hpp:15
void execute_shplonk_partial_evaluation_round()
Definition: eccvm_prover.cpp:198
void execute_final_pcs_round()
Definition: eccvm_prover.cpp:210
void execute_pcs_evaluation_round()
Definition: eccvm_prover.cpp:166
void execute_relation_check_rounds()
Run Sumcheck resulting in u = (u_1,...,u_d) challenges and all evaluations at u being calculated.
Definition: eccvm_prover.cpp:109
void execute_grand_product_computation_round()
Compute permutation and lookup grand product polynomials and commitments.
Definition: eccvm_prover.cpp:97
void execute_shplonk_batched_quotient_round()
Definition: eccvm_prover.cpp:183
void execute_transcript_consistency_univariate_opening_round()
Batch open the transcript polynomials as univariates for Translator consistency check TODO(#768): Fin...
Definition: eccvm_prover.cpp:221
void execute_univariatization_round()
Definition: eccvm_prover.cpp:123
void execute_log_derivative_commitments_round()
Compute sorted witness-table accumulator.
Definition: eccvm_prover.cpp:72
void execute_wire_commitments_round()
Compute commitments to the first three wires.
Definition: eccvm_prover.cpp:59
void execute_preamble_round()
Add circuit size, public input size, and public inputs to transcript.
Definition: eccvm_prover.cpp:48
A container for commitment labels.
Definition: goblin_translator.hpp:1022
A container for the prover polynomials handles.
Definition: goblin_translator.hpp:955
The proving key is responsible for storing the polynomials used by the prover.
Definition: goblin_translator.hpp:902
CommitmentKey object over a pairing group 𝔾₁.
Definition: commitment_key.hpp:35
Definition: kzg.hpp:14
Shplonk Prover.
Definition: shplonk.hpp:46
Defines particular circuit builder types expected to be used for circuit construction in stdlib and c...
Definition: claim.hpp:6
Definition: translation_evaluations.hpp:5
Container for parameters used by the grand product (permutation, lookup) Honk relations.
Definition: relation_parameters.hpp:12
Prover output (evalutation pair, witness) that can be passed on to Shplonk batch opening.
Definition: gemini.hpp:60
Prover output (claim=([G], r, 0), witness = G(X), proof = [Q]) that can be passed on to a univariate ...
Definition: shplonk.hpp:36
Contains the multi-linear evaluations of the polynomials at the challenge point 'u'....
Definition: sumcheck_output.hpp:13
Definition: proof.hpp:11