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

#include <recursive_verifier.hpp>

Public Member Functions

 AvmRecursiveVerifier (Builder &builder, const std::shared_ptr< Transcript > &transcript=std::make_shared< Transcript >())
 Construct a new AvmRecursiveVerifier.
 
PairingPoints verify_proof (const StdlibProof &stdlib_proof, const std::vector< std::vector< typename Flavor::FF > > &public_inputs)
 Verify an AVM proof and return PairingPoints whose validity bears witness to successful verification of the proof.
 
FF hash_avm_transcript (const StdlibProof &stdlib_proof)
 Hash the transcript after verification is complete to produce a hash of the public inputs and proofs that have been verified.
 

Private Types

using Flavor = AvmRecursiveFlavor
 
using FF = typename Flavor::FF
 
using BF = typename Flavor::BF
 
using Curve = typename Flavor::Curve
 
using Commitment = typename Flavor::Commitment
 
using SubrelationSeparators = typename Flavor::SubrelationSeparators
 
using VerificationKey = typename Flavor::VerificationKey
 
using NativeVerificationKey = typename Flavor::NativeVerificationKey
 
using Builder = typename Flavor::CircuitBuilder
 
using PCS = typename Flavor::PCS
 
using Transcript = Flavor::Transcript
 
using VerifierCommitments = typename Flavor::VerifierCommitments
 
using PairingPoints = stdlib::recursion::PairingPoints< Curve >
 
using StdlibProof = stdlib::Proof< Builder >
 

Static Private Member Functions

static FF evaluate_public_input_column (const std::vector< FF > &points, const std::vector< FF > &challenges)
 Evaluate the given public input column over the multivariate challenge points.
 

Private Attributes

Builderbuilder
 
std::shared_ptr< VerificationKeykey
 
std::shared_ptr< Transcripttranscript
 
bool is_verification_complete = false
 

Detailed Description

Definition at line 16 of file recursive_verifier.hpp.

Member Typedef Documentation

◆ BF

Definition at line 19 of file recursive_verifier.hpp.

◆ Builder

Definition at line 25 of file recursive_verifier.hpp.

◆ Commitment

Definition at line 21 of file recursive_verifier.hpp.

◆ Curve

Definition at line 20 of file recursive_verifier.hpp.

◆ FF

Definition at line 18 of file recursive_verifier.hpp.

◆ Flavor

◆ NativeVerificationKey

◆ PairingPoints

◆ PCS

Definition at line 26 of file recursive_verifier.hpp.

◆ StdlibProof

◆ SubrelationSeparators

◆ Transcript

◆ VerificationKey

◆ VerifierCommitments

Constructor & Destructor Documentation

◆ AvmRecursiveVerifier()

bb::avm2::AvmRecursiveVerifier::AvmRecursiveVerifier ( Builder builder,
const std::shared_ptr< Transcript > &  transcript = std::make_shared<Transcript>() 
)
explicit

Construct a new AvmRecursiveVerifier.

The constructor fixes the verification key and vk hash of the AVM circuit by copying them into the selectors.

Parameters
builder
transcript

Definition at line 36 of file recursive_verifier.cpp.

Member Function Documentation

◆ evaluate_public_input_column()

AvmRecursiveVerifier::FF bb::avm2::AvmRecursiveVerifier::evaluate_public_input_column ( const std::vector< FF > &  points,
const std::vector< FF > &  challenges 
)
staticprivate

Evaluate the given public input column over the multivariate challenge points.

Among its witness commitments, the AVM prover sends commitments to the public inputs. To enforce consistency between these commitments and the public inputs, the verifier computes the evaluation of the public inputs sent in the clear at the Sumcheck challenge and compares the result with the claimed evaluation sent by the Prover at the end of Sumcheck.

Parameters
pointsThe public input column to be evaluated
challengesThe sumcheck challenge
Returns
FF

Definition at line 56 of file recursive_verifier.cpp.

◆ hash_avm_transcript()

AvmRecursiveVerifier::FF bb::avm2::AvmRecursiveVerifier::hash_avm_transcript ( const StdlibProof stdlib_proof)

Hash the transcript after verification is complete to produce a hash of the public inputs and proofs that have been verified.

Definition at line 240 of file recursive_verifier.cpp.

◆ verify_proof()

AvmRecursiveVerifier::PairingPoints bb::avm2::AvmRecursiveVerifier::verify_proof ( const StdlibProof stdlib_proof,
const std::vector< std::vector< typename Flavor::FF > > &  public_inputs 
)

Verify an AVM proof and return PairingPoints whose validity bears witness to successful verification of the proof.

This function reduces verification of an AVM proof to a pairing check, which is deferred for performance reasons.

Note
As the AVM verifier is arithmetized over Mega, this function does not enforce the validity of the elliptic curve operations. Such verification is deferred to the circuit that verifies the proof of the circuit that contains the AVM verifier.

Definition at line 84 of file recursive_verifier.cpp.

Member Data Documentation

◆ builder

Builder& bb::avm2::AvmRecursiveVerifier::builder
private

Definition at line 47 of file recursive_verifier.hpp.

◆ is_verification_complete

bool bb::avm2::AvmRecursiveVerifier::is_verification_complete = false
private

Definition at line 51 of file recursive_verifier.hpp.

◆ key

std::shared_ptr<VerificationKey> bb::avm2::AvmRecursiveVerifier::key
private

Definition at line 48 of file recursive_verifier.hpp.

◆ transcript

std::shared_ptr<Transcript> bb::avm2::AvmRecursiveVerifier::transcript
private

Definition at line 49 of file recursive_verifier.hpp.


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