|
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< 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< DataType > | export_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. | |
| 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 () |
| 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< BaseTranscript > | convert_prover_transcript_to_verifier_transcript (const std::shared_ptr< BaseTranscript > &prover_transcript) |
| Convert a prover transcript to a verifier transcript. | |
| static std::vector< DataType > | serialize (const T &element) |
| static T | deserialize (std::span< const DataType > frs) |
| 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 |
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. | |
| 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< Codec, HashFunction > | |
| Proof | proof_data |
Derived class that defines proof structure for Ultra proofs, as well as supporting functions.
Definition at line 373 of file ultra_flavor.hpp.
| using bb::UltraFlavor::Transcript_< Codec, HashFunction >::Base = BaseTranscript<Codec, HashFunction> |
Definition at line 375 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 415 of file ultra_flavor.hpp.
|
inlinestatic |
Definition at line 397 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 456 of file ultra_flavor.hpp.
|
inlinestatic |
Definition at line 403 of file ultra_flavor.hpp.
| std::vector<Commitment> bb::UltraFlavor::Transcript_< Codec, HashFunction >::gemini_fold_comms |
Definition at line 391 of file ultra_flavor.hpp.
| std::vector<FF> bb::UltraFlavor::Transcript_< Codec, HashFunction >::gemini_fold_evals |
Definition at line 392 of file ultra_flavor.hpp.
| Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::kzg_w_comm |
Definition at line 394 of file ultra_flavor.hpp.
| Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::lookup_inverses_comm |
Definition at line 388 of file ultra_flavor.hpp.
| Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::lookup_read_counts_comm |
Definition at line 384 of file ultra_flavor.hpp.
| Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::lookup_read_tags_comm |
Definition at line 385 of file ultra_flavor.hpp.
| std::vector<FF> bb::UltraFlavor::Transcript_< Codec, HashFunction >::public_inputs |
Definition at line 380 of file ultra_flavor.hpp.
| Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::shplonk_q_comm |
Definition at line 393 of file ultra_flavor.hpp.
| std::array<FF, NUM_ALL_ENTITIES> bb::UltraFlavor::Transcript_< Codec, HashFunction >::sumcheck_evaluations |
Definition at line 390 of file ultra_flavor.hpp.
| 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.
| Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::w_4_comm |
Definition at line 386 of file ultra_flavor.hpp.
| Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::w_l_comm |
Definition at line 381 of file ultra_flavor.hpp.
| Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::w_o_comm |
Definition at line 383 of file ultra_flavor.hpp.
| Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::w_r_comm |
Definition at line 382 of file ultra_flavor.hpp.
| Commitment bb::UltraFlavor::Transcript_< Codec, HashFunction >::z_perm_comm |
Definition at line 387 of file ultra_flavor.hpp.