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

Derived class that defines proof structure for Ultra zero knowledge proofs, as well as supporting functions. TODO(https://github.com/AztecProtocol/barretenberg/issues/1355): Deduplicate zk flavor transcripts. More...

#include <ultra_zk_flavor.hpp>

Inheritance diagram for bb::UltraZKFlavor::Transcript_:
bb::UltraFlavor::Transcript_< Codec, HashFunction > bb::BaseTranscript< Codec, HashFunction >

Public Types

using Base = UltraFlavor::Transcript::Base
 
- Public Types inherited from bb::UltraFlavor::Transcript_< Codec, HashFunction >
using Base = BaseTranscript< Codec, HashFunction >
 
- Public Types inherited from bb::BaseTranscript< Codec, HashFunction >
using Codec = Codec
 
using HashFunction = HashFunction
 
using DataType = typename Codec::DataType
 
using Proof = std::vector< DataType >
 

Public Member Functions

 Transcript_ ()=default
 
void deserialize_full_transcript (size_t num_public_inputs, size_t virtual_log_n=CONST_PROOF_SIZE_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=CONST_PROOF_SIZE_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.
 
- Public Member Functions inherited from bb::UltraFlavor::Transcript_< Codec, HashFunction >
 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.
 
- Public Member Functions inherited from bb::BaseTranscript< Codec, HashFunction >
 BaseTranscript ()
 
 BaseTranscript (const Proof &proof)
 
std::vector< DataTypeexport_proof ()
 Return the proof data starting at proof_start.
 
void load_proof (const std::vector< DataType > &proof)
 Verifier-specific method. The verifier needs to load a proof or its segment before the verification.
 
size_t get_proof_size ()
 
void enable_manifest ()
 
std::vector< ChallengeType > get_challenges (std::span< const std::string > 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 (const std::array< std::string, N > &labels)
 Wrapper around get_challenges to handle array of challenges.
 
std::vector< ChallengeType > get_dyadic_powers_of_challenge (const std::string &label, size_t num_challenges)
 Get a challenge and compute its dyadic powers [δ, δ², δ⁴, ..., δ^(2^(num_challenges-1))].
 
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.
 
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 ()
 
void test_set_proof_parsing_state (std::ptrdiff_t start, size_t written)
 Test utility: Set proof parsing state for export after deserialization.
 
std::ptrdiff_t test_get_proof_start () const
 Test utility: Get proof_start for validation.
 

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 Public Member Functions inherited from bb::UltraFlavor::Transcript_< Codec, HashFunction >
static std::shared_ptr< Transcript_prover_init_empty ()
 
static std::shared_ptr< Transcript_verifier_init_empty (const std::shared_ptr< Transcript_ > &transcript)
 
- Static Public Member Functions inherited from bb::BaseTranscript< Codec, HashFunction >
static std::shared_ptr< BaseTranscriptconvert_prover_transcript_to_verifier_transcript (const std::shared_ptr< BaseTranscript > &prover_transcript)
 Convert a prover transcript to a verifier transcript.
 
static std::vector< DataTypeserialize (const T &element)
 
static T deserialize (std::span< const DataType > frs)
 
static std::shared_ptr< BaseTranscriptprover_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< BaseTranscriptverifier_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::array< FF, NUM_ALL_ENTITIESsumcheck_evaluations
 
std::vector< bb::Univariate< FF, BATCHED_RELATION_PARTIAL_LENGTH > > zk_sumcheck_univariates
 
Commitment libra_concatenation_commitment
 
FF libra_sum
 
FF libra_claimed_evaluation
 
Commitment libra_grand_sum_commitment
 
Commitment libra_quotient_commitment
 
FF libra_concatenation_eval
 
FF libra_shifted_grand_sum_eval
 
FF libra_grand_sum_eval
 
FF libra_quotient_eval
 
Commitment hiding_polynomial_commitment
 
FF hiding_polynomial_eval
 
- Public Attributes inherited from bb::UltraFlavor::Transcript_< Codec, HashFunction >
std::vector< FFpublic_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_ENTITIESsumcheck_evaluations
 
std::vector< Commitmentgemini_fold_comms
 
std::vector< FFgemini_fold_evals
 
Commitment shplonk_q_comm
 
Commitment kzg_w_comm
 

Additional Inherited Members

- Static Public Attributes inherited from bb::BaseTranscript< Codec, HashFunction >
static constexpr bool in_circuit
 
static constexpr size_t CHALLENGE_BUFFER_SIZE
 
- Protected Member Functions inherited from bb::BaseTranscript< Codec, HashFunction >
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.
 
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.
 
- Protected Attributes inherited from bb::BaseTranscript< Codec, HashFunction >
Proof proof_data
 

Detailed Description

Derived class that defines proof structure for Ultra zero knowledge proofs, as well as supporting functions. TODO(https://github.com/AztecProtocol/barretenberg/issues/1355): Deduplicate zk flavor transcripts.

Definition at line 95 of file ultra_zk_flavor.hpp.

Member Typedef Documentation

◆ Base

Constructor & Destructor Documentation

◆ Transcript_()

bb::UltraZKFlavor::Transcript_::Transcript_ ( )
default

Member Function Documentation

◆ deserialize_full_transcript()

void bb::UltraZKFlavor::Transcript_::deserialize_full_transcript ( size_t  num_public_inputs,
size_t  virtual_log_n = CONST_PROOF_SIZE_LOG_N 
)
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 134 of file ultra_zk_flavor.hpp.

◆ prover_init_empty()

static std::shared_ptr< Transcript_ > bb::UltraZKFlavor::Transcript_::prover_init_empty ( )
inlinestatic

Definition at line 116 of file ultra_zk_flavor.hpp.

◆ serialize_full_transcript()

void bb::UltraZKFlavor::Transcript_::serialize_full_transcript ( size_t  virtual_log_n = CONST_PROOF_SIZE_LOG_N)
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 188 of file ultra_zk_flavor.hpp.

◆ verifier_init_empty()

static std::shared_ptr< Transcript_ > bb::UltraZKFlavor::Transcript_::verifier_init_empty ( const std::shared_ptr< Transcript_ > &  transcript)
inlinestatic

Definition at line 122 of file ultra_zk_flavor.hpp.

Member Data Documentation

◆ hiding_polynomial_commitment

Commitment bb::UltraZKFlavor::Transcript_::hiding_polynomial_commitment

Definition at line 111 of file ultra_zk_flavor.hpp.

◆ hiding_polynomial_eval

FF bb::UltraZKFlavor::Transcript_::hiding_polynomial_eval

Definition at line 112 of file ultra_zk_flavor.hpp.

◆ libra_claimed_evaluation

FF bb::UltraZKFlavor::Transcript_::libra_claimed_evaluation

Definition at line 104 of file ultra_zk_flavor.hpp.

◆ libra_concatenation_commitment

Commitment bb::UltraZKFlavor::Transcript_::libra_concatenation_commitment

Definition at line 102 of file ultra_zk_flavor.hpp.

◆ libra_concatenation_eval

FF bb::UltraZKFlavor::Transcript_::libra_concatenation_eval

Definition at line 107 of file ultra_zk_flavor.hpp.

◆ libra_grand_sum_commitment

Commitment bb::UltraZKFlavor::Transcript_::libra_grand_sum_commitment

Definition at line 105 of file ultra_zk_flavor.hpp.

◆ libra_grand_sum_eval

FF bb::UltraZKFlavor::Transcript_::libra_grand_sum_eval

Definition at line 109 of file ultra_zk_flavor.hpp.

◆ libra_quotient_commitment

Commitment bb::UltraZKFlavor::Transcript_::libra_quotient_commitment

Definition at line 106 of file ultra_zk_flavor.hpp.

◆ libra_quotient_eval

FF bb::UltraZKFlavor::Transcript_::libra_quotient_eval

Definition at line 110 of file ultra_zk_flavor.hpp.

◆ libra_shifted_grand_sum_eval

FF bb::UltraZKFlavor::Transcript_::libra_shifted_grand_sum_eval

Definition at line 108 of file ultra_zk_flavor.hpp.

◆ libra_sum

FF bb::UltraZKFlavor::Transcript_::libra_sum

Definition at line 103 of file ultra_zk_flavor.hpp.

◆ sumcheck_evaluations

std::array<FF, NUM_ALL_ENTITIES> bb::UltraZKFlavor::Transcript_::sumcheck_evaluations

Definition at line 99 of file ultra_zk_flavor.hpp.

◆ zk_sumcheck_univariates

std::vector<bb::Univariate<FF, BATCHED_RELATION_PARTIAL_LENGTH> > bb::UltraZKFlavor::Transcript_::zk_sumcheck_univariates

Definition at line 101 of file ultra_zk_flavor.hpp.


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