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

Unified Goblin verifier for both native and recursive verification. More...

#include <goblin_verifier.hpp>

Classes

struct  ReductionResult
 

Public Types

using MergeVerifier = MergeVerifier_< Curve >
 
using ECCVMVerifier = ECCVMVerifier_< std::conditional_t< IsRecursive, ECCVMRecursiveFlavor, ECCVMFlavor > >
 
using TranslatorVerifier = TranslatorVerifier_< std::conditional_t< IsRecursive, TranslatorRecursiveFlavor, TranslatorFlavor > >
 
using GoblinProof = std::conditional_t< IsRecursive, GoblinStdlibProof, bb::GoblinProof >
 
using MergeCommitments = typename MergeVerifier::InputCommitments
 
using Transcript = std::conditional_t< IsRecursive, UltraStdlibTranscript, NativeTranscript >
 
using DeferredTripleIpaOpening = typename ECCVMVerifier::DeferredTripleIpaOpening
 Result of Goblin verification with mode-specific semantics.
 

Public Member Functions

 GoblinVerifier_ (std::shared_ptr< Transcript > transcript, const GoblinProof &proof, const MergeCommitments &merge_commitments)
 Construct a Goblin verifier.
 
ReductionResult reduce_to_pairing_check_and_triple_ipa_opening ()
 Reduce Goblin proof to pairing checks and a TripleIPA claim.
 

Static Public Attributes

static constexpr bool IsRecursive = Curve::is_stdlib_type
 

Private Attributes

std::shared_ptr< Transcripttranscript
 
GoblinProof proof
 
MergeCommitments merge_commitments
 

Detailed Description

template<typename Curve>
class bb::GoblinVerifier_< Curve >

Unified Goblin verifier for both native and recursive verification.

Orchestrates verification of the three Goblin sub-protocols:

  1. Merge protocol - Proves correct concatenation of op queue tables (see MERGE_PROTOCOL.md)
  2. ECCVM verification - Proves correct execution of elliptic curve operations
  3. Translator verification - Proves consistency between BN254 ↔ Grumpkin field element representations

This verifier does NOT perform final verification - it returns reduction results for deferred verification.

Template Parameters
CurveThe BN254 curve type (either curve::BN254 for native or stdlib::bn254<Builder> for recursive)

Definition at line 33 of file goblin_verifier.hpp.

Member Typedef Documentation

◆ DeferredTripleIpaOpening

template<typename Curve >
using bb::GoblinVerifier_< Curve >::DeferredTripleIpaOpening = typename ECCVMVerifier::DeferredTripleIpaOpening

Result of Goblin verification with mode-specific semantics.

Native mode: Pairing checks are performed immediately (fail-fast), TripleIPA verification is deferred. Recursive mode: Pairing and TripleIPA verification are deferred for aggregation.

Definition at line 55 of file goblin_verifier.hpp.

◆ ECCVMVerifier

◆ GoblinProof

Definition at line 44 of file goblin_verifier.hpp.

◆ MergeCommitments

template<typename Curve >
using bb::GoblinVerifier_< Curve >::MergeCommitments = typename MergeVerifier::InputCommitments

Definition at line 45 of file goblin_verifier.hpp.

◆ MergeVerifier

template<typename Curve >
using bb::GoblinVerifier_< Curve >::MergeVerifier = MergeVerifier_<Curve>

Definition at line 38 of file goblin_verifier.hpp.

◆ Transcript

◆ TranslatorVerifier

Definition at line 40 of file goblin_verifier.hpp.

Constructor & Destructor Documentation

◆ GoblinVerifier_()

template<typename Curve >
bb::GoblinVerifier_< Curve >::GoblinVerifier_ ( std::shared_ptr< Transcript transcript,
const GoblinProof proof,
const MergeCommitments merge_commitments 
)
inline

Construct a Goblin verifier.

Parameters
transcriptShared transcript for Fiat-Shamir
proofThe complete Goblin proof containing Merge, ECCVM, TripleIPA, and Translator proofs
merge_commitmentsThe input commitments for the Merge verifier (t and T_prev tables)

Definition at line 72 of file goblin_verifier.hpp.

Member Function Documentation

◆ reduce_to_pairing_check_and_triple_ipa_opening()

template<typename Curve >
GoblinVerifier_< Curve >::ReductionResult bb::GoblinVerifier_< Curve >::reduce_to_pairing_check_and_triple_ipa_opening ( )

Reduce Goblin proof to pairing checks and a TripleIPA claim.

Orchestrates three sub-verifiers in sequence: Merge → ECCVM → Translator

  • Merge: reduces to KZG pairing check
  • ECCVM: reconstructs a compact TripleIPA claim (Grumpkin curve)
  • Translator: reduces to KZG pairing check

Pairing points from Merge and Translator are aggregated. In native mode, performs immediate pairing checks for early rejections. TripleIPA verification is always deferred to the caller.

Returns
ReductionResult with all_checks_passed indicating:
  • Native: reduction checks + pairing checks passed, TripleIPA verification still needed
  • Recursive: reduction checks only (pairing and TripleIPA verification both deferred)
Warning
Caller must reduce or verify triple_ipa_opening, then verify or accumulate the resulting accumulator.

Processes Merge, ECCVM, and Translator sub-proofs sequentially. In native mode, performs immediate pairing checks for early rejections and returns the default ReductionResult on failure.

Definition at line 20 of file goblin_verifier.cpp.

Member Data Documentation

◆ IsRecursive

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

Definition at line 35 of file goblin_verifier.hpp.

◆ merge_commitments

template<typename Curve >
MergeCommitments bb::GoblinVerifier_< Curve >::merge_commitments
private

Definition at line 102 of file goblin_verifier.hpp.

◆ proof

template<typename Curve >
GoblinProof bb::GoblinVerifier_< Curve >::proof
private

Definition at line 101 of file goblin_verifier.hpp.

◆ transcript

template<typename Curve >
std::shared_ptr<Transcript> bb::GoblinVerifier_< Curve >::transcript
private

Definition at line 100 of file goblin_verifier.hpp.


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