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

#include <goblin.hpp>

Classes

struct  VerificationKey
 

Public Types

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 = bb::BaseTranscript< bb::stdlib::recursion::honk::StdlibTranscriptParams< MegaBuilder > >
 

Public Member Functions

 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 the translation polynomial evaluations.
 
void prove_translator ()
 Construct a translator proof.
 
GoblinProof prove (const MergeSettings merge_settings=MergeSettings::PREPEND)
 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.
 

Static Public Member Functions

static bool verify (const GoblinProof &proof, const MergeCommitments &merge_commitments, const std::shared_ptr< Transcript > &transcript, const MergeSettings merge_settings=MergeSettings::PREPEND)
 Verify a full Goblin proof (ECCVM, Translator, merge)
 

Public Attributes

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
 

Private Types

using Commitment = MegaFlavor::Commitment
 
using FF = MegaFlavor::FF
 

Detailed Description

Definition at line 24 of file goblin.hpp.

Member Typedef Documentation

◆ Commitment

Definition at line 25 of file goblin.hpp.

◆ ECCVMBuilder

◆ ECCVMProvingKey

◆ ECCVMVerificationKey

◆ FF

using bb::Goblin::FF = MegaFlavor::FF
private

Definition at line 26 of file goblin.hpp.

◆ Fr

Definition at line 30 of file goblin.hpp.

◆ MegaBuilder

Definition at line 29 of file goblin.hpp.

◆ MergeCommitments

◆ MergeProof

Definition at line 36 of file goblin.hpp.

◆ MergeRecursiveVerifier

◆ OpQueue

Definition at line 32 of file goblin.hpp.

◆ PairingPoints

◆ RecursiveCommitment

◆ RecursiveMergeCommitments

◆ RecursiveTableCommitments

◆ RecursiveTranscript

◆ TableCommitments

◆ Transcript

Definition at line 31 of file goblin.hpp.

◆ TranslatorBuilder

◆ TranslatorVerificationKey

Constructor & Destructor Documentation

◆ Goblin()

bb::Goblin::Goblin ( CommitmentKey< curve::BN254 bn254_commitment_key = CommitmentKey<curve::BN254>(),
const std::shared_ptr< Transcript > &  transcript = std::make_shared<Transcript>() 
)

Definition at line 19 of file goblin.cpp.

Member Function Documentation

◆ prove()

GoblinProof bb::Goblin::prove ( const MergeSettings  merge_settings = MergeSettings::PREPEND)

Constuct a full Goblin proof (ECCVM, Translator, merge)

Returns
Proof

Definition at line 50 of file goblin.cpp.

◆ prove_eccvm()

void bb::Goblin::prove_eccvm ( )

Construct an ECCVM proof and the translation polynomial evaluations.

Definition at line 31 of file goblin.cpp.

◆ prove_merge()

void bb::Goblin::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.

Parameters
transcript

Definition at line 24 of file goblin.cpp.

◆ prove_translator()

void bb::Goblin::prove_translator ( )

Construct a translator proof.

Definition at line 41 of file goblin.cpp.

◆ recursively_verify_merge()

std::pair< Goblin::PairingPoints, Goblin::RecursiveTableCommitments > bb::Goblin::recursively_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.

Proofs are verified in a FIFO manner

Parameters
builderThe circuit in which the recursive verification will be performed.
inputs_commitmentsThe commitment used by the Merge verifier
transcriptThe transcript to be passed to the MergeRecursiveVerifier.
merge_settingsHow the most recent ecc op subtable is going to be merged into the table of ecc ops
Returns
Pair of PairingPoints and commitments to the merged tables as read from the proof by the Merge verifier

Definition at line 77 of file goblin.cpp.

◆ verify()

bool bb::Goblin::verify ( const GoblinProof proof,
const MergeCommitments merge_commitments,
const std::shared_ptr< Transcript > &  transcript,
const MergeSettings  merge_settings = MergeSettings::PREPEND 
)
static

Verify a full Goblin proof (ECCVM, Translator, merge)

Parameters
proof
inputs_commitmentsThe commitments used by the Merge verifier
merged_table_commitmentThe commitment to the merged table as read from the proof
transcript
merge_settingsHow the most recent ecc op subtable is going to be merged into the table of ecc ops
Returns
Pair of verification result and commitments to the merged tables as read from the proof by the Merge verifier

Definition at line 97 of file goblin.cpp.

Member Data Documentation

◆ commitment_key

CommitmentKey<curve::BN254> bb::Goblin::commitment_key

Definition at line 49 of file goblin.hpp.

◆ evaluation_challenge_x

fq bb::Goblin::evaluation_challenge_x

Definition at line 54 of file goblin.hpp.

◆ goblin_proof

GoblinProof bb::Goblin::goblin_proof

Definition at line 51 of file goblin.hpp.

◆ merge_verification_queue

std::deque<MergeProof> bb::Goblin::merge_verification_queue

Definition at line 57 of file goblin.hpp.

◆ op_queue

std::shared_ptr<OpQueue> bb::Goblin::op_queue = std::make_shared<OpQueue>()

Definition at line 48 of file goblin.hpp.

◆ transcript

std::shared_ptr<Transcript> bb::Goblin::transcript

Definition at line 55 of file goblin.hpp.

◆ translation_batching_challenge_v

fq bb::Goblin::translation_batching_challenge_v

Definition at line 53 of file goblin.hpp.


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