Barretenberg
The ZK-SNARK library at the core of Aztec
|
Derived class that defines proof structure for Ultra proofs, as well as supporting functions. More...
#include <ultra_flavor.hpp>
Public Types | |
using | Base = BaseTranscript< Params > |
![]() | |
using | DataType = TranscriptParams::DataType |
using | Proof = typename TranscriptParams::Proof |
Public Member Functions | |
Transcript_ ()=default | |
void | deserialize_full_transcript (size_t public_input_size, size_t virtual_log_n=VIRTUAL_LOG_N) |
Takes a FULL Ultra proof and deserializes it into the public member variables that compose the structure. Must be called in order to access the structure of the proof. | |
void | serialize_full_transcript (size_t virtual_log_n=VIRTUAL_LOG_N) |
Serializes the structure variables into a FULL Ultra proof. Should be called only if deserialize_full_transcript() was called and some transcript variable was modified. | |
![]() | |
BaseTranscript () | |
std::vector< DataType > | export_proof () |
Return the proof data starting at proof_start. | |
void | load_proof (const std::vector< DataType > &proof) |
size_t | size_proof_data () |
Return the size of proof_data. | |
void | enable_manifest () |
Enables the manifest. | |
std::array< ChallengeType, sizeof...(Strings)> | get_challenges (const Strings &... labels) |
After all the prover messages have been sent, finalize the round by hashing all the data and then create the number of requested challenges. | |
std::array< ChallengeType, N > | get_challenges (std::array< String, N > const &labels) |
Wrapper around get_challenges to handle array of challenges. | |
std::vector< ChallengeType > | compute_round_challenge_pows (const size_t num_powers, const ChallengeType &round_challenge) |
Given δ, compute the vector [δ, δ^2,..., δ^2^num_powers]. | |
std::vector< ChallengeType > | get_powers_of_challenge (const String &label, size_t num_challenges) |
void | add_to_independent_hash_buffer (const std::string &label, const T &element) |
Adds an element to an independent hash buffer. | |
DataType | hash_independent_buffer () |
Hashes the independent hash buffer and clears it. | |
void | add_to_hash_buffer (const std::string &label, const T &element) |
Adds an element to the transcript. | |
void | send_to_verifier (const std::string &label, const T &element) |
Adds a prover message to the transcript, only intended to be used by the prover. | |
T | receive_from_prover (const std::string &label) |
Reads the next element of type T from the transcript, with a predefined label, only used by verifier. | |
ChallengeType | get_challenge (const std::string &label) |
TranscriptManifest | get_manifest () const |
void | print () |
BaseTranscript | branch_transcript () |
Branch a transcript to perform verifier-only computations. | |
Static Public Member Functions | |
static std::shared_ptr< Transcript_ > | prover_init_empty () |
static std::shared_ptr< Transcript_ > | verifier_init_empty (const std::shared_ptr< Transcript_ > &transcript) |
![]() | |
static DataType | hash (const std::vector< DataType > &data) |
Static hash method that forwards to TranscriptParams hash. | |
static std::vector< DataType > | serialize (const T &element) |
Serialize a size_t to a vector of field elements. | |
static std::shared_ptr< BaseTranscript > | convert_prover_transcript_to_verifier_transcript (const std::shared_ptr< BaseTranscript > &prover_transcript) |
Convert a prover transcript to a verifier transcript. | |
static std::shared_ptr< BaseTranscript > | prover_init_empty () |
For testing: initializes transcript with some arbitrary data so that a challenge can be generated after initialization. Only intended to be used by Prover. | |
static std::shared_ptr< BaseTranscript > | verifier_init_empty (const std::shared_ptr< BaseTranscript > &transcript) |
For testing: initializes transcript based on proof data then receives junk data produced by BaseTranscript::prover_init_empty(). Only intended to be used by Verifier. | |
Public Attributes | |
std::vector< FF > | public_inputs |
Commitment | w_l_comm |
Commitment | w_r_comm |
Commitment | w_o_comm |
Commitment | lookup_read_counts_comm |
Commitment | lookup_read_tags_comm |
Commitment | w_4_comm |
Commitment | z_perm_comm |
Commitment | lookup_inverses_comm |
std::vector< bb::Univariate< FF, BATCHED_RELATION_PARTIAL_LENGTH > > | sumcheck_univariates |
std::array< FF, NUM_ALL_ENTITIES > | sumcheck_evaluations |
std::vector< Commitment > | gemini_fold_comms |
std::vector< FF > | gemini_fold_evals |
Commitment | shplonk_q_comm |
Commitment | kzg_w_comm |
![]() | |
size_t | transcript_index |
size_t | round_index |
bool | reception_phase |
std::ptrdiff_t | proof_start |
size_t | num_frs_written |
size_t | num_frs_read |
size_t | round_number |
Additional Inherited Members | |
![]() | |
static constexpr bool | in_circuit |
static constexpr size_t | HASH_OUTPUT_SIZE |
![]() | |
void | add_element_frs_to_hash_buffer (const std::string &label, std::span< const DataType > element_frs) |
Adds challenge elements to the current_round_buffer and updates the manifest. | |
void | serialize_to_buffer (const T &element, Proof &proof_data) |
Serializes object and appends it to proof_data. | |
T | deserialize_from_buffer (const Proof &proof_data, size_t &offset) const |
Deserializes the frs starting at offset into the typed element and returns that element. | |
![]() | |
Proof | proof_data |
Derived class that defines proof structure for Ultra proofs, as well as supporting functions.
Definition at line 349 of file ultra_flavor.hpp.
using bb::UltraFlavor::Transcript_< Params >::Base = BaseTranscript<Params> |
Definition at line 351 of file ultra_flavor.hpp.
|
default |
|
inline |
Takes a FULL Ultra proof and deserializes it into the public member variables that compose the structure. Must be called in order to access the structure of the proof.
Definition at line 389 of file ultra_flavor.hpp.
|
inlinestatic |
Definition at line 371 of file ultra_flavor.hpp.
|
inline |
Serializes the structure variables into a FULL Ultra proof. Should be called only if deserialize_full_transcript() was called and some transcript variable was modified.
Definition at line 430 of file ultra_flavor.hpp.
|
inlinestatic |
Definition at line 377 of file ultra_flavor.hpp.
std::vector<Commitment> bb::UltraFlavor::Transcript_< Params >::gemini_fold_comms |
Definition at line 365 of file ultra_flavor.hpp.
std::vector<FF> bb::UltraFlavor::Transcript_< Params >::gemini_fold_evals |
Definition at line 366 of file ultra_flavor.hpp.
Commitment bb::UltraFlavor::Transcript_< Params >::kzg_w_comm |
Definition at line 368 of file ultra_flavor.hpp.
Commitment bb::UltraFlavor::Transcript_< Params >::lookup_inverses_comm |
Definition at line 362 of file ultra_flavor.hpp.
Commitment bb::UltraFlavor::Transcript_< Params >::lookup_read_counts_comm |
Definition at line 358 of file ultra_flavor.hpp.
Commitment bb::UltraFlavor::Transcript_< Params >::lookup_read_tags_comm |
Definition at line 359 of file ultra_flavor.hpp.
std::vector<FF> bb::UltraFlavor::Transcript_< Params >::public_inputs |
Definition at line 354 of file ultra_flavor.hpp.
Commitment bb::UltraFlavor::Transcript_< Params >::shplonk_q_comm |
Definition at line 367 of file ultra_flavor.hpp.
std::array<FF, NUM_ALL_ENTITIES> bb::UltraFlavor::Transcript_< Params >::sumcheck_evaluations |
Definition at line 364 of file ultra_flavor.hpp.
std::vector<bb::Univariate<FF, BATCHED_RELATION_PARTIAL_LENGTH> > bb::UltraFlavor::Transcript_< Params >::sumcheck_univariates |
Definition at line 363 of file ultra_flavor.hpp.
Commitment bb::UltraFlavor::Transcript_< Params >::w_4_comm |
Definition at line 360 of file ultra_flavor.hpp.
Commitment bb::UltraFlavor::Transcript_< Params >::w_l_comm |
Definition at line 355 of file ultra_flavor.hpp.
Commitment bb::UltraFlavor::Transcript_< Params >::w_o_comm |
Definition at line 357 of file ultra_flavor.hpp.
Commitment bb::UltraFlavor::Transcript_< Params >::w_r_comm |
Definition at line 356 of file ultra_flavor.hpp.
Commitment bb::UltraFlavor::Transcript_< Params >::z_perm_comm |
Definition at line 361 of file ultra_flavor.hpp.