barretenberg
Loading...
Searching...
No Matches
ultra_prover.hpp
1#pragma once
2#include "barretenberg/commitment_schemes/zeromorph/zeromorph.hpp"
3#include "barretenberg/flavor/goblin_ultra.hpp"
4#include "barretenberg/flavor/ultra.hpp"
5#include "barretenberg/plonk/proof_system/types/proof.hpp"
6#include "barretenberg/relations/relation_parameters.hpp"
7#include "barretenberg/sumcheck/instance/prover_instance.hpp"
8#include "barretenberg/sumcheck/sumcheck_output.hpp"
9#include "barretenberg/transcript/transcript.hpp"
10
11namespace proof_system::honk {
12
13template <UltraFlavor Flavor> class UltraProver_ {
14 using FF = typename Flavor::FF;
15 using Commitment = typename Flavor::Commitment;
16 using CommitmentKey = typename Flavor::CommitmentKey;
17 using Polynomial = typename Flavor::Polynomial;
18 using ProverPolynomials = typename Flavor::ProverPolynomials;
19 using CommitmentLabels = typename Flavor::CommitmentLabels;
20 using Curve = typename Flavor::Curve;
22 using Transcript = typename Flavor::Transcript;
23
24 public:
25 explicit UltraProver_(const std::shared_ptr<Instance>&,
26 const std::shared_ptr<CommitmentKey>&,
27 const std::shared_ptr<Transcript>& transcript = std::make_shared<Transcript>());
28
29 BBERG_PROFILE void execute_preamble_round();
30 BBERG_PROFILE void execute_wire_commitments_round();
31 BBERG_PROFILE void execute_sorted_list_accumulator_round();
32 BBERG_PROFILE void execute_log_derivative_inverse_round();
33 BBERG_PROFILE void execute_grand_product_computation_round();
34 BBERG_PROFILE void execute_relation_check_rounds();
35 BBERG_PROFILE void execute_zeromorph_rounds();
36
37 plonk::proof& export_proof();
38 plonk::proof& construct_proof();
39
40 std::shared_ptr<Instance> instance;
41
42 std::shared_ptr<Transcript> transcript;
43
44 proof_system::RelationParameters<FF> relation_parameters;
45
46 CommitmentLabels commitment_labels;
47
48 Polynomial quotient_W;
49
51
52 std::shared_ptr<CommitmentKey> commitment_key;
53
55
56 private:
57 plonk::proof proof;
58};
59
60extern template class UltraProver_<honk::flavor::Ultra>;
61extern template class UltraProver_<honk::flavor::GoblinUltra>;
62
65
66} // 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
An Instance is normally constructed from a finalized circuit and it's role is to compute all the poly...
Definition: prover_instance.hpp:20
Definition: ultra_prover.hpp:13
BBERG_PROFILE void execute_wire_commitments_round()
Commit to the wire polynomials (part of the witness), with the exception of the fourth wire,...
Definition: ultra_prover.cpp:50
BBERG_PROFILE void execute_zeromorph_rounds()
Execute the ZeroMorph protocol to prove the multilinear evaluations produced by Sumcheck.
Definition: ultra_prover.cpp:162
BBERG_PROFILE void execute_sorted_list_accumulator_round()
Compute sorted witness-table accumulator and commit to the resulting polynomials.
Definition: ultra_prover.cpp:93
BBERG_PROFILE void execute_relation_check_rounds()
Run Sumcheck resulting in u = (u_1,...,u_d) challenges and all evaluations at u being calculated.
Definition: ultra_prover.cpp:148
BBERG_PROFILE void execute_grand_product_computation_round()
Compute permutation and lookup grand product polynomials and their commitments.
Definition: ultra_prover.cpp:132
BBERG_PROFILE void execute_preamble_round()
Add circuit size, public input size, and public inputs to transcript.
Definition: ultra_prover.cpp:29
BBERG_PROFILE void execute_log_derivative_inverse_round()
Compute log derivative inverse polynomial and its commitment, if required.
Definition: ultra_prover.cpp:113
A container for commitment labels.
Definition: goblin_translator.hpp:1022
A container for the prover polynomials handles.
Definition: goblin_translator.hpp:955
CommitmentKey object over a pairing group 𝔾₁.
Definition: commitment_key.hpp:35
Prover for ZeroMorph multilinear PCS.
Definition: zeromorph.hpp:33
Defines particular circuit builder types expected to be used for circuit construction in stdlib and c...
Definition: claim.hpp:6
Container for parameters used by the grand product (permutation, lookup) Honk relations.
Definition: relation_parameters.hpp:12
Contains the multi-linear evaluations of the polynomials at the challenge point 'u'....
Definition: sumcheck_output.hpp:13
Definition: proof.hpp:11