Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::OinkProver< Flavor > Class Template Reference

Class for all the oink rounds, which are shared between the folding prover and ultra prover. More...

#include <oink_prover.hpp>

Public Types

using SubrelationSeparators = typename Flavor::SubrelationSeparators
 

Public Member Functions

 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{})
 
void prove ()
 Oink Prover function that runs all the rounds of the verifier.
 
Proof export_proof ()
 Export the Oink proof.
 
void execute_preamble_round ()
 Add circuit size, public input size, and public inputs to transcript.
 
void execute_wire_commitments_round ()
 Commit to the wire polynomials (part of the witness), with the exception of the fourth wire, which is only commited to after adding memory records. In the Goblin Flavor, we also commit to the ECC OP wires and the DataBus columns.
 
void execute_sorted_list_accumulator_round ()
 Compute sorted witness-table accumulator and commit to the resulting polynomials.
 
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.
 
SubrelationSeparators generate_alphas_round ()
 
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.
 

Public Attributes

std::shared_ptr< DeciderPKproving_key
 
std::shared_ptr< HonkVKhonk_vk
 
std::shared_ptr< Transcripttranscript
 
std::string domain_separator
 
ExecutionTraceUsageTracker trace_usage_tracker
 
Flavor::CommitmentLabels commitment_labels
 

Private Types

using CommitmentKey = typename Flavor::CommitmentKey
 
using HonkVK = typename Flavor::VerificationKey
 
using DeciderPK = DeciderProvingKey_< Flavor >
 
using Transcript = typename Flavor::Transcript
 
using FF = typename Flavor::FF
 
using Proof = typename Transcript::Proof
 

Detailed Description

template<IsUltraOrMegaHonk Flavor>
class bb::OinkProver< Flavor >

Class for all the oink rounds, which are shared between the folding prover and ultra prover.

This class contains execute_preamble_round(), execute_wire_commitments_round(), execute_sorted_list_accumulator_round(), execute_log_derivative_inverse_round(), and execute_grand_product_computation_round().

Template Parameters
Flavor

Definition at line 40 of file oink_prover.hpp.

Member Typedef Documentation

◆ CommitmentKey

template<IsUltraOrMegaHonk Flavor>
using bb::OinkProver< Flavor >::CommitmentKey = typename Flavor::CommitmentKey
private

Definition at line 41 of file oink_prover.hpp.

◆ DeciderPK

template<IsUltraOrMegaHonk Flavor>
using bb::OinkProver< Flavor >::DeciderPK = DeciderProvingKey_<Flavor>
private

Definition at line 43 of file oink_prover.hpp.

◆ FF

template<IsUltraOrMegaHonk Flavor>
using bb::OinkProver< Flavor >::FF = typename Flavor::FF
private

Definition at line 45 of file oink_prover.hpp.

◆ HonkVK

template<IsUltraOrMegaHonk Flavor>
using bb::OinkProver< Flavor >::HonkVK = typename Flavor::VerificationKey
private

Definition at line 42 of file oink_prover.hpp.

◆ Proof

template<IsUltraOrMegaHonk Flavor>
using bb::OinkProver< Flavor >::Proof = typename Transcript::Proof
private

Definition at line 46 of file oink_prover.hpp.

◆ SubrelationSeparators

template<IsUltraOrMegaHonk Flavor>
using bb::OinkProver< Flavor >::SubrelationSeparators = typename Flavor::SubrelationSeparators

Definition at line 56 of file oink_prover.hpp.

◆ Transcript

template<IsUltraOrMegaHonk Flavor>
using bb::OinkProver< Flavor >::Transcript = typename Flavor::Transcript
private

Definition at line 44 of file oink_prover.hpp.

Constructor & Destructor Documentation

◆ OinkProver()

template<IsUltraOrMegaHonk Flavor>
bb::OinkProver< Flavor >::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{} 
)
inline

Definition at line 58 of file oink_prover.hpp.

Member Function Documentation

◆ commit_to_witness_polynomial()

template<IsUltraOrMegaHonk Flavor>
void bb::OinkProver< Flavor >::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.

Parameters
polynomial
label
type

Definition at line 267 of file oink_prover.cpp.

◆ execute_grand_product_computation_round()

template<IsUltraOrMegaHonk Flavor>
void bb::OinkProver< Flavor >::execute_grand_product_computation_round ( )

Compute permutation and lookup grand product polynomials and their commitments.

Definition at line 223 of file oink_prover.cpp.

◆ execute_log_derivative_inverse_round()

template<IsUltraOrMegaHonk Flavor>
void bb::OinkProver< Flavor >::execute_log_derivative_inverse_round ( )

Compute log derivative inverse polynomial and its commitment, if required.

Definition at line 189 of file oink_prover.cpp.

◆ execute_preamble_round()

template<IsUltraOrMegaHonk Flavor>
void bb::OinkProver< Flavor >::execute_preamble_round ( )

Add circuit size, public input size, and public inputs to transcript.

Definition at line 87 of file oink_prover.cpp.

◆ execute_sorted_list_accumulator_round()

template<IsUltraOrMegaHonk Flavor>
void bb::OinkProver< Flavor >::execute_sorted_list_accumulator_round ( )

Compute sorted witness-table accumulator and commit to the resulting polynomials.

Definition at line 148 of file oink_prover.cpp.

◆ execute_wire_commitments_round()

template<IsUltraOrMegaHonk Flavor>
void bb::OinkProver< Flavor >::execute_wire_commitments_round ( )

Commit to the wire polynomials (part of the witness), with the exception of the fourth wire, which is only commited to after adding memory records. In the Goblin Flavor, we also commit to the ECC OP wires and the DataBus columns.

Definition at line 105 of file oink_prover.cpp.

◆ export_proof()

template<IsUltraOrMegaHonk Flavor>
OinkProver< Flavor >::Proof bb::OinkProver< Flavor >::export_proof ( )

Export the Oink proof.

Definition at line 78 of file oink_prover.cpp.

◆ generate_alphas_round()

template<IsUltraOrMegaHonk Flavor>
Flavor::SubrelationSeparators bb::OinkProver< Flavor >::generate_alphas_round ( )

Definition at line 243 of file oink_prover.cpp.

◆ prove()

template<IsUltraOrMegaHonk Flavor>
void bb::OinkProver< Flavor >::prove ( )

Oink Prover function that runs all the rounds of the verifier.

Returns the witness commitments and relation_parameters

Template Parameters
Flavor

Definition at line 20 of file oink_prover.cpp.

Member Data Documentation

◆ commitment_labels

template<IsUltraOrMegaHonk Flavor>
Flavor::CommitmentLabels bb::OinkProver< Flavor >::commitment_labels

Definition at line 55 of file oink_prover.hpp.

◆ domain_separator

template<IsUltraOrMegaHonk Flavor>
std::string bb::OinkProver< Flavor >::domain_separator

Definition at line 52 of file oink_prover.hpp.

◆ honk_vk

template<IsUltraOrMegaHonk Flavor>
std::shared_ptr<HonkVK> bb::OinkProver< Flavor >::honk_vk

Definition at line 50 of file oink_prover.hpp.

◆ proving_key

template<IsUltraOrMegaHonk Flavor>
std::shared_ptr<DeciderPK> bb::OinkProver< Flavor >::proving_key

Definition at line 49 of file oink_prover.hpp.

◆ trace_usage_tracker

template<IsUltraOrMegaHonk Flavor>
ExecutionTraceUsageTracker bb::OinkProver< Flavor >::trace_usage_tracker

Definition at line 53 of file oink_prover.hpp.

◆ transcript

template<IsUltraOrMegaHonk Flavor>
std::shared_ptr<Transcript> bb::OinkProver< Flavor >::transcript

Definition at line 51 of file oink_prover.hpp.


The documentation for this class was generated from the following files: