Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments > Class Template Reference

Base Stdlib verification key class. More...

#include <flavor.hpp>

Inheritance diagram for bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >:

Public Types

using Builder = Builder_
 
using FF = stdlib::field_t< Builder >
 
using Commitment = typename PrecomputedCommitments::DataType
 
using Transcript = BaseTranscript< stdlib::recursion::honk::StdlibTranscriptParams< Builder > >
 

Public Member Functions

bool operator== (const StdlibVerificationKey_ &) const =default
 
virtual ~StdlibVerificationKey_ ()=default
 
 StdlibVerificationKey_ ()=default
 
 StdlibVerificationKey_ (const size_t circuit_size, const size_t num_public_inputs)
 
virtual std::vector< FFto_field_elements () const
 Serialize verification key to field elements.
 
FF hash (Builder &builder)
 A model function to show how to compute the VK hash (without the Transcript abstracting things away).
 
virtual FF 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 Attributes

FF log_circuit_size
 
FF num_public_inputs
 
FF pub_inputs_offset = 0
 

Detailed Description

template<typename Builder_, typename PrecomputedCommitments>
class bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >

Base Stdlib verification key class.

Template Parameters
Builder
FF
PrecomputedCommitments

Definition at line 242 of file flavor.hpp.

Member Typedef Documentation

◆ Builder

template<typename Builder_ , typename PrecomputedCommitments >
using bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::Builder = Builder_

Definition at line 244 of file flavor.hpp.

◆ Commitment

template<typename Builder_ , typename PrecomputedCommitments >
using bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::Commitment = typename PrecomputedCommitments::DataType

Definition at line 246 of file flavor.hpp.

◆ FF

template<typename Builder_ , typename PrecomputedCommitments >
using bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::FF = stdlib::field_t<Builder>

Definition at line 245 of file flavor.hpp.

◆ Transcript

template<typename Builder_ , typename PrecomputedCommitments >
using bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::Transcript = BaseTranscript<stdlib::recursion::honk::StdlibTranscriptParams<Builder> >

Definition at line 247 of file flavor.hpp.

Constructor & Destructor Documentation

◆ ~StdlibVerificationKey_()

template<typename Builder_ , typename PrecomputedCommitments >
virtual bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::~StdlibVerificationKey_ ( )
virtualdefault

◆ StdlibVerificationKey_() [1/2]

template<typename Builder_ , typename PrecomputedCommitments >
bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::StdlibVerificationKey_ ( )
default

◆ StdlibVerificationKey_() [2/2]

template<typename Builder_ , typename PrecomputedCommitments >
bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::StdlibVerificationKey_ ( const size_t  circuit_size,
const size_t  num_public_inputs 
)
inline

Definition at line 255 of file flavor.hpp.

Member Function Documentation

◆ hash()

template<typename Builder_ , typename PrecomputedCommitments >
FF bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::hash ( Builder builder)
inline

A model function to show how to compute the VK hash (without the Transcript abstracting things away).

Currently only used in testing.

Parameters
builder
Returns
FF

Definition at line 294 of file flavor.hpp.

◆ hash_through_transcript()

template<typename Builder_ , typename PrecomputedCommitments >
virtual FF bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::hash_through_transcript ( const std::string &  domain_separator,
Transcript transcript 
) const
inlinevirtual

Hashes the vk using the transcript's independent buffer and returns the hash.

Needed to make sure the Origin Tag system works. We need to set the origin tags of the VK witnesses in the transcript. If we instead did the hashing outside of the transcript and submitted just the hash, only the origin tag of the hash would be set properly. We want to avoid backpropagating origin tags to the actual VK witnesses because it would be manual, as backpropagation of tags is not generally correct. By doing it like this, the origin tags of the VK all get set, so our tooling won't complain when we use the VK later on in the protocol.

Parameters
domain_separator
transcript
Returns
The hash of the verification key

Reimplemented in bb::ECCVMRecursiveFlavor::VerificationKey, bb::TranslatorRecursiveFlavor::VerificationKey, and bb::avm2::AvmRecursiveFlavor::VerificationKey.

Definition at line 312 of file flavor.hpp.

◆ operator==()

template<typename Builder_ , typename PrecomputedCommitments >
bool bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::operator== ( const StdlibVerificationKey_< Builder_, PrecomputedCommitments > &  ) const
default

◆ to_field_elements()

template<typename Builder_ , typename PrecomputedCommitments >
virtual std::vector< FF > bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::to_field_elements ( ) const
inlinevirtual

Serialize verification key to field elements.

Returns
std::vector<FF>

Reimplemented in bb::ECCVMRecursiveFlavor::VerificationKey, bb::TranslatorRecursiveFlavor::VerificationKey, and bb::avm2::AvmRecursiveFlavor::VerificationKey.

Definition at line 266 of file flavor.hpp.

Member Data Documentation

◆ log_circuit_size

template<typename Builder_ , typename PrecomputedCommitments >
FF bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::log_circuit_size

Definition at line 248 of file flavor.hpp.

◆ num_public_inputs

template<typename Builder_ , typename PrecomputedCommitments >
FF bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::num_public_inputs

Definition at line 249 of file flavor.hpp.

◆ pub_inputs_offset

template<typename Builder_ , typename PrecomputedCommitments >
FF bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments >::pub_inputs_offset = 0

Definition at line 250 of file flavor.hpp.


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