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::Codec, Transcript::HashFunction, void, VKSerializationMode::NO_METADATA > bb::ECCVMFlavor::PrecomputedEntities< Commitment >

Public Member Functions

 VerificationKey ()=default
 
 VerificationKey (std::array< Commitment, NUM_PRECOMPUTED_COMMITMENTS > const &precomputed_cmts)
 
Base::DataType hash_with_origin_tagging (const OriginTag &tag) 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::Codec, Transcript::HashFunction, void, VKSerializationMode::NO_METADATA >
bool operator== (const NativeVerificationKey_ &) const=default
 
bool compare (const NativeVerificationKey_ &other, RefArray< StringType, NUM_PRECOMPUTED_ENTITIES > commitment_labels) const
 
virtual ~NativeVerificationKey_ ()=default
 
 NativeVerificationKey_ ()=default
 
 NativeVerificationKey_ (const size_t circuit_size, const size_t num_public_inputs)
 
 NativeVerificationKey_ (const PrecomputedData &precomputed)
 Construct VK from precomputed data by committing to polynomials.
 
virtual std::vector< DataTypeto_field_elements () const
 Serialize verification key to field elements.
 
size_t from_field_elements (const std::span< const DataType > &elements)
 Populate verification key from field elements.
 
fr hash () const
 Compute VK hash.
 
DataType hash_with_origin_tagging (const Transcript &transcript) const
 An overload that accepts a transcript and extracts the tag internally.
 
- 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_third, lagrange_last)
 
DataType get_selectors ()
 

Static Public Member Functions

static VerificationKey from_proving_key (const ProvingKey &proving_key)
 
- Static Public Member Functions inherited from bb::NativeVerificationKey_< PrecomputedEntities< Commitment >, Transcript::Codec, Transcript::HashFunction, void, VKSerializationMode::NO_METADATA >
static size_t calc_num_data_types ()
 Calculate the number of field elements needed for serialization.
 

Static Public Attributes

static constexpr size_t NUM_PRECOMPUTED_COMMITMENTS = NUM_PRECOMPUTED_ENTITIES
 

Private Types

using Base = NativeVerificationKey_< PrecomputedEntities< Commitment >, typename Transcript::Codec, typename Transcript::HashFunction, void, VKSerializationMode::NO_METADATA >
 

Additional Inherited Members

- Public Types inherited from bb::NativeVerificationKey_< PrecomputedEntities< Commitment >, Transcript::Codec, Transcript::HashFunction, void, VKSerializationMode::NO_METADATA >
using Commitment = typename PrecomputedCommitments::DataType
 
using DataType = typename Codec::DataType
 
- Public Types inherited from bb::ECCVMFlavor::PrecomputedEntities< Commitment >
using DataType = Commitment
 
- Public Attributes inherited from bb::NativeVerificationKey_< PrecomputedEntities< Commitment >, Transcript::Codec, Transcript::HashFunction, void, VKSerializationMode::NO_METADATA >
uint64_t log_circuit_size
 
uint64_t num_public_inputs
 
uint64_t pub_inputs_offset
 

Detailed Description

Definition at line 229 of file flavor.hpp.

Member Typedef Documentation

◆ Base

using bb::avm2::AvmFlavor::VerificationKey::Base = NativeVerificationKey_<PrecomputedEntities<Commitment>, typename Transcript::Codec, typename Transcript::HashFunction, void, VKSerializationMode::NO_METADATA>
private

Definition at line 234 of file flavor.hpp.

Constructor & Destructor Documentation

◆ VerificationKey() [1/2]

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

◆ VerificationKey() [2/2]

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

Definition at line 245 of file flavor.hpp.

Member Function Documentation

◆ from_proving_key()

static VerificationKey bb::avm2::AvmFlavor::VerificationKey::from_proving_key ( const ProvingKey proving_key)
inlinestatic

Definition at line 254 of file flavor.hpp.

◆ hash_with_origin_tagging()

Base::DataType bb::avm2::AvmFlavor::VerificationKey::hash_with_origin_tagging ( const OriginTag tag) const
inlineoverridevirtual

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.

Reimplemented from bb::NativeVerificationKey_< PrecomputedEntities< Commitment >, Transcript::Codec, Transcript::HashFunction, void, VKSerializationMode::NO_METADATA >.

Definition at line 268 of file flavor.hpp.

Member Data Documentation

◆ NUM_PRECOMPUTED_COMMITMENTS

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

Definition at line 241 of file flavor.hpp.


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