Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::UltraZKFlavor::Transcript_< Params > Class Template 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_< Params >:
bb::UltraFlavor::Transcript_< Params > bb::BaseTranscript< Params >

Public Types

using Base = UltraFlavor::Transcript_< Params >::Base
 
- Public Types inherited from bb::UltraFlavor::Transcript_< Params >
using Base = BaseTranscript< Params >
 
- Public Types inherited from bb::BaseTranscript< Params >
using DataType = TranscriptParams::DataType
 
using Proof = typename TranscriptParams::Proof
 

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_< Params >
 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< Params >
 BaseTranscript ()
 
std::vector< DataTypeexport_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.
 
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 Public Member Functions inherited from bb::UltraFlavor::Transcript_< Params >
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< Params >
static DataType hash (const std::vector< DataType > &data)
 Static hash method that forwards to TranscriptParams hash.
 
static std::vector< DataTypeserialize (const T &element)
 Serialize a size_t to a vector of field elements.
 
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::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::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_< Params >
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
 
- Public Attributes inherited from bb::BaseTranscript< Params >
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 Public Attributes inherited from bb::BaseTranscript< Params >
static constexpr bool in_circuit
 
static constexpr size_t HASH_OUTPUT_SIZE
 
- Protected Member Functions inherited from bb::BaseTranscript< Params >
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< Params >
Proof proof_data
 

Detailed Description

template<typename Params>
class bb::UltraZKFlavor::Transcript_< Params >

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 63 of file ultra_zk_flavor.hpp.

Member Typedef Documentation

◆ Base

template<typename Params >
using bb::UltraZKFlavor::Transcript_< Params >::Base = UltraFlavor::Transcript_<Params>::Base

Definition at line 65 of file ultra_zk_flavor.hpp.

Constructor & Destructor Documentation

◆ Transcript_()

template<typename Params >
bb::UltraZKFlavor::Transcript_< Params >::Transcript_ ( )
default

Member Function Documentation

◆ deserialize_full_transcript()

template<typename Params >
void bb::UltraZKFlavor::Transcript_< Params >::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 100 of file ultra_zk_flavor.hpp.

◆ prover_init_empty()

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

Definition at line 82 of file ultra_zk_flavor.hpp.

◆ serialize_full_transcript()

template<typename Params >
void bb::UltraZKFlavor::Transcript_< Params >::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 155 of file ultra_zk_flavor.hpp.

◆ verifier_init_empty()

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

Definition at line 88 of file ultra_zk_flavor.hpp.

Member Data Documentation

◆ hiding_polynomial_commitment

template<typename Params >
Commitment bb::UltraZKFlavor::Transcript_< Params >::hiding_polynomial_commitment

Definition at line 77 of file ultra_zk_flavor.hpp.

◆ hiding_polynomial_eval

template<typename Params >
FF bb::UltraZKFlavor::Transcript_< Params >::hiding_polynomial_eval

Definition at line 78 of file ultra_zk_flavor.hpp.

◆ libra_claimed_evaluation

template<typename Params >
FF bb::UltraZKFlavor::Transcript_< Params >::libra_claimed_evaluation

Definition at line 70 of file ultra_zk_flavor.hpp.

◆ libra_concatenation_commitment

template<typename Params >
Commitment bb::UltraZKFlavor::Transcript_< Params >::libra_concatenation_commitment

Definition at line 68 of file ultra_zk_flavor.hpp.

◆ libra_concatenation_eval

template<typename Params >
FF bb::UltraZKFlavor::Transcript_< Params >::libra_concatenation_eval

Definition at line 73 of file ultra_zk_flavor.hpp.

◆ libra_grand_sum_commitment

template<typename Params >
Commitment bb::UltraZKFlavor::Transcript_< Params >::libra_grand_sum_commitment

Definition at line 71 of file ultra_zk_flavor.hpp.

◆ libra_grand_sum_eval

template<typename Params >
FF bb::UltraZKFlavor::Transcript_< Params >::libra_grand_sum_eval

Definition at line 75 of file ultra_zk_flavor.hpp.

◆ libra_quotient_commitment

template<typename Params >
Commitment bb::UltraZKFlavor::Transcript_< Params >::libra_quotient_commitment

Definition at line 72 of file ultra_zk_flavor.hpp.

◆ libra_quotient_eval

template<typename Params >
FF bb::UltraZKFlavor::Transcript_< Params >::libra_quotient_eval

Definition at line 76 of file ultra_zk_flavor.hpp.

◆ libra_shifted_grand_sum_eval

template<typename Params >
FF bb::UltraZKFlavor::Transcript_< Params >::libra_shifted_grand_sum_eval

Definition at line 74 of file ultra_zk_flavor.hpp.

◆ libra_sum

template<typename Params >
FF bb::UltraZKFlavor::Transcript_< Params >::libra_sum

Definition at line 69 of file ultra_zk_flavor.hpp.

◆ zk_sumcheck_univariates

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

Definition at line 67 of file ultra_zk_flavor.hpp.


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