Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
goblin_avm.cpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Planned, auditors: [], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#include "goblin_avm.hpp"
8
20#include <utility>
21
22namespace bb {
23
24GoblinAvm::GoblinAvm(MegaBuilder& builder, const std::shared_ptr<Transcript>& avm_transcript)
25{
26 // Set members of base Goblin class
27 avm_mode = true;
28 op_queue = builder.op_queue;
29 transcript = avm_transcript;
30
39 builder.queue_ecc_no_op();
40 builder.queue_ecc_random_op();
41 builder.queue_ecc_random_op();
42 builder.queue_ecc_random_op();
43 // In the AVM Recursive Verifier case, we don't need ZK; so we place a deterministic non-op as a "hiding_op", it
44 // does not contribute to the actual MSM circuit.
46 builder.queue_ecc_hiding_op(Fq(0), Fq(0));
47}
48
50{
51 BB_BENCH_NAME("GoblinAvm::prove");
52
53 op_queue->merge();
54 info("GoblinAvm: num ultra ops = ", op_queue->get_ultra_ops_count());
55
56 vinfo("prove eccvm...");
58 vinfo("finished eccvm proving.");
59 vinfo("prove translator...");
61 vinfo("finished translator proving.");
62
63 return GoblinAvmProof{
65 .ipa_proof = std::move(goblin_proof.ipa_proof),
66 .translator_proof = std::move(goblin_proof.translator_proof),
67 };
68}
69
70} // namespace bb
#define BB_BENCH_NAME(name)
Definition bb_bench.hpp:225
GoblinAvmProof prove()
Constuct a full GoblinAvm proof (ECCVM, Translator)
GoblinAvm(MegaBuilder &builder, const std::shared_ptr< Transcript > &avm_transcript=std::make_shared< Transcript >())
GoblinProof goblin_proof
Definition goblin.hpp:56
void prove_eccvm()
Construct an ECCVM proof and IPA opening proof.
Definition goblin.cpp:35
std::shared_ptr< OpQueue > op_queue
Definition goblin.hpp:54
void prove_translator()
Construct a translator proof.
Definition goblin.cpp:52
bool avm_mode
Definition goblin.hpp:30
std::shared_ptr< Transcript > transcript
Definition goblin.hpp:60
#define info(...)
Definition log.hpp:93
#define vinfo(...)
Definition log.hpp:94
AluTraceBuilder builder
Definition alu.test.cpp:124
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
HonkProof eccvm_proof
Definition types.hpp:18
HonkProof eccvm_proof
Definition types.hpp:23
HonkProof ipa_proof
Definition types.hpp:24
HonkProof translator_proof
Definition types.hpp:25
curve::BN254::BaseField Fq