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

Unified ECCVM verifier class for both native and recursive verification. More...

#include <eccvm_verifier.hpp>

Classes

struct  ReductionResult
 Result of reducing ECCVM proof to IPA opening claim. More...
 

Public Types

using FF = Flavor::FF
 
using BF = Flavor::BF
 
using Curve = Flavor::Curve
 
using Commitment = Flavor::Commitment
 
using CommitmentLabels = Flavor::CommitmentLabels
 
using Transcript = Flavor::Transcript
 
using VerificationKey = Flavor::VerificationKey
 
using VerifierCommitments = Flavor::VerifierCommitments
 
using VerifierCommitmentKey = Flavor::VerifierCommitmentKey
 
using Proof = Flavor::Proof
 
using PCS = IPA< Curve, CONST_ECCVM_LOG_N >
 
using TranslatorInputData = TranslatorInputData_< FF >
 
using Builder = std::conditional_t< IsRecursive, typename Flavor::CircuitBuilder, void >
 

Public Member Functions

 ECCVMVerifier_ (const std::shared_ptr< Transcript > &transcript, const Proof &proof)
 
ReductionResult reduce_to_ipa_opening ()
 Reduce the ECCVM proof to an IPA opening claim.
 
TranslatorInputData get_translator_input_data () const
 Get the data required by the TranslatorVerifier.
 
std::shared_ptr< VerificationKeyget_verification_key () const
 
std::shared_ptr< Transcriptget_transcript () const
 

Static Public Attributes

static constexpr bool IsRecursive = Curve::is_stdlib_type
 

Private Member Functions

void compute_translation_opening_claims (const std::vector< Commitment > &translation_commitments)
 To link the ECCVM Transcript wires op, Px, Py, z1, and z2 to the accumulator computed by the translator, we verify their evaluations as univariates. For efficiency reasons, we batch these evaluations.
 
void compute_accumulated_result ()
 

Private Attributes

std::shared_ptr< VerificationKeykey
 
Proof proof
 
BF vk_hash
 
std::shared_ptr< Transcripttranscript
 
std::conditional_t< IsRecursive, Builder *, void * > builder = nullptr
 
std::array< OpeningClaim< Curve >, NUM_OPENING_CLAIMSopening_claims
 
TranslationEvaluations_< FFtranslation_evaluations
 
FF evaluation_challenge_x
 
FF batching_challenge_v
 
FF accumulated_result
 
FF translation_masking_term_eval
 
bool translation_masking_consistency_checked = false
 

Static Private Attributes

static constexpr size_t NUM_OPENING_CLAIMS = ECCVMFlavor::NUM_TRANSLATION_OPENING_CLAIMS + 1
 

Detailed Description

template<typename Flavor>
class bb::ECCVMVerifier_< Flavor >

Unified ECCVM verifier class for both native and recursive verification.

Template Parameters
FlavorEither ECCVMFlavor (native) or ECCVMRecursiveFlavor (recursive)

Definition at line 19 of file eccvm_verifier.hpp.

Member Typedef Documentation

◆ BF

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::BF = Flavor::BF

Definition at line 22 of file eccvm_verifier.hpp.

◆ Builder

Definition at line 35 of file eccvm_verifier.hpp.

◆ Commitment

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::Commitment = Flavor::Commitment

Definition at line 24 of file eccvm_verifier.hpp.

◆ CommitmentLabels

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::CommitmentLabels = Flavor::CommitmentLabels

Definition at line 25 of file eccvm_verifier.hpp.

◆ Curve

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::Curve = Flavor::Curve

Definition at line 23 of file eccvm_verifier.hpp.

◆ FF

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::FF = Flavor::FF

Definition at line 21 of file eccvm_verifier.hpp.

◆ PCS

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::PCS = IPA<Curve, CONST_ECCVM_LOG_N>

Definition at line 31 of file eccvm_verifier.hpp.

◆ Proof

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::Proof = Flavor::Proof

Definition at line 30 of file eccvm_verifier.hpp.

◆ Transcript

Definition at line 26 of file eccvm_verifier.hpp.

◆ TranslatorInputData

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::TranslatorInputData = TranslatorInputData_<FF>

Definition at line 32 of file eccvm_verifier.hpp.

◆ VerificationKey

Definition at line 27 of file eccvm_verifier.hpp.

◆ VerifierCommitmentKey

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::VerifierCommitmentKey = Flavor::VerifierCommitmentKey

Definition at line 29 of file eccvm_verifier.hpp.

◆ VerifierCommitments

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::VerifierCommitments = Flavor::VerifierCommitments

Definition at line 28 of file eccvm_verifier.hpp.

Constructor & Destructor Documentation

◆ ECCVMVerifier_()

template<typename Flavor >
bb::ECCVMVerifier_< Flavor >::ECCVMVerifier_ ( const std::shared_ptr< Transcript > &  transcript,
const Proof proof 
)
inline

Definition at line 49 of file eccvm_verifier.hpp.

Member Function Documentation

◆ compute_accumulated_result()

template<typename Flavor >
void bb::ECCVMVerifier_< Flavor >::compute_accumulated_result ( )
private

Definition at line 244 of file eccvm_verifier.cpp.

◆ compute_translation_opening_claims()

template<typename Flavor >
void bb::ECCVMVerifier_< Flavor >::compute_translation_opening_claims ( const std::vector< Commitment > &  translation_commitments)
private

To link the ECCVM Transcript wires op, Px, Py, z1, and z2 to the accumulator computed by the translator, we verify their evaluations as univariates. For efficiency reasons, we batch these evaluations.

For details, see the docs of ECCVMProver::compute_translation_opening_claims() method.

Parameters
translation_commitmentsCommitments to op, Px, Py, z1, and z2
Returns
Populate opening_claims.

Definition at line 147 of file eccvm_verifier.cpp.

◆ get_transcript()

template<typename Flavor >
std::shared_ptr< Transcript > bb::ECCVMVerifier_< Flavor >::get_transcript ( ) const
inline

Definition at line 91 of file eccvm_verifier.hpp.

◆ get_translator_input_data()

template<typename Flavor >
TranslatorInputData bb::ECCVMVerifier_< Flavor >::get_translator_input_data ( ) const
inline

Get the data required by the TranslatorVerifier.

Returns
TranslatorInputData containing evaluation_challenge_x, batching_challenge_v, and accumulated_result

Definition at line 85 of file eccvm_verifier.hpp.

◆ get_verification_key()

template<typename Flavor >
std::shared_ptr< VerificationKey > bb::ECCVMVerifier_< Flavor >::get_verification_key ( ) const
inline

Definition at line 90 of file eccvm_verifier.hpp.

◆ reduce_to_ipa_opening()

template<typename Flavor >
ECCVMVerifier_< Flavor >::ReductionResult bb::ECCVMVerifier_< Flavor >::reduce_to_ipa_opening ( )

Reduce the ECCVM proof to an IPA opening claim.

Verifies an ECCVM Honk proof for given program settings.

The ECCVM proves correct execution of elliptic curve operations accumulated in the op queue. This method verifies the ECCVM proof's internal checks (sumcheck, translation masking consistency, etc.) and reduces all polynomial opening claims to a single IPA opening claim via Shplemini and Shplonk. This method does NOT perform the final IPA verification - it returns an IPA claim that must be verified externally.

Returns
ReductionResult containing:
  • ipa_claim: IPA opening claim to be verified externally (in root rollup or natively)
  • reduction_succeeded: true if sumcheck, consistency, and masking checks passed

Works for both native verification and recursive (in-circuit) verification.

Definition at line 20 of file eccvm_verifier.cpp.

Member Data Documentation

◆ accumulated_result

template<typename Flavor >
FF bb::ECCVMVerifier_< Flavor >::accumulated_result
private

Definition at line 115 of file eccvm_verifier.hpp.

◆ batching_challenge_v

template<typename Flavor >
FF bb::ECCVMVerifier_< Flavor >::batching_challenge_v
private

Definition at line 114 of file eccvm_verifier.hpp.

◆ builder

template<typename Flavor >
std::conditional_t<IsRecursive, Builder*, void*> bb::ECCVMVerifier_< Flavor >::builder = nullptr
private

Definition at line 103 of file eccvm_verifier.hpp.

◆ evaluation_challenge_x

template<typename Flavor >
FF bb::ECCVMVerifier_< Flavor >::evaluation_challenge_x
private

Definition at line 113 of file eccvm_verifier.hpp.

◆ IsRecursive

template<typename Flavor >
constexpr bool bb::ECCVMVerifier_< Flavor >::IsRecursive = Curve::is_stdlib_type
staticconstexpr

Definition at line 34 of file eccvm_verifier.hpp.

◆ key

template<typename Flavor >
std::shared_ptr<VerificationKey> bb::ECCVMVerifier_< Flavor >::key
private

Definition at line 97 of file eccvm_verifier.hpp.

◆ NUM_OPENING_CLAIMS

template<typename Flavor >
constexpr size_t bb::ECCVMVerifier_< Flavor >::NUM_OPENING_CLAIMS = ECCVMFlavor::NUM_TRANSLATION_OPENING_CLAIMS + 1
staticconstexprprivate

Definition at line 107 of file eccvm_verifier.hpp.

◆ opening_claims

template<typename Flavor >
std::array<OpeningClaim<Curve>, NUM_OPENING_CLAIMS> bb::ECCVMVerifier_< Flavor >::opening_claims
private

Definition at line 108 of file eccvm_verifier.hpp.

◆ proof

template<typename Flavor >
Proof bb::ECCVMVerifier_< Flavor >::proof
private

Definition at line 98 of file eccvm_verifier.hpp.

◆ transcript

template<typename Flavor >
std::shared_ptr<Transcript> bb::ECCVMVerifier_< Flavor >::transcript
private

Definition at line 100 of file eccvm_verifier.hpp.

◆ translation_evaluations

template<typename Flavor >
TranslationEvaluations_<FF> bb::ECCVMVerifier_< Flavor >::translation_evaluations
private

Definition at line 110 of file eccvm_verifier.hpp.

◆ translation_masking_consistency_checked

template<typename Flavor >
bool bb::ECCVMVerifier_< Flavor >::translation_masking_consistency_checked = false
private

Definition at line 119 of file eccvm_verifier.hpp.

◆ translation_masking_term_eval

template<typename Flavor >
FF bb::ECCVMVerifier_< Flavor >::translation_masking_term_eval
private

Definition at line 118 of file eccvm_verifier.hpp.

◆ vk_hash

template<typename Flavor >
BF bb::ECCVMVerifier_< Flavor >::vk_hash
private

Definition at line 99 of file eccvm_verifier.hpp.


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