49 static constexpr bool HasZK =
true;
103 "Translator circuit is too small for defined number of steps "
104 "(TranslatorDeltaRangeConstraintRelation). ");
155 template <
typename FF>
177 "LIBRA_UNIVARIATES_LENGTH must be equal to Translator::BATCHED_RELATION_PARTIAL_LENGTH");
180 static constexpr size_t num_frs_comm = FrCodec::calc_num_fields<Commitment>();
181 static constexpr size_t num_frs_fr = FrCodec::calc_num_fields<FF>();
182 static constexpr size_t num_frs_fq = FrCodec::calc_num_fields<BF>();
217 ordered_extra_range_constraints_numerator,
222 lagrange_odd_in_minicircuit,
223 lagrange_even_in_minicircuit,
225 lagrange_last_in_minicircuit,
227 lagrange_mini_masking,
234 interleaved_range_constraints_0,
235 interleaved_range_constraints_1,
236 interleaved_range_constraints_2,
237 interleaved_range_constraints_3)
251 accumulators_binary_limbs_0,
252 accumulators_binary_limbs_1,
253 accumulators_binary_limbs_2,
254 accumulators_binary_limbs_3,
255 quotient_low_binary_limbs,
256 quotient_high_binary_limbs,
258 p_x_low_limbs_range_constraint_0,
259 p_x_low_limbs_range_constraint_1,
260 p_x_low_limbs_range_constraint_2,
261 p_x_low_limbs_range_constraint_3,
262 p_x_low_limbs_range_constraint_4,
263 p_x_low_limbs_range_constraint_tail,
264 p_x_high_limbs_range_constraint_0,
265 p_x_high_limbs_range_constraint_1,
266 p_x_high_limbs_range_constraint_2,
267 p_x_high_limbs_range_constraint_3,
268 p_x_high_limbs_range_constraint_4,
269 p_x_high_limbs_range_constraint_tail,
270 p_y_low_limbs_range_constraint_0,
271 p_y_low_limbs_range_constraint_1,
272 p_y_low_limbs_range_constraint_2,
273 p_y_low_limbs_range_constraint_3,
274 p_y_low_limbs_range_constraint_4,
275 p_y_low_limbs_range_constraint_tail,
276 p_y_high_limbs_range_constraint_0,
277 p_y_high_limbs_range_constraint_1,
278 p_y_high_limbs_range_constraint_2,
279 p_y_high_limbs_range_constraint_3,
280 p_y_high_limbs_range_constraint_4,
281 p_y_high_limbs_range_constraint_tail,
282 z_low_limbs_range_constraint_0,
283 z_low_limbs_range_constraint_1,
284 z_low_limbs_range_constraint_2,
285 z_low_limbs_range_constraint_3,
286 z_low_limbs_range_constraint_4,
287 z_low_limbs_range_constraint_tail,
288 z_high_limbs_range_constraint_0,
289 z_high_limbs_range_constraint_1,
290 z_high_limbs_range_constraint_2,
291 z_high_limbs_range_constraint_3,
292 z_high_limbs_range_constraint_4,
293 z_high_limbs_range_constraint_tail,
294 accumulator_low_limbs_range_constraint_0,
295 accumulator_low_limbs_range_constraint_1,
296 accumulator_low_limbs_range_constraint_2,
297 accumulator_low_limbs_range_constraint_3,
298 accumulator_low_limbs_range_constraint_4,
299 accumulator_low_limbs_range_constraint_tail,
300 accumulator_high_limbs_range_constraint_0,
301 accumulator_high_limbs_range_constraint_1,
302 accumulator_high_limbs_range_constraint_2,
303 accumulator_high_limbs_range_constraint_3,
304 accumulator_high_limbs_range_constraint_4,
305 accumulator_high_limbs_range_constraint_tail,
306 quotient_low_limbs_range_constraint_0,
307 quotient_low_limbs_range_constraint_1,
308 quotient_low_limbs_range_constraint_2,
309 quotient_low_limbs_range_constraint_3,
310 quotient_low_limbs_range_constraint_4,
311 quotient_low_limbs_range_constraint_tail,
312 quotient_high_limbs_range_constraint_0,
313 quotient_high_limbs_range_constraint_1,
314 quotient_high_limbs_range_constraint_2,
315 quotient_high_limbs_range_constraint_3,
316 quotient_high_limbs_range_constraint_4,
317 quotient_high_limbs_range_constraint_tail,
318 relation_wide_limbs_range_constraint_0,
319 relation_wide_limbs_range_constraint_1,
320 relation_wide_limbs_range_constraint_2,
321 relation_wide_limbs_range_constraint_3);
329 ordered_range_constraints_0,
330 ordered_range_constraints_1,
331 ordered_range_constraints_2,
332 ordered_range_constraints_3,
333 ordered_range_constraints_4);
350 template <
typename DataType>
423 this->p_x_low_limbs_range_constraint_0,
424 this->p_x_low_limbs_range_constraint_1,
425 this->p_x_low_limbs_range_constraint_2,
426 this->p_x_low_limbs_range_constraint_3,
427 this->p_x_low_limbs_range_constraint_4,
428 this->p_x_low_limbs_range_constraint_tail,
429 this->p_x_high_limbs_range_constraint_0,
430 this->p_x_high_limbs_range_constraint_1,
431 this->p_x_high_limbs_range_constraint_2,
432 this->p_x_high_limbs_range_constraint_3,
433 this->p_x_high_limbs_range_constraint_4,
434 this->p_x_high_limbs_range_constraint_tail,
435 this->p_y_low_limbs_range_constraint_0,
436 this->p_y_low_limbs_range_constraint_1,
437 this->p_y_low_limbs_range_constraint_2,
438 this->p_y_low_limbs_range_constraint_3,
441 this->p_y_low_limbs_range_constraint_4,
442 this->p_y_low_limbs_range_constraint_tail,
443 this->p_y_high_limbs_range_constraint_0,
444 this->p_y_high_limbs_range_constraint_1,
445 this->p_y_high_limbs_range_constraint_2,
446 this->p_y_high_limbs_range_constraint_3,
447 this->p_y_high_limbs_range_constraint_4,
448 this->p_y_high_limbs_range_constraint_tail,
449 this->z_low_limbs_range_constraint_0,
450 this->z_low_limbs_range_constraint_1,
451 this->z_low_limbs_range_constraint_2,
452 this->z_low_limbs_range_constraint_3,
453 this->z_low_limbs_range_constraint_4,
454 this->z_low_limbs_range_constraint_tail,
455 this->z_high_limbs_range_constraint_0,
456 this->z_high_limbs_range_constraint_1,
459 this->z_high_limbs_range_constraint_2,
460 this->z_high_limbs_range_constraint_3,
461 this->z_high_limbs_range_constraint_4,
462 this->z_high_limbs_range_constraint_tail,
463 this->accumulator_low_limbs_range_constraint_0,
464 this->accumulator_low_limbs_range_constraint_1,
465 this->accumulator_low_limbs_range_constraint_2,
466 this->accumulator_low_limbs_range_constraint_3,
467 this->accumulator_low_limbs_range_constraint_4,
468 this->accumulator_low_limbs_range_constraint_tail,
469 this->accumulator_high_limbs_range_constraint_0,
470 this->accumulator_high_limbs_range_constraint_1,
471 this->accumulator_high_limbs_range_constraint_2,
472 this->accumulator_high_limbs_range_constraint_3,
473 this->accumulator_high_limbs_range_constraint_4,
474 this->accumulator_high_limbs_range_constraint_tail,
477 this->quotient_low_limbs_range_constraint_0,
478 this->quotient_low_limbs_range_constraint_1,
479 this->quotient_low_limbs_range_constraint_2,
480 this->quotient_low_limbs_range_constraint_3,
481 this->quotient_low_limbs_range_constraint_4,
482 this->quotient_low_limbs_range_constraint_tail,
483 this->quotient_high_limbs_range_constraint_0,
484 this->quotient_high_limbs_range_constraint_1,
485 this->quotient_high_limbs_range_constraint_2,
486 this->quotient_high_limbs_range_constraint_3,
487 this->quotient_high_limbs_range_constraint_4,
488 this->quotient_high_limbs_range_constraint_tail,
489 this->relation_wide_limbs_range_constraint_0,
490 this->relation_wide_limbs_range_constraint_1,
491 this->relation_wide_limbs_range_constraint_2,
492 this->relation_wide_limbs_range_constraint_3,
508 p_x_high_limbs_shift,
510 p_y_high_limbs_shift,
513 accumulators_binary_limbs_0_shift,
514 accumulators_binary_limbs_1_shift,
515 accumulators_binary_limbs_2_shift,
516 accumulators_binary_limbs_3_shift,
517 quotient_low_binary_limbs_shift,
518 quotient_high_binary_limbs_shift,
519 relation_wide_limbs_shift,
520 p_x_low_limbs_range_constraint_0_shift,
521 p_x_low_limbs_range_constraint_1_shift,
522 p_x_low_limbs_range_constraint_2_shift,
523 p_x_low_limbs_range_constraint_3_shift,
524 p_x_low_limbs_range_constraint_4_shift,
525 p_x_low_limbs_range_constraint_tail_shift,
526 p_x_high_limbs_range_constraint_0_shift,
527 p_x_high_limbs_range_constraint_1_shift,
528 p_x_high_limbs_range_constraint_2_shift,
529 p_x_high_limbs_range_constraint_3_shift,
530 p_x_high_limbs_range_constraint_4_shift,
531 p_x_high_limbs_range_constraint_tail_shift,
532 p_y_low_limbs_range_constraint_0_shift,
533 p_y_low_limbs_range_constraint_1_shift,
534 p_y_low_limbs_range_constraint_2_shift,
535 p_y_low_limbs_range_constraint_3_shift,
536 p_y_low_limbs_range_constraint_4_shift,
537 p_y_low_limbs_range_constraint_tail_shift,
538 p_y_high_limbs_range_constraint_0_shift,
539 p_y_high_limbs_range_constraint_1_shift,
540 p_y_high_limbs_range_constraint_2_shift,
541 p_y_high_limbs_range_constraint_3_shift,
542 p_y_high_limbs_range_constraint_4_shift,
543 p_y_high_limbs_range_constraint_tail_shift,
544 z_low_limbs_range_constraint_0_shift,
545 z_low_limbs_range_constraint_1_shift,
546 z_low_limbs_range_constraint_2_shift,
547 z_low_limbs_range_constraint_3_shift,
548 z_low_limbs_range_constraint_4_shift,
549 z_low_limbs_range_constraint_tail_shift,
550 z_high_limbs_range_constraint_0_shift,
551 z_high_limbs_range_constraint_1_shift,
552 z_high_limbs_range_constraint_2_shift,
553 z_high_limbs_range_constraint_3_shift,
554 z_high_limbs_range_constraint_4_shift,
555 z_high_limbs_range_constraint_tail_shift,
556 accumulator_low_limbs_range_constraint_0_shift,
557 accumulator_low_limbs_range_constraint_1_shift,
558 accumulator_low_limbs_range_constraint_2_shift,
559 accumulator_low_limbs_range_constraint_3_shift,
560 accumulator_low_limbs_range_constraint_4_shift,
561 accumulator_low_limbs_range_constraint_tail_shift,
562 accumulator_high_limbs_range_constraint_0_shift,
563 accumulator_high_limbs_range_constraint_1_shift,
564 accumulator_high_limbs_range_constraint_2_shift,
565 accumulator_high_limbs_range_constraint_3_shift,
566 accumulator_high_limbs_range_constraint_4_shift,
567 accumulator_high_limbs_range_constraint_tail_shift,
568 quotient_low_limbs_range_constraint_0_shift,
569 quotient_low_limbs_range_constraint_1_shift,
570 quotient_low_limbs_range_constraint_2_shift,
571 quotient_low_limbs_range_constraint_3_shift,
572 quotient_low_limbs_range_constraint_4_shift,
573 quotient_low_limbs_range_constraint_tail_shift,
574 quotient_high_limbs_range_constraint_0_shift,
575 quotient_high_limbs_range_constraint_1_shift,
576 quotient_high_limbs_range_constraint_2_shift,
577 quotient_high_limbs_range_constraint_3_shift,
578 quotient_high_limbs_range_constraint_4_shift,
579 quotient_high_limbs_range_constraint_tail_shift,
580 relation_wide_limbs_range_constraint_0_shift,
581 relation_wide_limbs_range_constraint_1_shift,
582 relation_wide_limbs_range_constraint_2_shift,
583 relation_wide_limbs_range_constraint_3_shift,
584 ordered_range_constraints_0_shift,
585 ordered_range_constraints_1_shift,
586 ordered_range_constraints_2_shift,
587 ordered_range_constraints_3_shift,
588 ordered_range_constraints_4_shift,
600 template <
typename DataType>
636 std::ios_base::fmtflags f(os.flags());
637 auto entities =
a.get_all();
638 for (
size_t i = 0; i < entities.size() - 1; i++) {
639 os <<
"e[" <<
std::setw(2) << i <<
"] = " << (entities[i]) <<
",\n";
641 os <<
"e[" <<
std::setw(2) << (entities.size() - 1) <<
"] = " << entities[entities.size() - 1] <<
" }";
672 ordered_range_constraint =
Polynomial{ circuit_size - 1,
678 interleaved =
Polynomial{ circuit_size, circuit_size };
689 if (poly.is_empty()) {
698 lagrange_first =
Polynomial{ 1, circuit_size };
711 lagrange_masking =
Polynomial{ circuit_size - circuit_size_without_masking,
713 circuit_size_without_masking };
719 circuit_size_without_masking - 1 };
720 ordered_extra_range_constraints_numerator =
738 for (
auto [result_field, polynomial] :
zip_view(result.get_all(), this->get_all())) {
739 result_field = polynomial[row_idx];
747 shifted = to_be_shifted.shifted();
786 for (
auto [vk_commitment, fixed_commitment] :
788 vk_commitment = fixed_commitment;
798 for (
auto [polynomial, commitment] :
799 zip_view(proving_key->polynomials.get_precomputed(), this->get_all())) {
800 commitment = proving_key->commitment_key.commit(polynomial);
811 [[maybe_unused]]
Transcript& transcript)
const override
813 throw_or_abort(
"Not intended to be used because vk is hardcoded in circuit.");
826 for (
auto& poly : this->get_all()) {
832 for (
auto [poly, full_poly] :
zip_view(get_all(), full_polynomials.get_all())) {
834 size_t desired_size = full_poly.end_index() / 2 + full_poly.end_index() % 2;
835 poly =
Polynomial(desired_size, circuit_size / 2);
861 this->x_lo_y_hi =
"X_LO_Y_HI";
862 this->x_hi_z_1 =
"X_HI_Z_1";
863 this->y_lo_z_2 =
"Y_LO_Z_2";
864 this->p_x_low_limbs =
"P_X_LOW_LIMBS";
865 this->p_x_high_limbs =
"P_X_HIGH_LIMBS";
866 this->p_x_low_limbs_range_constraint_0 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_0";
867 this->p_x_low_limbs_range_constraint_1 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_1";
868 this->p_x_low_limbs_range_constraint_2 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_2";
869 this->p_x_low_limbs_range_constraint_3 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_3";
870 this->p_x_low_limbs_range_constraint_4 =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_4";
871 this->p_x_low_limbs_range_constraint_tail =
"P_X_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
872 this->p_x_high_limbs_range_constraint_0 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_0";
873 this->p_x_high_limbs_range_constraint_1 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_1";
874 this->p_x_high_limbs_range_constraint_2 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_2";
875 this->p_x_high_limbs_range_constraint_3 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_3";
876 this->p_x_high_limbs_range_constraint_4 =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_4";
877 this->p_x_high_limbs_range_constraint_tail =
"P_X_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
878 this->p_y_low_limbs =
"P_Y_LOW_LIMBS";
879 this->p_y_low_limbs_range_constraint_0 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_0";
880 this->p_y_low_limbs_range_constraint_1 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_1";
881 this->p_y_low_limbs_range_constraint_2 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_2";
882 this->p_y_low_limbs_range_constraint_3 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_3";
883 this->p_y_low_limbs_range_constraint_4 =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_4";
884 this->p_y_low_limbs_range_constraint_tail =
"P_Y_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
885 this->p_y_high_limbs =
"P_Y_HIGH_LIMBS";
886 this->p_y_high_limbs_range_constraint_0 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_0";
887 this->p_y_high_limbs_range_constraint_1 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_1";
888 this->p_y_high_limbs_range_constraint_2 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_2";
889 this->p_y_high_limbs_range_constraint_3 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_3";
890 this->p_y_high_limbs_range_constraint_4 =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_4";
891 this->p_y_high_limbs_range_constraint_tail =
"P_Y_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
892 this->z_low_limbs =
"Z_LOw_LIMBS";
893 this->z_low_limbs_range_constraint_0 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_0";
894 this->z_low_limbs_range_constraint_1 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_1";
895 this->z_low_limbs_range_constraint_2 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_2";
896 this->z_low_limbs_range_constraint_3 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_3";
897 this->z_low_limbs_range_constraint_4 =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_4";
898 this->z_low_limbs_range_constraint_tail =
"Z_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
899 this->z_high_limbs =
"Z_HIGH_LIMBS";
900 this->z_high_limbs_range_constraint_0 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_0";
901 this->z_high_limbs_range_constraint_1 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_1";
902 this->z_high_limbs_range_constraint_2 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_2";
903 this->z_high_limbs_range_constraint_3 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_3";
904 this->z_high_limbs_range_constraint_4 =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_4";
905 this->z_high_limbs_range_constraint_tail =
"Z_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
906 this->accumulators_binary_limbs_0 =
"ACCUMULATORS_BINARY_LIMBS_0";
907 this->accumulators_binary_limbs_1 =
"ACCUMULATORS_BINARY_LIMBS_1";
908 this->accumulators_binary_limbs_2 =
"ACCUMULATORS_BINARY_LIMBS_2";
909 this->accumulators_binary_limbs_3 =
"ACCUMULATORS_BINARY_LIMBS_3";
910 this->accumulator_low_limbs_range_constraint_0 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_0";
911 this->accumulator_low_limbs_range_constraint_1 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_1";
912 this->accumulator_low_limbs_range_constraint_2 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_2";
913 this->accumulator_low_limbs_range_constraint_3 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_3";
914 this->accumulator_low_limbs_range_constraint_4 =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_4";
915 this->accumulator_low_limbs_range_constraint_tail =
"ACCUMULATOR_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
916 this->accumulator_high_limbs_range_constraint_0 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_0";
917 this->accumulator_high_limbs_range_constraint_1 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_1";
918 this->accumulator_high_limbs_range_constraint_2 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_2";
919 this->accumulator_high_limbs_range_constraint_3 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_3";
920 this->accumulator_high_limbs_range_constraint_4 =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_4";
921 this->accumulator_high_limbs_range_constraint_tail =
"ACCUMULATOR_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
922 this->quotient_low_binary_limbs =
"QUOTIENT_LOW_BINARY_LIMBS";
923 this->quotient_high_binary_limbs =
"QUOTIENT_HIGH_BINARY_LIMBS";
924 this->quotient_low_limbs_range_constraint_0 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_0";
925 this->quotient_low_limbs_range_constraint_1 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_1";
926 this->quotient_low_limbs_range_constraint_2 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_2";
927 this->quotient_low_limbs_range_constraint_3 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_3";
928 this->quotient_low_limbs_range_constraint_4 =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_4";
929 this->quotient_low_limbs_range_constraint_tail =
"QUOTIENT_LOW_LIMBS_RANGE_CONSTRAINT_TAIL";
930 this->quotient_high_limbs_range_constraint_0 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_0";
931 this->quotient_high_limbs_range_constraint_1 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_1";
932 this->quotient_high_limbs_range_constraint_2 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_2";
933 this->quotient_high_limbs_range_constraint_3 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_3";
934 this->quotient_high_limbs_range_constraint_4 =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_4";
935 this->quotient_high_limbs_range_constraint_tail =
"QUOTIENT_HIGH_LIMBS_RANGE_CONSTRAINT_TAIL";
936 this->relation_wide_limbs =
"RELATION_WIDE_LIMBS";
937 this->relation_wide_limbs_range_constraint_0 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_0";
938 this->relation_wide_limbs_range_constraint_1 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_1";
939 this->relation_wide_limbs_range_constraint_2 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_2";
940 this->relation_wide_limbs_range_constraint_3 =
"RELATION_WIDE_LIMBS_RANGE_CONSTRAINT_2";
941 this->ordered_range_constraints_0 =
"ORDERED_RANGE_CONSTRAINTS_0";
942 this->ordered_range_constraints_1 =
"ORDERED_RANGE_CONSTRAINTS_1";
943 this->ordered_range_constraints_2 =
"ORDERED_RANGE_CONSTRAINTS_2";
944 this->ordered_range_constraints_3 =
"ORDERED_RANGE_CONSTRAINTS_3";
945 this->ordered_range_constraints_4 =
"ORDERED_RANGE_CONSTRAINTS_4";
946 this->z_perm =
"Z_PERM";
947 this->interleaved_range_constraints_0 =
"INTERLEAVED_RANGE_CONSTRAINTS_0";
948 this->interleaved_range_constraints_1 =
"INTERLEAVED_RANGE_CONSTRAINTS_1";
949 this->interleaved_range_constraints_2 =
"INTERLEAVED_RANGE_CONSTRAINTS_2";
950 this->interleaved_range_constraints_3 =
"INTERLEAVED_RANGE_CONSTRAINTS_3";
953 this->lagrange_first =
"__LAGRANGE_FIRST";
954 this->lagrange_last =
"__LAGRANGE_LAST";
955 this->lagrange_odd_in_minicircuit =
"__LAGRANGE_ODD_IN_MINICIRCUIT";
956 this->lagrange_even_in_minicircuit =
"__LAGRANGE_EVEN_IN_MINICIRCUIT";
957 this->lagrange_result_row =
"__LAGRANGE_RESULT_ROW";
958 this->lagrange_last_in_minicircuit =
"__LAGRANGE_LAST_IN_MINICIRCUIT";
959 this->ordered_extra_range_constraints_numerator =
"__ORDERED_EXTRA_RANGE_CONSTRAINTS_NUMERATOR";
960 this->lagrange_masking =
"__LAGRANGE_MASKING";
961 this->lagrange_mini_masking =
"__LAGRANGE_MINI_MASKING";
962 this->lagrange_real_last =
"__LAGRANGE_REAL_LAST";
966 template <
typename Commitment,
typename VerificationKey>
971 this->lagrange_first = verification_key->lagrange_first;
972 this->lagrange_last = verification_key->lagrange_last;
973 this->lagrange_odd_in_minicircuit = verification_key->lagrange_odd_in_minicircuit;
974 this->lagrange_even_in_minicircuit = verification_key->lagrange_even_in_minicircuit;
975 this->lagrange_result_row = verification_key->lagrange_result_row;
976 this->lagrange_last_in_minicircuit = verification_key->lagrange_last_in_minicircuit;
977 this->ordered_extra_range_constraints_numerator =
978 verification_key->ordered_extra_range_constraints_numerator;
979 this->lagrange_masking = verification_key->lagrange_masking;
980 this->lagrange_mini_masking = verification_key->lagrange_mini_masking;
981 this->lagrange_real_last = verification_key->lagrange_real_last;
992 template <
typename ProverPolynomialsOrPartiallyEvaluatedMultivariates,
typename EdgeType>
993 static bool skip_entire_row([[maybe_unused]]
const ProverPolynomialsOrPartiallyEvaluatedMultivariates& polynomials,
994 [[maybe_unused]]
const EdgeType edge_idx)
997 auto s0 = polynomials.ordered_range_constraints_0_shift[edge_idx];
998 auto s1 = polynomials.ordered_range_constraints_1_shift[edge_idx];
999 auto s2 = polynomials.ordered_range_constraints_2_shift[edge_idx];
1000 auto s3 = polynomials.ordered_range_constraints_3_shift[edge_idx];
1001 auto s4 = polynomials.ordered_range_constraints_4_shift[edge_idx];
1002 auto s5 = polynomials.ordered_range_constraints_0_shift[edge_idx + 1];
1003 auto s6 = polynomials.ordered_range_constraints_1_shift[edge_idx + 1];
1004 auto s7 = polynomials.ordered_range_constraints_2_shift[edge_idx + 1];
1005 auto s8 = polynomials.ordered_range_constraints_3_shift[edge_idx + 1];
1006 auto s9 = polynomials.ordered_range_constraints_4_shift[edge_idx + 1];
1007 auto shift_0 = (s0 == 0) && (s1 == 0) && (s2 == 0) && (s3 == 0) && (s4 == 0) && (s5 == 0) && (s6 == 0) &&
1008 (s7 == 0) && (s8 == 0) && (s9 == 0);
1009 return shift_0 && (polynomials.z_perm[edge_idx] == polynomials.z_perm_shift[edge_idx]) &&
1010 (polynomials.z_perm[edge_idx + 1] == polynomials.z_perm_shift[edge_idx + 1]) &&
1011 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_precomputed() const
auto get_unshifted_without_interleaved()
auto get_unshifted() 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)
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...
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.
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_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 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
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
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)