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 BatchMergeProof = BatchMergeProver::MergeProof
 
using ECCVMVerificationKey = ECCVMFlavor::VerificationKey
 
using TranslatorVerificationKey = TranslatorFlavor::VerificationKey
 
using MergeRecursiveVerifier = stdlib::recursion::goblin::MergeRecursiveVerifier< MegaBuilder >
 
using BatchMergeRecursiveVerifier = stdlib::recursion::goblin::BatchMergeRecursiveVerifier< MegaBuilder >
 
using PairingPoints = MergeRecursiveVerifier::PairingPoints
 
using TableCommitments = MergeVerifier::TableCommitments
 
using RecursiveTableCommitments = MergeRecursiveVerifier::TableCommitments
 
using BatchRecursiveTableCommitments = BatchMergeRecursiveVerifier::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, 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 (const std::shared_ptr< Transcript > &transcript=std::make_shared< Transcript >())
 
MergeProof prove_merge (const std::shared_ptr< Transcript > &transcript=std::make_shared< Transcript >()) const
 Construct a single-step merge proof for the most recently merged subtable.
 
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)
 Recursively verify the most recent single-step merge proof.
 
void prove_batch_merge ()
 Construct a batched merge proof for all subtables accumulated during the IVC.
 
std::pair< PairingPoints, BatchRecursiveTableCommitmentsrecursively_verify_batch_merge (MegaBuilder &builder, const BatchMergeRecursiveVerifier::FF &hash) const
 Recursively verify the batched merge proof inside the hiding kernel.
 

Additional Inherited Members

- Public Attributes inherited from bb::Goblin
std::shared_ptr< OpQueueop_queue = std::make_shared<OpQueue>()
 
GoblinProof goblin_proof
 
fq translation_batching_challenge_v
 
fq evaluation_challenge_x
 
std::shared_ptr< Transcripttranscript
 
BatchMergeProof batch_merge_proof
 
- 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,
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 of Translator op queue wires)
  • Add 3 random ops (for ZK hiding of accumulation result). This matches the structure expected by Translator. In Chonk, these ops are added by the tail kernel; AVM uses Goblin directly without the full Chonk IVC flow, so it queues them explicitly here.

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 48 of file goblin_avm.cpp.


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