49 static constexpr bool HasZK =
true;
96 "Translator circuit is too small for defined number of steps "
97 "(TranslatorDeltaRangeConstraintRelation). ");
148 template <
typename FF>
170 "LIBRA_UNIVARIATES_LENGTH must be equal to Translator::BATCHED_RELATION_PARTIAL_LENGTH");
173 static constexpr size_t num_frs_comm = bb::field_conversion::calc_num_bn254_frs<Commitment>();
174 static constexpr size_t num_frs_fr = bb::field_conversion::calc_num_bn254_frs<FF>();
175 static constexpr size_t num_frs_fq = bb::field_conversion::calc_num_bn254_frs<BF>();
210 ordered_extra_range_constraints_numerator,
215 lagrange_odd_in_minicircuit,
216 lagrange_even_in_minicircuit,
218 lagrange_last_in_minicircuit,
220 lagrange_mini_masking,
227 interleaved_range_constraints_0,
228 interleaved_range_constraints_1,
229 interleaved_range_constraints_2,
230 interleaved_range_constraints_3)
244 accumulators_binary_limbs_0,
245 accumulators_binary_limbs_1,
246 accumulators_binary_limbs_2,
247 accumulators_binary_limbs_3,
248 quotient_low_binary_limbs,
249 quotient_high_binary_limbs,
251 p_x_low_limbs_range_constraint_0,
252 p_x_low_limbs_range_constraint_1,
253 p_x_low_limbs_range_constraint_2,
254 p_x_low_limbs_range_constraint_3,
255 p_x_low_limbs_range_constraint_4,
256 p_x_low_limbs_range_constraint_tail,
257 p_x_high_limbs_range_constraint_0,
258 p_x_high_limbs_range_constraint_1,
259 p_x_high_limbs_range_constraint_2,
260 p_x_high_limbs_range_constraint_3,
261 p_x_high_limbs_range_constraint_4,
262 p_x_high_limbs_range_constraint_tail,
263 p_y_low_limbs_range_constraint_0,
264 p_y_low_limbs_range_constraint_1,
265 p_y_low_limbs_range_constraint_2,
266 p_y_low_limbs_range_constraint_3,
267 p_y_low_limbs_range_constraint_4,
268 p_y_low_limbs_range_constraint_tail,
269 p_y_high_limbs_range_constraint_0,
270 p_y_high_limbs_range_constraint_1,
271 p_y_high_limbs_range_constraint_2,
272 p_y_high_limbs_range_constraint_3,
273 p_y_high_limbs_range_constraint_4,
274 p_y_high_limbs_range_constraint_tail,
275 z_low_limbs_range_constraint_0,
276 z_low_limbs_range_constraint_1,
277 z_low_limbs_range_constraint_2,
278 z_low_limbs_range_constraint_3,
279 z_low_limbs_range_constraint_4,
280 z_low_limbs_range_constraint_tail,
281 z_high_limbs_range_constraint_0,
282 z_high_limbs_range_constraint_1,
283 z_high_limbs_range_constraint_2,
284 z_high_limbs_range_constraint_3,
285 z_high_limbs_range_constraint_4,
286 z_high_limbs_range_constraint_tail,
287 accumulator_low_limbs_range_constraint_0,
288 accumulator_low_limbs_range_constraint_1,
289 accumulator_low_limbs_range_constraint_2,
290 accumulator_low_limbs_range_constraint_3,
291 accumulator_low_limbs_range_constraint_4,
292 accumulator_low_limbs_range_constraint_tail,
293 accumulator_high_limbs_range_constraint_0,
294 accumulator_high_limbs_range_constraint_1,
295 accumulator_high_limbs_range_constraint_2,
296 accumulator_high_limbs_range_constraint_3,
297 accumulator_high_limbs_range_constraint_4,
298 accumulator_high_limbs_range_constraint_tail,
299 quotient_low_limbs_range_constraint_0,
300 quotient_low_limbs_range_constraint_1,
301 quotient_low_limbs_range_constraint_2,
302 quotient_low_limbs_range_constraint_3,
303 quotient_low_limbs_range_constraint_4,
304 quotient_low_limbs_range_constraint_tail,
305 quotient_high_limbs_range_constraint_0,
306 quotient_high_limbs_range_constraint_1,
307 quotient_high_limbs_range_constraint_2,
308 quotient_high_limbs_range_constraint_3,
309 quotient_high_limbs_range_constraint_4,
310 quotient_high_limbs_range_constraint_tail,
311 relation_wide_limbs_range_constraint_0,
312 relation_wide_limbs_range_constraint_1,
313 relation_wide_limbs_range_constraint_2,
314 relation_wide_limbs_range_constraint_3);
322 ordered_range_constraints_0,
323 ordered_range_constraints_1,
324 ordered_range_constraints_2,
325 ordered_range_constraints_3,
326 ordered_range_constraints_4);
343 template <
typename DataType>
418 this->p_x_low_limbs_range_constraint_0,
419 this->p_x_low_limbs_range_constraint_1,
420 this->p_x_low_limbs_range_constraint_2,
421 this->p_x_low_limbs_range_constraint_3,
422 this->p_x_low_limbs_range_constraint_4,
423 this->p_x_low_limbs_range_constraint_tail,
424 this->p_x_high_limbs_range_constraint_0,
425 this->p_x_high_limbs_range_constraint_1,
426 this->p_x_high_limbs_range_constraint_2,
427 this->p_x_high_limbs_range_constraint_3,
428 this->p_x_high_limbs_range_constraint_4,
429 this->p_x_high_limbs_range_constraint_tail,
430 this->p_y_low_limbs_range_constraint_0,
431 this->p_y_low_limbs_range_constraint_1,
432 this->p_y_low_limbs_range_constraint_2,
433 this->p_y_low_limbs_range_constraint_3,
436 this->p_y_low_limbs_range_constraint_4,
437 this->p_y_low_limbs_range_constraint_tail,
438 this->p_y_high_limbs_range_constraint_0,
439 this->p_y_high_limbs_range_constraint_1,
440 this->p_y_high_limbs_range_constraint_2,
441 this->p_y_high_limbs_range_constraint_3,
442 this->p_y_high_limbs_range_constraint_4,
443 this->p_y_high_limbs_range_constraint_tail,
444 this->z_low_limbs_range_constraint_0,
445 this->z_low_limbs_range_constraint_1,
446 this->z_low_limbs_range_constraint_2,
447 this->z_low_limbs_range_constraint_3,
448 this->z_low_limbs_range_constraint_4,
449 this->z_low_limbs_range_constraint_tail,
450 this->z_high_limbs_range_constraint_0,
451 this->z_high_limbs_range_constraint_1,
454 this->z_high_limbs_range_constraint_2,
455 this->z_high_limbs_range_constraint_3,
456 this->z_high_limbs_range_constraint_4,
457 this->z_high_limbs_range_constraint_tail,
458 this->accumulator_low_limbs_range_constraint_0,
459 this->accumulator_low_limbs_range_constraint_1,
460 this->accumulator_low_limbs_range_constraint_2,
461 this->accumulator_low_limbs_range_constraint_3,
462 this->accumulator_low_limbs_range_constraint_4,
463 this->accumulator_low_limbs_range_constraint_tail,
464 this->accumulator_high_limbs_range_constraint_0,
465 this->accumulator_high_limbs_range_constraint_1,
466 this->accumulator_high_limbs_range_constraint_2,
467 this->accumulator_high_limbs_range_constraint_3,
468 this->accumulator_high_limbs_range_constraint_4,
469 this->accumulator_high_limbs_range_constraint_tail,
472 this->quotient_low_limbs_range_constraint_0,
473 this->quotient_low_limbs_range_constraint_1,
474 this->quotient_low_limbs_range_constraint_2,
475 this->quotient_low_limbs_range_constraint_3,
476 this->quotient_low_limbs_range_constraint_4,
477 this->quotient_low_limbs_range_constraint_tail,
478 this->quotient_high_limbs_range_constraint_0,
479 this->quotient_high_limbs_range_constraint_1,
480 this->quotient_high_limbs_range_constraint_2,
481 this->quotient_high_limbs_range_constraint_3,
482 this->quotient_high_limbs_range_constraint_4,
483 this->quotient_high_limbs_range_constraint_tail,
484 this->relation_wide_limbs_range_constraint_0,
485 this->relation_wide_limbs_range_constraint_1,
486 this->relation_wide_limbs_range_constraint_2,
487 this->relation_wide_limbs_range_constraint_3,
503 p_x_high_limbs_shift,
505 p_y_high_limbs_shift,
508 accumulators_binary_limbs_0_shift,
509 accumulators_binary_limbs_1_shift,
510 accumulators_binary_limbs_2_shift,
511 accumulators_binary_limbs_3_shift,
512 quotient_low_binary_limbs_shift,
513 quotient_high_binary_limbs_shift,
514 relation_wide_limbs_shift,
515 p_x_low_limbs_range_constraint_0_shift,
516 p_x_low_limbs_range_constraint_1_shift,
517 p_x_low_limbs_range_constraint_2_shift,
518 p_x_low_limbs_range_constraint_3_shift,
519 p_x_low_limbs_range_constraint_4_shift,
520 p_x_low_limbs_range_constraint_tail_shift,
521 p_x_high_limbs_range_constraint_0_shift,
522 p_x_high_limbs_range_constraint_1_shift,
523 p_x_high_limbs_range_constraint_2_shift,
524 p_x_high_limbs_range_constraint_3_shift,
525 p_x_high_limbs_range_constraint_4_shift,
526 p_x_high_limbs_range_constraint_tail_shift,
527 p_y_low_limbs_range_constraint_0_shift,
528 p_y_low_limbs_range_constraint_1_shift,
529 p_y_low_limbs_range_constraint_2_shift,
530 p_y_low_limbs_range_constraint_3_shift,
531 p_y_low_limbs_range_constraint_4_shift,
532 p_y_low_limbs_range_constraint_tail_shift,
533 p_y_high_limbs_range_constraint_0_shift,
534 p_y_high_limbs_range_constraint_1_shift,
535 p_y_high_limbs_range_constraint_2_shift,
536 p_y_high_limbs_range_constraint_3_shift,
537 p_y_high_limbs_range_constraint_4_shift,
538 p_y_high_limbs_range_constraint_tail_shift,
539 z_low_limbs_range_constraint_0_shift,
540 z_low_limbs_range_constraint_1_shift,
541 z_low_limbs_range_constraint_2_shift,
542 z_low_limbs_range_constraint_3_shift,
543 z_low_limbs_range_constraint_4_shift,
544 z_low_limbs_range_constraint_tail_shift,
545 z_high_limbs_range_constraint_0_shift,
546 z_high_limbs_range_constraint_1_shift,
547 z_high_limbs_range_constraint_2_shift,
548 z_high_limbs_range_constraint_3_shift,
549 z_high_limbs_range_constraint_4_shift,
550 z_high_limbs_range_constraint_tail_shift,
551 accumulator_low_limbs_range_constraint_0_shift,
552 accumulator_low_limbs_range_constraint_1_shift,
553 accumulator_low_limbs_range_constraint_2_shift,
554 accumulator_low_limbs_range_constraint_3_shift,
555 accumulator_low_limbs_range_constraint_4_shift,
556 accumulator_low_limbs_range_constraint_tail_shift,
557 accumulator_high_limbs_range_constraint_0_shift,
558 accumulator_high_limbs_range_constraint_1_shift,
559 accumulator_high_limbs_range_constraint_2_shift,
560 accumulator_high_limbs_range_constraint_3_shift,
561 accumulator_high_limbs_range_constraint_4_shift,
562 accumulator_high_limbs_range_constraint_tail_shift,
563 quotient_low_limbs_range_constraint_0_shift,
564 quotient_low_limbs_range_constraint_1_shift,
565 quotient_low_limbs_range_constraint_2_shift,
566 quotient_low_limbs_range_constraint_3_shift,
567 quotient_low_limbs_range_constraint_4_shift,
568 quotient_low_limbs_range_constraint_tail_shift,
569 quotient_high_limbs_range_constraint_0_shift,
570 quotient_high_limbs_range_constraint_1_shift,
571 quotient_high_limbs_range_constraint_2_shift,
572 quotient_high_limbs_range_constraint_3_shift,
573 quotient_high_limbs_range_constraint_4_shift,
574 quotient_high_limbs_range_constraint_tail_shift,
575 relation_wide_limbs_range_constraint_0_shift,
576 relation_wide_limbs_range_constraint_1_shift,
577 relation_wide_limbs_range_constraint_2_shift,
578 relation_wide_limbs_range_constraint_3_shift,
579 ordered_range_constraints_0_shift,
580 ordered_range_constraints_1_shift,
581 ordered_range_constraints_2_shift,
582 ordered_range_constraints_3_shift,
583 ordered_range_constraints_4_shift,
595 template <
typename DataType>
631 std::ios_base::fmtflags f(os.flags());
632 auto entities =
a.get_all();
633 for (
size_t i = 0; i < entities.size() - 1; i++) {
634 os <<
"e[" <<
std::setw(2) << i <<
"] = " << (entities[i]) <<
",\n";
636 os <<
"e[" <<
std::setw(2) << (entities.size() - 1) <<
"] = " << entities[entities.size() - 1] <<
" }";
666 ordered_range_constraint =
Polynomial{ circuit_size - 1,
672 interleaved =
Polynomial{ circuit_size, circuit_size };
681 if (poly.is_empty()) {
689 lagrange_first =
Polynomial{ 1, circuit_size };
690 lagrange_result_row =
Polynomial{ 3, circuit_size };
695 if (poly.is_empty()) {
715 for (
auto [result_field, polynomial] :
zip_view(result.get_all(), this->get_all())) {
716 result_field = polynomial[row_idx];
724 shifted = to_be_shifted.shifted();
767 for (
auto [vk_commitment, fixed_commitment] :
769 vk_commitment = fixed_commitment;
779 for (
auto [polynomial, commitment] :
780 zip_view(proving_key->polynomials.get_precomputed(), this->get_all())) {
781 commitment = proving_key->commitment_key.commit(polynomial);
794 auto serialize_to_field_buffer = []<
typename T>(
const T& input, std::vector<fr>&
buffer) {
795 std::vector<fr> input_fields = convert_to_bn254_frs<T>(input);
796 buffer.insert(
buffer.end(), input_fields.begin(), input_fields.end());
799 std::vector<fr> elements;
800 for (
const Commitment& commitment : this->get_all()) {
801 serialize_to_field_buffer(commitment, elements);
813 [[maybe_unused]]
Transcript& transcript)
const override
815 throw_or_abort(
"Not intended to be used because vk is hardcoded in circuit.");
823 ordered_extra_range_constraints_numerator,
826 lagrange_odd_in_minicircuit,
827 lagrange_even_in_minicircuit,
829 lagrange_last_in_minicircuit,
831 lagrange_mini_masking,
844 for (
auto& poly : this->get_all()) {
850 for (
auto [poly, full_poly] :
zip_view(get_all(), full_polynomials.get_all())) {
852 size_t desired_size = full_poly.end_index() / 2 + full_poly.end_index() % 2;
853 poly =
Polynomial(desired_size, circuit_size / 2);
879 this->x_lo_y_hi =
"X_LO_Y_HI";
880 this->x_hi_z_1 =
"X_HI_Z_1";
881 this->y_lo_z_2 =
"Y_LO_Z_2";
882 this->p_x_low_limbs =
"P_X_LOW_LIMBS";
883 this->p_x_high_limbs =
"P_X_HIGH_LIMBS";
884 this->p_x_low_limbs_range_constraint_0 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_0";
885 this->p_x_low_limbs_range_constraint_1 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_1";
886 this->p_x_low_limbs_range_constraint_2 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_2";
887 this->p_x_low_limbs_range_constraint_3 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_3";
888 this->p_x_low_limbs_range_constraint_4 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_4";
889 this->p_x_low_limbs_range_constraint_tail =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
890 this->p_x_high_limbs_range_constraint_0 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_0";
891 this->p_x_high_limbs_range_constraint_1 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_1";
892 this->p_x_high_limbs_range_constraint_2 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_2";
893 this->p_x_high_limbs_range_constraint_3 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_3";
894 this->p_x_high_limbs_range_constraint_4 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_4";
895 this->p_x_high_limbs_range_constraint_tail =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
896 this->p_y_low_limbs =
"P_Y_LOW_LIMBS";
897 this->p_y_low_limbs_range_constraint_0 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_0";
898 this->p_y_low_limbs_range_constraint_1 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_1";
899 this->p_y_low_limbs_range_constraint_2 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_2";
900 this->p_y_low_limbs_range_constraint_3 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_3";
901 this->p_y_low_limbs_range_constraint_4 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_4";
902 this->p_y_low_limbs_range_constraint_tail =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
903 this->p_y_high_limbs =
"P_Y_HIGH_LIMBS";
904 this->p_y_high_limbs_range_constraint_0 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_0";
905 this->p_y_high_limbs_range_constraint_1 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_1";
906 this->p_y_high_limbs_range_constraint_2 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_2";
907 this->p_y_high_limbs_range_constraint_3 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_3";
908 this->p_y_high_limbs_range_constraint_4 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_4";
909 this->p_y_high_limbs_range_constraint_tail =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
910 this->z_low_limbs =
"Z_LOw_LIMBS";
911 this->z_low_limbs_range_constraint_0 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_0";
912 this->z_low_limbs_range_constraint_1 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_1";
913 this->z_low_limbs_range_constraint_2 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_2";
914 this->z_low_limbs_range_constraint_3 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_3";
915 this->z_low_limbs_range_constraint_4 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_4";
916 this->z_low_limbs_range_constraint_tail =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
917 this->z_high_limbs =
"Z_HIGH_LIMBS";
918 this->z_high_limbs_range_constraint_0 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_0";
919 this->z_high_limbs_range_constraint_1 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_1";
920 this->z_high_limbs_range_constraint_2 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_2";
921 this->z_high_limbs_range_constraint_3 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_3";
922 this->z_high_limbs_range_constraint_4 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_4";
923 this->z_high_limbs_range_constraint_tail =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
924 this->accumulators_binary_limbs_0 =
"ACCUMULATORS_BINARY_LIMBS_0";
925 this->accumulators_binary_limbs_1 =
"ACCUMULATORS_BINARY_LIMBS_1";
926 this->accumulators_binary_limbs_2 =
"ACCUMULATORS_BINARY_LIMBS_2";
927 this->accumulators_binary_limbs_3 =
"ACCUMULATORS_BINARY_LIMBS_3";
928 this->accumulator_low_limbs_range_constraint_0 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_0";
929 this->accumulator_low_limbs_range_constraint_1 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_1";
930 this->accumulator_low_limbs_range_constraint_2 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_2";
931 this->accumulator_low_limbs_range_constraint_3 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_3";
932 this->accumulator_low_limbs_range_constraint_4 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_4";
933 this->accumulator_low_limbs_range_constraint_tail =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
934 this->accumulator_high_limbs_range_constraint_0 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_0";
935 this->accumulator_high_limbs_range_constraint_1 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_1";
936 this->accumulator_high_limbs_range_constraint_2 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_2";
937 this->accumulator_high_limbs_range_constraint_3 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_3";
938 this->accumulator_high_limbs_range_constraint_4 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_4";
939 this->accumulator_high_limbs_range_constraint_tail =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
940 this->quotient_low_binary_limbs =
"QUOTIENT_LOW_BINARY_LIMBS";
941 this->quotient_high_binary_limbs =
"QUOTIENT_HIGH_BINARY_LIMBS";
942 this->quotient_low_limbs_range_constraint_0 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_0";
943 this->quotient_low_limbs_range_constraint_1 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_1";
944 this->quotient_low_limbs_range_constraint_2 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_2";
945 this->quotient_low_limbs_range_constraint_3 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_3";
946 this->quotient_low_limbs_range_constraint_4 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_4";
947 this->quotient_low_limbs_range_constraint_tail =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
948 this->quotient_high_limbs_range_constraint_0 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_0";
949 this->quotient_high_limbs_range_constraint_1 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_1";
950 this->quotient_high_limbs_range_constraint_2 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_2";
951 this->quotient_high_limbs_range_constraint_3 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_3";
952 this->quotient_high_limbs_range_constraint_4 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_4";
953 this->quotient_high_limbs_range_constraint_tail =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
954 this->relation_wide_limbs =
"RELATION_WIDE_LIMBS";
955 this->relation_wide_limbs_range_constraint_0 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_0";
956 this->relation_wide_limbs_range_constraint_1 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_1";
957 this->relation_wide_limbs_range_constraint_2 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_2";
958 this->relation_wide_limbs_range_constraint_3 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_2";
959 this->ordered_range_constraints_0 =
"ORDERED_RANGE_CONSTRAINTS_0";
960 this->ordered_range_constraints_1 =
"ORDERED_RANGE_CONSTRAINTS_1";
961 this->ordered_range_constraints_2 =
"ORDERED_RANGE_CONSTRAINTS_2";
962 this->ordered_range_constraints_3 =
"ORDERED_RANGE_CONSTRAINTS_3";
963 this->ordered_range_constraints_4 =
"ORDERED_RANGE_CONSTRAINTS_4";
964 this->interleaved_range_constraints_0 =
"INTERLEAVED_RANGE_CONSTRAINTS_0";
965 this->interleaved_range_constraints_1 =
"INTERLEAVED_RANGE_CONSTRAINTS_1";
966 this->interleaved_range_constraints_2 =
"INTERLEAVED_RANGE_CONSTRAINTS_2";
967 this->interleaved_range_constraints_3 =
"INTERLEAVED_RANGE_CONSTRAINTS_3";
968 this->z_perm =
"Z_PERM";
970 this->lagrange_first =
"__LAGRANGE_FIRST";
971 this->lagrange_last =
"__LAGRANGE_LAST";
972 this->lagrange_odd_in_minicircuit =
"__LAGRANGE_ODD_IN_MINICIRCUIT";
973 this->lagrange_even_in_minicircuit =
"__LAGRANGE_EVEN_IN_MINICIRCUIT";
974 this->lagrange_result_row =
"__LAGRANGE_RESULT_ROW";
975 this->lagrange_last_in_minicircuit =
"__LAGRANGE_LAST_IN_MINICIRCUIT";
976 this->ordered_extra_range_constraints_numerator =
"__ORDERED_EXTRA_RANGE_CONSTRAINTS_NUMERATOR";
977 this->lagrange_masking =
"__LAGRANGE_MASKING";
978 this->lagrange_mini_masking =
"__LAGRANGE_MINI_MASKING";
979 this->lagrange_real_last =
"__LAGRANGE_REAL_LAST";
983 template <
typename Commitment,
typename VerificationKey>
988 this->lagrange_first = verification_key->lagrange_first;
989 this->lagrange_last = verification_key->lagrange_last;
990 this->lagrange_odd_in_minicircuit = verification_key->lagrange_odd_in_minicircuit;
991 this->lagrange_even_in_minicircuit = verification_key->lagrange_even_in_minicircuit;
992 this->lagrange_result_row = verification_key->lagrange_result_row;
993 this->lagrange_last_in_minicircuit = verification_key->lagrange_last_in_minicircuit;
994 this->ordered_extra_range_constraints_numerator =
995 verification_key->ordered_extra_range_constraints_numerator;
996 this->lagrange_masking = verification_key->lagrange_masking;
997 this->lagrange_mini_masking = verification_key->lagrange_mini_masking;
998 this->lagrange_real_last = verification_key->lagrange_real_last;
1009 template <
typename ProverPolynomialsOrPartiallyEvaluatedMultivariates,
typename EdgeType>
1010 static bool skip_entire_row([[maybe_unused]]
const ProverPolynomialsOrPartiallyEvaluatedMultivariates& polynomials,
1011 [[maybe_unused]]
const EdgeType edge_idx)
1014 auto s0 = polynomials.ordered_range_constraints_0_shift[edge_idx];
1015 auto s1 = polynomials.ordered_range_constraints_1_shift[edge_idx];
1016 auto s2 = polynomials.ordered_range_constraints_2_shift[edge_idx];
1017 auto s3 = polynomials.ordered_range_constraints_3_shift[edge_idx];
1018 auto s4 = polynomials.ordered_range_constraints_4_shift[edge_idx];
1019 auto s5 = polynomials.ordered_range_constraints_0_shift[edge_idx + 1];
1020 auto s6 = polynomials.ordered_range_constraints_1_shift[edge_idx + 1];
1021 auto s7 = polynomials.ordered_range_constraints_2_shift[edge_idx + 1];
1022 auto s8 = polynomials.ordered_range_constraints_3_shift[edge_idx + 1];
1023 auto s9 = polynomials.ordered_range_constraints_4_shift[edge_idx + 1];
1024 auto shift_0 = (s0 == 0) && (s1 == 0) && (s2 == 0) && (s3 == 0) && (s4 == 0) && (s5 == 0) && (s6 == 0) &&
1025 (s7 == 0) && (s8 == 0) && (s9 == 0);
1026 return shift_0 && (polynomials.z_perm[edge_idx] == polynomials.z_perm_shift[edge_idx]) &&
1027 (polynomials.z_perm[edge_idx + 1] == polynomials.z_perm_shift[edge_idx + 1]) &&
1028 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 pub_inputs_offset
uint64_t num_public_inputs
typename PrecomputedCommitments::DataType Commitment
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 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
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_precomputed() const
auto get_unshifted_without_interleaved()
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)
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.
~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.
size_t get_polynomial_size() const
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...
std::true_type MSGPACK_NO_STATIC_CHECK
std::vector< fr > to_field_elements() const override
Serialize verification key to field elements.
MSGPACK_FIELDS(num_public_inputs, pub_inputs_offset, 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)
VerificationKey(const std::shared_ptr< ProvingKey > &proving_key)
fr hash_through_transcript(const std::string &domain_separator, Transcript &transcript) const override
Unused function because vk is hardcoded in recursive verifier, so no transcript hashing is needed.
static constexpr size_t VERIFICATION_KEY_LENGTH
VerifierCommitments_(const std::shared_ptr< VerificationKey > &verification_key)
DEFINE_FLAVOR_MEMBERS(DataType, op)
DEFINE_FLAVOR_MEMBERS(DataType, x_lo_y_hi, x_hi_z_1, y_lo_z_2, 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)
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_wires_to_be_shifted()
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_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 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 size_t NUM_SHIFTED_WITNESSES
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_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 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 MAX_TOTAL_RELATION_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
uint8_t buffer[RANDOM_BUFFER_SIZE]
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< NativeTranscriptParams > NativeTranscript
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
static std::vector< Commitment > get_all()
void throw_or_abort(std::string const &err)