Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
oink_prover.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: not started, auditors: [], date: YYYY-MM-DD }
3// external_1: { status: not started, auditors: [], date: YYYY-MM-DD }
4// external_2: { status: not started, auditors: [], date: YYYY-MM-DD }
5// =====================
6
7#pragma once
8// clang-format off
9/* )\ /|
10* .-/'-|_/ |
11* __ __,-' ( / \/
12* .-'" "'-..__,-'"" -o.`-._
13* / '/
14* *--._ ./ _.--
15* | _.-'
16* : .-/
17* \ )_ /
18* \ _) / \‍(
19* `. /-.___.---'( / \\
20* ( / \\ \‍( L\
21* \‍( L\ \\
22* \\ \\
23* L\ L\
24*/
25// clang-format on
26#include <utility>
27
29
30namespace bb {
39template <IsUltraOrMegaHonk Flavor> class OinkProver {
44 using FF = typename Flavor::FF;
45 using Proof = typename Transcript::Proof;
46
47 public:
49 std::shared_ptr<HonkVK> honk_vk;
50 std::shared_ptr<Transcript> transcript;
51 std::string domain_separator;
52
54 using SubrelationSeparator = typename Flavor::SubrelationSeparator;
55
65
66 void prove();
75 Flavor::Commitment commit_to_witness_polynomial(Polynomial<FF>& polynomial, const std::string& label);
76};
77
79
80} // namespace bb
std::vector< DataType > Proof
A container for commitment labels.
The verification key is responsible for storing the commitments to the precomputed (non-witnessk) pol...
typename Curve::ScalarField FF
typename G1::affine_element Commitment
bb::CommitmentKey< Curve > CommitmentKey
NativeTranscript Transcript
Class for all the oink rounds, which are shared between the folding prover and ultra prover.
Proof export_proof()
Export the Oink proof.
OinkProver(std::shared_ptr< ProverInstance > prover_instance, std::shared_ptr< HonkVK > honk_vk, const std::shared_ptr< typename Flavor::Transcript > &transcript=std::make_shared< Transcript >(), std::string domain_separator="")
Flavor::Commitment commit_to_witness_polynomial(Polynomial< FF > &polynomial, const std::string &label)
A uniform method to mask, commit, and send the corresponding commitment to the verifier.
typename Flavor::SubrelationSeparator SubrelationSeparator
void execute_log_derivative_inverse_round()
Compute log derivative inverse polynomial and its commitment, if required.
void execute_grand_product_computation_round()
Compute permutation and lookup grand product polynomials and their commitments.
void prove()
Oink Prover function that runs all the rounds of the verifier.
SubrelationSeparator generate_alpha_round()
void execute_preamble_round()
Add circuit size, public input size, and public inputs to transcript.
typename Flavor::Transcript Transcript
std::shared_ptr< ProverInstance > prover_instance
Flavor::CommitmentLabels commitment_labels
typename Flavor::VerificationKey HonkVK
typename Flavor::CommitmentKey CommitmentKey
typename Flavor::FF FF
std::shared_ptr< Transcript > transcript
void execute_sorted_list_accumulator_round()
Compute sorted witness-table accumulator and commit to the resulting polynomials.
std::string domain_separator
void commit_to_masking_poly()
void execute_wire_commitments_round()
Commit to the wire polynomials (part of the witness), with the exception of the fourth wire,...
std::shared_ptr< HonkVK > honk_vk
typename Transcript::Proof Proof
Structured polynomial class that represents the coefficients 'a' of a_0 + a_1 x .....
A ProverInstance is normally constructed from a finalized circuit and it contains all the information...
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
STL namespace.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13