Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
goblin_avm_verifier.cpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Completed, auditors: [Federico], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
9
10namespace bb {
11
17{
18 // Step 1: Verify the ECCVM proof
19 ECCVMVerifier eccvm_verifier{ transcript, proof.eccvm_proof };
20 auto eccvm_result = eccvm_verifier.reduce_to_ipa_opening();
21 vinfo("Goblin: ECCVM reduced to IPA opening successfully: ", eccvm_result.reduction_succeeded ? "true" : "false");
22
23 // Get translation data from ECCVM verifier
24 auto translator_input = eccvm_verifier.get_translator_input_data();
25
26 // Step 2: Verify the Translator proof
27 // - Pass `table_commitments` as the one with which GoblinAvm was initialized (which commits all the ECC ops of the
28 // circuit containing the AVM recursive verifier).
29 // - `accumulated_result` and corresponding challenges ensure non-native computation matches ECCVM's native result
30 TranslatorVerifier translator_verifier{ transcript,
32 translator_input.evaluation_challenge_x,
33 translator_input.batching_challenge_v,
34 translator_input.accumulated_result,
36 auto translator_result = translator_verifier.reduce_to_pairing_check();
37 vinfo("Goblin: Translator reduced to pairing check successfully: ",
38 translator_result.reduction_succeeded ? "true" : "false");
39
40 ReductionResult result{
41 .translator_pairing_points = std::move(translator_result.pairing_points),
42 .ipa_claim = std::move(eccvm_result.ipa_claim),
43 .ipa_proof = proof.ipa_proof,
44 };
45
46 return result;
47}
48
49} // namespace bb
Unified ECCVM verifier class for both native and recursive verification.
std::shared_ptr< Transcript > transcript
ReductionResult reduce_to_pairing_check_and_ipa_opening()
Reduce Goblin proof to pairing check and IPA opening claim.
Translator verifier class that verifies the proof of the Translator circuit.
#define vinfo(...)
Definition log.hpp:94
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13