barretenberg
Loading...
Searching...
No Matches
ecc_vm.hpp
1#pragma once
2#include "barretenberg/commitment_schemes/commitment_key.hpp"
3#include "barretenberg/commitment_schemes/ipa/ipa.hpp"
4#include "barretenberg/commitment_schemes/kzg/kzg.hpp"
5#include "barretenberg/common/std_array.hpp"
6#include "barretenberg/ecc/curves/bn254/bn254.hpp"
7#include "barretenberg/ecc/curves/grumpkin/grumpkin.hpp"
9#include "barretenberg/flavor/flavor_macros.hpp"
10#include "barretenberg/polynomials/univariate.hpp"
11#include "barretenberg/relations/ecc_vm/ecc_lookup_relation.hpp"
12#include "barretenberg/relations/ecc_vm/ecc_msm_relation.hpp"
13#include "barretenberg/relations/ecc_vm/ecc_point_table_relation.hpp"
14#include "barretenberg/relations/ecc_vm/ecc_set_relation.hpp"
15#include "barretenberg/relations/ecc_vm/ecc_transcript_relation.hpp"
16#include "barretenberg/relations/ecc_vm/ecc_wnaf_relation.hpp"
17#include "barretenberg/relations/relation_parameters.hpp"
18#include "barretenberg/relations/relation_types.hpp"
19#include "relation_definitions_fwd.hpp"
20#include <array>
21#include <concepts>
22#include <span>
23#include <string>
24#include <type_traits>
25#include <vector>
26
27// NOLINTBEGIN(cppcoreguidelines-avoid-const-or-ref-data-members)
28
29namespace proof_system::honk {
30namespace flavor {
31
32template <typename CycleGroup_T, typename Curve_T, typename PCS_T> class ECCVMBase {
33 public:
34 // forward template params into the ECCVMBase namespace
35 using CycleGroup = CycleGroup_T;
36 using Curve = Curve_T;
37 using G1 = typename Curve::Group;
38 using PCS = PCS_T;
39
40 using FF = typename G1::subgroup_field;
42 using PolynomialHandle = std::span<FF>;
43 using GroupElement = typename G1::element;
44 using Commitment = typename G1::affine_element;
45 using CommitmentHandle = typename G1::affine_element;
48
49 static constexpr size_t NUM_WIRES = 74;
50
51 // The number of multivariate polynomials on which a sumcheck prover sumcheck operates (including shifts). We often
52 // need containers of this size to hold related data, so we choose a name more agnostic than `NUM_POLYNOMIALS`.
53 // Note: this number does not include the individual sorted list polynomials.
54 static constexpr size_t NUM_ALL_ENTITIES = 105;
55 // The number of polynomials precomputed to describe a circuit and to aid a prover in constructing a satisfying
56 // assignment of witnesses. We again choose a neutral name.
57 static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 3;
58 // The total number of witness entities not including shifts.
59 static constexpr size_t NUM_WITNESS_ENTITIES = 76;
60
61 using GrandProductRelations = std::tuple<sumcheck::ECCVMSetRelation<FF>>;
62 // define the tuple of Relations that comprise the Sumcheck relation
63 using Relations = std::tuple<sumcheck::ECCVMTranscriptRelation<FF>,
69
71 static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();
72
73 // BATCHED_RELATION_PARTIAL_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta`
74 // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation
75 // length = 3
76 static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1;
77 static constexpr size_t NUM_RELATIONS = std::tuple_size<Relations>::value;
78
79 // Instantiate the BarycentricData needed to extend each Relation Univariate
80
81 // define the containers for storing the contributions from each relation in Sumcheck
82 using SumcheckTupleOfTuplesOfUnivariates = decltype(create_sumcheck_tuple_of_tuples_of_univariates<Relations>());
83 using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values<Relations>());
84
85 private:
90 template <typename DataType_> class PrecomputedEntities : public PrecomputedEntitiesBase {
91 public:
92 using DataType = DataType_;
93 DEFINE_FLAVOR_MEMBERS(DataType,
94 lagrange_first, // column 0
95 lagrange_second, // column 1
96 lagrange_last); // column 2
97
98 DataType get_selectors() { return get_all(); };
99 RefVector<DataType> get_sigma_polynomials() { return {}; };
100 RefVector<DataType> get_id_polynomials() { return {}; };
101 RefVector<DataType> get_table_polynomials() { return {}; };
102 };
103
108 template <typename DataType> struct DerivedWitnessEntities {
109 DEFINE_FLAVOR_MEMBERS(DataType,
110 z_perm, // column 0
111 lookup_inverses); // column 1
112 };
113
118 template <typename DataType> class WireEntities {
119 public:
120 DEFINE_FLAVOR_MEMBERS(DataType,
121 transcript_add, // column 0
122 transcript_mul, // column 1
123 transcript_eq, // column 2
124 transcript_collision_check, // column 3
125 transcript_msm_transition, // column 4
126 transcript_pc, // column 5
127 transcript_msm_count, // column 6
128 transcript_Px, // column 7
129 transcript_Py, // column 8
130 transcript_z1, // column 9
131 transcript_z2, // column 10
132 transcript_z1zero, // column 11
133 transcript_z2zero, // column 12
134 transcript_op, // column 13
135 transcript_accumulator_x, // column 14
136 transcript_accumulator_y, // column 15
137 transcript_msm_x, // column 16
138 transcript_msm_y, // column 17
139 precompute_pc, // column 18
140 precompute_point_transition, // column 19
141 precompute_round, // column 20
142 precompute_scalar_sum, // column 21
143 precompute_s1hi, // column 22
144 precompute_s1lo, // column 23
145 precompute_s2hi, // column 24
146 precompute_s2lo, // column 25
147 precompute_s3hi, // column 26
148 precompute_s3lo, // column 27
149 precompute_s4hi, // column 28
150 precompute_s4lo, // column 29
151 precompute_skew, // column 30
152 precompute_dx, // column 31
153 precompute_dy, // column 32
154 precompute_tx, // column 33
155 precompute_ty, // column 34
156 msm_transition, // column 35
157 msm_add, // column 36
158 msm_double, // column 37
159 msm_skew, // column 38
160 msm_accumulator_x, // column 39
161 msm_accumulator_y, // column 40
162 msm_pc, // column 41
163 msm_size_of_msm, // column 42
164 msm_count, // column 43
165 msm_round, // column 44
166 msm_add1, // column 45
167 msm_add2, // column 46
168 msm_add3, // column 47
169 msm_add4, // column 48
170 msm_x1, // column 49
171 msm_y1, // column 50
172 msm_x2, // column 51
173 msm_y2, // column 52
174 msm_x3, // column 53
175 msm_y3, // column 54
176 msm_x4, // column 55
177 msm_y4, // column 56
178 msm_collision_x1, // column 57
179 msm_collision_x2, // column 58
180 msm_collision_x3, // column 59
181 msm_collision_x4, // column 60
182 msm_lambda1, // column 61
183 msm_lambda2, // column 62
184 msm_lambda3, // column 63
185 msm_lambda4, // column 64
186 msm_slice1, // column 65
187 msm_slice2, // column 66
188 msm_slice3, // column 67
189 msm_slice4, // column 68
190 transcript_accumulator_empty, // column 69
191 transcript_reset_accumulator, // column 70
192 precompute_select, // column 71
193 lookup_read_counts_0, // column 72
194 lookup_read_counts_1); // column 73
195 };
196
201 template <typename DataType>
202 class WitnessEntities : public WireEntities<DataType>, public DerivedWitnessEntities<DataType> {
203 public:
204 DEFINE_COMPOUND_GET_ALL(WireEntities<DataType>, DerivedWitnessEntities<DataType>)
205 RefVector<DataType> get_wires() { return WireEntities<DataType>::get_all(); };
206 // The sorted concatenations of table and witness data needed for plookup.
207 RefVector<DataType> get_sorted_polynomials() { return {}; };
208 };
209
213 template <typename DataType> class ShiftedEntities {
214 public:
215 DEFINE_FLAVOR_MEMBERS(DataType,
216 transcript_mul_shift, // column 0
217 transcript_msm_count_shift, // column 1
218 transcript_accumulator_x_shift, // column 2
219 transcript_accumulator_y_shift, // column 3
220 precompute_scalar_sum_shift, // column 4
221 precompute_s1hi_shift, // column 5
222 precompute_dx_shift, // column 6
223 precompute_dy_shift, // column 7
224 precompute_tx_shift, // column 8
225 precompute_ty_shift, // column 9
226 msm_transition_shift, // column 10
227 msm_add_shift, // column 11
228 msm_double_shift, // column 12
229 msm_skew_shift, // column 13
230 msm_accumulator_x_shift, // column 14
231 msm_accumulator_y_shift, // column 15
232 msm_count_shift, // column 16
233 msm_round_shift, // column 17
234 msm_add1_shift, // column 18
235 msm_pc_shift, // column 19
236 precompute_pc_shift, // column 20
237 transcript_pc_shift, // column 21
238 precompute_round_shift, // column 22
239 transcript_accumulator_empty_shift, // column 23
240 precompute_select_shift, // column 24
241 z_perm_shift); // column 25
242 };
243
244 template <typename DataType, typename PrecomputedAndWitnessEntitiesSuperset>
245 static RefVector<DataType> get_to_be_shifted(PrecomputedAndWitnessEntitiesSuperset& entities)
246 {
247 // NOTE: must match order of ShiftedEntities above!
248 return { entities.transcript_mul,
249 entities.transcript_msm_count,
250 entities.transcript_accumulator_x,
251 entities.transcript_accumulator_y,
252 entities.precompute_scalar_sum,
253 entities.precompute_s1hi,
254 entities.precompute_dx,
255 entities.precompute_dy,
256 entities.precompute_tx,
257 entities.precompute_ty,
258 entities.msm_transition,
259 entities.msm_add,
260 entities.msm_double,
261 entities.msm_skew,
262 entities.msm_accumulator_x,
263 entities.msm_accumulator_y,
264 entities.msm_count,
265 entities.msm_round,
266 entities.msm_add1,
267 entities.msm_pc,
268 entities.precompute_pc,
269 entities.transcript_pc,
270 entities.precompute_round,
271 entities.transcript_accumulator_empty,
272 entities.precompute_select,
273 entities.z_perm };
274 }
285 template <typename DataType>
286 class AllEntities : public PrecomputedEntities<DataType>,
287 public WitnessEntities<DataType>,
288 public ShiftedEntities<DataType> {
289 public:
290 // Initialize members
291 AllEntities()
292 : PrecomputedEntities<DataType>{}
293 , WitnessEntities<DataType>{}
294 , ShiftedEntities<DataType>{}
295 {}
296 // get_wires is inherited
297
298 DEFINE_COMPOUND_GET_ALL(PrecomputedEntities<DataType>, WitnessEntities<DataType>, ShiftedEntities<DataType>)
299 // Gemini-specific getters.
300 RefVector<DataType> get_unshifted()
301 {
302 return concatenate(PrecomputedEntities<DataType>::get_all(), WitnessEntities<DataType>::get_all());
303 };
304
305 RefVector<DataType> get_to_be_shifted() { return ECCVMBase::get_to_be_shifted<DataType>(*this); }
306 RefVector<DataType> get_shifted() { return ShiftedEntities<DataType>::get_all(); };
307 };
308
309 public:
315 class ProvingKey : public ProvingKey_<PrecomputedEntities<Polynomial>, WitnessEntities<Polynomial>> {
316 public:
317 // Expose constructors on the base class
318 using Base = ProvingKey_<PrecomputedEntities<Polynomial>, WitnessEntities<Polynomial>>;
319 using Base::Base;
320
321 RefVector<Polynomial> get_to_be_shifted() { return ECCVMBase::get_to_be_shifted<Polynomial>(*this); }
322 // The plookup wires that store plookup read data.
323 std::array<PolynomialHandle, 3> get_table_column_wires() { return {}; };
324 };
325
335
340 using FoldedPolynomials = AllEntities<std::vector<FF>>;
341
346 class AllValues : public AllEntities<FF> {
347 public:
348 using Base = AllEntities<FF>;
349 using Base::Base;
350 AllValues(std::array<FF, NUM_ALL_ENTITIES> _data_in) { this->_data = _data_in; }
351 };
352
357 using RowPolynomials = AllEntities<FF>;
358
362 class PartiallyEvaluatedMultivariates : public AllEntities<Polynomial> {
363
364 public:
366 PartiallyEvaluatedMultivariates(const size_t circuit_size)
367 {
368 // Storage is only needed after the first partial evaluation, hence polynomials of size (n / 2)
369 for (auto& poly : this->get_all()) {
370 poly = Polynomial(circuit_size / 2);
371 }
372 }
373 };
374
378 template <size_t LENGTH> using ProverUnivariates = AllEntities<barretenberg::Univariate<FF, LENGTH>>;
379
384
388 class ProverPolynomials : public AllEntities<Polynomial> {
389 public:
390 // Define all operations as default, except move construction/assignment
391 ProverPolynomials() = default;
392 ProverPolynomials& operator=(const ProverPolynomials&) = delete;
393 ProverPolynomials(const ProverPolynomials& o) = delete;
394 ProverPolynomials(ProverPolynomials&& o) noexcept = default;
395 ProverPolynomials& operator=(ProverPolynomials&& o) noexcept = default;
396 ~ProverPolynomials() = default;
397 [[nodiscard]] size_t get_polynomial_size() const { return this->lagrange_first.size(); }
402 AllValues get_row(const size_t row_idx)
403 {
404 AllValues result;
405 for (auto [result_field, polynomial] : zip_view(result.get_all(), this->get_all())) {
406 result_field = polynomial[row_idx];
407 }
408 return result;
409 }
410 };
411
418 class CommitmentLabels : public AllEntities<std::string> {
419 private:
420 using Base = AllEntities<std::string>;
421
422 public:
424 : AllEntities<std::string>()
425 {
426 Base::transcript_add = "TRANSCRIPT_ADD";
427 Base::transcript_mul = "TRANSCRIPT_MUL";
428 Base::transcript_eq = "TRANSCRIPT_EQ";
429 Base::transcript_collision_check = "TRANSCRIPT_COLLISION_CHECK";
430 Base::transcript_msm_transition = "TRANSCRIPT_MSM_TRANSITION";
431 Base::transcript_pc = "TRANSCRIPT_PC";
432 Base::transcript_msm_count = "TRANSCRIPT_MSM_COUNT";
433 Base::transcript_Px = "TRANSCRIPT_PX";
434 Base::transcript_Py = "TRANSCRIPT_PY";
435 Base::transcript_z1 = "TRANSCRIPT_Z1";
436 Base::transcript_z2 = "TRANSCRIPT_Z2";
437 Base::transcript_z1zero = "TRANSCRIPT_Z1ZERO";
438 Base::transcript_z2zero = "TRANSCRIPT_Z2ZERO";
439 Base::transcript_op = "TRANSCRIPT_OP";
440 Base::transcript_accumulator_x = "TRANSCRIPT_ACCUMULATOR_X";
441 Base::transcript_accumulator_y = "TRANSCRIPT_ACCUMULATOR_Y";
442 Base::transcript_msm_x = "TRANSCRIPT_MSM_X";
443 Base::transcript_msm_y = "TRANSCRIPT_MSM_Y";
444 Base::precompute_pc = "PRECOMPUTE_PC";
445 Base::precompute_point_transition = "PRECOMPUTE_POINT_TRANSITION";
446 Base::precompute_round = "PRECOMPUTE_ROUND";
447 Base::precompute_scalar_sum = "PRECOMPUTE_SCALAR_SUM";
448 Base::precompute_s1hi = "PRECOMPUTE_S1HI";
449 Base::precompute_s1lo = "PRECOMPUTE_S1LO";
450 Base::precompute_s2hi = "PRECOMPUTE_S2HI";
451 Base::precompute_s2lo = "PRECOMPUTE_S2LO";
452 Base::precompute_s3hi = "PRECOMPUTE_S3HI";
453 Base::precompute_s3lo = "PRECOMPUTE_S3LO";
454 Base::precompute_s4hi = "PRECOMPUTE_S4HI";
455 Base::precompute_s4lo = "PRECOMPUTE_S4LO";
456 Base::precompute_skew = "PRECOMPUTE_SKEW";
457 Base::precompute_dx = "PRECOMPUTE_DX";
458 Base::precompute_dy = "PRECOMPUTE_DY";
459 Base::precompute_tx = "PRECOMPUTE_TX";
460 Base::precompute_ty = "PRECOMPUTE_TY";
461 Base::msm_transition = "MSM_TRANSITION";
462 Base::msm_add = "MSM_ADD";
463 Base::msm_double = "MSM_DOUBLE";
464 Base::msm_skew = "MSM_SKEW";
465 Base::msm_accumulator_x = "MSM_ACCUMULATOR_X";
466 Base::msm_accumulator_y = "MSM_ACCUMULATOR_Y";
467 Base::msm_pc = "MSM_PC";
468 Base::msm_size_of_msm = "MSM_SIZE_OF_MSM";
469 Base::msm_count = "MSM_COUNT";
470 Base::msm_round = "MSM_ROUND";
471 Base::msm_add1 = "MSM_ADD1";
472 Base::msm_add2 = "MSM_ADD2";
473 Base::msm_add3 = "MSM_ADD3";
474 Base::msm_add4 = "MSM_ADD4";
475 Base::msm_x1 = "MSM_X1";
476 Base::msm_y1 = "MSM_Y1";
477 Base::msm_x2 = "MSM_X2";
478 Base::msm_y2 = "MSM_Y2";
479 Base::msm_x3 = "MSM_X3";
480 Base::msm_y3 = "MSM_Y3";
481 Base::msm_x4 = "MSM_X4";
482 Base::msm_y4 = "MSM_Y4";
483 Base::msm_collision_x1 = "MSM_COLLISION_X1";
484 Base::msm_collision_x2 = "MSM_COLLISION_X2";
485 Base::msm_collision_x3 = "MSM_COLLISION_X3";
486 Base::msm_collision_x4 = "MSM_COLLISION_X4";
487 Base::msm_lambda1 = "MSM_LAMBDA1";
488 Base::msm_lambda2 = "MSM_LAMBDA2";
489 Base::msm_lambda3 = "MSM_LAMBDA3";
490 Base::msm_lambda4 = "MSM_LAMBDA4";
491 Base::msm_slice1 = "MSM_SLICE1";
492 Base::msm_slice2 = "MSM_SLICE2";
493 Base::msm_slice3 = "MSM_SLICE3";
494 Base::msm_slice4 = "MSM_SLICE4";
495 Base::transcript_accumulator_empty = "TRANSCRIPT_ACCUMULATOR_EMPTY";
496 Base::transcript_reset_accumulator = "TRANSCRIPT_RESET_ACCUMULATOR";
497 Base::precompute_select = "PRECOMPUTE_SELECT";
498 Base::lookup_read_counts_0 = "LOOKUP_READ_COUNTS_0";
499 Base::lookup_read_counts_1 = "LOOKUP_READ_COUNTS_1";
500 Base::z_perm = "Z_PERM";
501 Base::lookup_inverses = "LOOKUP_INVERSES";
502 // The ones beginning with "__" are only used for debugging
503 Base::lagrange_first = "__LAGRANGE_FIRST";
504 Base::lagrange_second = "__LAGRANGE_SECOND";
505 Base::lagrange_last = "__LAGRANGE_LAST";
506 };
507 };
508
509 class VerifierCommitments : public AllEntities<Commitment> {
510 public:
511 VerifierCommitments(const std::shared_ptr<VerificationKey>& verification_key)
512 {
513 this->lagrange_first = verification_key->lagrange_first;
514 this->lagrange_second = verification_key->lagrange_second;
515 this->lagrange_last = verification_key->lagrange_last;
516 }
517 };
518
523 class Transcript : public BaseTranscript {
524 public:
525 uint32_t circuit_size;
526 Commitment transcript_add_comm;
527 Commitment transcript_mul_comm;
528 Commitment transcript_eq_comm;
529 Commitment transcript_collision_check_comm;
530 Commitment transcript_msm_transition_comm;
531 Commitment transcript_pc_comm;
532 Commitment transcript_msm_count_comm;
533 Commitment transcript_Px_comm;
534 Commitment transcript_Py_comm;
535 Commitment transcript_z1_comm;
536 Commitment transcript_z2_comm;
537 Commitment transcript_z1zero_comm;
538 Commitment transcript_z2zero_comm;
539 Commitment transcript_op_comm;
540 Commitment transcript_accumulator_x_comm;
541 Commitment transcript_accumulator_y_comm;
542 Commitment transcript_msm_x_comm;
543 Commitment transcript_msm_y_comm;
544 Commitment precompute_pc_comm;
545 Commitment precompute_point_transition_comm;
546 Commitment precompute_round_comm;
547 Commitment precompute_scalar_sum_comm;
548 Commitment precompute_s1hi_comm;
549 Commitment precompute_s1lo_comm;
550 Commitment precompute_s2hi_comm;
551 Commitment precompute_s2lo_comm;
552 Commitment precompute_s3hi_comm;
553 Commitment precompute_s3lo_comm;
554 Commitment precompute_s4hi_comm;
555 Commitment precompute_s4lo_comm;
556 Commitment precompute_skew_comm;
557 Commitment precompute_dx_comm;
558 Commitment precompute_dy_comm;
559 Commitment precompute_tx_comm;
560 Commitment precompute_ty_comm;
561 Commitment msm_transition_comm;
562 Commitment msm_add_comm;
563 Commitment msm_double_comm;
564 Commitment msm_skew_comm;
565 Commitment msm_accumulator_x_comm;
566 Commitment msm_accumulator_y_comm;
567 Commitment msm_pc_comm;
568 Commitment msm_size_of_msm_comm;
569 Commitment msm_count_comm;
570 Commitment msm_round_comm;
571 Commitment msm_add1_comm;
572 Commitment msm_add2_comm;
573 Commitment msm_add3_comm;
574 Commitment msm_add4_comm;
575 Commitment msm_x1_comm;
576 Commitment msm_y1_comm;
577 Commitment msm_x2_comm;
578 Commitment msm_y2_comm;
579 Commitment msm_x3_comm;
580 Commitment msm_y3_comm;
581 Commitment msm_x4_comm;
582 Commitment msm_y4_comm;
583 Commitment msm_collision_x1_comm;
584 Commitment msm_collision_x2_comm;
585 Commitment msm_collision_x3_comm;
586 Commitment msm_collision_x4_comm;
587 Commitment msm_lambda1_comm;
588 Commitment msm_lambda2_comm;
589 Commitment msm_lambda3_comm;
590 Commitment msm_lambda4_comm;
591 Commitment msm_slice1_comm;
592 Commitment msm_slice2_comm;
593 Commitment msm_slice3_comm;
594 Commitment msm_slice4_comm;
595 Commitment transcript_accumulator_empty_comm;
596 Commitment transcript_reset_accumulator_comm;
597 Commitment precompute_select_comm;
598 Commitment lookup_read_counts_0_comm;
599 Commitment lookup_read_counts_1_comm;
600 Commitment z_perm_comm;
601 Commitment lookup_inverses_comm;
602 std::vector<barretenberg::Univariate<FF, BATCHED_RELATION_PARTIAL_LENGTH>> sumcheck_univariates;
603 std::array<FF, NUM_ALL_ENTITIES> sumcheck_evaluations;
604 std::vector<Commitment> gemini_univariate_comms;
605 std::vector<FF> gemini_a_evals;
606 Commitment shplonk_q_comm;
607 Commitment kzg_w_comm;
608 // the rest are only for Grumpkin
609 uint64_t ipa_poly_degree;
610 std::vector<Commitment> ipa_l_comms;
611 std::vector<Commitment> ipa_r_comms;
612 FF ipa_a_0_eval;
613
614 Transcript() = default;
615
616 Transcript(const std::vector<uint8_t>& proof)
617 : BaseTranscript(proof)
618 {}
619
620 void deserialize_full_transcript()
621 {
622 // take current proof and put them into the struct
623 size_t num_bytes_read = 0;
624 circuit_size =
625 BaseTranscript::template deserialize_from_buffer<uint32_t>(BaseTranscript::proof_data, num_bytes_read);
626 size_t log_n = numeric::get_msb(circuit_size);
627 transcript_add_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
628 BaseTranscript::proof_data, num_bytes_read);
629 transcript_mul_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
630 BaseTranscript::proof_data, num_bytes_read);
631 transcript_eq_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
632 BaseTranscript::proof_data, num_bytes_read);
633 transcript_collision_check_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
634 BaseTranscript::proof_data, num_bytes_read);
635 transcript_msm_transition_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
636 BaseTranscript::proof_data, num_bytes_read);
637 transcript_pc_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
638 BaseTranscript::proof_data, num_bytes_read);
639 transcript_msm_count_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
640 BaseTranscript::proof_data, num_bytes_read);
641 transcript_Px_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
642 BaseTranscript::proof_data, num_bytes_read);
643 transcript_Py_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
644 BaseTranscript::proof_data, num_bytes_read);
645 transcript_z1_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
646 BaseTranscript::proof_data, num_bytes_read);
647 transcript_z2_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
648 BaseTranscript::proof_data, num_bytes_read);
649 transcript_z1zero_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
650 BaseTranscript::proof_data, num_bytes_read);
651 transcript_z2zero_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
652 BaseTranscript::proof_data, num_bytes_read);
653 transcript_op_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
654 BaseTranscript::proof_data, num_bytes_read);
655 transcript_accumulator_x_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
656 BaseTranscript::proof_data, num_bytes_read);
657 transcript_accumulator_y_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
658 BaseTranscript::proof_data, num_bytes_read);
659 transcript_msm_x_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
660 BaseTranscript::proof_data, num_bytes_read);
661 transcript_msm_y_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
662 BaseTranscript::proof_data, num_bytes_read);
663 precompute_pc_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
664 BaseTranscript::proof_data, num_bytes_read);
665 precompute_point_transition_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
666 BaseTranscript::proof_data, num_bytes_read);
667 precompute_round_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
668 BaseTranscript::proof_data, num_bytes_read);
669 precompute_scalar_sum_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
670 BaseTranscript::proof_data, num_bytes_read);
671 precompute_s1hi_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
672 BaseTranscript::proof_data, num_bytes_read);
673 precompute_s1lo_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
674 BaseTranscript::proof_data, num_bytes_read);
675 precompute_s2hi_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
676 BaseTranscript::proof_data, num_bytes_read);
677 precompute_s2lo_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
678 BaseTranscript::proof_data, num_bytes_read);
679 precompute_s3hi_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
680 BaseTranscript::proof_data, num_bytes_read);
681 precompute_s3lo_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
682 BaseTranscript::proof_data, num_bytes_read);
683 precompute_s4hi_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
684 BaseTranscript::proof_data, num_bytes_read);
685 precompute_s4lo_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
686 BaseTranscript::proof_data, num_bytes_read);
687 precompute_skew_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
688 BaseTranscript::proof_data, num_bytes_read);
689 precompute_dx_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
690 BaseTranscript::proof_data, num_bytes_read);
691 precompute_dy_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
692 BaseTranscript::proof_data, num_bytes_read);
693 precompute_tx_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
694 BaseTranscript::proof_data, num_bytes_read);
695 precompute_ty_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
696 BaseTranscript::proof_data, num_bytes_read);
697 msm_transition_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
698 BaseTranscript::proof_data, num_bytes_read);
699 msm_add_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
700 num_bytes_read);
701 msm_double_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
702 num_bytes_read);
703 msm_skew_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
704 num_bytes_read);
705 msm_accumulator_x_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
706 BaseTranscript::proof_data, num_bytes_read);
707 msm_accumulator_y_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
708 BaseTranscript::proof_data, num_bytes_read);
709 msm_pc_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
710 num_bytes_read);
711 msm_size_of_msm_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
712 BaseTranscript::proof_data, num_bytes_read);
713 msm_count_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
714 num_bytes_read);
715 msm_round_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
716 num_bytes_read);
717 msm_add1_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
718 num_bytes_read);
719 msm_add2_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
720 num_bytes_read);
721 msm_add3_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
722 num_bytes_read);
723 msm_add4_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
724 num_bytes_read);
725 msm_x1_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
726 num_bytes_read);
727 msm_y1_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
728 num_bytes_read);
729 msm_x2_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
730 num_bytes_read);
731 msm_y2_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
732 num_bytes_read);
733 msm_x3_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
734 num_bytes_read);
735 msm_y3_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
736 num_bytes_read);
737 msm_x4_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
738 num_bytes_read);
739 msm_y4_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
740 num_bytes_read);
741 msm_collision_x1_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
742 BaseTranscript::proof_data, num_bytes_read);
743 msm_collision_x2_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
744 BaseTranscript::proof_data, num_bytes_read);
745 msm_collision_x3_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
746 BaseTranscript::proof_data, num_bytes_read);
747 msm_collision_x4_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
748 BaseTranscript::proof_data, num_bytes_read);
749 msm_lambda1_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
750 num_bytes_read);
751 msm_lambda2_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
752 num_bytes_read);
753 msm_lambda3_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
754 num_bytes_read);
755 msm_lambda4_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
756 num_bytes_read);
757 msm_slice1_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
758 num_bytes_read);
759 msm_slice2_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
760 num_bytes_read);
761 msm_slice3_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
762 num_bytes_read);
763 msm_slice4_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
764 num_bytes_read);
765 transcript_accumulator_empty_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
766 BaseTranscript::proof_data, num_bytes_read);
767 transcript_reset_accumulator_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
768 BaseTranscript::proof_data, num_bytes_read);
769 precompute_select_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
770 BaseTranscript::proof_data, num_bytes_read);
771 lookup_read_counts_0_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
772 BaseTranscript::proof_data, num_bytes_read);
773 lookup_read_counts_1_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
774 BaseTranscript::proof_data, num_bytes_read);
775 lookup_inverses_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(
776 BaseTranscript::proof_data, num_bytes_read);
777 z_perm_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
778 num_bytes_read);
779 for (size_t i = 0; i < log_n; ++i) {
780 sumcheck_univariates.emplace_back(BaseTranscript::template deserialize_from_buffer<
782 BaseTranscript::proof_data, num_bytes_read));
783 }
784 sumcheck_evaluations = BaseTranscript::template deserialize_from_buffer<std::array<FF, NUM_ALL_ENTITIES>>(
785 BaseTranscript::proof_data, num_bytes_read);
786 for (size_t i = 0; i < log_n - 1; ++i) {
787 gemini_univariate_comms.emplace_back(BaseTranscript::template deserialize_from_buffer<Commitment>(
788 BaseTranscript::proof_data, num_bytes_read));
789 }
790 for (size_t i = 0; i < log_n; ++i) {
791 gemini_a_evals.emplace_back(
792 BaseTranscript::template deserialize_from_buffer<FF>(BaseTranscript::proof_data, num_bytes_read));
793 }
794 shplonk_q_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
795 num_bytes_read);
796 if (std::is_same<PCS, pcs::kzg::KZG<curve::BN254>>::value) {
797 kzg_w_comm = BaseTranscript::template deserialize_from_buffer<Commitment>(BaseTranscript::proof_data,
798 num_bytes_read);
799 } else if (std::is_same<PCS, pcs::ipa::IPA<curve::Grumpkin>>::value) {
800 ipa_poly_degree = BaseTranscript::template deserialize_from_buffer<uint64_t>(BaseTranscript::proof_data,
801 num_bytes_read);
802 auto log_poly_degree = static_cast<size_t>(numeric::get_msb(ipa_poly_degree));
803 for (size_t i = 0; i < log_poly_degree; ++i) {
804 ipa_l_comms.emplace_back(BaseTranscript::template deserialize_from_buffer<Commitment>(
805 BaseTranscript::proof_data, num_bytes_read));
806 ipa_r_comms.emplace_back(BaseTranscript::template deserialize_from_buffer<Commitment>(
807 BaseTranscript::proof_data, num_bytes_read));
808 }
809 ipa_a_0_eval =
810 BaseTranscript::template deserialize_from_buffer<FF>(BaseTranscript::proof_data, num_bytes_read);
811 } else {
812 throw_or_abort("Unsupported PCS");
813 }
814 }
815
816 void serialize_full_transcript()
817 {
818 size_t old_proof_length = BaseTranscript::proof_data.size();
819 BaseTranscript::proof_data.clear();
820 size_t log_n = numeric::get_msb(circuit_size);
821
822 BaseTranscript::template serialize_to_buffer(circuit_size, BaseTranscript::proof_data);
823 BaseTranscript::template serialize_to_buffer(transcript_add_comm, BaseTranscript::proof_data);
824 BaseTranscript::template serialize_to_buffer(transcript_mul_comm, BaseTranscript::proof_data);
825 BaseTranscript::template serialize_to_buffer(transcript_eq_comm, BaseTranscript::proof_data);
826 BaseTranscript::template serialize_to_buffer(transcript_collision_check_comm, BaseTranscript::proof_data);
827 BaseTranscript::template serialize_to_buffer(transcript_msm_transition_comm, BaseTranscript::proof_data);
828 BaseTranscript::template serialize_to_buffer(transcript_pc_comm, BaseTranscript::proof_data);
829 BaseTranscript::template serialize_to_buffer(transcript_msm_count_comm, BaseTranscript::proof_data);
830 BaseTranscript::template serialize_to_buffer(transcript_Px_comm, BaseTranscript::proof_data);
831 BaseTranscript::template serialize_to_buffer(transcript_Py_comm, BaseTranscript::proof_data);
832 BaseTranscript::template serialize_to_buffer(transcript_z1_comm, BaseTranscript::proof_data);
833 BaseTranscript::template serialize_to_buffer(transcript_z2_comm, BaseTranscript::proof_data);
834 BaseTranscript::template serialize_to_buffer(transcript_z1zero_comm, BaseTranscript::proof_data);
835 BaseTranscript::template serialize_to_buffer(transcript_z2zero_comm, BaseTranscript::proof_data);
836 BaseTranscript::template serialize_to_buffer(transcript_op_comm, BaseTranscript::proof_data);
837 BaseTranscript::template serialize_to_buffer(transcript_accumulator_x_comm, BaseTranscript::proof_data);
838 BaseTranscript::template serialize_to_buffer(transcript_accumulator_y_comm, BaseTranscript::proof_data);
839 BaseTranscript::template serialize_to_buffer(transcript_msm_x_comm, BaseTranscript::proof_data);
840 BaseTranscript::template serialize_to_buffer(transcript_msm_y_comm, BaseTranscript::proof_data);
841 BaseTranscript::template serialize_to_buffer(precompute_pc_comm, BaseTranscript::proof_data);
842 BaseTranscript::template serialize_to_buffer(precompute_point_transition_comm, BaseTranscript::proof_data);
843 BaseTranscript::template serialize_to_buffer(precompute_round_comm, BaseTranscript::proof_data);
844 BaseTranscript::template serialize_to_buffer(precompute_scalar_sum_comm, BaseTranscript::proof_data);
845 BaseTranscript::template serialize_to_buffer(precompute_s1hi_comm, BaseTranscript::proof_data);
846 BaseTranscript::template serialize_to_buffer(precompute_s1lo_comm, BaseTranscript::proof_data);
847 BaseTranscript::template serialize_to_buffer(precompute_s2hi_comm, BaseTranscript::proof_data);
848 BaseTranscript::template serialize_to_buffer(precompute_s2lo_comm, BaseTranscript::proof_data);
849 BaseTranscript::template serialize_to_buffer(precompute_s3hi_comm, BaseTranscript::proof_data);
850 BaseTranscript::template serialize_to_buffer(precompute_s3lo_comm, BaseTranscript::proof_data);
851 BaseTranscript::template serialize_to_buffer(precompute_s4hi_comm, BaseTranscript::proof_data);
852 BaseTranscript::template serialize_to_buffer(precompute_s4lo_comm, BaseTranscript::proof_data);
853 BaseTranscript::template serialize_to_buffer(precompute_skew_comm, BaseTranscript::proof_data);
854 BaseTranscript::template serialize_to_buffer(precompute_dx_comm, BaseTranscript::proof_data);
855 BaseTranscript::template serialize_to_buffer(precompute_dy_comm, BaseTranscript::proof_data);
856 BaseTranscript::template serialize_to_buffer(precompute_tx_comm, BaseTranscript::proof_data);
857 BaseTranscript::template serialize_to_buffer(precompute_ty_comm, BaseTranscript::proof_data);
858 BaseTranscript::template serialize_to_buffer(msm_transition_comm, BaseTranscript::proof_data);
859 BaseTranscript::template serialize_to_buffer(msm_add_comm, BaseTranscript::proof_data);
860 BaseTranscript::template serialize_to_buffer(msm_double_comm, BaseTranscript::proof_data);
861 BaseTranscript::template serialize_to_buffer(msm_skew_comm, BaseTranscript::proof_data);
862 BaseTranscript::template serialize_to_buffer(msm_accumulator_x_comm, BaseTranscript::proof_data);
863 BaseTranscript::template serialize_to_buffer(msm_accumulator_y_comm, BaseTranscript::proof_data);
864 BaseTranscript::template serialize_to_buffer(msm_pc_comm, BaseTranscript::proof_data);
865 BaseTranscript::template serialize_to_buffer(msm_size_of_msm_comm, BaseTranscript::proof_data);
866 BaseTranscript::template serialize_to_buffer(msm_count_comm, BaseTranscript::proof_data);
867 BaseTranscript::template serialize_to_buffer(msm_round_comm, BaseTranscript::proof_data);
868 BaseTranscript::template serialize_to_buffer(msm_add1_comm, BaseTranscript::proof_data);
869 BaseTranscript::template serialize_to_buffer(msm_add2_comm, BaseTranscript::proof_data);
870 BaseTranscript::template serialize_to_buffer(msm_add3_comm, BaseTranscript::proof_data);
871 BaseTranscript::template serialize_to_buffer(msm_add4_comm, BaseTranscript::proof_data);
872 BaseTranscript::template serialize_to_buffer(msm_x1_comm, BaseTranscript::proof_data);
873 BaseTranscript::template serialize_to_buffer(msm_y1_comm, BaseTranscript::proof_data);
874 BaseTranscript::template serialize_to_buffer(msm_x2_comm, BaseTranscript::proof_data);
875 BaseTranscript::template serialize_to_buffer(msm_y2_comm, BaseTranscript::proof_data);
876 BaseTranscript::template serialize_to_buffer(msm_x3_comm, BaseTranscript::proof_data);
877 BaseTranscript::template serialize_to_buffer(msm_y3_comm, BaseTranscript::proof_data);
878 BaseTranscript::template serialize_to_buffer(msm_x4_comm, BaseTranscript::proof_data);
879 BaseTranscript::template serialize_to_buffer(msm_y4_comm, BaseTranscript::proof_data);
880 BaseTranscript::template serialize_to_buffer(msm_collision_x1_comm, BaseTranscript::proof_data);
881 BaseTranscript::template serialize_to_buffer(msm_collision_x2_comm, BaseTranscript::proof_data);
882 BaseTranscript::template serialize_to_buffer(msm_collision_x3_comm, BaseTranscript::proof_data);
883 BaseTranscript::template serialize_to_buffer(msm_collision_x4_comm, BaseTranscript::proof_data);
884 BaseTranscript::template serialize_to_buffer(msm_lambda1_comm, BaseTranscript::proof_data);
885 BaseTranscript::template serialize_to_buffer(msm_lambda2_comm, BaseTranscript::proof_data);
886 BaseTranscript::template serialize_to_buffer(msm_lambda3_comm, BaseTranscript::proof_data);
887 BaseTranscript::template serialize_to_buffer(msm_lambda4_comm, BaseTranscript::proof_data);
888 BaseTranscript::template serialize_to_buffer(msm_slice1_comm, BaseTranscript::proof_data);
889 BaseTranscript::template serialize_to_buffer(msm_slice2_comm, BaseTranscript::proof_data);
890 BaseTranscript::template serialize_to_buffer(msm_slice3_comm, BaseTranscript::proof_data);
891 BaseTranscript::template serialize_to_buffer(msm_slice4_comm, BaseTranscript::proof_data);
892 BaseTranscript::template serialize_to_buffer(transcript_accumulator_empty_comm, BaseTranscript::proof_data);
893 BaseTranscript::template serialize_to_buffer(transcript_reset_accumulator_comm, BaseTranscript::proof_data);
894 BaseTranscript::template serialize_to_buffer(precompute_select_comm, BaseTranscript::proof_data);
895 BaseTranscript::template serialize_to_buffer(lookup_read_counts_0_comm, BaseTranscript::proof_data);
896 BaseTranscript::template serialize_to_buffer(lookup_read_counts_1_comm, BaseTranscript::proof_data);
897 BaseTranscript::template serialize_to_buffer(lookup_inverses_comm, BaseTranscript::proof_data);
898 BaseTranscript::template serialize_to_buffer(z_perm_comm, BaseTranscript::proof_data);
899 for (size_t i = 0; i < log_n; ++i) {
900 BaseTranscript::template serialize_to_buffer(sumcheck_univariates[i], BaseTranscript::proof_data);
901 }
902 BaseTranscript::template serialize_to_buffer(sumcheck_evaluations, BaseTranscript::proof_data);
903 for (size_t i = 0; i < log_n - 1; ++i) {
904 BaseTranscript::template serialize_to_buffer(gemini_univariate_comms[i], BaseTranscript::proof_data);
905 }
906 for (size_t i = 0; i < log_n; ++i) {
907 BaseTranscript::template serialize_to_buffer(gemini_a_evals[i], BaseTranscript::proof_data);
908 }
909 BaseTranscript::template serialize_to_buffer(shplonk_q_comm, BaseTranscript::proof_data);
910 if (std::is_same<PCS, pcs::kzg::KZG<curve::BN254>>::value) {
911 BaseTranscript::template serialize_to_buffer(kzg_w_comm, BaseTranscript::proof_data);
912 } else if (std::is_same<PCS, pcs::ipa::IPA<curve::Grumpkin>>::value) {
913 BaseTranscript::template serialize_to_buffer(ipa_poly_degree, BaseTranscript::proof_data);
914 auto log_poly_degree = static_cast<size_t>(numeric::get_msb(ipa_poly_degree));
915 for (size_t i = 0; i < log_poly_degree; ++i) {
916 BaseTranscript::template serialize_to_buffer(ipa_l_comms[i], BaseTranscript::proof_data);
917 BaseTranscript::template serialize_to_buffer(ipa_r_comms[i], BaseTranscript::proof_data);
918 }
919
920 BaseTranscript::template serialize_to_buffer(ipa_a_0_eval, BaseTranscript::proof_data);
921 }
922 ASSERT(BaseTranscript::proof_data.size() == old_proof_length);
923 }
924 };
925};
926
927class ECCVM : public ECCVMBase<barretenberg::g1, curve::Grumpkin, pcs::ipa::IPA<curve::Grumpkin>> {};
928
929// NOLINTEND(cppcoreguidelines-avoid-const-or-ref-data-members)
930
931} // namespace flavor
932namespace sumcheck {
933
934extern template class ECCVMTranscriptRelationImpl<grumpkin::fr>;
935extern template class ECCVMWnafRelationImpl<grumpkin::fr>;
936extern template class ECCVMPointTableRelationImpl<grumpkin::fr>;
937extern template class ECCVMMSMRelationImpl<grumpkin::fr>;
938extern template class ECCVMSetRelationImpl<grumpkin::fr>;
939extern template class ECCVMLookupRelationImpl<grumpkin::fr>;
940
941DECLARE_SUMCHECK_RELATION_CLASS(ECCVMTranscriptRelationImpl, flavor::ECCVM);
942DECLARE_SUMCHECK_RELATION_CLASS(ECCVMWnafRelationImpl, flavor::ECCVM);
943DECLARE_SUMCHECK_RELATION_CLASS(ECCVMPointTableRelationImpl, flavor::ECCVM);
944DECLARE_SUMCHECK_RELATION_CLASS(ECCVMMSMRelationImpl, flavor::ECCVM);
945DECLARE_SUMCHECK_RELATION_CLASS(ECCVMSetRelationImpl, flavor::ECCVM);
946DECLARE_SUMCHECK_RELATION_CLASS(ECCVMLookupRelationImpl, flavor::ECCVM);
947
948DECLARE_SUMCHECK_PERMUTATION_CLASS(ECCVMSetRelationImpl, flavor::ECCVM);
949} // namespace sumcheck
950} // namespace proof_system::honk
A template class for a reference vector. Behaves as if std::vector<T&> was possible.
Definition: ref_vector.hpp:20
Definition: polynomial.hpp:12
A univariate polynomial represented by its values on {domain_start, domain_start + 1,...
Definition: univariate.hpp:23
The templates defined herein facilitate sharing the relation arithmetic between the prover and the ve...
Definition: relation_types.hpp:121
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
Definition: transcript.hpp:62
T deserialize_from_buffer(const Proof &proof_data, size_t &offset) const
Deserializes the bytes starting at offset into the typed element and returns that element.
Definition: transcript.hpp:180
void serialize_to_buffer(const T &element, Proof &proof_data)
Serializes object and appends it to proof_data.
Definition: transcript.hpp:166
A field element for each entity of the flavor. These entities represent the prover polynomials evalua...
Definition: ecc_vm.hpp:346
A container for commitment labels.
Definition: ecc_vm.hpp:418
A container for storing the partially evaluated multivariates produced by sumcheck.
Definition: ecc_vm.hpp:362
A container for the prover polynomials.
Definition: ecc_vm.hpp:388
AllValues get_row(const size_t row_idx)
Returns the evaluations of all prover polynomials at one point on the boolean hypercube,...
Definition: ecc_vm.hpp:402
The proving key is responsible for storing the polynomials used by the prover.
Definition: ecc_vm.hpp:315
Derived class that defines proof structure for ECCVM proofs, as well as supporting functions.
Definition: ecc_vm.hpp:523
Definition: ecc_vm.hpp:32
AllEntities< barretenberg::Univariate< FF, LENGTH > > ProverUnivariates
A container for univariates used during sumcheck.
Definition: ecc_vm.hpp:378
AllEntities< std::vector< FF > > FoldedPolynomials
A container for polynomials produced after the first round of sumcheck.
Definition: ecc_vm.hpp:340
AllEntities< FF > RowPolynomials
A container for polynomials produced after the first round of sumcheck.
Definition: ecc_vm.hpp:357
ProverUnivariates< MAX_PARTIAL_RELATION_LENGTH > ExtendedEdges
A container for univariates produced during the hot loop in sumcheck.
Definition: ecc_vm.hpp:383
Definition: ecc_vm.hpp:927
Base class template containing circuit-specifying data.
Definition: flavor.hpp:85
Base proving key class.
Definition: flavor.hpp:101
CommitmentKey object over a pairing group 𝔾₁.
Definition: commitment_key.hpp:35
Definition: verification_key.hpp:25
Definition: ipa.hpp:18
Definition: kzg.hpp:14
Definition: zip_view.hpp:159
Base class templates for structures that contain data parameterized by the fundamental polynomials of...
Defines particular circuit builder types expected to be used for circuit construction in stdlib and c...
Definition: claim.hpp:6