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

Verifier class for all the presumcheck rounds, which are shared between the folding verifier and ultra verifier. More...

#include <oink_verifier.hpp>

Public Member Functions

 OinkVerifier (const std::shared_ptr< Instance > &verifier_instance, const std::shared_ptr< Transcript > &transcript, std::string domain_separator="")
 
void verify ()
 Oink Verifier function that runs all the rounds of the verifier.
 
void execute_preamble_round ()
 Get circuit size, public input size, and public inputs from transcript.
 
void execute_wire_commitments_round ()
 Get the wire polynomials (part of the witness), with the exception of the fourth wire, which is only received after adding memory records. In the Goblin Flavor, we also receive the ECC OP wires and the DataBus columns.
 
void execute_sorted_list_accumulator_round ()
 Get sorted witness-table accumulator and fourth wire commitments.
 
void execute_log_derivative_inverse_round ()
 Get log derivative inverse polynomial and its commitment, if MegaFlavor.
 
void execute_grand_product_computation_round ()
 Compute lookup grand product delta and get permutation and lookup grand product commitments.
 
SubrelationSeparators generate_alphas_round ()
 

Public Attributes

std::shared_ptr< Transcripttranscript
 
std::shared_ptr< Instanceverifier_instance
 
std::string domain_separator
 
Flavor::CommitmentLabels comm_labels
 
bb::RelationParameters< FFrelation_parameters
 
WitnessCommitments witness_comms
 

Private Types

using WitnessCommitments = typename Flavor::WitnessCommitments
 
using Transcript = typename Flavor::Transcript
 
using FF = typename Flavor::FF
 
using Commitment = typename Flavor::Commitment
 
using SubrelationSeparators = typename Flavor::SubrelationSeparators
 
using Instance = typename OinkVerifierInstanceType< Flavor >::type
 

Private Member Functions

size_t get_num_public_inputs () const
 Helper to get number of public inputs, abstracting differences between native and recursive flavors.
 

Detailed Description

template<typename Flavor>
class bb::OinkVerifier< Flavor >

Verifier class for all the presumcheck rounds, which are shared between the folding verifier and ultra verifier.

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().

Works with both native and recursive flavors. When instantiated with a recursive flavor (IsRecursiveFlavor<Flavor>), automatically handles the differences in VK access and VK hash assertion.

Template Parameters
FlavorNative or recursive flavor

Definition at line 35 of file oink_verifier.hpp.

Member Typedef Documentation

◆ Commitment

template<typename Flavor >
using bb::OinkVerifier< Flavor >::Commitment = typename Flavor::Commitment
private

Definition at line 39 of file oink_verifier.hpp.

◆ FF

template<typename Flavor >
using bb::OinkVerifier< Flavor >::FF = typename Flavor::FF
private

Definition at line 38 of file oink_verifier.hpp.

◆ Instance

template<typename Flavor >
using bb::OinkVerifier< Flavor >::Instance = typename OinkVerifierInstanceType<Flavor>::type
private

Definition at line 43 of file oink_verifier.hpp.

◆ SubrelationSeparators

template<typename Flavor >
using bb::OinkVerifier< Flavor >::SubrelationSeparators = typename Flavor::SubrelationSeparators
private

Definition at line 40 of file oink_verifier.hpp.

◆ Transcript

template<typename Flavor >
using bb::OinkVerifier< Flavor >::Transcript = typename Flavor::Transcript
private

Definition at line 37 of file oink_verifier.hpp.

◆ WitnessCommitments

template<typename Flavor >
using bb::OinkVerifier< Flavor >::WitnessCommitments = typename Flavor::WitnessCommitments
private

Definition at line 36 of file oink_verifier.hpp.

Constructor & Destructor Documentation

◆ OinkVerifier()

template<typename Flavor >
bb::OinkVerifier< Flavor >::OinkVerifier ( const std::shared_ptr< Instance > &  verifier_instance,
const std::shared_ptr< Transcript > &  transcript,
std::string  domain_separator = "" 
)
inline

Definition at line 53 of file oink_verifier.hpp.

Member Function Documentation

◆ execute_grand_product_computation_round()

template<typename Flavor >
void bb::OinkVerifier< Flavor >::execute_grand_product_computation_round ( )

Compute lookup grand product delta and get permutation and lookup grand product commitments.

Definition at line 147 of file oink_verifier.cpp.

◆ execute_log_derivative_inverse_round()

template<typename Flavor >
void bb::OinkVerifier< Flavor >::execute_log_derivative_inverse_round ( )

Get log derivative inverse polynomial and its commitment, if MegaFlavor.

Definition at line 124 of file oink_verifier.cpp.

◆ execute_preamble_round()

template<typename Flavor >
void bb::OinkVerifier< Flavor >::execute_preamble_round ( )

Get circuit size, public input size, and public inputs from transcript.

Definition at line 47 of file oink_verifier.cpp.

◆ execute_sorted_list_accumulator_round()

template<typename Flavor >
void bb::OinkVerifier< Flavor >::execute_sorted_list_accumulator_round ( )

Get sorted witness-table accumulator and fourth wire commitments.

Definition at line 103 of file oink_verifier.cpp.

◆ execute_wire_commitments_round()

template<typename Flavor >
void bb::OinkVerifier< Flavor >::execute_wire_commitments_round ( )

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

Definition at line 77 of file oink_verifier.cpp.

◆ generate_alphas_round()

template<typename Flavor >
Flavor::SubrelationSeparators bb::OinkVerifier< Flavor >::generate_alphas_round ( )

Definition at line 160 of file oink_verifier.cpp.

◆ get_num_public_inputs()

template<typename Flavor >
size_t bb::OinkVerifier< Flavor >::get_num_public_inputs ( ) const
inlineprivate

Helper to get number of public inputs, abstracting differences between native and recursive flavors.

Returns
Number of public inputs as size_t

Definition at line 80 of file oink_verifier.hpp.

◆ verify()

template<typename Flavor >
void bb::OinkVerifier< Flavor >::verify ( )

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

Returns the witness commitments and relation_parameters. If used as a standalone function, the proof returned by the OinkProver must be loaded into the transcript of the OinkVerifier before calling OinkVerifier::verify()

Template Parameters
Flavor
Returns
OinkOutput<Flavor>

Definition at line 28 of file oink_verifier.cpp.

Member Data Documentation

◆ comm_labels

template<typename Flavor >
Flavor::CommitmentLabels bb::OinkVerifier< Flavor >::comm_labels

Definition at line 49 of file oink_verifier.hpp.

◆ domain_separator

template<typename Flavor >
std::string bb::OinkVerifier< Flavor >::domain_separator

Definition at line 48 of file oink_verifier.hpp.

◆ relation_parameters

template<typename Flavor >
bb::RelationParameters<FF> bb::OinkVerifier< Flavor >::relation_parameters

Definition at line 50 of file oink_verifier.hpp.

◆ transcript

template<typename Flavor >
std::shared_ptr<Transcript> bb::OinkVerifier< Flavor >::transcript

Definition at line 46 of file oink_verifier.hpp.

◆ verifier_instance

template<typename Flavor >
std::shared_ptr<Instance> bb::OinkVerifier< Flavor >::verifier_instance

Definition at line 47 of file oink_verifier.hpp.

◆ witness_comms

template<typename Flavor >
WitnessCommitments bb::OinkVerifier< Flavor >::witness_comms

Definition at line 51 of file oink_verifier.hpp.


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