Barretenberg
The ZK-SNARK library at the core of Aztec
|
Base Native verification key class. More...
#include <flavor.hpp>
Public Types | |
using | Commitment = typename PrecomputedCommitments::DataType |
Public Member Functions | |
bool | operator== (const NativeVerificationKey_ &) const =default |
virtual | ~NativeVerificationKey_ ()=default |
NativeVerificationKey_ ()=default | |
NativeVerificationKey_ (const size_t circuit_size, const size_t num_public_inputs) | |
virtual std::vector< typename Transcript::DataType > | to_field_elements () const |
Serialize verification key to field elements. | |
fr | hash () const |
A model function to show how to compute the VK hash(without the Transcript abstracting things away) | |
virtual Transcript::DataType | 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 | |
uint64_t | log_circuit_size = 0 |
uint64_t | num_public_inputs = 0 |
uint64_t | pub_inputs_offset = 0 |
Base Native verification key class.
We want a separate native and stdlib verification key class because we don't have nice mappings from native to stdlib and back. Examples of mappings that don't exist are from uint64_t to field_t, .get_value() doesn't have a native equivalent, and Builder also doesn't have a native equivalent.
PrecomputedEntities | An instance of PrecomputedEntities_ with affine_element data type and handle type. |
Definition at line 152 of file flavor.hpp.
using bb::NativeVerificationKey_< PrecomputedCommitments, Transcript >::Commitment = typename PrecomputedCommitments::DataType |
Definition at line 154 of file flavor.hpp.
|
virtualdefault |
|
default |
|
inline |
Definition at line 162 of file flavor.hpp.
|
inline |
A model function to show how to compute the VK hash(without the Transcript abstracting things away)
Currently only used in testing.
Definition at line 200 of file flavor.hpp.
|
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.
domain_separator | |
transcript |
Reimplemented in bb::ECCVMFlavor::VerificationKey, and bb::TranslatorFlavor::VerificationKey.
Definition at line 219 of file flavor.hpp.
|
default |
|
inlinevirtual |
Serialize verification key to field elements.
Reimplemented in bb::ECCVMFlavor::VerificationKey, bb::TranslatorFlavor::VerificationKey, and bb::avm2::AvmFlavor::VerificationKey.
Definition at line 173 of file flavor.hpp.
uint64_t bb::NativeVerificationKey_< PrecomputedCommitments, Transcript >::log_circuit_size = 0 |
Definition at line 155 of file flavor.hpp.
uint64_t bb::NativeVerificationKey_< PrecomputedCommitments, Transcript >::num_public_inputs = 0 |
Definition at line 156 of file flavor.hpp.
uint64_t bb::NativeVerificationKey_< PrecomputedCommitments, Transcript >::pub_inputs_offset = 0 |
Definition at line 157 of file flavor.hpp.