49 static constexpr bool HasZK =
true;
106 "Translator circuit is too small for defined number of steps "
107 "(TranslatorDeltaRangeConstraintRelation). ");
160 template <
typename FF>
181 "LIBRA_UNIVARIATES_LENGTH must be equal to Translator::BATCHED_RELATION_PARTIAL_LENGTH");
184 static constexpr size_t num_frs_comm = FrCodec::calc_num_fields<Commitment>();
185 static constexpr size_t num_frs_fr = FrCodec::calc_num_fields<FF>();
186 static constexpr size_t num_frs_fq = FrCodec::calc_num_fields<BF>();
220 ordered_extra_range_constraints_numerator,
225 lagrange_odd_in_minicircuit,
226 lagrange_even_in_minicircuit,
228 lagrange_last_in_minicircuit,
230 lagrange_mini_masking,
237 interleaved_range_constraints_0,
238 interleaved_range_constraints_1,
239 interleaved_range_constraints_2,
240 interleaved_range_constraints_3)
254 accumulators_binary_limbs_0,
255 accumulators_binary_limbs_1,
256 accumulators_binary_limbs_2,
257 accumulators_binary_limbs_3,
258 quotient_low_binary_limbs,
259 quotient_high_binary_limbs,
261 p_x_low_limbs_range_constraint_0,
262 p_x_low_limbs_range_constraint_1,
263 p_x_low_limbs_range_constraint_2,
264 p_x_low_limbs_range_constraint_3,
265 p_x_low_limbs_range_constraint_4,
266 p_x_low_limbs_range_constraint_tail,
267 p_x_high_limbs_range_constraint_0,
268 p_x_high_limbs_range_constraint_1,
269 p_x_high_limbs_range_constraint_2,
270 p_x_high_limbs_range_constraint_3,
271 p_x_high_limbs_range_constraint_4,
272 p_x_high_limbs_range_constraint_tail,
273 p_y_low_limbs_range_constraint_0,
274 p_y_low_limbs_range_constraint_1,
275 p_y_low_limbs_range_constraint_2,
276 p_y_low_limbs_range_constraint_3,
277 p_y_low_limbs_range_constraint_4,
278 p_y_low_limbs_range_constraint_tail,
279 p_y_high_limbs_range_constraint_0,
280 p_y_high_limbs_range_constraint_1,
281 p_y_high_limbs_range_constraint_2,
282 p_y_high_limbs_range_constraint_3,
283 p_y_high_limbs_range_constraint_4,
284 p_y_high_limbs_range_constraint_tail,
285 z_low_limbs_range_constraint_0,
286 z_low_limbs_range_constraint_1,
287 z_low_limbs_range_constraint_2,
288 z_low_limbs_range_constraint_3,
289 z_low_limbs_range_constraint_4,
290 z_low_limbs_range_constraint_tail,
291 z_high_limbs_range_constraint_0,
292 z_high_limbs_range_constraint_1,
293 z_high_limbs_range_constraint_2,
294 z_high_limbs_range_constraint_3,
295 z_high_limbs_range_constraint_4,
296 z_high_limbs_range_constraint_tail,
297 accumulator_low_limbs_range_constraint_0,
298 accumulator_low_limbs_range_constraint_1,
299 accumulator_low_limbs_range_constraint_2,
300 accumulator_low_limbs_range_constraint_3,
301 accumulator_low_limbs_range_constraint_4,
302 accumulator_low_limbs_range_constraint_tail,
303 accumulator_high_limbs_range_constraint_0,
304 accumulator_high_limbs_range_constraint_1,
305 accumulator_high_limbs_range_constraint_2,
306 accumulator_high_limbs_range_constraint_3,
307 accumulator_high_limbs_range_constraint_4,
308 accumulator_high_limbs_range_constraint_tail,
309 quotient_low_limbs_range_constraint_0,
310 quotient_low_limbs_range_constraint_1,
311 quotient_low_limbs_range_constraint_2,
312 quotient_low_limbs_range_constraint_3,
313 quotient_low_limbs_range_constraint_4,
314 quotient_low_limbs_range_constraint_tail,
315 quotient_high_limbs_range_constraint_0,
316 quotient_high_limbs_range_constraint_1,
317 quotient_high_limbs_range_constraint_2,
318 quotient_high_limbs_range_constraint_3,
319 quotient_high_limbs_range_constraint_4,
320 quotient_high_limbs_range_constraint_tail,
321 relation_wide_limbs_range_constraint_0,
322 relation_wide_limbs_range_constraint_1,
323 relation_wide_limbs_range_constraint_2,
324 relation_wide_limbs_range_constraint_3);
341 template <
typename DataType>
354 ordered_range_constraints_0,
355 ordered_range_constraints_1,
356 ordered_range_constraints_2,
357 ordered_range_constraints_3,
358 ordered_range_constraints_4);
387 template <
typename DataType>
478 this->p_x_low_limbs_range_constraint_0,
479 this->p_x_low_limbs_range_constraint_1,
480 this->p_x_low_limbs_range_constraint_2,
481 this->p_x_low_limbs_range_constraint_3,
482 this->p_x_low_limbs_range_constraint_4,
483 this->p_x_low_limbs_range_constraint_tail,
484 this->p_x_high_limbs_range_constraint_0,
485 this->p_x_high_limbs_range_constraint_1,
486 this->p_x_high_limbs_range_constraint_2,
487 this->p_x_high_limbs_range_constraint_3,
488 this->p_x_high_limbs_range_constraint_4,
489 this->p_x_high_limbs_range_constraint_tail,
490 this->p_y_low_limbs_range_constraint_0,
491 this->p_y_low_limbs_range_constraint_1,
492 this->p_y_low_limbs_range_constraint_2,
493 this->p_y_low_limbs_range_constraint_3,
496 this->p_y_low_limbs_range_constraint_4,
497 this->p_y_low_limbs_range_constraint_tail,
498 this->p_y_high_limbs_range_constraint_0,
499 this->p_y_high_limbs_range_constraint_1,
500 this->p_y_high_limbs_range_constraint_2,
501 this->p_y_high_limbs_range_constraint_3,
502 this->p_y_high_limbs_range_constraint_4,
503 this->p_y_high_limbs_range_constraint_tail,
504 this->z_low_limbs_range_constraint_0,
505 this->z_low_limbs_range_constraint_1,
506 this->z_low_limbs_range_constraint_2,
507 this->z_low_limbs_range_constraint_3,
508 this->z_low_limbs_range_constraint_4,
509 this->z_low_limbs_range_constraint_tail,
510 this->z_high_limbs_range_constraint_0,
511 this->z_high_limbs_range_constraint_1,
514 this->z_high_limbs_range_constraint_2,
515 this->z_high_limbs_range_constraint_3,
516 this->z_high_limbs_range_constraint_4,
517 this->z_high_limbs_range_constraint_tail,
518 this->accumulator_low_limbs_range_constraint_0,
519 this->accumulator_low_limbs_range_constraint_1,
520 this->accumulator_low_limbs_range_constraint_2,
521 this->accumulator_low_limbs_range_constraint_3,
522 this->accumulator_low_limbs_range_constraint_4,
523 this->accumulator_low_limbs_range_constraint_tail,
524 this->accumulator_high_limbs_range_constraint_0,
525 this->accumulator_high_limbs_range_constraint_1,
526 this->accumulator_high_limbs_range_constraint_2,
527 this->accumulator_high_limbs_range_constraint_3,
528 this->accumulator_high_limbs_range_constraint_4,
529 this->accumulator_high_limbs_range_constraint_tail,
532 this->quotient_low_limbs_range_constraint_0,
533 this->quotient_low_limbs_range_constraint_1,
534 this->quotient_low_limbs_range_constraint_2,
535 this->quotient_low_limbs_range_constraint_3,
536 this->quotient_low_limbs_range_constraint_4,
537 this->quotient_low_limbs_range_constraint_tail,
538 this->quotient_high_limbs_range_constraint_0,
539 this->quotient_high_limbs_range_constraint_1,
540 this->quotient_high_limbs_range_constraint_2,
541 this->quotient_high_limbs_range_constraint_3,
542 this->quotient_high_limbs_range_constraint_4,
543 this->quotient_high_limbs_range_constraint_tail,
544 this->relation_wide_limbs_range_constraint_0,
545 this->relation_wide_limbs_range_constraint_1,
546 this->relation_wide_limbs_range_constraint_2,
547 this->relation_wide_limbs_range_constraint_3,
563 p_x_high_limbs_shift,
565 p_y_high_limbs_shift,
568 accumulators_binary_limbs_0_shift,
569 accumulators_binary_limbs_1_shift,
570 accumulators_binary_limbs_2_shift,
571 accumulators_binary_limbs_3_shift,
572 quotient_low_binary_limbs_shift,
573 quotient_high_binary_limbs_shift,
574 relation_wide_limbs_shift,
575 p_x_low_limbs_range_constraint_0_shift,
576 p_x_low_limbs_range_constraint_1_shift,
577 p_x_low_limbs_range_constraint_2_shift,
578 p_x_low_limbs_range_constraint_3_shift,
579 p_x_low_limbs_range_constraint_4_shift,
580 p_x_low_limbs_range_constraint_tail_shift,
581 p_x_high_limbs_range_constraint_0_shift,
582 p_x_high_limbs_range_constraint_1_shift,
583 p_x_high_limbs_range_constraint_2_shift,
584 p_x_high_limbs_range_constraint_3_shift,
585 p_x_high_limbs_range_constraint_4_shift,
586 p_x_high_limbs_range_constraint_tail_shift,
587 p_y_low_limbs_range_constraint_0_shift,
588 p_y_low_limbs_range_constraint_1_shift,
589 p_y_low_limbs_range_constraint_2_shift,
590 p_y_low_limbs_range_constraint_3_shift,
591 p_y_low_limbs_range_constraint_4_shift,
592 p_y_low_limbs_range_constraint_tail_shift,
593 p_y_high_limbs_range_constraint_0_shift,
594 p_y_high_limbs_range_constraint_1_shift,
595 p_y_high_limbs_range_constraint_2_shift,
596 p_y_high_limbs_range_constraint_3_shift,
597 p_y_high_limbs_range_constraint_4_shift,
598 p_y_high_limbs_range_constraint_tail_shift,
599 z_low_limbs_range_constraint_0_shift,
600 z_low_limbs_range_constraint_1_shift,
601 z_low_limbs_range_constraint_2_shift,
602 z_low_limbs_range_constraint_3_shift,
603 z_low_limbs_range_constraint_4_shift,
604 z_low_limbs_range_constraint_tail_shift,
605 z_high_limbs_range_constraint_0_shift,
606 z_high_limbs_range_constraint_1_shift,
607 z_high_limbs_range_constraint_2_shift,
608 z_high_limbs_range_constraint_3_shift,
609 z_high_limbs_range_constraint_4_shift,
610 z_high_limbs_range_constraint_tail_shift,
611 accumulator_low_limbs_range_constraint_0_shift,
612 accumulator_low_limbs_range_constraint_1_shift,
613 accumulator_low_limbs_range_constraint_2_shift,
614 accumulator_low_limbs_range_constraint_3_shift,
615 accumulator_low_limbs_range_constraint_4_shift,
616 accumulator_low_limbs_range_constraint_tail_shift,
617 accumulator_high_limbs_range_constraint_0_shift,
618 accumulator_high_limbs_range_constraint_1_shift,
619 accumulator_high_limbs_range_constraint_2_shift,
620 accumulator_high_limbs_range_constraint_3_shift,
621 accumulator_high_limbs_range_constraint_4_shift,
622 accumulator_high_limbs_range_constraint_tail_shift,
623 quotient_low_limbs_range_constraint_0_shift,
624 quotient_low_limbs_range_constraint_1_shift,
625 quotient_low_limbs_range_constraint_2_shift,
626 quotient_low_limbs_range_constraint_3_shift,
627 quotient_low_limbs_range_constraint_4_shift,
628 quotient_low_limbs_range_constraint_tail_shift,
629 quotient_high_limbs_range_constraint_0_shift,
630 quotient_high_limbs_range_constraint_1_shift,
631 quotient_high_limbs_range_constraint_2_shift,
632 quotient_high_limbs_range_constraint_3_shift,
633 quotient_high_limbs_range_constraint_4_shift,
634 quotient_high_limbs_range_constraint_tail_shift,
635 relation_wide_limbs_range_constraint_0_shift,
636 relation_wide_limbs_range_constraint_1_shift,
637 relation_wide_limbs_range_constraint_2_shift,
638 relation_wide_limbs_range_constraint_3_shift,
639 ordered_range_constraints_0_shift,
640 ordered_range_constraints_1_shift,
641 ordered_range_constraints_2_shift,
642 ordered_range_constraints_3_shift,
643 ordered_range_constraints_4_shift,
664 template <
typename DataType>
707 std::ios_base::fmtflags f(os.flags());
708 auto entities =
a.get_all();
709 for (
size_t i = 0; i < entities.size() - 1; i++) {
710 os <<
"e[" <<
std::setw(2) << i <<
"] = " << (entities[i]) <<
",\n";
712 os <<
"e[" <<
std::setw(2) << (entities.size() - 1) <<
"] = " << entities[entities.size() - 1] <<
" }";
743 ordered_range_constraint =
Polynomial{ circuit_size - 1,
749 interleaved =
Polynomial{ circuit_size, circuit_size };
760 if (poly.is_empty()) {
769 lagrange_first =
Polynomial{ 1, circuit_size };
782 lagrange_masking =
Polynomial{ circuit_size - circuit_size_without_masking,
784 circuit_size_without_masking };
790 circuit_size_without_masking - 1 };
791 ordered_extra_range_constraints_numerator =
809 for (
auto [result_field, polynomial] :
zip_view(result.get_all(), this->get_all())) {
810 result_field = polynomial[row_idx];
818 shifted = to_be_shifted.shifted();
857 for (
auto [vk_commitment, fixed_commitment] :
859 vk_commitment = fixed_commitment;
869 for (
auto [polynomial, commitment] :
870 zip_view(proving_key->polynomials.get_precomputed(), this->get_all())) {
871 commitment = proving_key->commitment_key.commit(polynomial);
882 [[maybe_unused]]
Transcript& transcript)
const override
884 throw_or_abort(
"Not intended to be used because vk is hardcoded in circuit.");
905 for (
auto& poly : this->get_all()) {
911 for (
auto [poly, full_poly] :
zip_view(get_all(), full_polynomials.get_all())) {
913 size_t desired_size = full_poly.end_index() / 2 + full_poly.end_index() % 2;
914 poly =
Polynomial(desired_size, circuit_size / 2);
940 this->x_lo_y_hi =
"X_LO_Y_HI";
941 this->x_hi_z_1 =
"X_HI_Z_1";
942 this->y_lo_z_2 =
"Y_LO_Z_2";
943 this->p_x_low_limbs =
"P_X_LOW_LIMBS";
944 this->p_x_high_limbs =
"P_X_HIGH_LIMBS";
945 this->p_x_low_limbs_range_constraint_0 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_0";
946 this->p_x_low_limbs_range_constraint_1 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_1";
947 this->p_x_low_limbs_range_constraint_2 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_2";
948 this->p_x_low_limbs_range_constraint_3 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_3";
949 this->p_x_low_limbs_range_constraint_4 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_4";
950 this->p_x_low_limbs_range_constraint_tail =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
951 this->p_x_high_limbs_range_constraint_0 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_0";
952 this->p_x_high_limbs_range_constraint_1 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_1";
953 this->p_x_high_limbs_range_constraint_2 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_2";
954 this->p_x_high_limbs_range_constraint_3 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_3";
955 this->p_x_high_limbs_range_constraint_4 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_4";
956 this->p_x_high_limbs_range_constraint_tail =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
957 this->p_y_low_limbs =
"P_Y_LOW_LIMBS";
958 this->p_y_low_limbs_range_constraint_0 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_0";
959 this->p_y_low_limbs_range_constraint_1 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_1";
960 this->p_y_low_limbs_range_constraint_2 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_2";
961 this->p_y_low_limbs_range_constraint_3 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_3";
962 this->p_y_low_limbs_range_constraint_4 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_4";
963 this->p_y_low_limbs_range_constraint_tail =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
964 this->p_y_high_limbs =
"P_Y_HIGH_LIMBS";
965 this->p_y_high_limbs_range_constraint_0 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_0";
966 this->p_y_high_limbs_range_constraint_1 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_1";
967 this->p_y_high_limbs_range_constraint_2 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_2";
968 this->p_y_high_limbs_range_constraint_3 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_3";
969 this->p_y_high_limbs_range_constraint_4 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_4";
970 this->p_y_high_limbs_range_constraint_tail =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
971 this->z_low_limbs =
"Z_LOw_LIMBS";
972 this->z_low_limbs_range_constraint_0 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_0";
973 this->z_low_limbs_range_constraint_1 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_1";
974 this->z_low_limbs_range_constraint_2 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_2";
975 this->z_low_limbs_range_constraint_3 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_3";
976 this->z_low_limbs_range_constraint_4 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_4";
977 this->z_low_limbs_range_constraint_tail =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
978 this->z_high_limbs =
"Z_HIGH_LIMBS";
979 this->z_high_limbs_range_constraint_0 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_0";
980 this->z_high_limbs_range_constraint_1 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_1";
981 this->z_high_limbs_range_constraint_2 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_2";
982 this->z_high_limbs_range_constraint_3 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_3";
983 this->z_high_limbs_range_constraint_4 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_4";
984 this->z_high_limbs_range_constraint_tail =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
985 this->accumulators_binary_limbs_0 =
"ACCUMULATORS_BINARY_LIMBS_0";
986 this->accumulators_binary_limbs_1 =
"ACCUMULATORS_BINARY_LIMBS_1";
987 this->accumulators_binary_limbs_2 =
"ACCUMULATORS_BINARY_LIMBS_2";
988 this->accumulators_binary_limbs_3 =
"ACCUMULATORS_BINARY_LIMBS_3";
989 this->accumulator_low_limbs_range_constraint_0 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_0";
990 this->accumulator_low_limbs_range_constraint_1 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_1";
991 this->accumulator_low_limbs_range_constraint_2 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_2";
992 this->accumulator_low_limbs_range_constraint_3 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_3";
993 this->accumulator_low_limbs_range_constraint_4 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_4";
994 this->accumulator_low_limbs_range_constraint_tail =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
995 this->accumulator_high_limbs_range_constraint_0 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_0";
996 this->accumulator_high_limbs_range_constraint_1 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_1";
997 this->accumulator_high_limbs_range_constraint_2 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_2";
998 this->accumulator_high_limbs_range_constraint_3 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_3";
999 this->accumulator_high_limbs_range_constraint_4 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_4";
1000 this->accumulator_high_limbs_range_constraint_tail =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
1001 this->quotient_low_binary_limbs =
"QUOTIENT_LOW_BINARY_LIMBS";
1002 this->quotient_high_binary_limbs =
"QUOTIENT_HIGH_BINARY_LIMBS";
1003 this->quotient_low_limbs_range_constraint_0 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_0";
1004 this->quotient_low_limbs_range_constraint_1 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_1";
1005 this->quotient_low_limbs_range_constraint_2 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_2";
1006 this->quotient_low_limbs_range_constraint_3 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_3";
1007 this->quotient_low_limbs_range_constraint_4 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_4";
1008 this->quotient_low_limbs_range_constraint_tail =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
1009 this->quotient_high_limbs_range_constraint_0 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_0";
1010 this->quotient_high_limbs_range_constraint_1 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_1";
1011 this->quotient_high_limbs_range_constraint_2 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_2";
1012 this->quotient_high_limbs_range_constraint_3 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_3";
1013 this->quotient_high_limbs_range_constraint_4 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_4";
1014 this->quotient_high_limbs_range_constraint_tail =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
1015 this->relation_wide_limbs =
"RELATION_WIDE_LIMBS";
1016 this->relation_wide_limbs_range_constraint_0 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_0";
1017 this->relation_wide_limbs_range_constraint_1 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_1";
1018 this->relation_wide_limbs_range_constraint_2 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_2";
1019 this->relation_wide_limbs_range_constraint_3 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_2";
1020 this->ordered_range_constraints_0 =
"ORDERED_RANGE_CONSTRAINTS_0";
1021 this->ordered_range_constraints_1 =
"ORDERED_RANGE_CONSTRAINTS_1";
1022 this->ordered_range_constraints_2 =
"ORDERED_RANGE_CONSTRAINTS_2";
1023 this->ordered_range_constraints_3 =
"ORDERED_RANGE_CONSTRAINTS_3";
1024 this->ordered_range_constraints_4 =
"ORDERED_RANGE_CONSTRAINTS_4";
1025 this->z_perm =
"Z_PERM";
1026 this->interleaved_range_constraints_0 =
"INTERLEAVED_RANGE_CONSTRAINTS_0";
1027 this->interleaved_range_constraints_1 =
"INTERLEAVED_RANGE_CONSTRAINTS_1";
1028 this->interleaved_range_constraints_2 =
"INTERLEAVED_RANGE_CONSTRAINTS_2";
1029 this->interleaved_range_constraints_3 =
"INTERLEAVED_RANGE_CONSTRAINTS_3";
1032 this->lagrange_first =
"__LAGRANGE_FIRST";
1033 this->lagrange_last =
"__LAGRANGE_LAST";
1034 this->lagrange_odd_in_minicircuit =
"__LAGRANGE_ODD_IN_MINICIRCUIT";
1035 this->lagrange_even_in_minicircuit =
"__LAGRANGE_EVEN_IN_MINICIRCUIT";
1036 this->lagrange_result_row =
"__LAGRANGE_RESULT_ROW";
1037 this->lagrange_last_in_minicircuit =
"__LAGRANGE_LAST_IN_MINICIRCUIT";
1038 this->ordered_extra_range_constraints_numerator =
"__ORDERED_EXTRA_RANGE_CONSTRAINTS_NUMERATOR";
1039 this->lagrange_masking =
"__LAGRANGE_MASKING";
1040 this->lagrange_mini_masking =
"__LAGRANGE_MINI_MASKING";
1041 this->lagrange_real_last =
"__LAGRANGE_REAL_LAST";
1045 template <
typename Commitment,
typename VerificationKey>
1050 this->lagrange_first = verification_key->lagrange_first;
1051 this->lagrange_last = verification_key->lagrange_last;
1052 this->lagrange_odd_in_minicircuit = verification_key->lagrange_odd_in_minicircuit;
1053 this->lagrange_even_in_minicircuit = verification_key->lagrange_even_in_minicircuit;
1054 this->lagrange_result_row = verification_key->lagrange_result_row;
1055 this->lagrange_last_in_minicircuit = verification_key->lagrange_last_in_minicircuit;
1056 this->ordered_extra_range_constraints_numerator =
1057 verification_key->ordered_extra_range_constraints_numerator;
1058 this->lagrange_masking = verification_key->lagrange_masking;
1059 this->lagrange_mini_masking = verification_key->lagrange_mini_masking;
1060 this->lagrange_real_last = verification_key->lagrange_real_last;
1071 template <
typename ProverPolynomialsOrPartiallyEvaluatedMultivariates,
typename EdgeType>
1072 static bool skip_entire_row([[maybe_unused]]
const ProverPolynomialsOrPartiallyEvaluatedMultivariates& polynomials,
1073 [[maybe_unused]]
const EdgeType edge_idx)
1076 auto s0 = polynomials.ordered_range_constraints_0_shift[edge_idx];
1077 auto s1 = polynomials.ordered_range_constraints_1_shift[edge_idx];
1078 auto s2 = polynomials.ordered_range_constraints_2_shift[edge_idx];
1079 auto s3 = polynomials.ordered_range_constraints_3_shift[edge_idx];
1080 auto s4 = polynomials.ordered_range_constraints_4_shift[edge_idx];
1081 auto s5 = polynomials.ordered_range_constraints_0_shift[edge_idx + 1];
1082 auto s6 = polynomials.ordered_range_constraints_1_shift[edge_idx + 1];
1083 auto s7 = polynomials.ordered_range_constraints_2_shift[edge_idx + 1];
1084 auto s8 = polynomials.ordered_range_constraints_3_shift[edge_idx + 1];
1085 auto s9 = polynomials.ordered_range_constraints_4_shift[edge_idx + 1];
1086 auto shift_0 = (s0 == 0) && (s1 == 0) && (s2 == 0) && (s3 == 0) && (s4 == 0) && (s5 == 0) && (s6 == 0) &&
1087 (s7 == 0) && (s8 == 0) && (s9 == 0);
1088 return shift_0 && (polynomials.z_perm[edge_idx] == polynomials.z_perm_shift[edge_idx]) &&
1089 (polynomials.z_perm[edge_idx + 1] == polynomials.z_perm_shift[edge_idx + 1]) &&
1090 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
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...
bool compare(const VerificationKey &other)
VerificationKey(const std::shared_ptr< ProvingKey > &proving_key)
fr hash_with_origin_tagging(const std::string &domain_separator, Transcript &transcript) const override
Unused function because vk is hardcoded in recursive verifier, so no transcript hashing is needed.
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
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.
BaseTranscript< FrCodec, bb::crypto::Poseidon2< bb::crypto::Poseidon2Bn254ScalarFieldParams > > NativeTranscript
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
static std::vector< Commitment > get_all()
void throw_or_abort(std::string const &err)