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

#include <recursive_flavor.hpp>

Inheritance diagram for bb::avm2::AvmRecursiveFlavor::VerificationKey:
bb::StdlibVerificationKey_< CircuitBuilder, NativeFlavor::PrecomputedEntities< Commitment > >

Public Member Functions

 VerificationKey (CircuitBuilder *builder, const std::shared_ptr< NativeVerificationKey > &native_key)
 
 VerificationKey (CircuitBuilder &builder, std::span< const FF > elements)
 Deserialize a verification key from a vector of field elements.
 
std::vector< FFto_field_elements () const override
 Serialize verification key to field elements.
 
FF hash_through_transcript (const std::string &domain_separator, Transcript &transcript) const override
 Hashes the vk using the transcript's independent buffer and returns the hash.
 
void fix_witness ()
 Fixes witnesses of VK to be constants.
 
- Public Member Functions inherited from bb::StdlibVerificationKey_< CircuitBuilder, NativeFlavor::PrecomputedEntities< Commitment > >
bool operator== (const StdlibVerificationKey_ &) const=default
 
virtual ~StdlibVerificationKey_ ()=default
 
 StdlibVerificationKey_ ()=default
 
 StdlibVerificationKey_ (const size_t circuit_size, const size_t num_public_inputs)
 
FF hash (Builder &builder)
 A model function to show how to compute the VK hash (without the Transcript abstracting things away).
 

Public Attributes

size_t log_fixed_circuit_size = MAX_AVM_TRACE_LOG_SIZE
 
- Public Attributes inherited from bb::StdlibVerificationKey_< CircuitBuilder, NativeFlavor::PrecomputedEntities< Commitment > >
FF log_circuit_size
 
FF num_public_inputs
 
FF pub_inputs_offset
 

Additional Inherited Members

- Public Types inherited from bb::StdlibVerificationKey_< CircuitBuilder, NativeFlavor::PrecomputedEntities< Commitment > >
using Builder = CircuitBuilder
 
using FF = stdlib::field_t< Builder >
 
using Commitment = typename PrecomputedCommitments::DataType
 
using Transcript = BaseTranscript< stdlib::recursion::honk::StdlibTranscriptParams< Builder > >
 

Detailed Description

Definition at line 63 of file recursive_flavor.hpp.

Constructor & Destructor Documentation

◆ VerificationKey() [1/2]

bb::avm2::AvmRecursiveFlavor::VerificationKey::VerificationKey ( CircuitBuilder builder,
const std::shared_ptr< NativeVerificationKey > &  native_key 
)
inline

Definition at line 67 of file recursive_flavor.hpp.

◆ VerificationKey() [2/2]

bb::avm2::AvmRecursiveFlavor::VerificationKey::VerificationKey ( CircuitBuilder builder,
std::span< const FF elements 
)
inline

Deserialize a verification key from a vector of field elements.

Parameters
builder
elements

Definition at line 80 of file recursive_flavor.hpp.

Member Function Documentation

◆ fix_witness()

void bb::avm2::AvmRecursiveFlavor::VerificationKey::fix_witness ( )
inline

Fixes witnesses of VK to be constants.

Definition at line 103 of file recursive_flavor.hpp.

◆ hash_through_transcript()

FF bb::avm2::AvmRecursiveFlavor::VerificationKey::hash_through_transcript ( const std::string &  domain_separator,
Transcript transcript 
) const
inlineoverridevirtual

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 from bb::StdlibVerificationKey_< CircuitBuilder, NativeFlavor::PrecomputedEntities< Commitment > >.

Definition at line 93 of file recursive_flavor.hpp.

◆ to_field_elements()

std::vector< FF > bb::avm2::AvmRecursiveFlavor::VerificationKey::to_field_elements ( ) const
inlineoverridevirtual

Serialize verification key to field elements.

Returns
std::vector<FF>

Reimplemented from bb::StdlibVerificationKey_< CircuitBuilder, NativeFlavor::PrecomputedEntities< Commitment > >.

Definition at line 92 of file recursive_flavor.hpp.

Member Data Documentation

◆ log_fixed_circuit_size

size_t bb::avm2::AvmRecursiveFlavor::VerificationKey::log_fixed_circuit_size = MAX_AVM_TRACE_LOG_SIZE

Definition at line 66 of file recursive_flavor.hpp.


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