|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Base Stdlib verification key class. More...
#include <flavor.hpp>
Public Types | |
| using | Builder = Builder_ |
| using | FF = stdlib::field_t< Builder > |
| using | Commitment = typename PrecomputedCommitments::DataType |
| using | Transcript = StdlibTranscript< Builder > |
| using | NativeVerificationKey = NativeVerificationKey_ |
Public Member Functions | |
| bool | operator== (const StdlibVerificationKey_ &) const =default |
| virtual | ~StdlibVerificationKey_ ()=default |
| StdlibVerificationKey_ ()=default | |
| template<typename T = NativeVerificationKey_> requires (!std::is_void_v<T>) | |
| 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. | |
| template<typename T = NativeVerificationKey_> requires (!std::is_void_v<T>) | |
| T | get_value () const |
| Get the native verification key corresponding to this stdlib verification key. | |
| virtual FF | hash_with_origin_tagging (const OriginTag &tag) const |
| Tag VK components and hash. | |
| template<typename Transcript > | |
| FF | hash_with_origin_tagging (const Transcript &transcript) const |
| An overload that accepts a transcript and extracts the tag internally. | |
Static Public Member Functions | |
| 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. | |
Public Attributes | |
| FF | log_circuit_size |
| FF | num_public_inputs |
| FF | pub_inputs_offset = 0 |
Base Stdlib verification key class.
| Builder_ | The circuit builder type |
| PrecomputedCommitments | The precomputed entities type |
| NativeVerificationKey_ | The native VK type (optional, enables native<->stdlib conversion) |
| SerializeMetadata | Controls how metadata is serialized (FULL, NO_METADATA) |
Definition at line 353 of file flavor.hpp.
| using bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments, NativeVerificationKey_, SerializeMetadata >::Builder = Builder_ |
Definition at line 355 of file flavor.hpp.
| using bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments, NativeVerificationKey_, SerializeMetadata >::Commitment = typename PrecomputedCommitments::DataType |
Definition at line 357 of file flavor.hpp.
| using bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments, NativeVerificationKey_, SerializeMetadata >::FF = stdlib::field_t<Builder> |
Definition at line 356 of file flavor.hpp.
| using bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments, NativeVerificationKey_, SerializeMetadata >::NativeVerificationKey = NativeVerificationKey_ |
Definition at line 359 of file flavor.hpp.
| using bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments, NativeVerificationKey_, SerializeMetadata >::Transcript = StdlibTranscript<Builder> |
Definition at line 358 of file flavor.hpp.
|
virtualdefault |
|
default |
|
inline |
Construct a new Verification Key with stdlib types from a provided native verification key.
Only available when NativeVerificationKey is specified (not void)
Definition at line 374 of file flavor.hpp.
|
inlineexplicit |
Deserialize a verification key from a vector of field elements.
Definition at line 388 of file flavor.hpp.
|
inline |
Fixes witnesses of VK to be constants.
Definition at line 420 of file flavor.hpp.
|
inlinestatic |
Construct a VerificationKey from a set of corresponding witness indices.
Definition at line 406 of file flavor.hpp.
|
inline |
Get the native verification key corresponding to this stdlib verification key.
Only available when NativeVerificationKey is specified (not void)
Definition at line 437 of file flavor.hpp.
|
inlinevirtual |
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.
| domain_separator | (currently unused, kept for API compatibility) |
| tag | The origin tag extracted from the transcript |
Reimplemented in bb::ECCVMRecursiveFlavor::VerificationKey, bb::TranslatorRecursiveFlavor::VerificationKey, and bb::avm2::AvmRecursiveFlavor::VerificationKey.
Definition at line 460 of file flavor.hpp.
|
inline |
An overload that accepts a transcript and extracts the tag internally.
| TranscriptType | The transcript type (Codec and HashFunction deduced automatically) |
| transcript | The transcript to extract the origin tag from |
Definition at line 495 of file flavor.hpp.
|
default |
| FF bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments, NativeVerificationKey_, SerializeMetadata >::log_circuit_size |
Definition at line 360 of file flavor.hpp.
| FF bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments, NativeVerificationKey_, SerializeMetadata >::num_public_inputs |
Definition at line 361 of file flavor.hpp.
| FF bb::StdlibVerificationKey_< Builder_, PrecomputedCommitments, NativeVerificationKey_, SerializeMetadata >::pub_inputs_offset = 0 |
Definition at line 362 of file flavor.hpp.