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
30
31namespace bb {
40template <IsUltraOrMegaHonk Flavor> class OinkProver {
45 using FF = typename Flavor::FF;
46 using Proof = typename Transcript::Proof;
47
48 public:
49 std::shared_ptr<DeciderPK> proving_key;
50 std::shared_ptr<HonkVK> honk_vk;
51 std::shared_ptr<Transcript> transcript;
52 std::string domain_separator;
54
57
69
70 void prove();
79 const std::string& label,
81};
82
84
85} // namespace bb
typename TranscriptParams::Proof Proof
A DeciderProvingKey is normally constructed from a finalized circuit and it contains all the informat...
A container for commitment labels.
The verification key is responsible for storing the commitments to the precomputed (non-witness) poly...
Curve::ScalarField FF
bb::CommitmentKey< Curve > CommitmentKey
std::array< FF, NUM_SUBRELATIONS - 1 > SubrelationSeparators
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.
void execute_log_derivative_inverse_round()
Compute log derivative inverse polynomial and its commitment, if required.
std::shared_ptr< DeciderPK > proving_key
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.
ExecutionTraceUsageTracker trace_usage_tracker
void execute_preamble_round()
Add circuit size, public input size, and public inputs to transcript.
typename Flavor::Transcript Transcript
Flavor::CommitmentLabels commitment_labels
typename Flavor::VerificationKey HonkVK
typename Flavor::CommitmentKey CommitmentKey
typename Flavor::FF FF
OinkProver(std::shared_ptr< DeciderPK > proving_key, std::shared_ptr< HonkVK > honk_vk, const std::shared_ptr< typename Flavor::Transcript > &transcript=std::make_shared< Transcript >(), std::string domain_separator="", const ExecutionTraceUsageTracker &trace_usage_tracker=ExecutionTraceUsageTracker{})
std::shared_ptr< Transcript > transcript
SubrelationSeparators generate_alphas_round()
void execute_sorted_list_accumulator_round()
Compute sorted witness-table accumulator and commit to the resulting polynomials.
typename Flavor::SubrelationSeparators SubrelationSeparators
std::string domain_separator
void commit_to_witness_polynomial(Polynomial< FF > &polynomial, const std::string &label, const CommitmentKey::CommitType type=CommitmentKey::CommitType::Default)
A uniform method to mask, commit, and send the corresponding commitment to the verifier.
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
typename Flavor::Polynomial Polynomial
Entry point for Barretenberg command-line interface.
STL namespace.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
Tracks the cumulative usage of the execution trace across a series of circuits.