2#include "barretenberg/commitment_schemes/commitment_key.hpp"
3#include "barretenberg/commitment_schemes/kzg/kzg.hpp"
4#include "barretenberg/ecc/curves/bn254/g1.hpp"
6#include "barretenberg/flavor/flavor_macros.hpp"
7#include "barretenberg/flavor/goblin_ultra.hpp"
8#include "barretenberg/polynomials/barycentric.hpp"
9#include "barretenberg/polynomials/evaluation_domain.hpp"
10#include "barretenberg/polynomials/polynomial.hpp"
11#include "barretenberg/polynomials/univariate.hpp"
12#include "barretenberg/proof_system/circuit_builder/goblin_ultra_circuit_builder.hpp"
13#include "barretenberg/srs/factories/crs_factory.hpp"
21#include "barretenberg/stdlib/primitives/curves/bn254.hpp"
22#include "barretenberg/stdlib/primitives/field/field.hpp"
23#include "barretenberg/stdlib/recursion/honk/transcript/transcript.hpp"
25namespace proof_system::honk::flavor {
43 using CircuitBuilder = BuilderType;
54 static constexpr size_t NUM_WIRES = flavor::GoblinUltra::NUM_WIRES;
58 static constexpr size_t NUM_ALL_ENTITIES = flavor::GoblinUltra::NUM_ALL_ENTITIES;
61 static constexpr size_t NUM_PRECOMPUTED_ENTITIES = flavor::GoblinUltra::NUM_PRECOMPUTED_ENTITIES;
63 static constexpr size_t NUM_WITNESS_ENTITIES = flavor::GoblinUltra::NUM_WITNESS_ENTITIES;
67 using Relations = GoblinUltra::Relations_<FF>;
69 static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();
74 static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1;
75 static constexpr size_t NUM_RELATIONS = std::tuple_size<Relations>::value;
78 using SumcheckTupleOfTuplesOfUnivariates =
decltype(create_sumcheck_tuple_of_tuples_of_univariates<Relations>());
79 using TupleOfArraysOfValues =
decltype(create_tuple_of_arrays_of_values<Relations>());
90 AllValues(std::array<FF, NUM_ALL_ENTITIES> _data_in) { this->_data = _data_in; }
110 VerificationKey(CircuitBuilder* builder,
const std::shared_ptr<NativeVerificationKey>& native_key)
112 native_key->num_public_inputs)
114 this->q_m = Commitment::from_witness(builder, native_key->q_m);
115 this->q_l = Commitment::from_witness(builder, native_key->q_l);
116 this->q_r = Commitment::from_witness(builder, native_key->q_r);
117 this->q_o = Commitment::from_witness(builder, native_key->q_o);
118 this->q_4 = Commitment::from_witness(builder, native_key->q_4);
119 this->q_c = Commitment::from_witness(builder, native_key->q_c);
120 this->q_arith = Commitment::from_witness(builder, native_key->q_arith);
121 this->q_sort = Commitment::from_witness(builder, native_key->q_sort);
122 this->q_elliptic = Commitment::from_witness(builder, native_key->q_elliptic);
123 this->q_aux = Commitment::from_witness(builder, native_key->q_aux);
124 this->q_lookup = Commitment::from_witness(builder, native_key->q_lookup);
125 this->q_busread = Commitment::from_witness(builder, native_key->q_busread);
126 this->q_poseidon2_external = Commitment::from_witness(builder, native_key->q_poseidon2_external);
127 this->q_poseidon2_internal = Commitment::from_witness(builder, native_key->q_poseidon2_internal);
128 this->sigma_1 = Commitment::from_witness(builder, native_key->sigma_1);
129 this->sigma_2 = Commitment::from_witness(builder, native_key->sigma_2);
130 this->sigma_3 = Commitment::from_witness(builder, native_key->sigma_3);
131 this->sigma_4 = Commitment::from_witness(builder, native_key->sigma_4);
132 this->id_1 = Commitment::from_witness(builder, native_key->id_1);
133 this->id_2 = Commitment::from_witness(builder, native_key->id_2);
134 this->id_3 = Commitment::from_witness(builder, native_key->id_3);
135 this->id_4 = Commitment::from_witness(builder, native_key->id_4);
136 this->table_1 = Commitment::from_witness(builder, native_key->table_1);
137 this->table_2 = Commitment::from_witness(builder, native_key->table_2);
138 this->table_3 = Commitment::from_witness(builder, native_key->table_3);
139 this->table_4 = Commitment::from_witness(builder, native_key->table_4);
140 this->lagrange_first = Commitment::from_witness(builder, native_key->lagrange_first);
141 this->lagrange_last = Commitment::from_witness(builder, native_key->lagrange_last);
142 this->lagrange_ecc_op = Commitment::from_witness(builder, native_key->lagrange_ecc_op);
143 this->databus_id = Commitment::from_witness(builder, native_key->databus_id);
A field element for each entity of the flavor. These entities represent the prover polynomials evalua...
Definition: goblin_ultra_recursive.hpp:86
The verification key is responsible for storing the the commitments to the precomputed (non-witnessk)...
Definition: goblin_ultra_recursive.hpp:101
VerificationKey(CircuitBuilder *builder, const std::shared_ptr< NativeVerificationKey > &native_key)
Construct a new Verification Key with stdlib types from a provided native verification key.
Definition: goblin_ultra_recursive.hpp:110
The recursive counterpart to the "native" Goblin Ultra flavor.
Definition: goblin_ultra_recursive.hpp:41
A base class labelling all entities (for instance, all of the polynomials used by the prover during s...
Definition: goblin_ultra.hpp:229
A container for commitment labels.
Definition: goblin_ultra.hpp:360
Definition: goblin_ultra.hpp:416
Definition: goblin_ultra.hpp:24
VerificationKey_< PrecomputedEntities< Commitment > > VerificationKey
The verification key is responsible for storing the the commitments to the precomputed (non-witnessk)...
Definition: goblin_ultra.hpp:287
Definition: verification_key.hpp:25
Definition: biggroup.hpp:22
Definition: transcript.hpp:17
Base class templates for structures that contain data parameterized by the fundamental polynomials of...