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

#include <flavor.hpp>

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

Public Member Functions

 VerificationKey ()=default
 
 VerificationKey (const std::shared_ptr< ProvingKey > &proving_key)
 
 VerificationKey (std::array< Commitment, NUM_PRECOMPUTED_COMMITMENTS > const &precomputed_cmts)
 
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
 Unimplemented because AVM VK is hardcoded so hash does not need to be computed. Rather, we just add the provided VK hash directly to the transcript.
 
- 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)
 
virtual Transcript::DataType hash_through_transcript (const std::string &domain_separator, Transcript &transcript) const
 Hashes the vk using the transcript's independent buffer and returns the hash.
 
- 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 NUM_PRECOMPUTED_COMMITMENTS = NUM_PRECOMPUTED_ENTITIES
 

Additional Inherited Members

- 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 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

Definition at line 240 of file flavor.hpp.

Constructor & Destructor Documentation

◆ VerificationKey() [1/3]

bb::avm2::AvmFlavor::VerificationKey::VerificationKey ( )
default

◆ VerificationKey() [2/3]

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

Definition at line 246 of file flavor.hpp.

◆ VerificationKey() [3/3]

bb::avm2::AvmFlavor::VerificationKey::VerificationKey ( std::array< Commitment, NUM_PRECOMPUTED_COMMITMENTS > const &  precomputed_cmts)
inline

Definition at line 255 of file flavor.hpp.

Member Function Documentation

◆ hash_through_transcript()

fr bb::avm2::AvmFlavor::VerificationKey::hash_through_transcript ( const std::string &  domain_separator,
Transcript transcript 
) const
inlineoverride

Unimplemented because AVM VK is hardcoded so hash does not need to be computed. Rather, we just add the provided VK hash directly to the transcript.

Definition at line 268 of file flavor.hpp.

◆ to_field_elements()

std::vector< AvmFlavor::FF > bb::avm2::AvmFlavor::VerificationKey::to_field_elements ( ) const
overridevirtual

Serialize verification key to field elements.

Returns
std::vector<FF>

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

Definition at line 106 of file flavor.cpp.

Member Data Documentation

◆ NUM_PRECOMPUTED_COMMITMENTS

constexpr size_t bb::avm2::AvmFlavor::VerificationKey::NUM_PRECOMPUTED_COMMITMENTS = NUM_PRECOMPUTED_ENTITIES
staticconstexpr

Definition at line 242 of file flavor.hpp.


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