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

#include <prover.hpp>

Public Types

using Flavor = AvmFlavor
 
using FF = Flavor::FF
 
using PCS = Flavor::PCS
 
using Curve = Flavor::Curve
 
using PCSCommitmentKey = Flavor::CommitmentKey
 
using ProvingKey = Flavor::ProvingKey
 
using VerificationKey = Flavor::VerificationKey
 
using Polynomial = Flavor::Polynomial
 
using ProverPolynomials = Flavor::ProverPolynomials
 
using Transcript = Flavor::Transcript
 
using Proof = HonkProof
 

Public Member Functions

 AvmProver (std::shared_ptr< ProvingKey > input_proving_key, std::shared_ptr< VerificationKey > vk, const PCSCommitmentKey &commitment_key)
 
 AvmProver (AvmProver &&prover)=default
 
virtual ~AvmProver ()=default
 
void execute_preamble_round ()
 Add vk hash to transcript.
 
void execute_public_inputs_round ()
 Add public inputs to transcript.
 
void execute_wire_commitments_round ()
 Compute commitments to all of the witness wires (apart from the logderivative inverse wires)
 
void execute_log_derivative_inverse_round ()
 
void execute_log_derivative_inverse_commitments_round ()
 
void execute_relation_check_rounds ()
 Run Sumcheck resulting in u = (u_1,...,u_d) challenges and all evaluations at u being calculated.
 
void execute_pcs_rounds ()
 Run the PCS to prove that the claimed evaluations are correct.
 
HonkProof export_proof ()
 
HonkProof construct_proof ()
 

Public Attributes

std::shared_ptr< Transcripttranscript = std::make_shared<Transcript>()
 
std::vector< FFpublic_inputs
 
bb::RelationParameters< FFrelation_parameters
 
std::shared_ptr< ProvingKeyproving_key
 
std::shared_ptr< VerificationKeyvk
 
ProverPolynomials prover_polynomials
 
SumcheckOutput< Flavorsumcheck_output
 
PCSCommitmentKey commitment_key
 

Detailed Description

Definition at line 15 of file prover.hpp.

Member Typedef Documentation

◆ Curve

Definition at line 20 of file prover.hpp.

◆ FF

Definition at line 18 of file prover.hpp.

◆ Flavor

Definition at line 17 of file prover.hpp.

◆ PCS

Definition at line 19 of file prover.hpp.

◆ PCSCommitmentKey

◆ Polynomial

Definition at line 24 of file prover.hpp.

◆ Proof

Definition at line 27 of file prover.hpp.

◆ ProverPolynomials

◆ ProvingKey

Definition at line 22 of file prover.hpp.

◆ Transcript

Definition at line 26 of file prover.hpp.

◆ VerificationKey

Constructor & Destructor Documentation

◆ AvmProver() [1/2]

bb::avm2::AvmProver::AvmProver ( std::shared_ptr< ProvingKey input_proving_key,
std::shared_ptr< VerificationKey vk,
const PCSCommitmentKey commitment_key 
)
explicit

Create AvmProver from proving key, verification key and commitment key.

Parameters
input_keyProving key.
vkVerification key.
commitment_keyPCS commitment key

Definition at line 42 of file prover.cpp.

◆ AvmProver() [2/2]

bb::avm2::AvmProver::AvmProver ( AvmProver &&  prover)
default

◆ ~AvmProver()

virtual bb::avm2::AvmProver::~AvmProver ( )
virtualdefault

Member Function Documentation

◆ construct_proof()

HonkProof bb::avm2::AvmProver::construct_proof ( )

Definition at line 266 of file prover.cpp.

◆ execute_log_derivative_inverse_commitments_round()

void bb::avm2::AvmProver::execute_log_derivative_inverse_commitments_round ( )

Definition at line 140 of file prover.cpp.

◆ execute_log_derivative_inverse_round()

void bb::avm2::AvmProver::execute_log_derivative_inverse_round ( )

Definition at line 109 of file prover.cpp.

◆ execute_pcs_rounds()

void bb::avm2::AvmProver::execute_pcs_rounds ( )

Run the PCS to prove that the claimed evaluations are correct.

To optimize the usage of the ECCVM, we batch the polynomials using short scalars before executing Shplemini. The batching proceeds in two phases (note that the unshifted polynomials contain copies of the shifted polynomials that have not been shifted yet; this allows us to save some work by batching the shifted polynomials in their to_be_shifted form and later shift them):

  1. Batch the shifted polynomials (in their to_be_shifted form) into a single polynomial
  2. Batch the unshifted polynomials, excluding the to_be_shifted polynomials, and then the batched polynomial computed at step 1

Definition at line 191 of file prover.cpp.

◆ execute_preamble_round()

void bb::avm2::AvmProver::execute_preamble_round ( )

Add vk hash to transcript.

Definition at line 55 of file prover.cpp.

◆ execute_public_inputs_round()

void bb::avm2::AvmProver::execute_public_inputs_round ( )

Add public inputs to transcript.

Note
The number of public inputs in the proof is fixed. If there are fewer public inputs than the fixed number, we pad with zeros.

Definition at line 69 of file prover.cpp.

◆ execute_relation_check_rounds()

void bb::avm2::AvmProver::execute_relation_check_rounds ( )

Run Sumcheck resulting in u = (u_1,...,u_d) challenges and all evaluations at u being calculated.

Definition at line 157 of file prover.cpp.

◆ execute_wire_commitments_round()

void bb::avm2::AvmProver::execute_wire_commitments_round ( )

Compute commitments to all of the witness wires (apart from the logderivative inverse wires)

Definition at line 97 of file prover.cpp.

◆ export_proof()

HonkProof bb::avm2::AvmProver::export_proof ( )

Definition at line 261 of file prover.cpp.

Member Data Documentation

◆ commitment_key

PCSCommitmentKey bb::avm2::AvmProver::commitment_key

Definition at line 60 of file prover.hpp.

◆ prover_polynomials

ProverPolynomials bb::avm2::AvmProver::prover_polynomials

Definition at line 56 of file prover.hpp.

◆ proving_key

std::shared_ptr<ProvingKey> bb::avm2::AvmProver::proving_key

Definition at line 52 of file prover.hpp.

◆ public_inputs

std::vector<FF> bb::avm2::AvmProver::public_inputs

Definition at line 48 of file prover.hpp.

◆ relation_parameters

bb::RelationParameters<FF> bb::avm2::AvmProver::relation_parameters

Definition at line 50 of file prover.hpp.

◆ sumcheck_output

SumcheckOutput<Flavor> bb::avm2::AvmProver::sumcheck_output

Definition at line 58 of file prover.hpp.

◆ transcript

std::shared_ptr<Transcript> bb::avm2::AvmProver::transcript = std::make_shared<Transcript>()

Definition at line 46 of file prover.hpp.

◆ vk

std::shared_ptr<VerificationKey> bb::avm2::AvmProver::vk

Definition at line 53 of file prover.hpp.


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