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 >, NativeVerificationKey, VKSerializationMode::NO_METADATA >

Public Member Functions

 VerificationKey (CircuitBuilder *builder, const std::shared_ptr< NativeVerificationKey > &native_key)
 
 VerificationKey (std::span< const FF > elements)
 Deserialize a verification key from a vector of field elements.
 
FF hash_with_origin_tagging (const OriginTag &tag) const override
 Tag VK components and hash.
 
void fix_witness ()
 Fixes witnesses of VK to be constants.
 
- Public Member Functions inherited from bb::StdlibVerificationKey_< CircuitBuilder, NativeFlavor::PrecomputedEntities< Commitment >, NativeVerificationKey, VKSerializationMode::NO_METADATA >
bool operator== (const StdlibVerificationKey_ &) const=default
 
virtual ~StdlibVerificationKey_ ()=default
 
 StdlibVerificationKey_ ()=default
 
 StdlibVerificationKey_ (Builder *builder, const std::shared_ptr< T > &native_key)
 Construct a new Verification Key with stdlib types from a provided native verification key.
 
 StdlibVerificationKey_ (std::span< FF > elements)
 Deserialize a verification key from a vector of field elements.
 
void fix_witness ()
 Fixes witnesses of VK to be constants.
 
get_value () const
 Get the native verification key corresponding to this stdlib verification key.
 
FF hash_with_origin_tagging (const Transcript &transcript) const
 An overload that accepts a transcript and extracts the tag internally.
 

Public Attributes

size_t log_fixed_circuit_size = MAX_AVM_TRACE_LOG_SIZE
 
- Public Attributes inherited from bb::StdlibVerificationKey_< CircuitBuilder, NativeFlavor::PrecomputedEntities< Commitment >, NativeVerificationKey, VKSerializationMode::NO_METADATA >
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 >, NativeVerificationKey, VKSerializationMode::NO_METADATA >
using Builder = CircuitBuilder
 
using FF = stdlib::field_t< Builder >
 
using Commitment = typename PrecomputedCommitments::DataType
 
using Transcript = StdlibTranscript< Builder >
 
using NativeVerificationKey = NativeVerificationKey
 
- Static Public Member Functions inherited from bb::StdlibVerificationKey_< CircuitBuilder, NativeFlavor::PrecomputedEntities< Commitment >, NativeVerificationKey, VKSerializationMode::NO_METADATA >
static StdlibVerificationKey_ from_witness_indices (Builder &builder, const std::span< const uint32_t > &witness_indices)
 Construct a VerificationKey from a set of corresponding witness indices.
 

Detailed Description

Definition at line 61 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 ( 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_with_origin_tagging()

FF bb::avm2::AvmRecursiveFlavor::VerificationKey::hash_with_origin_tagging ( const OriginTag tag) const
inlineoverridevirtual

Tag VK components and hash.

Needed to make sure the Origin Tag system works. We need to set the origin tags of the VK witnesses. If we instead did the hashing outside and just submitted the hash, only the origin tag of the hash would be set properly. By tagging the VK components directly, we ensure all VK witnesses have proper origin tags.

Parameters
domain_separator(currently unused, kept for API compatibility)
tagThe origin tag extracted from the transcript
Returns
The hash of the verification key

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

Definition at line 94 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: