Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::UltraFlavor::Transcript_< Codec, HashFunction > Class Template Reference

Derived class that defines proof structure for Ultra proofs, as well as supporting functions. More...

#include <ultra_flavor.hpp>

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

Public Types

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 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::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::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

template<typename Codec, typename HashFunction>
class bb::UltraFlavor::Transcript_< Codec, HashFunction >

Derived class that defines proof structure for Ultra proofs, as well as supporting functions.

Definition at line 373 of file ultra_flavor.hpp.

Member Typedef Documentation

◆ Base

Definition at line 375 of file ultra_flavor.hpp.

Constructor & Destructor Documentation

◆ Transcript_()

template<typename Codec , typename HashFunction >
bb::UltraFlavor::Transcript_< Codec, HashFunction >::Transcript_ ( )
default

Member Function Documentation

◆ deserialize_full_transcript()

template<typename Codec , typename HashFunction >
void bb::UltraFlavor::Transcript_< Codec, HashFunction >::deserialize_full_transcript ( size_t  public_input_size,
size_t  virtual_log_n = VIRTUAL_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 415 of file ultra_flavor.hpp.

◆ prover_init_empty()

template<typename Codec , typename HashFunction >
static std::shared_ptr< Transcript_ > bb::UltraFlavor::Transcript_< Codec, HashFunction >::prover_init_empty ( )
inlinestatic

Definition at line 397 of file ultra_flavor.hpp.

◆ serialize_full_transcript()

template<typename Codec , typename HashFunction >
void bb::UltraFlavor::Transcript_< Codec, HashFunction >::serialize_full_transcript ( size_t  virtual_log_n = VIRTUAL_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 456 of file ultra_flavor.hpp.

◆ verifier_init_empty()

template<typename Codec , typename HashFunction >
static std::shared_ptr< Transcript_ > bb::UltraFlavor::Transcript_< Codec, HashFunction >::verifier_init_empty ( const std::shared_ptr< Transcript_< Codec, HashFunction > > &  transcript)
inlinestatic

Definition at line 403 of file ultra_flavor.hpp.

Member Data Documentation

◆ gemini_fold_comms

template<typename Codec , typename HashFunction >
std::vector<Commitment> bb::UltraFlavor::Transcript_< Codec, HashFunction >::gemini_fold_comms

Definition at line 391 of file ultra_flavor.hpp.

◆ gemini_fold_evals

template<typename Codec , typename HashFunction >
std::vector<FF> bb::UltraFlavor::Transcript_< Codec, HashFunction >::gemini_fold_evals

Definition at line 392 of file ultra_flavor.hpp.

◆ kzg_w_comm

template<typename Codec , typename HashFunction >
Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::kzg_w_comm

Definition at line 394 of file ultra_flavor.hpp.

◆ lookup_inverses_comm

template<typename Codec , typename HashFunction >
Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::lookup_inverses_comm

Definition at line 388 of file ultra_flavor.hpp.

◆ lookup_read_counts_comm

template<typename Codec , typename HashFunction >
Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::lookup_read_counts_comm

Definition at line 384 of file ultra_flavor.hpp.

◆ lookup_read_tags_comm

template<typename Codec , typename HashFunction >
Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::lookup_read_tags_comm

Definition at line 385 of file ultra_flavor.hpp.

◆ public_inputs

template<typename Codec , typename HashFunction >
std::vector<FF> bb::UltraFlavor::Transcript_< Codec, HashFunction >::public_inputs

Definition at line 380 of file ultra_flavor.hpp.

◆ shplonk_q_comm

template<typename Codec , typename HashFunction >
Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::shplonk_q_comm

Definition at line 393 of file ultra_flavor.hpp.

◆ sumcheck_evaluations

template<typename Codec , typename HashFunction >
std::array<FF, NUM_ALL_ENTITIES> bb::UltraFlavor::Transcript_< Codec, HashFunction >::sumcheck_evaluations

Definition at line 390 of file ultra_flavor.hpp.

◆ sumcheck_univariates

template<typename Codec , typename HashFunction >
std::vector<bb::Univariate<FF, BATCHED_RELATION_PARTIAL_LENGTH> > bb::UltraFlavor::Transcript_< Codec, HashFunction >::sumcheck_univariates

Definition at line 389 of file ultra_flavor.hpp.

◆ w_4_comm

template<typename Codec , typename HashFunction >
Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::w_4_comm

Definition at line 386 of file ultra_flavor.hpp.

◆ w_l_comm

template<typename Codec , typename HashFunction >
Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::w_l_comm

Definition at line 381 of file ultra_flavor.hpp.

◆ w_o_comm

template<typename Codec , typename HashFunction >
Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::w_o_comm

Definition at line 383 of file ultra_flavor.hpp.

◆ w_r_comm

template<typename Codec , typename HashFunction >
Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::w_r_comm

Definition at line 382 of file ultra_flavor.hpp.

◆ z_perm_comm

template<typename Codec , typename HashFunction >
Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::z_perm_comm

Definition at line 387 of file ultra_flavor.hpp.


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