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

#include <flavor.hpp>

Inheritance diagram for bb::avm2::AvmFlavor::Transcript:
bb::BaseTranscript< TranscriptParams >

Public Member Functions

 Transcript ()=default
 
void deserialize_full_transcript ()
 
void serialize_full_transcript ()
 
- Public Member Functions inherited from bb::BaseTranscript< TranscriptParams >
 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.
 
template<typename ChallengeType , typename... Strings>
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.
 
template<typename ChallengeType , typename String , std::size_t N>
std::array< ChallengeType, N > get_challenges (std::array< String, N > const &labels)
 Wrapper around get_challenges to handle array of challenges.
 
template<typename ChallengeType >
std::vector< ChallengeType > compute_round_challenge_pows (const size_t num_powers, const ChallengeType &round_challenge)
 Given δ, compute the vector [δ, δ^2,..., δ^2^num_powers].
 
template<typename ChallengeType , typename String >
std::vector< ChallengeType > get_powers_of_challenge (const String &label, size_t num_challenges)
 
template<class T >
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.
 
template<class T >
void add_to_hash_buffer (const std::string &label, const T &element)
 Adds an element to the transcript.
 
template<class T >
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.
 
template<class 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.
 
template<typename ChallengeType >
ChallengeType get_challenge (const std::string &label)
 
TranscriptManifest get_manifest () const
 
void print ()
 
BaseTranscript branch_transcript ()
 Branch a transcript to perform verifier-only computations.
 

Public Attributes

size_t log_circuit_size = MAX_AVM_TRACE_LOG_SIZE
 
std::array< Commitment, NUM_WITNESS_ENTITIEScommitments
 
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< TranscriptParams >
size_t transcript_index = 0
 
size_t round_index = 0
 
bool reception_phase = true
 
std::ptrdiff_t proof_start = 0
 
size_t num_frs_written = 0
 
size_t num_frs_read = 0
 
size_t round_number = 0
 

Additional Inherited Members

- Public Types inherited from bb::BaseTranscript< TranscriptParams >
using DataType = TranscriptParams::DataType
 
using Proof = typename TranscriptParams::Proof
 
- Static Public Member Functions inherited from bb::BaseTranscript< TranscriptParams >
static DataType hash (const std::vector< DataType > &data)
 Static hash method that forwards to TranscriptParams hash.
 
template<typename T >
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.
 
- Static Public Attributes inherited from bb::BaseTranscript< TranscriptParams >
static constexpr bool in_circuit = InCircuit<DataType>
 
static constexpr size_t HASH_OUTPUT_SIZE = 32
 
- Protected Member Functions inherited from bb::BaseTranscript< TranscriptParams >
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.
 
template<typename T >
void serialize_to_buffer (const T &element, Proof &proof_data)
 Serializes object and appends it to proof_data.
 
template<typename 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.
 
- Protected Attributes inherited from bb::BaseTranscript< TranscriptParams >
Proof proof_data
 

Detailed Description

Definition at line 199 of file flavor.hpp.

Constructor & Destructor Documentation

◆ Transcript()

bb::avm2::AvmFlavor::Transcript::Transcript ( )
default

Member Function Documentation

◆ deserialize_full_transcript()

void bb::avm2::AvmFlavor::Transcript::deserialize_full_transcript ( )

Definition at line 18 of file flavor.cpp.

◆ serialize_full_transcript()

void bb::avm2::AvmFlavor::Transcript::serialize_full_transcript ( )

Definition at line 47 of file flavor.cpp.

Member Data Documentation

◆ commitments

std::array<Commitment, NUM_WITNESS_ENTITIES> bb::avm2::AvmFlavor::Transcript::commitments

Definition at line 203 of file flavor.hpp.

◆ gemini_fold_comms

std::vector<Commitment> bb::avm2::AvmFlavor::Transcript::gemini_fold_comms

Definition at line 207 of file flavor.hpp.

◆ gemini_fold_evals

std::vector<FF> bb::avm2::AvmFlavor::Transcript::gemini_fold_evals

Definition at line 208 of file flavor.hpp.

◆ kzg_w_comm

Commitment bb::avm2::AvmFlavor::Transcript::kzg_w_comm

Definition at line 210 of file flavor.hpp.

◆ log_circuit_size

size_t bb::avm2::AvmFlavor::Transcript::log_circuit_size = MAX_AVM_TRACE_LOG_SIZE

Definition at line 201 of file flavor.hpp.

◆ shplonk_q_comm

Commitment bb::avm2::AvmFlavor::Transcript::shplonk_q_comm

Definition at line 209 of file flavor.hpp.

◆ sumcheck_evaluations

std::array<FF, NUM_ALL_ENTITIES> bb::avm2::AvmFlavor::Transcript::sumcheck_evaluations

Definition at line 206 of file flavor.hpp.

◆ sumcheck_univariates

std::vector<bb::Univariate<FF, BATCHED_RELATION_PARTIAL_LENGTH> > bb::avm2::AvmFlavor::Transcript::sumcheck_univariates

Definition at line 205 of file flavor.hpp.


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