Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::TranslatorFlavor::VerificationKey Class Reference

The verification key is responsible for storing the commitments to the precomputed (non-witnessk) polynomials used by the verifier. More...

#include <translator_flavor.hpp>

Inheritance diagram for bb::TranslatorFlavor::VerificationKey:
bb::NativeVerificationKey_< PrecomputedEntities< Commitment >, Transcript > bb::ECCVMFlavor::PrecomputedEntities< Commitment >

Public Types

using MSGPACK_NO_STATIC_CHECK = std::true_type
 
- Public Types inherited from bb::NativeVerificationKey_< PrecomputedEntities< Commitment >, Transcript >
using Commitment = typename PrecomputedCommitments::DataType
 
- Public Types inherited from bb::ECCVMFlavor::PrecomputedEntities< Commitment >
using DataType = Commitment
 

Public Member Functions

 VerificationKey ()
 
 VerificationKey (const std::shared_ptr< ProvingKey > &proving_key)
 
std::vector< frto_field_elements () const override
 Serialize verification key to field elements.
 
fr hash_through_transcript (const std::string &domain_separator, Transcript &transcript) const override
 Unused function because vk is hardcoded in recursive verifier, so no transcript hashing is needed.
 
 MSGPACK_FIELDS (num_public_inputs, pub_inputs_offset, ordered_extra_range_constraints_numerator, lagrange_first, lagrange_last, lagrange_odd_in_minicircuit, lagrange_even_in_minicircuit, lagrange_result_row, lagrange_last_in_minicircuit, lagrange_masking, lagrange_mini_masking, lagrange_real_last)
 
- Public Member Functions inherited from bb::NativeVerificationKey_< PrecomputedEntities< Commitment >, Transcript >
bool operator== (const NativeVerificationKey_ &) const=default
 
virtual ~NativeVerificationKey_ ()=default
 
 NativeVerificationKey_ ()=default
 
 NativeVerificationKey_ (const size_t circuit_size, const size_t num_public_inputs)
 
fr hash () const
 A model function to show how to compute the VK hash(without the Transcript abstracting things away)
 
- Public Member Functions inherited from bb::ECCVMFlavor::PrecomputedEntities< Commitment >
bool operator== (const PrecomputedEntities &other) const=default
 
 DEFINE_FLAVOR_MEMBERS (DataType, lagrange_first, lagrange_second, lagrange_last)
 
DataType get_selectors ()
 

Static Public Attributes

static constexpr size_t VERIFICATION_KEY_LENGTH
 

Additional Inherited Members

- Public Attributes inherited from bb::NativeVerificationKey_< PrecomputedEntities< Commitment >, Transcript >
uint64_t log_circuit_size
 
uint64_t num_public_inputs
 
uint64_t pub_inputs_offset
 

Detailed Description

The verification key is responsible for storing the commitments to the precomputed (non-witnessk) polynomials used by the verifier.

Note
Note the discrepancy with what sort of data is stored here vs in the proving key. We may want to resolve that, and split out separate PrecomputedPolynomials/Commitments data for clarity but also for portability of our circuits.

Definition at line 754 of file translator_flavor.hpp.

Member Typedef Documentation

◆ MSGPACK_NO_STATIC_CHECK

using bb::TranslatorFlavor::VerificationKey::MSGPACK_NO_STATIC_CHECK = std::true_type

Definition at line 819 of file translator_flavor.hpp.

Constructor & Destructor Documentation

◆ VerificationKey() [1/2]

bb::TranslatorFlavor::VerificationKey::VerificationKey ( )
inline

Definition at line 761 of file translator_flavor.hpp.

◆ VerificationKey() [2/2]

bb::TranslatorFlavor::VerificationKey::VerificationKey ( const std::shared_ptr< ProvingKey > &  proving_key)
inline

Definition at line 773 of file translator_flavor.hpp.

Member Function Documentation

◆ hash_through_transcript()

fr bb::TranslatorFlavor::VerificationKey::hash_through_transcript ( const std::string &  domain_separator,
Transcript transcript 
) const
inlineoverridevirtual

Unused function because vk is hardcoded in recursive verifier, so no transcript hashing is needed.

Parameters
domain_separator
transcript

Reimplemented from bb::NativeVerificationKey_< PrecomputedEntities< Commitment >, Transcript >.

Definition at line 812 of file translator_flavor.hpp.

◆ MSGPACK_FIELDS()

bb::TranslatorFlavor::VerificationKey::MSGPACK_FIELDS ( num_public_inputs  ,
pub_inputs_offset  ,
ordered_extra_range_constraints_numerator  ,
lagrange_first  ,
lagrange_last  ,
lagrange_odd_in_minicircuit  ,
lagrange_even_in_minicircuit  ,
lagrange_result_row  ,
lagrange_last_in_minicircuit  ,
lagrange_masking  ,
lagrange_mini_masking  ,
lagrange_real_last   
)

◆ to_field_elements()

std::vector< fr > bb::TranslatorFlavor::VerificationKey::to_field_elements ( ) const
inlineoverridevirtual

Serialize verification key to field elements.

Returns
std::vector<FF>

Reimplemented from bb::NativeVerificationKey_< PrecomputedEntities< Commitment >, Transcript >.

Definition at line 790 of file translator_flavor.hpp.

Member Data Documentation

◆ VERIFICATION_KEY_LENGTH

constexpr size_t bb::TranslatorFlavor::VerificationKey::VERIFICATION_KEY_LENGTH
staticconstexpr
Initial value:
=
static constexpr size_t num_frs_comm
static constexpr size_t NUM_PRECOMPUTED_ENTITIES

Definition at line 757 of file translator_flavor.hpp.


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