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

Specialization of Goblin for the AVM. More...

#include <goblin_avm.hpp>

Inheritance diagram for bb::GoblinAvm:
bb::Goblin

Public Types

using ECCVMVerificationKey = ECCVMFlavor::VerificationKey
 
using TranslatorVerificationKey = TranslatorFlavor::VerificationKey
 
- Public Types inherited from bb::Goblin
using MegaBuilder = MegaCircuitBuilder
 
using Fr = bb::fr
 
using Transcript = NativeTranscript
 
using OpQueue = ECCOpQueue
 
using ECCVMBuilder = ECCVMFlavor::CircuitBuilder
 
using ECCVMProvingKey = ECCVMFlavor::ProvingKey
 
using TranslatorBuilder = TranslatorCircuitBuilder
 
using MergeProof = MergeProver::MergeProof
 
using ECCVMVerificationKey = ECCVMFlavor::VerificationKey
 
using TranslatorVerificationKey = TranslatorFlavor::VerificationKey
 
using MergeRecursiveVerifier = stdlib::recursion::goblin::MergeRecursiveVerifier< MegaBuilder >
 
using PairingPoints = MergeRecursiveVerifier::PairingPoints
 
using TableCommitments = MergeVerifier::TableCommitments
 
using RecursiveTableCommitments = MergeRecursiveVerifier::TableCommitments
 
using MergeCommitments = MergeVerifier::InputCommitments
 
using RecursiveMergeCommitments = MergeRecursiveVerifier::InputCommitments
 
using RecursiveCommitment = MergeRecursiveVerifier::Commitment
 
using RecursiveTranscript = MegaStdlibTranscript
 
using TranslatorInputData = TranslatorInputData_< fq >
 
using IPA_PCS = IPA< ECCVMFlavor::Curve, CONST_ECCVM_LOG_N >
 

Public Member Functions

 GoblinAvm (MegaBuilder &builder, CommitmentKey< curve::BN254 > bn254_commitment_key=CommitmentKey< curve::BN254 >(), const std::shared_ptr< Transcript > &avm_transcript=std::make_shared< Transcript >())
 
GoblinAvmProof prove ()
 Constuct a full GoblinAvm proof (ECCVM, Translator)
 
- Public Member Functions inherited from bb::Goblin
 Goblin (CommitmentKey< curve::BN254 > bn254_commitment_key=CommitmentKey< curve::BN254 >(), const std::shared_ptr< Transcript > &transcript=std::make_shared< Transcript >())
 
void prove_merge (const std::shared_ptr< Transcript > &transcript=std::make_shared< Transcript >(), const MergeSettings merge_settings=MergeSettings::PREPEND)
 Construct a merge proof for the goblin ECC ops in the provided circuit; append the proof to the merge_verification_queue.
 
void prove_eccvm ()
 Construct an ECCVM proof and IPA opening proof.
 
void prove_translator ()
 Construct a translator proof.
 
GoblinProof prove ()
 Constuct a full Goblin proof (ECCVM, Translator, merge)
 
std::pair< PairingPoints, RecursiveTableCommitmentsrecursively_verify_merge (MegaBuilder &builder, const RecursiveMergeCommitments &merge_commitments, const std::shared_ptr< RecursiveTranscript > &transcript, const MergeSettings merge_settings=MergeSettings::PREPEND)
 Recursively verify the next merge proof in the merge verification queue.
 

Additional Inherited Members

- Public Attributes inherited from bb::Goblin
std::shared_ptr< OpQueueop_queue = std::make_shared<OpQueue>()
 
CommitmentKey< curve::BN254commitment_key
 
GoblinProof goblin_proof
 
fq translation_batching_challenge_v
 
fq evaluation_challenge_x
 
std::shared_ptr< Transcripttranscript
 
std::deque< MergeProofmerge_verification_queue
 
- Protected Attributes inherited from bb::Goblin
bool avm_mode = false
 

Detailed Description

Specialization of Goblin for the AVM.

The AVM uses Goblin for recursive verification to avoid bloating circuit size due to the large number of witness entities. As there is only one circuit, we don't need to perform a Merge, we can simply use as input to the Goblin proof the table of ECC ops produced by the circuit containing the AVM recursive verifier. This class specializes the Goblin constructor and Goblin::prove() method for the AVM case.

Definition at line 22 of file goblin_avm.hpp.

Member Typedef Documentation

◆ ECCVMVerificationKey

◆ TranslatorVerificationKey

Constructor & Destructor Documentation

◆ GoblinAvm()

bb::GoblinAvm::GoblinAvm ( MegaBuilder builder,
CommitmentKey< curve::BN254 bn254_commitment_key = CommitmentKey<curve::BN254>(),
const std::shared_ptr< Transcript > &  avm_transcript = std::make_shared<Transcript>() 
)
explicit

Add required initial ops to the op queue:

  • Add 1 no-op (for shiftability)
  • Add 3 random ops (for ZK hiding of accumulation result). This matches the structure expected by Translator. In Chonk, these ops are added automatically during circuit accumulation, but AVM uses Goblin directly without the full Chonk IVC flow.

Definition at line 24 of file goblin_avm.cpp.

Member Function Documentation

◆ prove()

GoblinAvmProof bb::GoblinAvm::prove ( )

Constuct a full GoblinAvm proof (ECCVM, Translator)

Returns
Proof

Definition at line 52 of file goblin_avm.cpp.


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