Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::UltraProver_< Flavor_ > Class Template Reference

#include <ultra_prover.hpp>

Public Types

using Flavor = Flavor_
 
using FF = typename Flavor::FF
 
using CommitmentKey = typename Flavor::CommitmentKey
 
using Curve = typename Flavor::Curve
 
using PCS = typename Flavor::PCS
 
using ProverInstance = ProverInstance_< Flavor >
 
using SmallSubgroupIPA = SmallSubgroupIPAProver< Flavor >
 
using HonkVK = typename Flavor::VerificationKey
 
using Transcript = typename Flavor::Transcript
 
using Proof = typename Transcript::Proof
 
using ZKData = ZKSumcheckData< Flavor >
 

Public Member Functions

 UltraProver_ (std::shared_ptr< ProverInstance >, const std::shared_ptr< HonkVK > &, const std::shared_ptr< Transcript > &transcript=std::make_shared< Transcript >())
 
Proof export_proof ()
 Export the complete proof, including IPA proof for rollup circuits.
 
Proof construct_proof ()
 
size_t num_public_inputs () const
 
size_t log_dyadic_size () const
 
const std::shared_ptr< Transcript > & get_transcript () const
 

Private Member Functions

BB_PROFILE void execute_sumcheck_iop ()
 Run Sumcheck to establish that ∑_i pow(\vec{β*})f_i(ω) = 0, producing sumcheck round challenges u = (u_1,...,u_d) and claimed evaluations at u.
 
BB_PROFILE void execute_pcs ()
 Reduce the sumcheck multivariate evaluations to a single univariate opening claim via Shplemini, then produce an opening proof with the PCS (KZG or IPA).
 
BB_PROFILE void generate_gate_challenges ()
 

Private Attributes

std::shared_ptr< ProverInstanceprover_instance
 
std::shared_ptr< Transcripttranscript
 
std::shared_ptr< HonkVKhonk_vk
 
SumcheckOutput< Flavorsumcheck_output
 
ZKData zk_sumcheck_data
 
CommitmentKey commitment_key
 
size_t virtual_log_n
 

Detailed Description

template<typename Flavor_>
class bb::UltraProver_< Flavor_ >

Definition at line 18 of file ultra_prover.hpp.

Member Typedef Documentation

◆ CommitmentKey

template<typename Flavor_ >
using bb::UltraProver_< Flavor_ >::CommitmentKey = typename Flavor::CommitmentKey

Definition at line 22 of file ultra_prover.hpp.

◆ Curve

template<typename Flavor_ >
using bb::UltraProver_< Flavor_ >::Curve = typename Flavor::Curve

Definition at line 23 of file ultra_prover.hpp.

◆ FF

template<typename Flavor_ >
using bb::UltraProver_< Flavor_ >::FF = typename Flavor::FF

Definition at line 21 of file ultra_prover.hpp.

◆ Flavor

template<typename Flavor_ >
using bb::UltraProver_< Flavor_ >::Flavor = Flavor_

Definition at line 20 of file ultra_prover.hpp.

◆ HonkVK

template<typename Flavor_ >
using bb::UltraProver_< Flavor_ >::HonkVK = typename Flavor::VerificationKey

Definition at line 27 of file ultra_prover.hpp.

◆ PCS

template<typename Flavor_ >
using bb::UltraProver_< Flavor_ >::PCS = typename Flavor::PCS

Definition at line 24 of file ultra_prover.hpp.

◆ Proof

template<typename Flavor_ >
using bb::UltraProver_< Flavor_ >::Proof = typename Transcript::Proof

Definition at line 29 of file ultra_prover.hpp.

◆ ProverInstance

template<typename Flavor_ >
using bb::UltraProver_< Flavor_ >::ProverInstance = ProverInstance_<Flavor>

Definition at line 25 of file ultra_prover.hpp.

◆ SmallSubgroupIPA

template<typename Flavor_ >
using bb::UltraProver_< Flavor_ >::SmallSubgroupIPA = SmallSubgroupIPAProver<Flavor>

Definition at line 26 of file ultra_prover.hpp.

◆ Transcript

template<typename Flavor_ >
using bb::UltraProver_< Flavor_ >::Transcript = typename Flavor::Transcript

Definition at line 28 of file ultra_prover.hpp.

◆ ZKData

template<typename Flavor_ >
using bb::UltraProver_< Flavor_ >::ZKData = ZKSumcheckData<Flavor>

Definition at line 30 of file ultra_prover.hpp.

Constructor & Destructor Documentation

◆ UltraProver_()

template<typename Flavor >
bb::UltraProver_< Flavor >::UltraProver_ ( std::shared_ptr< ProverInstance prover_instance,
const std::shared_ptr< HonkVK > &  honk_vk,
const std::shared_ptr< Transcript > &  transcript = std::make_shared<Transcript>() 
)
explicit

Definition at line 16 of file ultra_prover.cpp.

Member Function Documentation

◆ construct_proof()

template<typename Flavor >
UltraProver_< Flavor >::Proof bb::UltraProver_< Flavor >::construct_proof ( )

Definition at line 61 of file ultra_prover.cpp.

◆ execute_pcs()

template<typename Flavor >
void bb::UltraProver_< Flavor >::execute_pcs ( )
private

Reduce the sumcheck multivariate evaluations to a single univariate opening claim via Shplemini, then produce an opening proof with the PCS (KZG or IPA).

Definition at line 123 of file ultra_prover.cpp.

◆ execute_sumcheck_iop()

template<typename Flavor >
void bb::UltraProver_< Flavor >::execute_sumcheck_iop ( )
private

Run Sumcheck to establish that ∑_i pow(\vec{β*})f_i(ω) = 0, producing sumcheck round challenges u = (u_1,...,u_d) and claimed evaluations at u.

Definition at line 97 of file ultra_prover.cpp.

◆ export_proof()

template<typename Flavor >
UltraProver_< Flavor >::Proof bb::UltraProver_< Flavor >::export_proof ( )

Export the complete proof, including IPA proof for rollup circuits.

Two-level proof structure for rollup circuits:

Prover Level (this function): [public_inputs | honk_proof | ipa_proof]

API Level (bbapi):

  • _prove() further splits into: public_inputs (ACIR only) vs proof (rest including IPA)
  • concatenate_proof() reassembles for verification
Note
IPA_PROOF_LENGTH is defined in ipa.hpp as 4*CONST_ECCVM_LOG_N + 4 = 64 elements

Definition at line 39 of file ultra_prover.cpp.

◆ generate_gate_challenges()

template<typename Flavor >
void bb::UltraProver_< Flavor >::generate_gate_challenges ( )
private

Definition at line 52 of file ultra_prover.cpp.

◆ get_transcript()

template<typename Flavor_ >
const std::shared_ptr< Transcript > & bb::UltraProver_< Flavor_ >::get_transcript ( ) const
inline

Definition at line 41 of file ultra_prover.hpp.

◆ log_dyadic_size()

template<typename Flavor_ >
size_t bb::UltraProver_< Flavor_ >::log_dyadic_size ( ) const
inline

Definition at line 40 of file ultra_prover.hpp.

◆ num_public_inputs()

template<typename Flavor_ >
size_t bb::UltraProver_< Flavor_ >::num_public_inputs ( ) const
inline

Definition at line 39 of file ultra_prover.hpp.

Member Data Documentation

◆ commitment_key

template<typename Flavor_ >
CommitmentKey bb::UltraProver_< Flavor_ >::commitment_key
private

Definition at line 49 of file ultra_prover.hpp.

◆ honk_vk

template<typename Flavor_ >
std::shared_ptr<HonkVK> bb::UltraProver_< Flavor_ >::honk_vk
private

Definition at line 46 of file ultra_prover.hpp.

◆ prover_instance

template<typename Flavor_ >
std::shared_ptr<ProverInstance> bb::UltraProver_< Flavor_ >::prover_instance
private

Definition at line 44 of file ultra_prover.hpp.

◆ sumcheck_output

template<typename Flavor_ >
SumcheckOutput<Flavor> bb::UltraProver_< Flavor_ >::sumcheck_output
private

Definition at line 47 of file ultra_prover.hpp.

◆ transcript

template<typename Flavor_ >
std::shared_ptr<Transcript> bb::UltraProver_< Flavor_ >::transcript
private

Definition at line 45 of file ultra_prover.hpp.

◆ virtual_log_n

template<typename Flavor_ >
size_t bb::UltraProver_< Flavor_ >::virtual_log_n
private

Definition at line 51 of file ultra_prover.hpp.

◆ zk_sumcheck_data

template<typename Flavor_ >
ZKData bb::UltraProver_< Flavor_ >::zk_sumcheck_data
private

Definition at line 48 of file ultra_prover.hpp.


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