Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
proof.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#pragma once
8
10#include <cstdint>
11
12namespace bb::stdlib {
13
19template <typename Builder> class Proof : public std::vector<bb::stdlib::field_t<Builder>> {
20 public:
22 using Base::Base; // Inherit all constructors from std::vector
23
24 // Explicitly define vector copy constructor (not inherited by default)
25 Proof(const std::vector<bb::stdlib::field_t<Builder>>& fields)
26 : Base(fields)
27 {}
28
29 // Constructor from a native Proof
30 Proof(Builder& builder, const HonkProof& native_proof)
31 {
32 for (const auto& element : native_proof) {
34 }
35 };
36
37 // Extract the native HonkProof
39 {
40 HonkProof result;
41 result.reserve(this->size());
42 for (const auto& element : *this) {
43 result.push_back(element.get_value());
44 }
45 return result;
46 };
47};
48
49} // namespace bb::stdlib
A simple wrapper around a vector of stdlib field elements representing a proof.
Definition proof.hpp:19
Proof(const std::vector< bb::stdlib::field_t< Builder > > &fields)
Definition proof.hpp:25
HonkProof get_value() const
Definition proof.hpp:38
std::vector< bb::stdlib::field_t< Builder > > Base
Definition proof.hpp:21
Proof(Builder &builder, const HonkProof &native_proof)
Definition proof.hpp:30
AluTraceBuilder builder
Definition alu.test.cpp:123
std::conditional_t< IsGoblinBigGroup< C, Fq, Fr, G >, element_goblin::goblin_element< C, goblin_field< C >, Fr, G >, element_default::element< C, Fq, Fr, G > > element
element wraps either element_default::element or element_goblin::goblin_element depending on parametr...
std::vector< fr > HonkProof
Definition proof.hpp:15
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13