barretenberg
Loading...
Searching...
No Matches
native_aggregation_state.hpp
1#pragma once
2#include "barretenberg/common/streams.hpp"
3#include "barretenberg/ecc/curves/bn254/g1.hpp"
4#include "barretenberg/ecc/groups/affine_element.hpp"
5
6namespace proof_system::plonk {
7namespace stdlib {
8namespace recursion {
9
18 typename barretenberg::g1::affine_element P0 = barretenberg::g1::affine_one;
19 typename barretenberg::g1::affine_element P1 = barretenberg::g1::affine_one;
20 std::vector<barretenberg::fr> public_inputs;
21 std::vector<uint32_t> proof_witness_indices;
22 bool has_data = false;
23
24 // For serialization, update with new fields
25 MSGPACK_FIELDS(P0, P1, public_inputs, proof_witness_indices, has_data);
26 bool operator==(native_aggregation_state const& other) const
27 {
28 return P0 == other.P0 && P1 == other.P1 && public_inputs == other.public_inputs &&
29 proof_witness_indices == other.proof_witness_indices && has_data == other.has_data;
30 };
31};
32
33inline std::ostream& operator<<(std::ostream& os, native_aggregation_state const& obj)
34{
35 return os << "P0: " << obj.P0 << "\n"
36 << "P1: " << obj.P1 << "\n"
37 << "public_inputs: " << obj.public_inputs << "\n"
38 << "proof_witness_indices: " << obj.proof_witness_indices << "\n"
39 << "has_data: " << obj.has_data << "\n";
40};
41
42} // namespace recursion
43} // namespace stdlib
44} // namespace proof_system::plonk
Definition: affine_element.hpp:11
Definition: widget.bench.cpp:13
Definition: native_aggregation_state.hpp:17