|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <goblin.hpp>
Classes | |
| struct | VerificationKey |
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 IPA opening proof. | |
| void | prove_translator () |
| Construct a translator proof. | |
| GoblinProof | prove () |
| Constuct a full Goblin proof (ECCVM, Translator, merge) | |
| std::pair< PairingPoints, RecursiveTableCommitments > | 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. | |
Public Attributes | |
| std::shared_ptr< OpQueue > | op_queue = std::make_shared<OpQueue>() |
| CommitmentKey< curve::BN254 > | commitment_key |
| GoblinProof | goblin_proof |
| fq | translation_batching_challenge_v |
| fq | evaluation_challenge_x |
| std::shared_ptr< Transcript > | transcript |
| std::deque< MergeProof > | merge_verification_queue |
Protected Attributes | |
| bool | avm_mode = false |
Private Types | |
| using | Commitment = MegaFlavor::Commitment |
| using | FF = MegaFlavor::FF |
Definition at line 22 of file goblin.hpp.
|
private |
Definition at line 23 of file goblin.hpp.
Definition at line 37 of file goblin.hpp.
Definition at line 38 of file goblin.hpp.
Definition at line 41 of file goblin.hpp.
|
private |
Definition at line 24 of file goblin.hpp.
| using bb::Goblin::Fr = bb::fr |
Definition at line 34 of file goblin.hpp.
| using bb::Goblin::IPA_PCS = IPA<ECCVMFlavor::Curve, CONST_ECCVM_LOG_N> |
Definition at line 52 of file goblin.hpp.
Definition at line 33 of file goblin.hpp.
Definition at line 47 of file goblin.hpp.
Definition at line 40 of file goblin.hpp.
| using bb::Goblin::MergeRecursiveVerifier = stdlib::recursion::goblin::MergeRecursiveVerifier<MegaBuilder> |
Definition at line 43 of file goblin.hpp.
| using bb::Goblin::OpQueue = ECCOpQueue |
Definition at line 36 of file goblin.hpp.
Definition at line 44 of file goblin.hpp.
Definition at line 49 of file goblin.hpp.
Definition at line 48 of file goblin.hpp.
Definition at line 46 of file goblin.hpp.
Definition at line 50 of file goblin.hpp.
Definition at line 45 of file goblin.hpp.
Definition at line 35 of file goblin.hpp.
Definition at line 39 of file goblin.hpp.
Definition at line 51 of file goblin.hpp.
Definition at line 42 of file goblin.hpp.
| 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 24 of file goblin.cpp.
| GoblinProof bb::Goblin::prove | ( | ) |
Constuct a full Goblin proof (ECCVM, Translator, merge)
Definition at line 62 of file goblin.cpp.
| void bb::Goblin::prove_eccvm | ( | ) |
Construct an ECCVM proof and IPA opening proof.
Also computes the translation polynomial evaluation challenges (batching_challenge_v, evaluation_challenge_x) which are passed to the Translator.
Definition at line 36 of file goblin.cpp.
| 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.
| transcript |
Definition at line 29 of file goblin.cpp.
| void bb::Goblin::prove_translator | ( | ) |
Construct a translator proof.
Definition at line 53 of file goblin.cpp.
| 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.
Recursively verify the next merge proof in the queue.
Proofs are verified in a FIFO manner
| builder | The circuit in which the recursive verification will be performed. |
| inputs_commitments | The commitment used by the Merge verifier |
| transcript | The transcript to be passed to the MergeRecursiveVerifier. |
| merge_settings | How the most recent ecc op subtable is going to be merged into the table of ecc ops |
Merge proofs are verified in FIFO order to match the circuit accumulation order. Each kernel verifies the merge proof from its corresponding app circuit. Since circuits are accumulated in sequence (e.g., App₀ → Kernel₀ → App₁ → Kernel₁ → ..., though in practice there can be repeated kernels such as inner → reset), the merge proofs must be verified in the same order to maintain consistency of the op queue commitments.
Definition at line 91 of file goblin.cpp.
|
protected |
Definition at line 30 of file goblin.hpp.
| CommitmentKey<curve::BN254> bb::Goblin::commitment_key |
Definition at line 55 of file goblin.hpp.
| fq bb::Goblin::evaluation_challenge_x |
Definition at line 60 of file goblin.hpp.
| GoblinProof bb::Goblin::goblin_proof |
Definition at line 57 of file goblin.hpp.
| std::deque<MergeProof> bb::Goblin::merge_verification_queue |
Definition at line 63 of file goblin.hpp.
| std::shared_ptr<OpQueue> bb::Goblin::op_queue = std::make_shared<OpQueue>() |
Definition at line 54 of file goblin.hpp.
| std::shared_ptr<Transcript> bb::Goblin::transcript |
Definition at line 61 of file goblin.hpp.
| fq bb::Goblin::translation_batching_challenge_v |
Definition at line 59 of file goblin.hpp.