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 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, 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. | |
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< 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 |
Private Types | |
using | Commitment = MegaFlavor::Commitment |
using | FF = MegaFlavor::FF |
Definition at line 24 of file goblin.hpp.
|
private |
Definition at line 25 of file goblin.hpp.
Definition at line 33 of file goblin.hpp.
Definition at line 34 of file goblin.hpp.
Definition at line 37 of file goblin.hpp.
|
private |
Definition at line 26 of file goblin.hpp.
using bb::Goblin::Fr = bb::fr |
Definition at line 30 of file goblin.hpp.
Definition at line 29 of file goblin.hpp.
Definition at line 43 of file goblin.hpp.
Definition at line 36 of file goblin.hpp.
using bb::Goblin::MergeRecursiveVerifier = stdlib::recursion::goblin::MergeRecursiveVerifier_<MegaBuilder> |
Definition at line 39 of file goblin.hpp.
using bb::Goblin::OpQueue = ECCOpQueue |
Definition at line 32 of file goblin.hpp.
Definition at line 40 of file goblin.hpp.
Definition at line 45 of file goblin.hpp.
Definition at line 44 of file goblin.hpp.
Definition at line 42 of file goblin.hpp.
using bb::Goblin::RecursiveTranscript = bb::BaseTranscript<bb::stdlib::recursion::honk::StdlibTranscriptParams<MegaBuilder> > |
Definition at line 46 of file goblin.hpp.
Definition at line 41 of file goblin.hpp.
Definition at line 31 of file goblin.hpp.
Definition at line 35 of file goblin.hpp.
Definition at line 38 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 19 of file goblin.cpp.
GoblinProof bb::Goblin::prove | ( | const MergeSettings | merge_settings = MergeSettings::PREPEND | ) |
Constuct a full Goblin proof (ECCVM, Translator, merge)
Definition at line 50 of file goblin.cpp.
void bb::Goblin::prove_eccvm | ( | ) |
Construct an ECCVM proof and the translation polynomial evaluations.
Definition at line 31 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 24 of file goblin.cpp.
void bb::Goblin::prove_translator | ( | ) |
Construct a translator proof.
Definition at line 41 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.
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 |
Definition at line 77 of file goblin.cpp.
|
static |
Verify a full Goblin proof (ECCVM, Translator, merge)
proof | |
inputs_commitments | The commitments used by the Merge verifier |
merged_table_commitment | The commitment to the merged table as read from the proof |
transcript | |
merge_settings | How the most recent ecc op subtable is going to be merged into the table of ecc ops |
Definition at line 97 of file goblin.cpp.
CommitmentKey<curve::BN254> bb::Goblin::commitment_key |
Definition at line 49 of file goblin.hpp.
fq bb::Goblin::evaluation_challenge_x |
Definition at line 54 of file goblin.hpp.
GoblinProof bb::Goblin::goblin_proof |
Definition at line 51 of file goblin.hpp.
std::deque<MergeProof> bb::Goblin::merge_verification_queue |
Definition at line 57 of file goblin.hpp.
std::shared_ptr<OpQueue> bb::Goblin::op_queue = std::make_shared<OpQueue>() |
Definition at line 48 of file goblin.hpp.
std::shared_ptr<Transcript> bb::Goblin::transcript |
Definition at line 55 of file goblin.hpp.
fq bb::Goblin::translation_batching_challenge_v |
Definition at line 53 of file goblin.hpp.