Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
mega_flavor.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#include <utility>
9
30
31namespace bb {
32
34 public:
40 using PCS = KZG<Curve>;
46
47 // An upper bound on the size of the Mega-circuits. `CONST_PG_LOG_N` bounds the log circuit sizes in the CIVC
48 // context. `MEGA_AVM_LOG_N` is determined by the size of the AVMRecursiveVerifier.
49 static constexpr size_t VIRTUAL_LOG_N = std::max(CONST_PG_LOG_N, MEGA_AVM_LOG_N);
50 // indicates when evaluating sumcheck, edges can be left as degree-1 monomials
51 static constexpr bool USE_SHORT_MONOMIALS = true;
52 // Indicates that this flavor runs with non-ZK Sumcheck.
53 static constexpr bool HasZK = false;
54 // To achieve fixed proof size and that the recursive verifier circuit is constant, we are using padding in Sumcheck
55 // and Shplemini
56 static constexpr bool USE_PADDING = true;
57 static constexpr size_t NUM_WIRES = CircuitBuilder::NUM_WIRES;
58 // The number of multivariate polynomials on which a sumcheck prover sumcheck operates (including shifts). We often
59 // need containers of this size to hold related data, so we choose a name more agnostic than `NUM_POLYNOMIALS`.
60 static constexpr size_t NUM_ALL_ENTITIES = 60;
61 // The number of polynomials precomputed to describe a circuit and to aid a prover in constructing a satisfying
62 // assignment of witnesses. We again choose a neutral name.
63 static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 31;
64 // The total number of witness entities not including shifts.
65 static constexpr size_t NUM_WITNESS_ENTITIES = 24;
66 // Total number of folded polynomials, which is just all polynomials except the shifts
68 // The number of shifted witness entities including derived witness entities
69 static constexpr size_t NUM_SHIFTED_WITNESSES = 5;
70
73
74 // define the tuple of Relations that comprise the Sumcheck relation
75 // Note: made generic for use in MegaRecursive.
76 template <typename FF>
89
90 static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();
91 static constexpr size_t MAX_TOTAL_RELATION_LENGTH = compute_max_total_relation_length<Relations>();
92 static_assert(MAX_TOTAL_RELATION_LENGTH == 11);
93 // BATCHED_RELATION_PARTIAL_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta`
94 // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation
95 // length = 3
98
99 static constexpr size_t num_frs_comm = bb::field_conversion::calc_num_bn254_frs<Commitment>();
100 static constexpr size_t num_frs_fr = bb::field_conversion::calc_num_bn254_frs<FF>();
101
102 // Proof length formula methods
103 static constexpr size_t OINK_PROOF_LENGTH_WITHOUT_PUB_INPUTS =
104 /* 1. NUM_WITNESS_ENTITIES commitments */ (NUM_WITNESS_ENTITIES * num_frs_comm);
105
106 static constexpr size_t DECIDER_PROOF_LENGTH(size_t virtual_log_n = VIRTUAL_LOG_N)
107 {
108 return /* 2. virtual_log_n sumcheck univariates */
109 (virtual_log_n * BATCHED_RELATION_PARTIAL_LENGTH * num_frs_fr) +
110 /* 3. NUM_ALL_ENTITIES sumcheck evaluations */ (NUM_ALL_ENTITIES * num_frs_fr) +
111 /* 4. virtual_log_n - 1 Gemini Fold commitments */ ((virtual_log_n - 1) * num_frs_comm) +
112 /* 5. virtual_log_n Gemini a evaluations */ (virtual_log_n * num_frs_fr) +
113 /* 6. Shplonk Q commitment */ (num_frs_comm) +
114 /* 7. KZG W commitment */ (num_frs_comm);
115 }
116
117 static constexpr size_t PROOF_LENGTH_WITHOUT_PUB_INPUTS(size_t virtual_log_n = VIRTUAL_LOG_N)
118 {
120 }
121
122 // For instances of this flavour, used in folding, we need a unique sumcheck batching challenges for each
123 // subrelation. This is because using powers of alpha would increase the degree of Protogalaxy polynomial $G$ (the
124 // combiner) too much.
125 static constexpr size_t NUM_SUBRELATIONS = compute_number_of_subrelations<Relations>();
126 using SubrelationSeparators = std::array<FF, NUM_SUBRELATIONS - 1>;
127
128 template <size_t NUM_KEYS>
130 decltype(create_protogalaxy_tuple_of_tuples_of_univariates<Relations, NUM_KEYS>());
131
132 template <size_t NUM_KEYS>
135 NUM_KEYS,
136 /*optimized=*/true>());
137
138 // Whether or not the first row of the execution trace is reserved for 0s to enable shifts
139 static constexpr bool has_zero_row = true;
144 template <typename DataType_> class PrecomputedEntities {
145 public:
146 bool operator==(const PrecomputedEntities&) const = default;
147 using DataType = DataType_;
149 q_m, // column 0
150 q_c, // column 1
151 q_l, // column 2
152 q_r, // column 3
153 q_o, // column 4
154 q_4, // column 5
155 q_busread, // column 6
156 q_lookup, // column 7
157 q_arith, // column 8
158 q_delta_range, // column 9
159 q_elliptic, // column 10
160 q_memory, // column 11
161 q_nnf, // column 12
162 q_poseidon2_external, // column 13
163 q_poseidon2_internal, // column 14
164 sigma_1, // column 15
165 sigma_2, // column 16
166 sigma_3, // column 17
167 sigma_4, // column 18
168 id_1, // column 19
169 id_2, // column 20
170 id_3, // column 21
171 id_4, // column 22
172 table_1, // column 23
173 table_2, // column 24
174 table_3, // column 25
175 table_4, // column 26
176 lagrange_first, // column 27
177 lagrange_last, // column 28
178 lagrange_ecc_op, // column 29 // indicator poly for ecc op gates
179 databus_id // column 30 // id polynomial, i.e. id_i = i
180 )
181
182 static constexpr CircuitType CIRCUIT_TYPE = CircuitBuilder::CIRCUIT_TYPE;
183
184 auto get_non_gate_selectors() { return RefArray{ q_m, q_c, q_l, q_r, q_o, q_4 }; };
186 {
187 return RefArray{
188 q_busread,
189 q_lookup,
190 q_arith,
191 q_delta_range,
192 q_elliptic,
193 q_memory,
194 q_nnf,
195 q_poseidon2_external,
196 q_poseidon2_internal,
197 };
198 }
200
201 auto get_sigmas() { return RefArray{ sigma_1, sigma_2, sigma_3, sigma_4 }; };
202 auto get_ids() { return RefArray{ id_1, id_2, id_3, id_4 }; };
203 auto get_tables() { return RefArray{ table_1, table_2, table_3, table_4 }; };
204 };
205
206 // Mega needs to expose more public classes than most flavors due to MegaRecursive reuse, but these
207 // are internal:
208
209 // WireEntities for basic witness entities
210 template <typename DataType> class WireEntities {
211 public:
213 w_l, // column 0
214 w_r, // column 1
215 w_o, // column 2
216 w_4); // column 3
217 };
218
219 // DerivedEntities for derived witness entities
220 template <typename DataType> class DerivedEntities {
221 public:
223 z_perm, // column 4
224 lookup_inverses, // column 5
225 lookup_read_counts, // column 6
226 lookup_read_tags, // column 7
227 ecc_op_wire_1, // column 8
228 ecc_op_wire_2, // column 9
229 ecc_op_wire_3, // column 10
230 ecc_op_wire_4, // column 11
231 calldata, // column 12
232 calldata_read_counts, // column 13
233 calldata_read_tags, // column 14
234 calldata_inverses, // column 15
235 secondary_calldata, // column 16
236 secondary_calldata_read_counts, // column 17
237 secondary_calldata_read_tags, // column 18
238 secondary_calldata_inverses, // column 19
239 return_data, // column 20
240 return_data_read_counts, // column 21
241 return_data_read_tags, // column 22
242 return_data_inverses); // column 23
243 auto get_to_be_shifted() { return RefArray{ z_perm }; };
244 };
245
251 template <typename DataType>
252 class WitnessEntities : public WireEntities<DataType>, public DerivedEntities<DataType> {
253 public:
255
258 {
259 return RefArray{ this->ecc_op_wire_1, this->ecc_op_wire_2, this->ecc_op_wire_3, this->ecc_op_wire_4 };
260 }
261 auto get_databus_entities() // Excludes the derived inverse polynomials
262 {
263 return RefArray{
264 this->calldata, this->calldata_read_counts, this->calldata_read_tags,
265 this->secondary_calldata, this->secondary_calldata_read_counts, this->secondary_calldata_read_tags,
266 this->return_data, this->return_data_read_counts, this->return_data_read_tags
267 };
268 }
269
271 {
272 return RefArray{
273 this->calldata_inverses,
274 this->secondary_calldata_inverses,
275 this->return_data_inverses,
276 };
277 }
282
283 MSGPACK_FIELDS(this->w_l,
284 this->w_r,
285 this->w_o,
286 this->w_4,
287 this->z_perm,
288 this->lookup_inverses,
289 this->lookup_read_counts,
290 this->lookup_read_tags,
291 this->ecc_op_wire_1,
292 this->ecc_op_wire_2,
293 this->ecc_op_wire_3,
294 this->ecc_op_wire_4,
295 this->calldata,
296 this->calldata_read_counts,
297 this->calldata_read_tags,
298 this->calldata_inverses,
299 this->secondary_calldata,
300 this->secondary_calldata_read_counts,
301 this->secondary_calldata_read_tags,
302 this->secondary_calldata_inverses,
303 this->return_data,
304 this->return_data_read_counts,
305 this->return_data_read_tags,
306 this->return_data_inverses);
307 };
308
312 template <typename DataType> class ShiftedEntities {
313 public:
314 DEFINE_FLAVOR_MEMBERS(DataType,
315 w_l_shift, // column 0
316 w_r_shift, // column 1
317 w_o_shift, // column 2
318 w_4_shift, // column 3
319 z_perm_shift) // column 4
320 };
321
322 public:
332 template <typename DataType>
347
352 class AllValues : public AllEntities<FF> {
353 public:
355 using Base::Base;
356 };
357
361 class ProverPolynomials : public AllEntities<Polynomial> {
362 public:
363 // Define all operations as default, except copy construction/assignment
364 ProverPolynomials() = default;
365 // fully-formed constructor
366 ProverPolynomials(size_t circuit_size)
367 {
368 PROFILE_THIS_NAME("ProverPolynomials(size_t)");
369
370 for (auto& poly : get_to_be_shifted()) {
371 poly = Polynomial{ /*memory size*/ circuit_size - 1,
372 /*largest possible index*/ circuit_size,
373 /* offset */ 1 };
374 }
375 // catch-all with fully formed polynomials
376 for (auto& poly : get_unshifted()) {
377 if (poly.is_empty()) {
378 // Not set above
379 poly = Polynomial{ /*memory size*/ circuit_size, /*largest possible index*/ circuit_size };
380 }
381 }
382 set_shifted();
383 }
386 ProverPolynomials(ProverPolynomials&& o) noexcept = default;
389 [[nodiscard]] size_t get_polynomial_size() const { return q_c.size(); }
390 [[nodiscard]] AllValues get_row(size_t row_idx) const
391 {
392 AllValues result;
393 for (auto [result_field, polynomial] : zip_view(result.get_all(), this->get_all())) {
394 result_field = polynomial[row_idx];
395 }
396 return result;
397 }
398
399 [[nodiscard]] AllValues get_row_for_permutation_arg(size_t row_idx)
400 {
401 AllValues result;
402 for (auto [result_field, polynomial] : zip_view(result.get_sigmas(), get_sigmas())) {
403 result_field = polynomial[row_idx];
404 }
405 for (auto [result_field, polynomial] : zip_view(result.get_ids(), get_ids())) {
406 result_field = polynomial[row_idx];
407 }
408 for (auto [result_field, polynomial] : zip_view(result.get_wires(), get_wires())) {
409 result_field = polynomial[row_idx];
410 }
411 return result;
412 }
413
415 {
416 for (auto [shifted, to_be_shifted] : zip_view(get_shifted(), get_to_be_shifted())) {
417 shifted = to_be_shifted.shifted();
418 }
419 }
420
421 void increase_polynomials_virtual_size(const size_t size_in)
422 {
423 for (auto& polynomial : this->get_all()) {
424 polynomial.increase_virtual_size(size_in);
425 }
426 }
427 };
428
430
440 class VerificationKey : public NativeVerificationKey_<PrecomputedEntities<Commitment>, Transcript> {
441 public:
442 // Serialized Verification Key length in fields
443 static constexpr size_t VERIFICATION_KEY_LENGTH =
444 /* 1. Metadata (log_circuit_size, num_public_inputs, pub_inputs_offset) */ (3 * num_frs_fr) +
445 /* 2. NUM_PRECOMPUTED_ENTITIES commitments */ (NUM_PRECOMPUTED_ENTITIES * num_frs_comm);
446
447 VerificationKey() = default;
448 VerificationKey(const size_t circuit_size, const size_t num_public_inputs)
450 {}
451
453
454 void set_metadata(const MetaData& metadata)
455 {
457 this->num_public_inputs = metadata.num_public_inputs;
458 this->pub_inputs_offset = metadata.pub_inputs_offset;
459 }
460
462 {
463 set_metadata(precomputed.metadata);
464
465 CommitmentKey commitment_key{ precomputed.metadata.dyadic_size };
466 for (auto [polynomial, commitment] : zip_view(precomputed.polynomials, this->get_all())) {
467 commitment = commitment_key.commit(polynomial);
468 }
469 }
470
471 // Don't statically check for object completeness.
472 using MSGPACK_NO_STATIC_CHECK = std::true_type;
476 q_m,
477 q_c,
478 q_l,
479 q_r,
480 q_o,
481 q_4,
482 q_busread,
483 q_lookup,
484 q_arith,
485 q_delta_range,
486 q_elliptic,
487 q_memory,
488 q_nnf,
489 q_poseidon2_external,
490 q_poseidon2_internal,
491 sigma_1,
492 sigma_2,
493 sigma_3,
494 sigma_4,
495 id_1,
496 id_2,
497 id_3,
498 id_4,
499 table_1,
500 table_2,
501 table_3,
502 table_4,
503 lagrange_first,
504 lagrange_last,
505 lagrange_ecc_op,
506 databus_id);
507 };
511 class PartiallyEvaluatedMultivariates : public AllEntities<Polynomial> {
512
513 public:
515 PartiallyEvaluatedMultivariates(const size_t circuit_size)
516 {
517 // Storage is only needed after the first partial evaluation, hence polynomials of size (n / 2)
518 for (auto& poly : this->get_all()) {
519 poly = Polynomial(circuit_size / 2);
520 }
521 }
522 PartiallyEvaluatedMultivariates(const ProverPolynomials& full_polynomials, size_t circuit_size)
523 {
524 for (auto [poly, full_poly] : zip_view(get_all(), full_polynomials.get_all())) {
525 // After the initial sumcheck round, the new size is CEIL(size/2).
526 size_t desired_size = full_poly.end_index() / 2 + full_poly.end_index() % 2;
527 poly = Polynomial(desired_size, circuit_size / 2);
528 }
529 }
530 };
531
537
543 template <size_t LENGTH, size_t SKIP_COUNT>
545
550
555
562 class CommitmentLabels : public AllEntities<std::string> {
563 public:
565 {
566 w_l = "W_L";
567 w_r = "W_R";
568 w_o = "W_O";
569 w_4 = "W_4";
570 z_perm = "Z_PERM";
571 lookup_inverses = "LOOKUP_INVERSES";
572 lookup_read_counts = "LOOKUP_READ_COUNTS";
573 lookup_read_tags = "LOOKUP_READ_TAGS";
574 ecc_op_wire_1 = "ECC_OP_WIRE_1";
575 ecc_op_wire_2 = "ECC_OP_WIRE_2";
576 ecc_op_wire_3 = "ECC_OP_WIRE_3";
577 ecc_op_wire_4 = "ECC_OP_WIRE_4";
578 calldata = "CALLDATA";
579 calldata_read_counts = "CALLDATA_READ_COUNTS";
580 calldata_read_tags = "CALLDATA_READ_TAGS";
581 calldata_inverses = "CALLDATA_INVERSES";
582 secondary_calldata = "SECONDARY_CALLDATA";
583 secondary_calldata_read_counts = "SECONDARY_CALLDATA_READ_COUNTS";
584 secondary_calldata_read_tags = "SECONDARY_CALLDATA_READ_TAGS";
585 secondary_calldata_inverses = "SECONDARY_CALLDATA_INVERSES";
586 return_data = "RETURN_DATA";
587 return_data_read_counts = "RETURN_DATA_READ_COUNTS";
588 return_data_read_tags = "RETURN_DATA_READ_TAGS";
589 return_data_inverses = "RETURN_DATA_INVERSES";
590
591 q_c = "Q_C";
592 q_l = "Q_L";
593 q_r = "Q_R";
594 q_o = "Q_O";
595 q_4 = "Q_4";
596 q_m = "Q_M";
597 q_busread = "Q_BUSREAD";
598 q_lookup = "Q_LOOKUP";
599 q_arith = "Q_ARITH";
600 q_delta_range = "Q_SORT";
601 q_elliptic = "Q_ELLIPTIC";
602 q_memory = "Q_MEMORY";
603 q_nnf = "Q_NNF";
604 q_poseidon2_external = "Q_POSEIDON2_EXTERNAL";
605 q_poseidon2_internal = "Q_POSEIDON2_INTERNAL";
606 sigma_1 = "SIGMA_1";
607 sigma_2 = "SIGMA_2";
608 sigma_3 = "SIGMA_3";
609 sigma_4 = "SIGMA_4";
610 id_1 = "ID_1";
611 id_2 = "ID_2";
612 id_3 = "ID_3";
613 id_4 = "ID_4";
614 table_1 = "TABLE_1";
615 table_2 = "TABLE_2";
616 table_3 = "TABLE_3";
617 table_4 = "TABLE_4";
618 lagrange_first = "LAGRANGE_FIRST";
619 lagrange_last = "LAGRANGE_LAST";
620 lagrange_ecc_op = "Q_ECC_OP_QUEUE";
621 };
622 };
623
627 template <typename Commitment, typename VerificationKey>
628 class VerifierCommitments_ : public AllEntities<Commitment> {
629 public:
630 VerifierCommitments_(const std::shared_ptr<VerificationKey>& verification_key,
631 const std::optional<WitnessEntities<Commitment>>& witness_commitments = std::nullopt)
632 {
633 // Copy the precomputed polynomial commitments into this
634 for (auto [precomputed, precomputed_in] : zip_view(this->get_precomputed(), verification_key->get_all())) {
635 precomputed = precomputed_in;
636 }
637
638 // If provided, copy the witness polynomial commitments into this
639 if (witness_commitments.has_value()) {
640 for (auto [witness, witness_in] :
641 zip_view(this->get_witness(), witness_commitments.value().get_all())) {
642 witness = witness_in;
643 }
644 }
645 }
646 };
647 // Specialize for Mega (general case used in MegaRecursive).
649};
650
651} // namespace bb
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
CommitmentKey object over a pairing group 𝔾₁.
static constexpr CircuitType CIRCUIT_TYPE
A base class labelling all entities (for instance, all of the polynomials used by the prover during s...
A field element for each entity of the flavor. These entities represent the prover polynomials evalua...
A container for commitment labels.
DEFINE_FLAVOR_MEMBERS(DataType, z_perm, lookup_inverses, lookup_read_counts, lookup_read_tags, ecc_op_wire_1, ecc_op_wire_2, ecc_op_wire_3, ecc_op_wire_4, calldata, calldata_read_counts, calldata_read_tags, calldata_inverses, secondary_calldata, secondary_calldata_read_counts, secondary_calldata_read_tags, secondary_calldata_inverses, return_data, return_data_read_counts, return_data_read_tags, return_data_inverses)
A container for storing the partially evaluated multivariates produced by sumcheck.
PartiallyEvaluatedMultivariates(const size_t circuit_size)
PartiallyEvaluatedMultivariates(const ProverPolynomials &full_polynomials, size_t circuit_size)
A base class labelling precomputed entities and (ordered) subsets of interest.
DEFINE_FLAVOR_MEMBERS(DataType, q_m, q_c, q_l, q_r, q_o, q_4, q_busread, q_lookup, q_arith, q_delta_range, q_elliptic, q_memory, q_nnf, q_poseidon2_external, q_poseidon2_internal, sigma_1, sigma_2, sigma_3, sigma_4, id_1, id_2, id_3, id_4, table_1, table_2, table_3, table_4, lagrange_first, lagrange_last, lagrange_ecc_op, databus_id) static const expr CircuitType CIRCUIT_TYPE
bool operator==(const PrecomputedEntities &) const =default
A container for the prover polynomials handles.
AllValues get_row(size_t row_idx) const
void increase_polynomials_virtual_size(const size_t size_in)
ProverPolynomials(const ProverPolynomials &o)=delete
ProverPolynomials & operator=(ProverPolynomials &&o) noexcept=default
ProverPolynomials & operator=(const ProverPolynomials &)=delete
ProverPolynomials(size_t circuit_size)
AllValues get_row_for_permutation_arg(size_t row_idx)
ProverPolynomials(ProverPolynomials &&o) noexcept=default
Class for ShiftedEntities, containing the shifted witness polynomials.
The verification key is responsible for storing the commitments to the precomputed (non-witness) poly...
VerificationKey(const PrecomputedData &precomputed)
VerificationKey(const size_t circuit_size, const size_t num_public_inputs)
static constexpr size_t VERIFICATION_KEY_LENGTH
void set_metadata(const MetaData &metadata)
MSGPACK_FIELDS(log_circuit_size, num_public_inputs, pub_inputs_offset, q_m, q_c, q_l, q_r, q_o, q_4, q_busread, q_lookup, q_arith, q_delta_range, q_elliptic, q_memory, q_nnf, q_poseidon2_external, q_poseidon2_internal, sigma_1, sigma_2, sigma_3, sigma_4, id_1, id_2, id_3, id_4, table_1, table_2, table_3, table_4, lagrange_first, lagrange_last, lagrange_ecc_op, databus_id)
VerificationKey(const VerificationKey &vk)=default
VerifierCommitments_(const std::shared_ptr< VerificationKey > &verification_key, const std::optional< WitnessEntities< Commitment > > &witness_commitments=std::nullopt)
DEFINE_FLAVOR_MEMBERS(DataType, w_l, w_r, w_o, w_4)
Container for all witness polynomials used/constructed by the prover.
MSGPACK_FIELDS(this->w_l, this->w_r, this->w_o, this->w_4, this->z_perm, this->lookup_inverses, this->lookup_read_counts, this->lookup_read_tags, this->ecc_op_wire_1, this->ecc_op_wire_2, this->ecc_op_wire_3, this->ecc_op_wire_4, this->calldata, this->calldata_read_counts, this->calldata_read_tags, this->calldata_inverses, this->secondary_calldata, this->secondary_calldata_read_counts, this->secondary_calldata_read_tags, this->secondary_calldata_inverses, this->return_data, this->return_data_read_counts, this->return_data_read_tags, this->return_data_inverses)
static constexpr size_t NUM_PRECOMPUTED_ENTITIES
decltype(create_protogalaxy_tuple_of_tuples_of_univariates< Relations, NUM_KEYS, true >()) ProtogalaxyTupleOfTuplesOfUnivariates
Curve::ScalarField FF
static constexpr size_t DECIDER_PROOF_LENGTH(size_t virtual_log_n=VIRTUAL_LOG_N)
static constexpr RepeatedCommitmentsData REPEATED_COMMITMENTS
static constexpr size_t NUM_WIRES
static constexpr size_t PROOF_LENGTH_WITHOUT_PUB_INPUTS(size_t virtual_log_n=VIRTUAL_LOG_N)
std::array< FF, NUM_SUBRELATIONS - 1 > SubrelationSeparators
static constexpr size_t MAX_TOTAL_RELATION_LENGTH
decltype(create_protogalaxy_tuple_of_tuples_of_univariates< Relations, NUM_KEYS >()) ProtogalaxyTupleOfTuplesOfUnivariatesNoOptimisticSkipping
static constexpr size_t NUM_SUBRELATIONS
Curve::Element GroupElement
static constexpr size_t OINK_PROOF_LENGTH_WITHOUT_PUB_INPUTS
static constexpr size_t num_frs_fr
static constexpr size_t NUM_RELATIONS
static constexpr size_t NUM_ALL_ENTITIES
static constexpr bool HasZK
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH
static constexpr size_t NUM_WITNESS_ENTITIES
static constexpr size_t NUM_SHIFTED_WITNESSES
static constexpr size_t VIRTUAL_LOG_N
bb::Polynomial< FF > Polynomial
Relations_< FF > Relations
static constexpr bool USE_SHORT_MONOMIALS
Curve::AffineElement Commitment
static constexpr bool USE_PADDING
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
static constexpr bool has_zero_row
static constexpr size_t num_frs_comm
static constexpr size_t NUM_FOLDED_ENTITIES
std::tuple< bb::UltraArithmeticRelation< FF >, bb::UltraPermutationRelation< FF >, bb::LogDerivLookupRelation< FF >, bb::DeltaRangeConstraintRelation< FF >, bb::EllipticRelation< FF >, bb::MemoryRelation< FF >, bb::NonNativeFieldRelation< FF >, bb::EccOpQueueRelation< FF >, bb::DatabusLookupRelation< FF >, bb::Poseidon2ExternalRelation< FF >, bb::Poseidon2InternalRelation< FF > > Relations_
Base Native verification key class.
Definition flavor.hpp:152
A template class for a reference array. Behaves as if std::array<T&, N> was possible.
Definition ref_array.hpp:22
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
typename Group::element Element
Definition bn254.hpp:21
typename Group::affine_element AffineElement
Definition bn254.hpp:22
bb::fr ScalarField
Definition bn254.hpp:18
constexpr size_t NUM_KEYS
Base class templates for structures that contain data parameterized by the fundamental polynomials of...
#define DEFINE_FLAVOR_MEMBERS(DataType,...)
Define the body of a flavor class, included each member and a pointer view with which to iterate the ...
#define DEFINE_COMPOUND_GET_ALL(...)
constexpr T get_msb(const T in)
Definition get_msb.hpp:47
Entry point for Barretenberg command-line interface.
constexpr auto create_protogalaxy_tuple_of_tuples_of_univariates()
Utility function to construct a container for the subrelation accumulators of Protogalaxy folding.
Definition flavor.hpp:400
RefArray< T,(Ns+...)> constexpr concatenate(const RefArray< T, Ns > &... ref_arrays)
Concatenates multiple RefArray objects into a single RefArray.
MegaCircuitBuilder_< field< Bn254FrParams > > MegaCircuitBuilder
BaseTranscript< NativeTranscriptParams > NativeTranscript
VerifierCommitmentKey< Curve > vk
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
#define PROFILE_THIS_NAME(name)
Definition op_count.hpp:16
std::vector< FF > calldata
Dyadic trace size and public inputs metadata; Common between prover and verifier keys.
Definition flavor.hpp:129
size_t pub_inputs_offset
Definition flavor.hpp:132
size_t num_public_inputs
Definition flavor.hpp:131
size_t dyadic_size
Definition flavor.hpp:130
The precomputed data needed to compute a Honk VK.
Definition flavor.hpp:138
RefArray< Polynomial, NUM_PRECOMPUTED_ENTITIES > polynomials
Definition flavor.hpp:139