52 static constexpr bool HasZK =
true;
109 "Translator circuit is too small for defined number of steps "
110 "(TranslatorDeltaRangeConstraintRelation). ");
174 template <
typename FF>
197 "LIBRA_UNIVARIATES_LENGTH must be equal to Translator::BATCHED_RELATION_PARTIAL_LENGTH");
200 static constexpr size_t num_frs_comm = FrCodec::calc_num_fields<Commitment>();
201 static constexpr size_t num_frs_fr = FrCodec::calc_num_fields<FF>();
202 static constexpr size_t num_frs_fq = FrCodec::calc_num_fields<BF>();
236 ordered_extra_range_constraints_numerator,
239 lagrange_odd_in_minicircuit,
240 lagrange_even_in_minicircuit,
242 lagrange_last_in_minicircuit,
244 lagrange_mini_masking,
251 interleaved_range_constraints_0,
252 interleaved_range_constraints_1,
253 interleaved_range_constraints_2,
254 interleaved_range_constraints_3)
268 accumulators_binary_limbs_0,
269 accumulators_binary_limbs_1,
270 accumulators_binary_limbs_2,
271 accumulators_binary_limbs_3,
272 quotient_low_binary_limbs,
273 quotient_high_binary_limbs,
275 p_x_low_limbs_range_constraint_0,
276 p_x_low_limbs_range_constraint_1,
277 p_x_low_limbs_range_constraint_2,
278 p_x_low_limbs_range_constraint_3,
279 p_x_low_limbs_range_constraint_4,
280 p_x_low_limbs_range_constraint_tail,
281 p_x_high_limbs_range_constraint_0,
282 p_x_high_limbs_range_constraint_1,
283 p_x_high_limbs_range_constraint_2,
284 p_x_high_limbs_range_constraint_3,
285 p_x_high_limbs_range_constraint_4,
286 p_x_high_limbs_range_constraint_tail,
287 p_y_low_limbs_range_constraint_0,
288 p_y_low_limbs_range_constraint_1,
289 p_y_low_limbs_range_constraint_2,
290 p_y_low_limbs_range_constraint_3,
291 p_y_low_limbs_range_constraint_4,
292 p_y_low_limbs_range_constraint_tail,
293 p_y_high_limbs_range_constraint_0,
294 p_y_high_limbs_range_constraint_1,
295 p_y_high_limbs_range_constraint_2,
296 p_y_high_limbs_range_constraint_3,
297 p_y_high_limbs_range_constraint_4,
298 p_y_high_limbs_range_constraint_tail,
299 z_low_limbs_range_constraint_0,
300 z_low_limbs_range_constraint_1,
301 z_low_limbs_range_constraint_2,
302 z_low_limbs_range_constraint_3,
303 z_low_limbs_range_constraint_4,
304 z_low_limbs_range_constraint_tail,
305 z_high_limbs_range_constraint_0,
306 z_high_limbs_range_constraint_1,
307 z_high_limbs_range_constraint_2,
308 z_high_limbs_range_constraint_3,
309 z_high_limbs_range_constraint_4,
310 z_high_limbs_range_constraint_tail,
311 accumulator_low_limbs_range_constraint_0,
312 accumulator_low_limbs_range_constraint_1,
313 accumulator_low_limbs_range_constraint_2,
314 accumulator_low_limbs_range_constraint_3,
315 accumulator_low_limbs_range_constraint_4,
316 accumulator_low_limbs_range_constraint_tail,
317 accumulator_high_limbs_range_constraint_0,
318 accumulator_high_limbs_range_constraint_1,
319 accumulator_high_limbs_range_constraint_2,
320 accumulator_high_limbs_range_constraint_3,
321 accumulator_high_limbs_range_constraint_4,
322 accumulator_high_limbs_range_constraint_tail,
323 quotient_low_limbs_range_constraint_0,
324 quotient_low_limbs_range_constraint_1,
325 quotient_low_limbs_range_constraint_2,
326 quotient_low_limbs_range_constraint_3,
327 quotient_low_limbs_range_constraint_4,
328 quotient_low_limbs_range_constraint_tail,
329 quotient_high_limbs_range_constraint_0,
330 quotient_high_limbs_range_constraint_1,
331 quotient_high_limbs_range_constraint_2,
332 quotient_high_limbs_range_constraint_3,
333 quotient_high_limbs_range_constraint_4,
334 quotient_high_limbs_range_constraint_tail,
335 relation_wide_limbs_range_constraint_0,
336 relation_wide_limbs_range_constraint_1,
337 relation_wide_limbs_range_constraint_2,
338 relation_wide_limbs_range_constraint_3);
355 template <
typename DataType>
367 ordered_range_constraints_0,
368 ordered_range_constraints_1,
369 ordered_range_constraints_2,
370 ordered_range_constraints_3,
371 ordered_range_constraints_4);
400 template <
typename DataType>
491 this->p_x_low_limbs_range_constraint_0,
492 this->p_x_low_limbs_range_constraint_1,
493 this->p_x_low_limbs_range_constraint_2,
494 this->p_x_low_limbs_range_constraint_3,
495 this->p_x_low_limbs_range_constraint_4,
496 this->p_x_low_limbs_range_constraint_tail,
497 this->p_x_high_limbs_range_constraint_0,
498 this->p_x_high_limbs_range_constraint_1,
499 this->p_x_high_limbs_range_constraint_2,
500 this->p_x_high_limbs_range_constraint_3,
501 this->p_x_high_limbs_range_constraint_4,
502 this->p_x_high_limbs_range_constraint_tail,
503 this->p_y_low_limbs_range_constraint_0,
504 this->p_y_low_limbs_range_constraint_1,
505 this->p_y_low_limbs_range_constraint_2,
506 this->p_y_low_limbs_range_constraint_3,
509 this->p_y_low_limbs_range_constraint_4,
510 this->p_y_low_limbs_range_constraint_tail,
511 this->p_y_high_limbs_range_constraint_0,
512 this->p_y_high_limbs_range_constraint_1,
513 this->p_y_high_limbs_range_constraint_2,
514 this->p_y_high_limbs_range_constraint_3,
515 this->p_y_high_limbs_range_constraint_4,
516 this->p_y_high_limbs_range_constraint_tail,
517 this->z_low_limbs_range_constraint_0,
518 this->z_low_limbs_range_constraint_1,
519 this->z_low_limbs_range_constraint_2,
520 this->z_low_limbs_range_constraint_3,
521 this->z_low_limbs_range_constraint_4,
522 this->z_low_limbs_range_constraint_tail,
523 this->z_high_limbs_range_constraint_0,
524 this->z_high_limbs_range_constraint_1,
527 this->z_high_limbs_range_constraint_2,
528 this->z_high_limbs_range_constraint_3,
529 this->z_high_limbs_range_constraint_4,
530 this->z_high_limbs_range_constraint_tail,
531 this->accumulator_low_limbs_range_constraint_0,
532 this->accumulator_low_limbs_range_constraint_1,
533 this->accumulator_low_limbs_range_constraint_2,
534 this->accumulator_low_limbs_range_constraint_3,
535 this->accumulator_low_limbs_range_constraint_4,
536 this->accumulator_low_limbs_range_constraint_tail,
537 this->accumulator_high_limbs_range_constraint_0,
538 this->accumulator_high_limbs_range_constraint_1,
539 this->accumulator_high_limbs_range_constraint_2,
540 this->accumulator_high_limbs_range_constraint_3,
541 this->accumulator_high_limbs_range_constraint_4,
542 this->accumulator_high_limbs_range_constraint_tail,
545 this->quotient_low_limbs_range_constraint_0,
546 this->quotient_low_limbs_range_constraint_1,
547 this->quotient_low_limbs_range_constraint_2,
548 this->quotient_low_limbs_range_constraint_3,
549 this->quotient_low_limbs_range_constraint_4,
550 this->quotient_low_limbs_range_constraint_tail,
551 this->quotient_high_limbs_range_constraint_0,
552 this->quotient_high_limbs_range_constraint_1,
553 this->quotient_high_limbs_range_constraint_2,
554 this->quotient_high_limbs_range_constraint_3,
555 this->quotient_high_limbs_range_constraint_4,
556 this->quotient_high_limbs_range_constraint_tail,
557 this->relation_wide_limbs_range_constraint_0,
558 this->relation_wide_limbs_range_constraint_1,
559 this->relation_wide_limbs_range_constraint_2,
560 this->relation_wide_limbs_range_constraint_3,
576 p_x_high_limbs_shift,
578 p_y_high_limbs_shift,
581 accumulators_binary_limbs_0_shift,
582 accumulators_binary_limbs_1_shift,
583 accumulators_binary_limbs_2_shift,
584 accumulators_binary_limbs_3_shift,
585 quotient_low_binary_limbs_shift,
586 quotient_high_binary_limbs_shift,
587 relation_wide_limbs_shift,
588 p_x_low_limbs_range_constraint_0_shift,
589 p_x_low_limbs_range_constraint_1_shift,
590 p_x_low_limbs_range_constraint_2_shift,
591 p_x_low_limbs_range_constraint_3_shift,
592 p_x_low_limbs_range_constraint_4_shift,
593 p_x_low_limbs_range_constraint_tail_shift,
594 p_x_high_limbs_range_constraint_0_shift,
595 p_x_high_limbs_range_constraint_1_shift,
596 p_x_high_limbs_range_constraint_2_shift,
597 p_x_high_limbs_range_constraint_3_shift,
598 p_x_high_limbs_range_constraint_4_shift,
599 p_x_high_limbs_range_constraint_tail_shift,
600 p_y_low_limbs_range_constraint_0_shift,
601 p_y_low_limbs_range_constraint_1_shift,
602 p_y_low_limbs_range_constraint_2_shift,
603 p_y_low_limbs_range_constraint_3_shift,
604 p_y_low_limbs_range_constraint_4_shift,
605 p_y_low_limbs_range_constraint_tail_shift,
606 p_y_high_limbs_range_constraint_0_shift,
607 p_y_high_limbs_range_constraint_1_shift,
608 p_y_high_limbs_range_constraint_2_shift,
609 p_y_high_limbs_range_constraint_3_shift,
610 p_y_high_limbs_range_constraint_4_shift,
611 p_y_high_limbs_range_constraint_tail_shift,
612 z_low_limbs_range_constraint_0_shift,
613 z_low_limbs_range_constraint_1_shift,
614 z_low_limbs_range_constraint_2_shift,
615 z_low_limbs_range_constraint_3_shift,
616 z_low_limbs_range_constraint_4_shift,
617 z_low_limbs_range_constraint_tail_shift,
618 z_high_limbs_range_constraint_0_shift,
619 z_high_limbs_range_constraint_1_shift,
620 z_high_limbs_range_constraint_2_shift,
621 z_high_limbs_range_constraint_3_shift,
622 z_high_limbs_range_constraint_4_shift,
623 z_high_limbs_range_constraint_tail_shift,
624 accumulator_low_limbs_range_constraint_0_shift,
625 accumulator_low_limbs_range_constraint_1_shift,
626 accumulator_low_limbs_range_constraint_2_shift,
627 accumulator_low_limbs_range_constraint_3_shift,
628 accumulator_low_limbs_range_constraint_4_shift,
629 accumulator_low_limbs_range_constraint_tail_shift,
630 accumulator_high_limbs_range_constraint_0_shift,
631 accumulator_high_limbs_range_constraint_1_shift,
632 accumulator_high_limbs_range_constraint_2_shift,
633 accumulator_high_limbs_range_constraint_3_shift,
634 accumulator_high_limbs_range_constraint_4_shift,
635 accumulator_high_limbs_range_constraint_tail_shift,
636 quotient_low_limbs_range_constraint_0_shift,
637 quotient_low_limbs_range_constraint_1_shift,
638 quotient_low_limbs_range_constraint_2_shift,
639 quotient_low_limbs_range_constraint_3_shift,
640 quotient_low_limbs_range_constraint_4_shift,
641 quotient_low_limbs_range_constraint_tail_shift,
642 quotient_high_limbs_range_constraint_0_shift,
643 quotient_high_limbs_range_constraint_1_shift,
644 quotient_high_limbs_range_constraint_2_shift,
645 quotient_high_limbs_range_constraint_3_shift,
646 quotient_high_limbs_range_constraint_4_shift,
647 quotient_high_limbs_range_constraint_tail_shift,
648 relation_wide_limbs_range_constraint_0_shift,
649 relation_wide_limbs_range_constraint_1_shift,
650 relation_wide_limbs_range_constraint_2_shift,
651 relation_wide_limbs_range_constraint_3_shift,
652 ordered_range_constraints_0_shift,
653 ordered_range_constraints_1_shift,
654 ordered_range_constraints_2_shift,
655 ordered_range_constraints_3_shift,
656 ordered_range_constraints_4_shift,
677 template <
typename DataType>
720 std::ios_base::fmtflags f(os.flags());
721 auto entities =
a.get_all();
722 for (
size_t i = 0; i < entities.size() - 1; i++) {
723 os <<
"e[" <<
std::setw(2) << i <<
"] = " << (entities[i]) <<
",\n";
725 os <<
"e[" <<
std::setw(2) << (entities.size() - 1) <<
"] = " << entities[entities.size() - 1] <<
" }";
756 ordered_range_constraint =
Polynomial{ circuit_size - 1,
762 interleaved =
Polynomial{ circuit_size, circuit_size };
773 if (poly.is_empty()) {
782 lagrange_first =
Polynomial{ 1, circuit_size };
796 lagrange_masking =
Polynomial{ circuit_size - circuit_size_without_masking,
798 circuit_size_without_masking };
804 circuit_size_without_masking - 1 };
805 ordered_extra_range_constraints_numerator =
825 for (
auto [result_field, polynomial] :
zip_view(result.get_all(), this->get_all())) {
826 result_field = polynomial[row_idx];
834 shifted = to_be_shifted.shifted();
889 this->x_lo_y_hi =
"X_LO_Y_HI";
890 this->x_hi_z_1 =
"X_HI_Z_1";
891 this->y_lo_z_2 =
"Y_LO_Z_2";
892 this->p_x_low_limbs =
"P_X_LOW_LIMBS";
893 this->p_x_high_limbs =
"P_X_HIGH_LIMBS";
894 this->p_x_low_limbs_range_constraint_0 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_0";
895 this->p_x_low_limbs_range_constraint_1 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_1";
896 this->p_x_low_limbs_range_constraint_2 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_2";
897 this->p_x_low_limbs_range_constraint_3 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_3";
898 this->p_x_low_limbs_range_constraint_4 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_4";
899 this->p_x_low_limbs_range_constraint_tail =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
900 this->p_x_high_limbs_range_constraint_0 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_0";
901 this->p_x_high_limbs_range_constraint_1 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_1";
902 this->p_x_high_limbs_range_constraint_2 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_2";
903 this->p_x_high_limbs_range_constraint_3 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_3";
904 this->p_x_high_limbs_range_constraint_4 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_4";
905 this->p_x_high_limbs_range_constraint_tail =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
906 this->p_y_low_limbs =
"P_Y_LOW_LIMBS";
907 this->p_y_low_limbs_range_constraint_0 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_0";
908 this->p_y_low_limbs_range_constraint_1 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_1";
909 this->p_y_low_limbs_range_constraint_2 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_2";
910 this->p_y_low_limbs_range_constraint_3 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_3";
911 this->p_y_low_limbs_range_constraint_4 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_4";
912 this->p_y_low_limbs_range_constraint_tail =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
913 this->p_y_high_limbs =
"P_Y_HIGH_LIMBS";
914 this->p_y_high_limbs_range_constraint_0 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_0";
915 this->p_y_high_limbs_range_constraint_1 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_1";
916 this->p_y_high_limbs_range_constraint_2 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_2";
917 this->p_y_high_limbs_range_constraint_3 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_3";
918 this->p_y_high_limbs_range_constraint_4 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_4";
919 this->p_y_high_limbs_range_constraint_tail =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
920 this->z_low_limbs =
"Z_LOw_LIMBS";
921 this->z_low_limbs_range_constraint_0 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_0";
922 this->z_low_limbs_range_constraint_1 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_1";
923 this->z_low_limbs_range_constraint_2 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_2";
924 this->z_low_limbs_range_constraint_3 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_3";
925 this->z_low_limbs_range_constraint_4 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_4";
926 this->z_low_limbs_range_constraint_tail =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
927 this->z_high_limbs =
"Z_HIGH_LIMBS";
928 this->z_high_limbs_range_constraint_0 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_0";
929 this->z_high_limbs_range_constraint_1 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_1";
930 this->z_high_limbs_range_constraint_2 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_2";
931 this->z_high_limbs_range_constraint_3 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_3";
932 this->z_high_limbs_range_constraint_4 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_4";
933 this->z_high_limbs_range_constraint_tail =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
934 this->accumulators_binary_limbs_0 =
"ACCUMULATORS_BINARY_LIMBS_0";
935 this->accumulators_binary_limbs_1 =
"ACCUMULATORS_BINARY_LIMBS_1";
936 this->accumulators_binary_limbs_2 =
"ACCUMULATORS_BINARY_LIMBS_2";
937 this->accumulators_binary_limbs_3 =
"ACCUMULATORS_BINARY_LIMBS_3";
938 this->accumulator_low_limbs_range_constraint_0 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_0";
939 this->accumulator_low_limbs_range_constraint_1 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_1";
940 this->accumulator_low_limbs_range_constraint_2 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_2";
941 this->accumulator_low_limbs_range_constraint_3 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_3";
942 this->accumulator_low_limbs_range_constraint_4 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_4";
943 this->accumulator_low_limbs_range_constraint_tail =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
944 this->accumulator_high_limbs_range_constraint_0 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_0";
945 this->accumulator_high_limbs_range_constraint_1 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_1";
946 this->accumulator_high_limbs_range_constraint_2 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_2";
947 this->accumulator_high_limbs_range_constraint_3 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_3";
948 this->accumulator_high_limbs_range_constraint_4 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_4";
949 this->accumulator_high_limbs_range_constraint_tail =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
950 this->quotient_low_binary_limbs =
"QUOTIENT_LOW_BINARY_LIMBS";
951 this->quotient_high_binary_limbs =
"QUOTIENT_HIGH_BINARY_LIMBS";
952 this->quotient_low_limbs_range_constraint_0 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_0";
953 this->quotient_low_limbs_range_constraint_1 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_1";
954 this->quotient_low_limbs_range_constraint_2 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_2";
955 this->quotient_low_limbs_range_constraint_3 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_3";
956 this->quotient_low_limbs_range_constraint_4 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_4";
957 this->quotient_low_limbs_range_constraint_tail =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
958 this->quotient_high_limbs_range_constraint_0 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_0";
959 this->quotient_high_limbs_range_constraint_1 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_1";
960 this->quotient_high_limbs_range_constraint_2 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_2";
961 this->quotient_high_limbs_range_constraint_3 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_3";
962 this->quotient_high_limbs_range_constraint_4 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_4";
963 this->quotient_high_limbs_range_constraint_tail =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
964 this->relation_wide_limbs =
"RELATION_WIDE_LIMBS";
965 this->relation_wide_limbs_range_constraint_0 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_0";
966 this->relation_wide_limbs_range_constraint_1 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_1";
967 this->relation_wide_limbs_range_constraint_2 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_2";
968 this->relation_wide_limbs_range_constraint_3 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_3";
969 this->ordered_range_constraints_0 =
"ORDERED_RANGE_CONSTRAINTS_0";
970 this->ordered_range_constraints_1 =
"ORDERED_RANGE_CONSTRAINTS_1";
971 this->ordered_range_constraints_2 =
"ORDERED_RANGE_CONSTRAINTS_2";
972 this->ordered_range_constraints_3 =
"ORDERED_RANGE_CONSTRAINTS_3";
973 this->ordered_range_constraints_4 =
"ORDERED_RANGE_CONSTRAINTS_4";
974 this->z_perm =
"Z_PERM";
975 this->interleaved_range_constraints_0 =
"INTERLEAVED_RANGE_CONSTRAINTS_0";
976 this->interleaved_range_constraints_1 =
"INTERLEAVED_RANGE_CONSTRAINTS_1";
977 this->interleaved_range_constraints_2 =
"INTERLEAVED_RANGE_CONSTRAINTS_2";
978 this->interleaved_range_constraints_3 =
"INTERLEAVED_RANGE_CONSTRAINTS_3";
981 this->lagrange_first =
"__LAGRANGE_FIRST";
982 this->lagrange_last =
"__LAGRANGE_LAST";
983 this->lagrange_odd_in_minicircuit =
"__LAGRANGE_ODD_IN_MINICIRCUIT";
984 this->lagrange_even_in_minicircuit =
"__LAGRANGE_EVEN_IN_MINICIRCUIT";
985 this->lagrange_result_row =
"__LAGRANGE_RESULT_ROW";
986 this->lagrange_last_in_minicircuit =
"__LAGRANGE_LAST_IN_MINICIRCUIT";
987 this->ordered_extra_range_constraints_numerator =
"__ORDERED_EXTRA_RANGE_CONSTRAINTS_NUMERATOR";
988 this->lagrange_masking =
"__LAGRANGE_MASKING";
989 this->lagrange_mini_masking =
"__LAGRANGE_MINI_MASKING";
990 this->lagrange_real_last =
"__LAGRANGE_REAL_LAST";
994 template <
typename Commitment,
typename VerificationKey>
999 this->lagrange_first = verification_key->lagrange_first;
1000 this->lagrange_last = verification_key->lagrange_last;
1001 this->lagrange_odd_in_minicircuit = verification_key->lagrange_odd_in_minicircuit;
1002 this->lagrange_even_in_minicircuit = verification_key->lagrange_even_in_minicircuit;
1003 this->lagrange_result_row = verification_key->lagrange_result_row;
1004 this->lagrange_last_in_minicircuit = verification_key->lagrange_last_in_minicircuit;
1005 this->ordered_extra_range_constraints_numerator =
1006 verification_key->ordered_extra_range_constraints_numerator;
1007 this->lagrange_masking = verification_key->lagrange_masking;
1008 this->lagrange_mini_masking = verification_key->lagrange_mini_masking;
1009 this->lagrange_real_last = verification_key->lagrange_real_last;
1020 template <
typename ProverPolynomialsOrPartiallyEvaluatedMultivariates,
typename EdgeType>
1021 static bool skip_entire_row([[maybe_unused]]
const ProverPolynomialsOrPartiallyEvaluatedMultivariates& polynomials,
1022 [[maybe_unused]]
const EdgeType edge_idx)
1024 auto s0 = polynomials.ordered_range_constraints_0_shift[edge_idx];
1025 auto s1 = polynomials.ordered_range_constraints_1_shift[edge_idx];
1026 auto s2 = polynomials.ordered_range_constraints_2_shift[edge_idx];
1027 auto s3 = polynomials.ordered_range_constraints_3_shift[edge_idx];
1028 auto s4 = polynomials.ordered_range_constraints_4_shift[edge_idx];
1029 auto s5 = polynomials.ordered_range_constraints_0_shift[edge_idx + 1];
1030 auto s6 = polynomials.ordered_range_constraints_1_shift[edge_idx + 1];
1031 auto s7 = polynomials.ordered_range_constraints_2_shift[edge_idx + 1];
1032 auto s8 = polynomials.ordered_range_constraints_3_shift[edge_idx + 1];
1033 auto s9 = polynomials.ordered_range_constraints_4_shift[edge_idx + 1];
1034 auto shift_0 = (s0 == 0) && (s1 == 0) && (s2 == 0) && (s3 == 0) && (s4 == 0) && (s5 == 0) && (s6 == 0) &&
1035 (s7 == 0) && (s8 == 0) && (s9 == 0);
1036 return shift_0 && (polynomials.z_perm[edge_idx] == polynomials.z_perm_shift[edge_idx]) &&
1037 (polynomials.z_perm[edge_idx + 1] == polynomials.z_perm_shift[edge_idx + 1]) &&
1038 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 𝔾₁.
Simple verification key class for fixed-size circuits (ECCVM, Translator).
A container for storing the partially evaluated multivariates produced by sumcheck.
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 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...
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 PROOF_LENGTH
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
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
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
Stores the fixed Translator VK commitments (to precomputed polynomials) that depend only on the circu...