51 static constexpr bool HasZK =
true;
108 "Translator circuit is too small for defined number of steps "
109 "(TranslatorDeltaRangeConstraintRelation). ");
162 template <
typename FF>
183 "LIBRA_UNIVARIATES_LENGTH must be equal to Translator::BATCHED_RELATION_PARTIAL_LENGTH");
186 static constexpr size_t num_frs_comm = FrCodec::calc_num_fields<Commitment>();
187 static constexpr size_t num_frs_fr = FrCodec::calc_num_fields<FF>();
188 static constexpr size_t num_frs_fq = FrCodec::calc_num_fields<BF>();
222 ordered_extra_range_constraints_numerator,
227 lagrange_odd_in_minicircuit,
228 lagrange_even_in_minicircuit,
230 lagrange_last_in_minicircuit,
232 lagrange_mini_masking,
239 interleaved_range_constraints_0,
240 interleaved_range_constraints_1,
241 interleaved_range_constraints_2,
242 interleaved_range_constraints_3)
256 accumulators_binary_limbs_0,
257 accumulators_binary_limbs_1,
258 accumulators_binary_limbs_2,
259 accumulators_binary_limbs_3,
260 quotient_low_binary_limbs,
261 quotient_high_binary_limbs,
263 p_x_low_limbs_range_constraint_0,
264 p_x_low_limbs_range_constraint_1,
265 p_x_low_limbs_range_constraint_2,
266 p_x_low_limbs_range_constraint_3,
267 p_x_low_limbs_range_constraint_4,
268 p_x_low_limbs_range_constraint_tail,
269 p_x_high_limbs_range_constraint_0,
270 p_x_high_limbs_range_constraint_1,
271 p_x_high_limbs_range_constraint_2,
272 p_x_high_limbs_range_constraint_3,
273 p_x_high_limbs_range_constraint_4,
274 p_x_high_limbs_range_constraint_tail,
275 p_y_low_limbs_range_constraint_0,
276 p_y_low_limbs_range_constraint_1,
277 p_y_low_limbs_range_constraint_2,
278 p_y_low_limbs_range_constraint_3,
279 p_y_low_limbs_range_constraint_4,
280 p_y_low_limbs_range_constraint_tail,
281 p_y_high_limbs_range_constraint_0,
282 p_y_high_limbs_range_constraint_1,
283 p_y_high_limbs_range_constraint_2,
284 p_y_high_limbs_range_constraint_3,
285 p_y_high_limbs_range_constraint_4,
286 p_y_high_limbs_range_constraint_tail,
287 z_low_limbs_range_constraint_0,
288 z_low_limbs_range_constraint_1,
289 z_low_limbs_range_constraint_2,
290 z_low_limbs_range_constraint_3,
291 z_low_limbs_range_constraint_4,
292 z_low_limbs_range_constraint_tail,
293 z_high_limbs_range_constraint_0,
294 z_high_limbs_range_constraint_1,
295 z_high_limbs_range_constraint_2,
296 z_high_limbs_range_constraint_3,
297 z_high_limbs_range_constraint_4,
298 z_high_limbs_range_constraint_tail,
299 accumulator_low_limbs_range_constraint_0,
300 accumulator_low_limbs_range_constraint_1,
301 accumulator_low_limbs_range_constraint_2,
302 accumulator_low_limbs_range_constraint_3,
303 accumulator_low_limbs_range_constraint_4,
304 accumulator_low_limbs_range_constraint_tail,
305 accumulator_high_limbs_range_constraint_0,
306 accumulator_high_limbs_range_constraint_1,
307 accumulator_high_limbs_range_constraint_2,
308 accumulator_high_limbs_range_constraint_3,
309 accumulator_high_limbs_range_constraint_4,
310 accumulator_high_limbs_range_constraint_tail,
311 quotient_low_limbs_range_constraint_0,
312 quotient_low_limbs_range_constraint_1,
313 quotient_low_limbs_range_constraint_2,
314 quotient_low_limbs_range_constraint_3,
315 quotient_low_limbs_range_constraint_4,
316 quotient_low_limbs_range_constraint_tail,
317 quotient_high_limbs_range_constraint_0,
318 quotient_high_limbs_range_constraint_1,
319 quotient_high_limbs_range_constraint_2,
320 quotient_high_limbs_range_constraint_3,
321 quotient_high_limbs_range_constraint_4,
322 quotient_high_limbs_range_constraint_tail,
323 relation_wide_limbs_range_constraint_0,
324 relation_wide_limbs_range_constraint_1,
325 relation_wide_limbs_range_constraint_2,
326 relation_wide_limbs_range_constraint_3);
343 template <
typename DataType>
356 ordered_range_constraints_0,
357 ordered_range_constraints_1,
358 ordered_range_constraints_2,
359 ordered_range_constraints_3,
360 ordered_range_constraints_4);
389 template <
typename DataType>
480 this->p_x_low_limbs_range_constraint_0,
481 this->p_x_low_limbs_range_constraint_1,
482 this->p_x_low_limbs_range_constraint_2,
483 this->p_x_low_limbs_range_constraint_3,
484 this->p_x_low_limbs_range_constraint_4,
485 this->p_x_low_limbs_range_constraint_tail,
486 this->p_x_high_limbs_range_constraint_0,
487 this->p_x_high_limbs_range_constraint_1,
488 this->p_x_high_limbs_range_constraint_2,
489 this->p_x_high_limbs_range_constraint_3,
490 this->p_x_high_limbs_range_constraint_4,
491 this->p_x_high_limbs_range_constraint_tail,
492 this->p_y_low_limbs_range_constraint_0,
493 this->p_y_low_limbs_range_constraint_1,
494 this->p_y_low_limbs_range_constraint_2,
495 this->p_y_low_limbs_range_constraint_3,
498 this->p_y_low_limbs_range_constraint_4,
499 this->p_y_low_limbs_range_constraint_tail,
500 this->p_y_high_limbs_range_constraint_0,
501 this->p_y_high_limbs_range_constraint_1,
502 this->p_y_high_limbs_range_constraint_2,
503 this->p_y_high_limbs_range_constraint_3,
504 this->p_y_high_limbs_range_constraint_4,
505 this->p_y_high_limbs_range_constraint_tail,
506 this->z_low_limbs_range_constraint_0,
507 this->z_low_limbs_range_constraint_1,
508 this->z_low_limbs_range_constraint_2,
509 this->z_low_limbs_range_constraint_3,
510 this->z_low_limbs_range_constraint_4,
511 this->z_low_limbs_range_constraint_tail,
512 this->z_high_limbs_range_constraint_0,
513 this->z_high_limbs_range_constraint_1,
516 this->z_high_limbs_range_constraint_2,
517 this->z_high_limbs_range_constraint_3,
518 this->z_high_limbs_range_constraint_4,
519 this->z_high_limbs_range_constraint_tail,
520 this->accumulator_low_limbs_range_constraint_0,
521 this->accumulator_low_limbs_range_constraint_1,
522 this->accumulator_low_limbs_range_constraint_2,
523 this->accumulator_low_limbs_range_constraint_3,
524 this->accumulator_low_limbs_range_constraint_4,
525 this->accumulator_low_limbs_range_constraint_tail,
526 this->accumulator_high_limbs_range_constraint_0,
527 this->accumulator_high_limbs_range_constraint_1,
528 this->accumulator_high_limbs_range_constraint_2,
529 this->accumulator_high_limbs_range_constraint_3,
530 this->accumulator_high_limbs_range_constraint_4,
531 this->accumulator_high_limbs_range_constraint_tail,
534 this->quotient_low_limbs_range_constraint_0,
535 this->quotient_low_limbs_range_constraint_1,
536 this->quotient_low_limbs_range_constraint_2,
537 this->quotient_low_limbs_range_constraint_3,
538 this->quotient_low_limbs_range_constraint_4,
539 this->quotient_low_limbs_range_constraint_tail,
540 this->quotient_high_limbs_range_constraint_0,
541 this->quotient_high_limbs_range_constraint_1,
542 this->quotient_high_limbs_range_constraint_2,
543 this->quotient_high_limbs_range_constraint_3,
544 this->quotient_high_limbs_range_constraint_4,
545 this->quotient_high_limbs_range_constraint_tail,
546 this->relation_wide_limbs_range_constraint_0,
547 this->relation_wide_limbs_range_constraint_1,
548 this->relation_wide_limbs_range_constraint_2,
549 this->relation_wide_limbs_range_constraint_3,
565 p_x_high_limbs_shift,
567 p_y_high_limbs_shift,
570 accumulators_binary_limbs_0_shift,
571 accumulators_binary_limbs_1_shift,
572 accumulators_binary_limbs_2_shift,
573 accumulators_binary_limbs_3_shift,
574 quotient_low_binary_limbs_shift,
575 quotient_high_binary_limbs_shift,
576 relation_wide_limbs_shift,
577 p_x_low_limbs_range_constraint_0_shift,
578 p_x_low_limbs_range_constraint_1_shift,
579 p_x_low_limbs_range_constraint_2_shift,
580 p_x_low_limbs_range_constraint_3_shift,
581 p_x_low_limbs_range_constraint_4_shift,
582 p_x_low_limbs_range_constraint_tail_shift,
583 p_x_high_limbs_range_constraint_0_shift,
584 p_x_high_limbs_range_constraint_1_shift,
585 p_x_high_limbs_range_constraint_2_shift,
586 p_x_high_limbs_range_constraint_3_shift,
587 p_x_high_limbs_range_constraint_4_shift,
588 p_x_high_limbs_range_constraint_tail_shift,
589 p_y_low_limbs_range_constraint_0_shift,
590 p_y_low_limbs_range_constraint_1_shift,
591 p_y_low_limbs_range_constraint_2_shift,
592 p_y_low_limbs_range_constraint_3_shift,
593 p_y_low_limbs_range_constraint_4_shift,
594 p_y_low_limbs_range_constraint_tail_shift,
595 p_y_high_limbs_range_constraint_0_shift,
596 p_y_high_limbs_range_constraint_1_shift,
597 p_y_high_limbs_range_constraint_2_shift,
598 p_y_high_limbs_range_constraint_3_shift,
599 p_y_high_limbs_range_constraint_4_shift,
600 p_y_high_limbs_range_constraint_tail_shift,
601 z_low_limbs_range_constraint_0_shift,
602 z_low_limbs_range_constraint_1_shift,
603 z_low_limbs_range_constraint_2_shift,
604 z_low_limbs_range_constraint_3_shift,
605 z_low_limbs_range_constraint_4_shift,
606 z_low_limbs_range_constraint_tail_shift,
607 z_high_limbs_range_constraint_0_shift,
608 z_high_limbs_range_constraint_1_shift,
609 z_high_limbs_range_constraint_2_shift,
610 z_high_limbs_range_constraint_3_shift,
611 z_high_limbs_range_constraint_4_shift,
612 z_high_limbs_range_constraint_tail_shift,
613 accumulator_low_limbs_range_constraint_0_shift,
614 accumulator_low_limbs_range_constraint_1_shift,
615 accumulator_low_limbs_range_constraint_2_shift,
616 accumulator_low_limbs_range_constraint_3_shift,
617 accumulator_low_limbs_range_constraint_4_shift,
618 accumulator_low_limbs_range_constraint_tail_shift,
619 accumulator_high_limbs_range_constraint_0_shift,
620 accumulator_high_limbs_range_constraint_1_shift,
621 accumulator_high_limbs_range_constraint_2_shift,
622 accumulator_high_limbs_range_constraint_3_shift,
623 accumulator_high_limbs_range_constraint_4_shift,
624 accumulator_high_limbs_range_constraint_tail_shift,
625 quotient_low_limbs_range_constraint_0_shift,
626 quotient_low_limbs_range_constraint_1_shift,
627 quotient_low_limbs_range_constraint_2_shift,
628 quotient_low_limbs_range_constraint_3_shift,
629 quotient_low_limbs_range_constraint_4_shift,
630 quotient_low_limbs_range_constraint_tail_shift,
631 quotient_high_limbs_range_constraint_0_shift,
632 quotient_high_limbs_range_constraint_1_shift,
633 quotient_high_limbs_range_constraint_2_shift,
634 quotient_high_limbs_range_constraint_3_shift,
635 quotient_high_limbs_range_constraint_4_shift,
636 quotient_high_limbs_range_constraint_tail_shift,
637 relation_wide_limbs_range_constraint_0_shift,
638 relation_wide_limbs_range_constraint_1_shift,
639 relation_wide_limbs_range_constraint_2_shift,
640 relation_wide_limbs_range_constraint_3_shift,
641 ordered_range_constraints_0_shift,
642 ordered_range_constraints_1_shift,
643 ordered_range_constraints_2_shift,
644 ordered_range_constraints_3_shift,
645 ordered_range_constraints_4_shift,
666 template <
typename DataType>
709 std::ios_base::fmtflags f(os.flags());
710 auto entities =
a.get_all();
711 for (
size_t i = 0; i < entities.size() - 1; i++) {
712 os <<
"e[" <<
std::setw(2) << i <<
"] = " << (entities[i]) <<
",\n";
714 os <<
"e[" <<
std::setw(2) << (entities.size() - 1) <<
"] = " << entities[entities.size() - 1] <<
" }";
745 ordered_range_constraint =
Polynomial{ circuit_size - 1,
751 interleaved =
Polynomial{ circuit_size, circuit_size };
762 if (poly.is_empty()) {
771 lagrange_first =
Polynomial{ 1, circuit_size };
784 lagrange_masking =
Polynomial{ circuit_size - circuit_size_without_masking,
786 circuit_size_without_masking };
792 circuit_size_without_masking - 1 };
793 ordered_extra_range_constraints_numerator =
811 for (
auto [result_field, polynomial] :
zip_view(result.get_all(), this->get_all())) {
812 result_field = polynomial[row_idx];
820 shifted = to_be_shifted.shifted();
861 for (
auto [vk_commitment, fixed_commitment] :
863 vk_commitment = fixed_commitment;
873 for (
auto [polynomial, commitment] :
874 zip_view(proving_key->polynomials.get_precomputed(), this->get_all())) {
875 commitment = proving_key->commitment_key.commit(polynomial);
887 throw_or_abort(
"Not intended to be used because vk is hardcoded in circuit.");
893 return Base::template compare<NUM_PRECOMPUTED_ENTITIES>(other,
CommitmentLabels().get_precomputed());
907 for (
auto& poly : this->get_all()) {
913 for (
auto [poly, full_poly] :
zip_view(get_all(), full_polynomials.get_all())) {
915 size_t desired_size = full_poly.end_index() / 2 + full_poly.end_index() % 2;
916 poly =
Polynomial(desired_size, circuit_size / 2);
942 this->x_lo_y_hi =
"X_LO_Y_HI";
943 this->x_hi_z_1 =
"X_HI_Z_1";
944 this->y_lo_z_2 =
"Y_LO_Z_2";
945 this->p_x_low_limbs =
"P_X_LOW_LIMBS";
946 this->p_x_high_limbs =
"P_X_HIGH_LIMBS";
947 this->p_x_low_limbs_range_constraint_0 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_0";
948 this->p_x_low_limbs_range_constraint_1 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_1";
949 this->p_x_low_limbs_range_constraint_2 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_2";
950 this->p_x_low_limbs_range_constraint_3 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_3";
951 this->p_x_low_limbs_range_constraint_4 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_4";
952 this->p_x_low_limbs_range_constraint_tail =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
953 this->p_x_high_limbs_range_constraint_0 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_0";
954 this->p_x_high_limbs_range_constraint_1 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_1";
955 this->p_x_high_limbs_range_constraint_2 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_2";
956 this->p_x_high_limbs_range_constraint_3 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_3";
957 this->p_x_high_limbs_range_constraint_4 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_4";
958 this->p_x_high_limbs_range_constraint_tail =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
959 this->p_y_low_limbs =
"P_Y_LOW_LIMBS";
960 this->p_y_low_limbs_range_constraint_0 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_0";
961 this->p_y_low_limbs_range_constraint_1 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_1";
962 this->p_y_low_limbs_range_constraint_2 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_2";
963 this->p_y_low_limbs_range_constraint_3 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_3";
964 this->p_y_low_limbs_range_constraint_4 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_4";
965 this->p_y_low_limbs_range_constraint_tail =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
966 this->p_y_high_limbs =
"P_Y_HIGH_LIMBS";
967 this->p_y_high_limbs_range_constraint_0 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_0";
968 this->p_y_high_limbs_range_constraint_1 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_1";
969 this->p_y_high_limbs_range_constraint_2 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_2";
970 this->p_y_high_limbs_range_constraint_3 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_3";
971 this->p_y_high_limbs_range_constraint_4 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_4";
972 this->p_y_high_limbs_range_constraint_tail =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
973 this->z_low_limbs =
"Z_LOw_LIMBS";
974 this->z_low_limbs_range_constraint_0 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_0";
975 this->z_low_limbs_range_constraint_1 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_1";
976 this->z_low_limbs_range_constraint_2 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_2";
977 this->z_low_limbs_range_constraint_3 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_3";
978 this->z_low_limbs_range_constraint_4 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_4";
979 this->z_low_limbs_range_constraint_tail =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
980 this->z_high_limbs =
"Z_HIGH_LIMBS";
981 this->z_high_limbs_range_constraint_0 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_0";
982 this->z_high_limbs_range_constraint_1 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_1";
983 this->z_high_limbs_range_constraint_2 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_2";
984 this->z_high_limbs_range_constraint_3 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_3";
985 this->z_high_limbs_range_constraint_4 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_4";
986 this->z_high_limbs_range_constraint_tail =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
987 this->accumulators_binary_limbs_0 =
"ACCUMULATORS_BINARY_LIMBS_0";
988 this->accumulators_binary_limbs_1 =
"ACCUMULATORS_BINARY_LIMBS_1";
989 this->accumulators_binary_limbs_2 =
"ACCUMULATORS_BINARY_LIMBS_2";
990 this->accumulators_binary_limbs_3 =
"ACCUMULATORS_BINARY_LIMBS_3";
991 this->accumulator_low_limbs_range_constraint_0 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_0";
992 this->accumulator_low_limbs_range_constraint_1 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_1";
993 this->accumulator_low_limbs_range_constraint_2 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_2";
994 this->accumulator_low_limbs_range_constraint_3 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_3";
995 this->accumulator_low_limbs_range_constraint_4 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_4";
996 this->accumulator_low_limbs_range_constraint_tail =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
997 this->accumulator_high_limbs_range_constraint_0 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_0";
998 this->accumulator_high_limbs_range_constraint_1 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_1";
999 this->accumulator_high_limbs_range_constraint_2 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_2";
1000 this->accumulator_high_limbs_range_constraint_3 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_3";
1001 this->accumulator_high_limbs_range_constraint_4 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_4";
1002 this->accumulator_high_limbs_range_constraint_tail =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
1003 this->quotient_low_binary_limbs =
"QUOTIENT_LOW_BINARY_LIMBS";
1004 this->quotient_high_binary_limbs =
"QUOTIENT_HIGH_BINARY_LIMBS";
1005 this->quotient_low_limbs_range_constraint_0 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_0";
1006 this->quotient_low_limbs_range_constraint_1 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_1";
1007 this->quotient_low_limbs_range_constraint_2 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_2";
1008 this->quotient_low_limbs_range_constraint_3 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_3";
1009 this->quotient_low_limbs_range_constraint_4 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_4";
1010 this->quotient_low_limbs_range_constraint_tail =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
1011 this->quotient_high_limbs_range_constraint_0 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_0";
1012 this->quotient_high_limbs_range_constraint_1 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_1";
1013 this->quotient_high_limbs_range_constraint_2 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_2";
1014 this->quotient_high_limbs_range_constraint_3 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_3";
1015 this->quotient_high_limbs_range_constraint_4 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_4";
1016 this->quotient_high_limbs_range_constraint_tail =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
1017 this->relation_wide_limbs =
"RELATION_WIDE_LIMBS";
1018 this->relation_wide_limbs_range_constraint_0 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_0";
1019 this->relation_wide_limbs_range_constraint_1 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_1";
1020 this->relation_wide_limbs_range_constraint_2 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_2";
1021 this->relation_wide_limbs_range_constraint_3 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_3";
1022 this->ordered_range_constraints_0 =
"ORDERED_RANGE_CONSTRAINTS_0";
1023 this->ordered_range_constraints_1 =
"ORDERED_RANGE_CONSTRAINTS_1";
1024 this->ordered_range_constraints_2 =
"ORDERED_RANGE_CONSTRAINTS_2";
1025 this->ordered_range_constraints_3 =
"ORDERED_RANGE_CONSTRAINTS_3";
1026 this->ordered_range_constraints_4 =
"ORDERED_RANGE_CONSTRAINTS_4";
1027 this->z_perm =
"Z_PERM";
1028 this->interleaved_range_constraints_0 =
"INTERLEAVED_RANGE_CONSTRAINTS_0";
1029 this->interleaved_range_constraints_1 =
"INTERLEAVED_RANGE_CONSTRAINTS_1";
1030 this->interleaved_range_constraints_2 =
"INTERLEAVED_RANGE_CONSTRAINTS_2";
1031 this->interleaved_range_constraints_3 =
"INTERLEAVED_RANGE_CONSTRAINTS_3";
1034 this->lagrange_first =
"__LAGRANGE_FIRST";
1035 this->lagrange_last =
"__LAGRANGE_LAST";
1036 this->lagrange_odd_in_minicircuit =
"__LAGRANGE_ODD_IN_MINICIRCUIT";
1037 this->lagrange_even_in_minicircuit =
"__LAGRANGE_EVEN_IN_MINICIRCUIT";
1038 this->lagrange_result_row =
"__LAGRANGE_RESULT_ROW";
1039 this->lagrange_last_in_minicircuit =
"__LAGRANGE_LAST_IN_MINICIRCUIT";
1040 this->ordered_extra_range_constraints_numerator =
"__ORDERED_EXTRA_RANGE_CONSTRAINTS_NUMERATOR";
1041 this->lagrange_masking =
"__LAGRANGE_MASKING";
1042 this->lagrange_mini_masking =
"__LAGRANGE_MINI_MASKING";
1043 this->lagrange_real_last =
"__LAGRANGE_REAL_LAST";
1047 template <
typename Commitment,
typename VerificationKey>
1052 this->lagrange_first = verification_key->lagrange_first;
1053 this->lagrange_last = verification_key->lagrange_last;
1054 this->lagrange_odd_in_minicircuit = verification_key->lagrange_odd_in_minicircuit;
1055 this->lagrange_even_in_minicircuit = verification_key->lagrange_even_in_minicircuit;
1056 this->lagrange_result_row = verification_key->lagrange_result_row;
1057 this->lagrange_last_in_minicircuit = verification_key->lagrange_last_in_minicircuit;
1058 this->ordered_extra_range_constraints_numerator =
1059 verification_key->ordered_extra_range_constraints_numerator;
1060 this->lagrange_masking = verification_key->lagrange_masking;
1061 this->lagrange_mini_masking = verification_key->lagrange_mini_masking;
1062 this->lagrange_real_last = verification_key->lagrange_real_last;
1073 template <
typename ProverPolynomialsOrPartiallyEvaluatedMultivariates,
typename EdgeType>
1074 static bool skip_entire_row([[maybe_unused]]
const ProverPolynomialsOrPartiallyEvaluatedMultivariates& polynomials,
1075 [[maybe_unused]]
const EdgeType edge_idx)
1078 auto s0 = polynomials.ordered_range_constraints_0_shift[edge_idx];
1079 auto s1 = polynomials.ordered_range_constraints_1_shift[edge_idx];
1080 auto s2 = polynomials.ordered_range_constraints_2_shift[edge_idx];
1081 auto s3 = polynomials.ordered_range_constraints_3_shift[edge_idx];
1082 auto s4 = polynomials.ordered_range_constraints_4_shift[edge_idx];
1083 auto s5 = polynomials.ordered_range_constraints_0_shift[edge_idx + 1];
1084 auto s6 = polynomials.ordered_range_constraints_1_shift[edge_idx + 1];
1085 auto s7 = polynomials.ordered_range_constraints_2_shift[edge_idx + 1];
1086 auto s8 = polynomials.ordered_range_constraints_3_shift[edge_idx + 1];
1087 auto s9 = polynomials.ordered_range_constraints_4_shift[edge_idx + 1];
1088 auto shift_0 = (s0 == 0) && (s1 == 0) && (s2 == 0) && (s3 == 0) && (s4 == 0) && (s5 == 0) && (s6 == 0) &&
1089 (s7 == 0) && (s8 == 0) && (s9 == 0);
1090 return shift_0 && (polynomials.z_perm[edge_idx] == polynomials.z_perm_shift[edge_idx]) &&
1091 (polynomials.z_perm[edge_idx + 1] == polynomials.z_perm_shift[edge_idx + 1]) &&
1092 polynomials.lagrange_last[edge_idx] == 0 && polynomials.lagrange_last[edge_idx + 1] == 0;
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
CommitmentKey object over a pairing group 𝔾₁.
Base Native verification key class.
uint64_t num_public_inputs
uint64_t pub_inputs_offset
typename Codec::DataType DataType
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
TranslatorCircuitBuilder creates a circuit that evaluates the correctness of the evaluation of EccOpQ...
static constexpr size_t NUM_RANDOM_OPS_END
static constexpr std::array< Fr, 5 > NEGATIVE_MODULUS_LIMBS
static constexpr size_t MICRO_LIMB_BITS
static constexpr size_t NUM_WIRES
static constexpr size_t NUM_LIMB_BITS
static constexpr size_t RESULT_ROW
static constexpr size_t NUM_NO_OPS_START
A base class labelling all entities (for instance, all of the polynomials used by the prover during s...
auto get_interleaved()
Getter for entities constructed by interleaving.
friend std::ostream & operator<<(std::ostream &os, const AllEntities &a)
auto get_unshifted_without_interleaved()
auto get_unshifted() const
DEFINE_COMPOUND_GET_ALL(MaskingEntities< DataType >, PrecomputedEntities< DataType >, WitnessEntities< DataType >, ShiftedEntities< DataType >) auto get_precomputed() const
auto get_ordered_range_constraints()
Getter for the ordered entities used in computing the denominator of the grand product in the permuta...
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)
Container for ZK entities (gemini masking polynomial for ZK-PCS)
Non-op-queue wires that need to be shifted.
DEFINE_FLAVOR_MEMBERS(DataType, p_x_low_limbs, p_x_high_limbs, p_y_low_limbs, p_y_high_limbs, z_low_limbs, z_high_limbs, accumulators_binary_limbs_0, accumulators_binary_limbs_1, accumulators_binary_limbs_2, accumulators_binary_limbs_3, quotient_low_binary_limbs, quotient_high_binary_limbs, relation_wide_limbs, p_x_low_limbs_range_constraint_0, p_x_low_limbs_range_constraint_1, p_x_low_limbs_range_constraint_2, p_x_low_limbs_range_constraint_3, p_x_low_limbs_range_constraint_4, p_x_low_limbs_range_constraint_tail, p_x_high_limbs_range_constraint_0, p_x_high_limbs_range_constraint_1, p_x_high_limbs_range_constraint_2, p_x_high_limbs_range_constraint_3, p_x_high_limbs_range_constraint_4, p_x_high_limbs_range_constraint_tail, p_y_low_limbs_range_constraint_0, p_y_low_limbs_range_constraint_1, p_y_low_limbs_range_constraint_2, p_y_low_limbs_range_constraint_3, p_y_low_limbs_range_constraint_4, p_y_low_limbs_range_constraint_tail, p_y_high_limbs_range_constraint_0, p_y_high_limbs_range_constraint_1, p_y_high_limbs_range_constraint_2, p_y_high_limbs_range_constraint_3, p_y_high_limbs_range_constraint_4, p_y_high_limbs_range_constraint_tail, z_low_limbs_range_constraint_0, z_low_limbs_range_constraint_1, z_low_limbs_range_constraint_2, z_low_limbs_range_constraint_3, z_low_limbs_range_constraint_4, z_low_limbs_range_constraint_tail, z_high_limbs_range_constraint_0, z_high_limbs_range_constraint_1, z_high_limbs_range_constraint_2, z_high_limbs_range_constraint_3, z_high_limbs_range_constraint_4, z_high_limbs_range_constraint_tail, accumulator_low_limbs_range_constraint_0, accumulator_low_limbs_range_constraint_1, accumulator_low_limbs_range_constraint_2, accumulator_low_limbs_range_constraint_3, accumulator_low_limbs_range_constraint_4, accumulator_low_limbs_range_constraint_tail, accumulator_high_limbs_range_constraint_0, accumulator_high_limbs_range_constraint_1, accumulator_high_limbs_range_constraint_2, accumulator_high_limbs_range_constraint_3, accumulator_high_limbs_range_constraint_4, accumulator_high_limbs_range_constraint_tail, quotient_low_limbs_range_constraint_0, quotient_low_limbs_range_constraint_1, quotient_low_limbs_range_constraint_2, quotient_low_limbs_range_constraint_3, quotient_low_limbs_range_constraint_4, quotient_low_limbs_range_constraint_tail, quotient_high_limbs_range_constraint_0, quotient_high_limbs_range_constraint_1, quotient_high_limbs_range_constraint_2, quotient_high_limbs_range_constraint_3, quotient_high_limbs_range_constraint_4, quotient_high_limbs_range_constraint_tail, relation_wide_limbs_range_constraint_0, relation_wide_limbs_range_constraint_1, relation_wide_limbs_range_constraint_2, relation_wide_limbs_range_constraint_3)
Op queue wires (non-shifted): these represent the op queue and are provided by the merge protocol.
DEFINE_FLAVOR_MEMBERS(DataType, op)
Op queue wires (to be shifted): first 3 wires of the to-be-shifted group.
DEFINE_FLAVOR_MEMBERS(DataType, ordered_range_constraints_0, ordered_range_constraints_1, ordered_range_constraints_2, ordered_range_constraints_3, ordered_range_constraints_4)
A container for storing the partially evaluated multivariates produced by sumcheck.
PartiallyEvaluatedMultivariates(const size_t circuit_size)
PartiallyEvaluatedMultivariates()=default
PartiallyEvaluatedMultivariates(const ProverPolynomials &full_polynomials, size_t circuit_size)
A base class labelling precomputed entities and (ordered) subsets of interest.
bool operator==(const PrecomputedEntities &other) const =default
DEFINE_FLAVOR_MEMBERS(DataType, ordered_extra_range_constraints_numerator, lagrange_first, lagrange_last, lagrange_odd_in_minicircuit, lagrange_even_in_minicircuit, lagrange_result_row, lagrange_last_in_minicircuit, lagrange_masking, lagrange_mini_masking, lagrange_real_last)
A container for the prover polynomials handles.
static size_t get_polynomial_size()
~ProverPolynomials()=default
ProverPolynomials(const ProverPolynomials &o)=delete
ProverPolynomials(ProverPolynomials &&o) noexcept=default
ProverPolynomials & operator=(const ProverPolynomials &)=delete
AllValues get_row(size_t row_idx) const
Returns the evaluations of all prover polynomials at one point on the boolean hypercube,...
ProverPolynomials()
ProverPolynomials constructor.
ProverPolynomials & operator=(ProverPolynomials &&o) noexcept=default
The proving key is responsible for storing the polynomials used by the prover.
CommitmentKey commitment_key
ProvingKey(const CommitmentKey &commitment_key=CommitmentKey())
ProverPolynomials polynomials
Represents polynomials shifted by 1 or their evaluations, defined relative to WireToBeShiftedEntities...
The verification key is responsible for storing the commitments to the precomputed (non-witnessk) pol...
Base::DataType hash_with_origin_tagging(const OriginTag &tag) const override
Unused function because vk is hardcoded in recursive verifier, so no transcript hashing is needed.
bool compare(const VerificationKey &other)
VerificationKey(const std::shared_ptr< ProvingKey > &proving_key)
VerifierCommitments_(const std::shared_ptr< VerificationKey > &verification_key)
All wire entities that are not shifted (currently just the op queue wire)
All wires to be shifted (op queue + non-op-queue)
Container for all witness polynomials used/constructed by the prover.
auto get_unshifted_without_interleaved()
Witness Entities on which Shplemini operates in the default manner.
std::vector< RefVector< DataType > > get_groups_to_be_interleaved()
Get the entities interleaved for the permutation relation.
DEFINE_COMPOUND_GET_ALL(WireNonshiftedEntities< DataType >, WireToBeShiftedEntities< DataType >, OrderedRangeConstraints< DataType >, DerivedWitnessEntities< DataType >, InterleavedRangeConstraints< DataType >) auto get_wires()
Entities constructed from circuit data.
auto get_wires_and_ordered_range_constraints()
Witness Entities to which the prover commits and do not require challenges (i.e. not derived).
auto get_non_opqueue_wires_and_ordered_range_constraints()
Non-op-queue wires and ordered range constraints (committed to by translator prover)
auto get_op_queue_wires()
Get only the op queue wires (provided by merge protocol, not committed to in translator)
auto get_interleaved()
Get the entities constructed by interleaving.
static constexpr size_t MINI_CIRCUIT_SIZE
static constexpr size_t MICRO_LIMB_BITS
std::tuple< TranslatorPermutationRelation< FF > > GrandProductRelations
static constexpr size_t num_frs_fq
static constexpr size_t NUM_MASKING_POLYNOMIALS
static constexpr size_t NUM_WIRES_TO_BE_SHIFTED_WITHOUT_INTERLEAVED
static bool skip_entire_row(const ProverPolynomialsOrPartiallyEvaluatedMultivariates &polynomials, const EdgeType edge_idx)
When evaluating the sumcheck protocol - can we skip evaluation of all relations for a given row?
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH
static constexpr size_t NUM_ALL_ENTITIES
static constexpr size_t NUM_WIRES
Curve::Element GroupElement
static constexpr size_t SORT_STEP
static constexpr RepeatedCommitmentsData REPEATED_COMMITMENTS
static constexpr size_t num_frs_comm
static constexpr size_t TO_BE_SHIFTED_WITNESSES_START
static constexpr size_t NUM_INTERLEAVED_WIRES
static constexpr size_t NUM_WITNESS_ENTITIES
static constexpr size_t RANDOMNESS_START
static constexpr size_t CONST_TRANSLATOR_LOG_N
static constexpr size_t NUM_OP_QUEUE_WIRES
static constexpr size_t NUM_INTERLEAVED
Relations_< FF > Relations
Curve::AffineElement Commitment
std::array< FF, NUM_SUBRELATIONS - 1 > SubrelationSeparators
static constexpr size_t MINIMUM_MINI_CIRCUIT_SIZE
static constexpr size_t LOG_MINI_CIRCUIT_SIZE
static constexpr bool USE_PADDING
static constexpr bool HasZK
static constexpr const std::array< FF, 5 > & negative_modulus_limbs()
static constexpr size_t NUM_LIMB_BITS
static constexpr size_t RESULT_ROW
static constexpr size_t NUM_MASKED_ROWS_END
static constexpr size_t NUM_RELATIONS
static constexpr bool USE_SHORT_MONOMIALS
static constexpr size_t PROOF_LENGTH_WITHOUT_PUB_INPUTS
std::tuple< TranslatorPermutationRelation< FF >, TranslatorDeltaRangeConstraintRelation< FF >, TranslatorOpcodeConstraintRelation< FF >, TranslatorAccumulatorTransferRelation< FF >, TranslatorDecompositionRelation< FF >, TranslatorNonNativeFieldRelation< FF >, TranslatorZeroConstraintsRelation< FF > > Relations_
bb::CommitmentKey< Curve > CommitmentKey
static constexpr size_t NUM_PRECOMPUTED_ENTITIES
static constexpr size_t NUM_SHIFTED_ENTITIES
static constexpr size_t TO_BE_INTERLEAVED_START
static constexpr size_t SHIFTED_WITNESSES_START
static constexpr size_t SORTED_STEPS_COUNT
static constexpr size_t NUM_SUBRELATIONS
static constexpr size_t NUM_WIRES_NON_SHIFTED
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
bb::Polynomial< FF > Polynomial
static constexpr size_t INTERLEAVING_GROUP_SIZE
static constexpr size_t num_frs_fr
static constexpr size_t INTERLEAVED_START
static constexpr size_t VIRTUAL_LOG_N
Representation of the Grumpkin Verifier Commitment Key inside a bn254 circuit.
typename Group::element Element
typename Group::affine_element AffineElement
static constexpr uint32_t LIBRA_UNIVARIATES_LENGTH
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)
Entry point for Barretenberg command-line interface.
RefArray< T,(Ns+...)> constexpr concatenate(const RefArray< T, Ns > &... ref_arrays)
Concatenates multiple RefArray objects into a single RefArray.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
static std::vector< Commitment > get_all()
void throw_or_abort(std::string const &err)