Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
goblin.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: not started, auditors: [], date: YYYY-MM-DD }
3// external_1: { status: not started, auditors: [], date: YYYY-MM-DD }
4// external_2: { status: not started, auditors: [], date: YYYY-MM-DD }
5// =====================
6
7// goblin.hpp
8#pragma once
9
21
22namespace bb {
23
24class Goblin {
27
28 public:
30 using Fr = bb::fr;
47
50
52
53 fq translation_batching_challenge_v; // challenge for batching the translation polynomials
54 fq evaluation_challenge_x; // challenge for evaluating the translation polynomials
55 std::shared_ptr<Transcript> transcript; // shared between ECCVM and Translator
56
57 std::deque<MergeProof> merge_verification_queue; // queue of merge proofs to be verified
58
64
66 const std::shared_ptr<Transcript>& transcript = std::make_shared<Transcript>());
67
74 void prove_merge(const std::shared_ptr<Transcript>& transcript = std::make_shared<Transcript>(),
75 const MergeSettings merge_settings = MergeSettings::PREPEND);
76
80 void prove_eccvm();
81
86 void prove_translator();
87
94
107 const RecursiveMergeCommitments& merge_commitments,
109 const MergeSettings merge_settings = MergeSettings::PREPEND);
110
122 static bool verify(const GoblinProof& proof,
123 const MergeCommitments& merge_commitments,
124 const std::shared_ptr<Transcript>& transcript,
125 const MergeSettings merge_settings = MergeSettings::PREPEND);
126};
127
128} // namespace bb
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
CommitmentKey object over a pairing group 𝔾₁.
Used to construct execution trace representations of elliptic curve operations.
The proving key is responsible for storing the polynomials used by the prover.
The verification key is responsible for storing the commitments to the precomputed (non-witnessk) pol...
ECCVMCircuitBuilder CircuitBuilder
fq evaluation_challenge_x
Definition goblin.hpp:54
GoblinProof goblin_proof
Definition goblin.hpp:51
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)
Definition goblin.cpp:97
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.
Definition goblin.cpp:77
MergeRecursiveVerifier::Commitment RecursiveCommitment
Definition goblin.hpp:45
void prove_eccvm()
Construct an ECCVM proof and the translation polynomial evaluations.
Definition goblin.cpp:31
fq translation_batching_challenge_v
Definition goblin.hpp:53
MergeVerifier::TableCommitments TableCommitments
Definition goblin.hpp:41
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...
Definition goblin.cpp:24
std::shared_ptr< OpQueue > op_queue
Definition goblin.hpp:48
void prove_translator()
Construct a translator proof.
Definition goblin.cpp:41
MegaFlavor::Commitment Commitment
Definition goblin.hpp:25
GoblinProof prove(const MergeSettings merge_settings=MergeSettings::PREPEND)
Constuct a full Goblin proof (ECCVM, Translator, merge)
Definition goblin.cpp:50
MergeProver::MergeProof MergeProof
Definition goblin.hpp:36
CommitmentKey< curve::BN254 > commitment_key
Definition goblin.hpp:49
std::deque< MergeProof > merge_verification_queue
Definition goblin.hpp:57
std::shared_ptr< Transcript > transcript
Definition goblin.hpp:55
MergeRecursiveVerifier::TableCommitments RecursiveTableCommitments
Definition goblin.hpp:42
Curve::ScalarField FF
Curve::AffineElement Commitment
std::vector< FF > MergeProof
std::array< Commitment, NUM_WIRES > TableCommitments
TranslatorCircuitBuilder creates a circuit that evaluates the correctness of the evaluation of EccOpQ...
The verification key is responsible for storing the commitments to the precomputed (non-witnessk) pol...
stdlib::recursion::PairingPoints< CircuitBuilder > PairingPoints
AluTraceBuilder builder
Definition alu.test.cpp:123
Entry point for Barretenberg command-line interface.
field< Bn254FrParams > fr
Definition fr.hpp:174
MergeSettings
The MergeSettings define whether an current subtable will be added at the beginning (PREPEND) or at t...
MegaCircuitBuilder_< field< Bn254FrParams > > MegaCircuitBuilder
BaseTranscript< NativeTranscriptParams > NativeTranscript
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
std::shared_ptr< TranslatorVerificationKey > translator_verification_key
Definition goblin.hpp:61
std::shared_ptr< ECCVMVerificationKey > eccvm_verification_key
Definition goblin.hpp:60
An object storing two EC points that represent the inputs to a pairing check.