1#include <gmock/gmock.h>
2#include <gtest/gtest.h>
38using ::testing::NiceMock;
39using ::testing::TestWithParam;
41using testing::TestMemoryTree;
43using simulation::EventEmitter;
44using simulation::ExecutionIdManager;
45using simulation::FieldGreaterThan;
46using simulation::FieldGreaterThanEvent;
47using simulation::MerkleCheck;
48using simulation::MerkleCheckEvent;
49using simulation::MockGreaterThan;
50using simulation::Poseidon2;
51using simulation::Poseidon2HashEvent;
52using simulation::Poseidon2PermutationEvent;
53using simulation::Poseidon2PermutationMemoryEvent;
54using simulation::PublicDataTreeCheck;
57using simulation::RangeCheck;
58using simulation::RangeCheckEvent;
62using tracegen::FieldGreaterThanTraceBuilder;
63using tracegen::MerkleCheckTraceBuilder;
64using tracegen::Poseidon2TraceBuilder;
65using tracegen::PrecomputedTraceBuilder;
66using tracegen::PublicDataTreeTraceBuilder;
67using tracegen::PublicInputsTraceBuilder;
68using tracegen::RangeCheckTraceBuilder;
69using tracegen::TestTraceContainer;
79class PublicDataTreeCheckConstrainingTest :
public ::testing::Test {
81 PublicDataTreeCheckConstrainingTest()
91 Poseidon2(execution_id_manager, mock_gt, hash_event_emitter, perm_event_emitter, perm_mem_event_emitter);
102 TestParams{ .slot = 42,
119class PublicDataReadPositiveTests :
public PublicDataTreeCheckConstrainingTest,
120 public ::testing::WithParamInterface<TestParams> {};
122TEST_P(PublicDataReadPositiveTests, Positive)
124 const auto& param = GetParam();
126 auto test_public_inputs = testing::PublicInputsBuilder().build();
128 EventEmitter<MerkleCheckEvent> merkle_event_emitter;
129 MerkleCheck merkle_check(
poseidon2, merkle_event_emitter);
131 EventEmitter<RangeCheckEvent> range_check_emitter;
134 EventEmitter<FieldGreaterThanEvent> field_gt_event_emitter;
135 FieldGreaterThan
field_gt(range_check, field_gt_event_emitter);
137 EventEmitter<PublicDataTreeCheckEvent> public_data_tree_check_event_emitter;
138 PublicDataTreeCheck public_data_tree_check_simulator(
141 TestTraceContainer
trace({ { { C::precomputed_first_row, 1 } } });
143 Poseidon2TraceBuilder poseidon2_builder;
144 MerkleCheckTraceBuilder merkle_check_builder;
147 PublicInputsTraceBuilder public_inputs_builder;
148 PublicDataTreeTraceBuilder public_data_tree_read_builder;
151 uint64_t leaf_index = 30;
152 std::vector<FF> sibling_path;
155 sibling_path.emplace_back(i);
159 public_data_tree_check_simulator.assert_read(param.slot,
165 AppendOnlyTreeSnapshot{
167 .nextAvailableLeafIndex = 128,
171 public_inputs_builder.process_public_inputs(
trace, test_public_inputs);
172 public_inputs_builder.process_public_inputs_aux_precomputed(
trace);
175 merkle_check_builder.process(merkle_event_emitter.dump_events(),
trace);
177 public_data_tree_read_builder.process(public_data_tree_check_event_emitter.dump_events(),
trace);
179 check_all_interactions<PublicDataTreeTraceBuilder>(
trace);
181 check_relation<public_data_check>(
trace);
182 check_relation<public_data_squash>(
trace);
186 PublicDataReadPositiveTests,
187 ::testing::ValuesIn(positive_tests));
189TEST(PublicDataTreeConstrainingTest, NegativeStartCondition)
192 TestTraceContainer
trace({ {
193 { C::public_data_check_sel, 0 },
194 { C::precomputed_first_row, 1 },
197 { C::public_data_check_sel, 1 },
200 { C::public_data_check_sel, 1 },
206 trace.
set(C::precomputed_first_row, 0, 0);
212TEST(PublicDataTreeConstrainingTest, NegativeExistsFlagCheck)
216 TestTraceContainer
trace({
217 { { C::public_data_check_sel, 1 },
218 { C::public_data_check_leaf_slot, 27 },
219 { C::public_data_check_low_leaf_slot, 27 },
220 { C::public_data_check_leaf_slot_low_leaf_slot_diff_inv, 0 },
221 { C::public_data_check_leaf_not_exists, 0 } },
222 { { C::public_data_check_sel, 1 },
223 { C::public_data_check_leaf_slot, 28 },
224 { C::public_data_check_low_leaf_slot, 27 },
225 { C::public_data_check_leaf_slot_low_leaf_slot_diff_inv,
FF(1).invert() },
226 { C::public_data_check_leaf_not_exists, 1 } },
231 trace.
set(C::public_data_check_leaf_not_exists, 0, 1);
234 "EXISTS_FLAG_CHECK");
236 trace.
set(C::public_data_check_leaf_not_exists, 0, 0);
237 trace.
set(C::public_data_check_leaf_not_exists, 1, 0);
240 "EXISTS_FLAG_CHECK");
243TEST(PublicDataTreeConstrainingTest, NegativeNextSlotIsZero)
247 TestTraceContainer
trace({
249 { C::public_data_check_leaf_not_exists, 1 },
250 { C::public_data_check_low_leaf_next_slot, 0 },
251 { C::public_data_check_next_slot_inv, 0 },
252 { C::public_data_check_next_slot_is_nonzero, 0 },
255 { C::public_data_check_leaf_not_exists, 1 },
256 { C::public_data_check_low_leaf_next_slot, 1 },
257 { C::public_data_check_next_slot_inv,
FF(1).invert() },
258 { C::public_data_check_next_slot_is_nonzero, 1 },
264 trace.
set(C::public_data_check_next_slot_is_nonzero, 0, 1);
267 "NEXT_SLOT_IS_ZERO_CHECK");
269 trace.
set(C::public_data_check_next_slot_is_nonzero, 0, 0);
270 trace.
set(C::public_data_check_next_slot_is_nonzero, 1, 0);
273 "NEXT_SLOT_IS_ZERO_CHECK");
276TEST(PublicDataTreeConstrainingTest, NegativeValueIsCorrect)
280 TestTraceContainer
trace({
282 { C::public_data_check_low_leaf_value, 27 },
283 { C::public_data_check_leaf_not_exists, 0 },
284 { C::public_data_check_value, 27 },
287 { C::public_data_check_low_leaf_value, 27 },
288 { C::public_data_check_leaf_not_exists, 1 },
289 { C::public_data_check_value, 0 },
296 trace.
set(C::public_data_check_value, 0, 0);
301 trace.
set(C::public_data_check_value, 0, 27);
303 trace.
set(C::public_data_check_value, 1, 27);
309TEST_F(PublicDataTreeCheckConstrainingTest, PositiveWriteExists)
316 AvmAccumulatedData accumulated_data = {};
317 accumulated_data.publicDataWrites[0] = PublicDataWrite{
318 .leafSlot = leaf_slot,
322 auto test_public_inputs = testing::PublicInputsBuilder()
323 .set_accumulated_data(accumulated_data)
324 .set_accumulated_data_array_lengths({ .publicDataWrites = 1 })
327 EventEmitter<MerkleCheckEvent> merkle_event_emitter;
328 MerkleCheck merkle_check(
poseidon2, merkle_event_emitter);
330 EventEmitter<RangeCheckEvent> range_check_emitter;
333 EventEmitter<FieldGreaterThanEvent> field_gt_event_emitter;
334 FieldGreaterThan
field_gt(range_check, field_gt_event_emitter);
336 EventEmitter<PublicDataTreeCheckEvent> public_data_tree_check_event_emitter;
337 PublicDataTreeCheck public_data_tree_check_simulator(
340 TestTraceContainer
trace({ { { C::precomputed_first_row, 1 } } });
342 Poseidon2TraceBuilder poseidon2_builder;
343 MerkleCheckTraceBuilder merkle_check_builder;
346 PublicInputsTraceBuilder public_inputs_builder;
347 PublicDataTreeTraceBuilder public_data_tree_builder;
351 uint64_t low_leaf_index = 30;
352 public_data_tree.update_element(low_leaf_index, low_leaf_hash);
354 AppendOnlyTreeSnapshot prev_snapshot =
355 AppendOnlyTreeSnapshot{ .root = public_data_tree.root(), .nextAvailableLeafIndex = 128 };
356 std::vector<FF> low_leaf_sibling_path = public_data_tree.get_sibling_path(low_leaf_index);
359 updated_low_leaf.
leaf.value = new_value;
360 FF updated_low_leaf_hash = UnconstrainedPoseidon2::hash(updated_low_leaf.get_hash_inputs());
361 public_data_tree.update_element(low_leaf_index, updated_low_leaf_hash);
363 FF intermediate_root = public_data_tree.root();
364 std::vector<FF> insertion_sibling_path = public_data_tree.get_sibling_path(prev_snapshot.nextAvailableLeafIndex);
367 AppendOnlyTreeSnapshot next_snapshot =
368 AppendOnlyTreeSnapshot{ .root = intermediate_root,
369 .nextAvailableLeafIndex = prev_snapshot.nextAvailableLeafIndex };
371 AppendOnlyTreeSnapshot result_snapshot = public_data_tree_check_simulator.write(
slot,
376 low_leaf_sibling_path,
378 insertion_sibling_path,
380 EXPECT_EQ(next_snapshot, result_snapshot);
383 public_inputs_builder.process_public_inputs(
trace, test_public_inputs);
384 public_inputs_builder.process_public_inputs_aux_precomputed(
trace);
387 merkle_check_builder.process(merkle_event_emitter.dump_events(),
trace);
389 public_data_tree_builder.process(public_data_tree_check_event_emitter.dump_events(),
trace);
391 check_relation<public_data_check>(
trace);
392 check_relation<public_data_squash>(
trace);
394 check_all_interactions<PublicDataTreeTraceBuilder>(
trace);
397TEST_F(PublicDataTreeCheckConstrainingTest, PositiveSquashing)
407 FF updated_value = 28;
411 FF dummy_leaf_value = 0;
414 ASSERT_GT(dummy_leaf_slot, leaf_slot);
416 FF low_leaf_slot = 40;
419 AvmAccumulatedData accumulated_data = {};
420 accumulated_data.publicDataWrites[0] = PublicDataWrite{
421 .leafSlot = leaf_slot,
422 .value = updated_value,
425 accumulated_data.publicDataWrites[1] = PublicDataWrite{
426 .leafSlot = dummy_leaf_slot,
427 .value = dummy_leaf_value,
430 auto test_public_inputs = testing::PublicInputsBuilder()
431 .set_accumulated_data(accumulated_data)
432 .set_accumulated_data_array_lengths({ .publicDataWrites = 2 })
435 EventEmitter<MerkleCheckEvent> merkle_event_emitter;
436 MerkleCheck merkle_check(
poseidon2, merkle_event_emitter);
438 EventEmitter<RangeCheckEvent> range_check_emitter;
441 EventEmitter<FieldGreaterThanEvent> field_gt_event_emitter;
442 FieldGreaterThan
field_gt(range_check, field_gt_event_emitter);
444 EventEmitter<PublicDataTreeCheckEvent> public_data_tree_check_event_emitter;
445 PublicDataTreeCheck public_data_tree_check_simulator(
448 TestTraceContainer
trace({ { { C::precomputed_first_row, 1 } } });
450 Poseidon2TraceBuilder poseidon2_builder;
451 MerkleCheckTraceBuilder merkle_check_builder;
454 PublicInputsTraceBuilder public_inputs_builder;
455 PublicDataTreeTraceBuilder public_data_tree_read_builder;
459 uint64_t low_leaf_index = 30;
460 public_data_tree.update_element(low_leaf_index, low_leaf_hash);
462 AppendOnlyTreeSnapshot prev_snapshot =
463 AppendOnlyTreeSnapshot{ .root = public_data_tree.root(), .nextAvailableLeafIndex = 128 };
464 std::vector<FF> low_leaf_sibling_path = public_data_tree.get_sibling_path(low_leaf_index);
469 updated_low_leaf.
nextIndex = prev_snapshot.nextAvailableLeafIndex;
470 updated_low_leaf.nextKey = leaf_slot;
471 FF updated_low_leaf_hash = UnconstrainedPoseidon2::hash(updated_low_leaf.get_hash_inputs());
472 public_data_tree.update_element(low_leaf_index, updated_low_leaf_hash);
474 std::vector<FF> insertion_sibling_path = public_data_tree.get_sibling_path(prev_snapshot.nextAvailableLeafIndex);
478 FF new_leaf_hash = UnconstrainedPoseidon2::hash(new_leaf.get_hash_inputs());
480 uint64_t value_to_be_updated_leaf_index = prev_snapshot.nextAvailableLeafIndex;
481 public_data_tree.update_element(value_to_be_updated_leaf_index, new_leaf_hash);
483 AppendOnlyTreeSnapshot next_snapshot =
484 AppendOnlyTreeSnapshot{ .root = public_data_tree.root(),
485 .nextAvailableLeafIndex = prev_snapshot.nextAvailableLeafIndex + 1 };
487 AppendOnlyTreeSnapshot snapshot_after_insertion = public_data_tree_check_simulator.write(
slot,
492 low_leaf_sibling_path,
494 insertion_sibling_path,
496 EXPECT_EQ(next_snapshot, snapshot_after_insertion);
500 low_leaf_index = prev_snapshot.nextAvailableLeafIndex;
501 prev_snapshot = snapshot_after_insertion;
505 low_leaf_sibling_path = public_data_tree.get_sibling_path(low_leaf_index);
508 updated_low_leaf.
nextIndex = prev_snapshot.nextAvailableLeafIndex;
509 updated_low_leaf.nextKey = dummy_leaf_slot;
510 updated_low_leaf_hash = UnconstrainedPoseidon2::hash(updated_low_leaf.get_hash_inputs());
511 public_data_tree.update_element(low_leaf_index, updated_low_leaf_hash);
513 insertion_sibling_path = public_data_tree.get_sibling_path(prev_snapshot.nextAvailableLeafIndex);
517 new_leaf_hash = UnconstrainedPoseidon2::hash(new_leaf.get_hash_inputs());
519 uint64_t dummy_leaf_index = prev_snapshot.nextAvailableLeafIndex;
520 public_data_tree.update_element(dummy_leaf_index, new_leaf_hash);
522 next_snapshot = AppendOnlyTreeSnapshot{ .root = public_data_tree.root(),
523 .nextAvailableLeafIndex = prev_snapshot.nextAvailableLeafIndex + 1 };
525 AppendOnlyTreeSnapshot snapshot_after_dummy_insertion =
526 public_data_tree_check_simulator.write(dummy_slot,
531 low_leaf_sibling_path,
533 insertion_sibling_path,
535 EXPECT_EQ(next_snapshot, snapshot_after_dummy_insertion);
539 low_leaf_index = value_to_be_updated_leaf_index;
540 prev_snapshot = snapshot_after_dummy_insertion;
544 low_leaf_sibling_path = public_data_tree.get_sibling_path(low_leaf_index);
547 updated_low_leaf.
leaf.value = updated_value;
548 updated_low_leaf_hash = UnconstrainedPoseidon2::hash(updated_low_leaf.get_hash_inputs());
549 public_data_tree.update_element(low_leaf_index, updated_low_leaf_hash);
551 insertion_sibling_path = public_data_tree.get_sibling_path(prev_snapshot.nextAvailableLeafIndex);
554 next_snapshot = AppendOnlyTreeSnapshot{ .root = public_data_tree.root(),
555 .nextAvailableLeafIndex = prev_snapshot.nextAvailableLeafIndex };
557 AppendOnlyTreeSnapshot snapshot_after_update = public_data_tree_check_simulator.write(
slot,
562 low_leaf_sibling_path,
564 insertion_sibling_path,
566 EXPECT_EQ(next_snapshot, snapshot_after_update);
569 public_inputs_builder.process_public_inputs(
trace, test_public_inputs);
570 public_inputs_builder.process_public_inputs_aux_precomputed(
trace);
573 merkle_check_builder.process(merkle_event_emitter.dump_events(),
trace);
575 public_data_tree_read_builder.process(public_data_tree_check_event_emitter.dump_events(),
trace);
577 check_relation<public_data_check>(
trace);
578 check_relation<public_data_squash>(
trace);
580 check_all_interactions<PublicDataTreeTraceBuilder>(
trace);
583TEST(PublicDataTreeConstrainingTest, NegativeLowLeafValueUpdate)
586 TestTraceContainer
trace({
588 { C::public_data_check_write, 1 },
589 { C::public_data_check_leaf_not_exists, 0 },
590 { C::public_data_check_low_leaf_value, 27 },
591 { C::public_data_check_value, 28 },
592 { C::public_data_check_updated_low_leaf_value, 28 },
595 { C::public_data_check_write, 1 },
596 { C::public_data_check_leaf_not_exists, 1 },
597 { C::public_data_check_low_leaf_value, 27 },
598 { C::public_data_check_value, 28 },
599 { C::public_data_check_updated_low_leaf_value, 27 },
606 trace.
set(C::public_data_check_leaf_not_exists, 0, 1);
609 "LOW_LEAF_VALUE_UPDATE");
611 trace.
set(C::public_data_check_leaf_not_exists, 0, 0);
613 trace.
set(C::public_data_check_leaf_not_exists, 1, 0);
616 "LOW_LEAF_VALUE_UPDATE");
619TEST(PublicDataTreeConstrainingTest, NegativeLowLeafNextIndexUpdate)
623 TestTraceContainer
trace({
625 { C::public_data_check_write, 1 },
626 { C::public_data_check_leaf_not_exists, 0 },
627 { C::public_data_check_low_leaf_next_index, 27 },
628 { C::public_data_check_tree_size_before_write, 128 },
629 { C::public_data_check_updated_low_leaf_next_index, 27 },
632 { C::public_data_check_write, 1 },
633 { C::public_data_check_leaf_not_exists, 1 },
634 { C::public_data_check_low_leaf_next_index, 27 },
635 { C::public_data_check_tree_size_before_write, 128 },
636 { C::public_data_check_updated_low_leaf_next_index, 128 },
643 trace.
set(C::public_data_check_leaf_not_exists, 0, 1);
647 "LOW_LEAF_NEXT_INDEX_UPDATE");
649 trace.
set(C::public_data_check_leaf_not_exists, 0, 0);
651 trace.
set(C::public_data_check_leaf_not_exists, 1, 0);
655 "LOW_LEAF_NEXT_INDEX_UPDATE");
658TEST(PublicDataTreeConstrainingTest, NegativeLowLeafNextSlotUpdate)
662 TestTraceContainer
trace({
664 { C::public_data_check_write, 1 },
665 { C::public_data_check_leaf_not_exists, 0 },
666 { C::public_data_check_low_leaf_next_slot, 27 },
667 { C::public_data_check_leaf_slot, 28 },
668 { C::public_data_check_updated_low_leaf_next_slot, 27 },
671 { C::public_data_check_write, 1 },
672 { C::public_data_check_leaf_not_exists, 1 },
673 { C::public_data_check_low_leaf_next_slot, 27 },
674 { C::public_data_check_leaf_slot, 28 },
675 { C::public_data_check_updated_low_leaf_next_slot, 28 },
682 trace.
set(C::public_data_check_leaf_not_exists, 0, 1);
685 "LOW_LEAF_NEXT_SLOT_UPDATE");
687 trace.
set(C::public_data_check_leaf_not_exists, 0, 0);
689 trace.
set(C::public_data_check_leaf_not_exists, 1, 0);
692 "LOW_LEAF_NEXT_SLOT_UPDATE");
695TEST(PublicDataTreeConstrainingTest, NegativeUpdateRootValidation)
698 TestTraceContainer
trace({
700 { C::public_data_check_write, 1 },
701 { C::public_data_check_leaf_not_exists, 0 },
702 { C::public_data_check_intermediate_root, 28 },
703 { C::public_data_check_write_root, 28 },
706 { C::public_data_check_write, 1 },
707 { C::public_data_check_leaf_not_exists, 1 },
708 { C::public_data_check_intermediate_root, 28 },
709 { C::public_data_check_write_root, 30 },
716 trace.
set(C::public_data_check_write_root, 0, 30);
719 "UPDATE_ROOT_VALIDATION");
722TEST(PublicDataTreeConstrainingTest, NegativeWriteIdxInitialValue)
726 TestTraceContainer
trace(
728 { C::public_data_check_sel, 0 },
731 { C::public_data_check_sel, 1 },
738 trace.
set(C::public_data_check_write_idx, 1, 27);
741 "WRITE_IDX_INITIAL_VALUE");
744TEST(PublicDataTreeConstrainingTest, NegativeWriteIdxIncrement)
747 TestTraceContainer
trace({
749 { C::public_data_check_not_end, 1 },
750 { C::public_data_check_write_idx, 5 },
751 { C::public_data_check_should_write_to_public_inputs, 1 },
754 { C::public_data_check_not_end, 1 },
755 { C::public_data_check_write_idx, 6 },
756 { C::public_data_check_should_write_to_public_inputs, 0 },
759 { C::public_data_check_write_idx, 6 },
766 trace.
set(C::public_data_check_should_write_to_public_inputs, 0, 0);
769 "WRITE_IDX_INCREMENT");
772 trace.
set(C::public_data_check_should_write_to_public_inputs, 0, 1);
773 trace.
set(C::public_data_check_should_write_to_public_inputs, 1, 1);
776 "WRITE_IDX_INCREMENT");
781TEST(PublicDataTreeConstrainingTest, SquashingNegativeStartCondition)
784 TestTraceContainer
trace({ {
785 { C::public_data_squash_sel, 0 },
786 { C::precomputed_first_row, 1 },
789 { C::public_data_squash_sel, 1 },
792 { C::public_data_squash_sel, 1 },
798 trace.
set(C::precomputed_first_row, 0, 0);
804TEST(PublicDataTreeConstrainingTest, SquashingNegativeCheckSameLeafSlot)
807 TestTraceContainer
trace({ {
808 { C::public_data_squash_sel, 1 },
809 { C::public_data_squash_leaf_slot_increase, 1 },
810 { C::public_data_squash_leaf_slot, 27 },
813 { C::public_data_squash_sel, 1 },
814 { C::public_data_squash_leaf_slot_increase, 0 },
815 { C::public_data_squash_leaf_slot, 40 },
821 trace.
set(C::public_data_squash_leaf_slot_increase, 0, 0);
824 "CHECK_SAME_LEAF_SLOT");
827TEST(PublicDataTreeConstrainingTest, SquashingNegativeFinalValuePropagation)
830 TestTraceContainer
trace({ {
831 { C::public_data_squash_sel, 1 },
832 { C::public_data_squash_check_clock, 1 },
833 { C::public_data_squash_final_value, 27 },
836 { C::public_data_squash_sel, 1 },
837 { C::public_data_squash_check_clock, 0 },
838 { C::public_data_squash_final_value, 27 },
844 trace.
set(C::public_data_squash_final_value, 1, 28);
847 "FINAL_VALUE_PROPAGATION");
850TEST(PublicDataTreeConstrainingTest, SquashingNegativeFinalValueCheck)
854 TestTraceContainer
trace({ {
855 { C::public_data_squash_sel, 1 },
856 { C::public_data_squash_final_value, 27 },
857 { C::public_data_squash_value, 99 },
860 { C::public_data_squash_sel, 1 },
861 { C::public_data_squash_final_value, 27 },
862 { C::public_data_squash_leaf_slot_increase, 1 },
863 { C::public_data_squash_value, 27 },
866 { C::public_data_squash_sel, 1 },
867 { C::public_data_squash_final_value, 42 },
868 { C::public_data_squash_value, 42 },
874 trace.
set(C::public_data_squash_value, 2, 99);
877 "FINAL_VALUE_CHECK");
879 trace.
set(C::public_data_squash_value, 2, 42);
882 trace.
set(C::public_data_squash_value, 1, 99);
885 "FINAL_VALUE_CHECK");
886 trace.
set(C::public_data_squash_value, 1, 27);
INSTANTIATE_TEST_SUITE_P(AcirTests, AcirIntegrationSingleTest, testing::Values("a_1327_concrete_in_generic", "a_1_mul", "a_2_div", "a_3_add", "a_4_sub", "a_5_over", "a_6", "a_6_array", "a_7", "a_7_function", "aes128_encrypt", "arithmetic_binary_operations", "array_dynamic", "array_dynamic_blackbox_input", "array_dynamic_main_output", "array_dynamic_nested_blackbox_input", "array_eq", "array_if_cond_simple", "array_len", "array_neq", "array_sort", "array_to_slice", "array_to_slice_constant_length", "assert", "assert_statement", "assign_ex", "bigint", "bit_and", "bit_not", "bit_shifts_comptime", "bit_shifts_runtime", "blake3", "bool_not", "bool_or", "break_and_continue", "brillig_acir_as_brillig", "brillig_array_eq", "brillig_array_to_slice", "brillig_arrays", "brillig_assert", "brillig_bit_shifts_runtime", "brillig_blake2s", "brillig_blake3", "brillig_calls", "brillig_calls_array", "brillig_calls_conditionals", "brillig_conditional", "brillig_cow", "brillig_cow_assign", "brillig_cow_regression", "brillig_ecdsa_secp256k1", "brillig_ecdsa_secp256r1", "brillig_embedded_curve", "brillig_fns_as_values", "brillig_hash_to_field", "brillig_identity_function", "brillig_keccak", "brillig_loop", "brillig_nested_arrays", "brillig_not", "brillig_oracle", "brillig_pedersen", "brillig_recursion", "brillig_references", "brillig_schnorr", "brillig_sha256", "brillig_signed_cmp", "brillig_signed_div", "brillig_slices", "brillig_to_be_bytes", "brillig_to_bits", "brillig_to_bytes_integration", "brillig_to_le_bytes", "brillig_top_level", "brillig_uninitialized_arrays", "brillig_wrapping", "cast_bool", "closures_mut_ref", "conditional_1", "conditional_2", "conditional_regression_421", "conditional_regression_547", "conditional_regression_661", "conditional_regression_short_circuit", "conditional_regression_underflow", "custom_entry", "databus", "debug_logs", "diamond_deps_0", "double_verify_nested_proof", "double_verify_proof", "ecdsa_secp256k1", "ecdsa_secp256r1", "ecdsa_secp256r1_3x", "eddsa", "embedded_curve_ops", "field_attribute", "generics", "global_consts", "hash_to_field", "hashmap", "higher_order_functions", "if_else_chain", "import", "inline_never_basic", "integer_array_indexing", "keccak256", "main_bool_arg", "main_return", "merkle_insert", "missing_closure_env", "modules", "modules_more", "modulus", "nested_array_dynamic", "nested_array_dynamic_simple", "nested_array_in_slice", "nested_arrays_from_brillig", "no_predicates_basic", "no_predicates_brillig", "no_predicates_numeric_generic_poseidon", "operator_overloading", "pedersen_check", "pedersen_commitment", "pedersen_hash", "poseidon_bn254_hash", "poseidonsponge_x5_254", "pred_eq", "prelude", "references", "regression", "regression_2660", "regression_3051", "regression_3394", "regression_3607", "regression_3889", "regression_4088", "regression_4124", "regression_4202", "regression_4449", "regression_4709", "regression_5045", "regression_capacity_tracker", "regression_mem_op_predicate", "regression_method_cannot_be_found", "regression_struct_array_conditional", "schnorr", "sha256", "sha2_byte", "side_effects_constrain_array", "signed_arithmetic", "signed_comparison", "signed_division", "simple_2d_array", "simple_add_and_ret_arr", "simple_array_param", "simple_bitwise", "simple_comparison", "simple_mut", "simple_not", "simple_print", "simple_program_addition", "simple_radix", "simple_shield", "simple_shift_left_right", "slice_coercion", "slice_dynamic_index", "slice_loop", "slices", "strings", "struct", "struct_array_inputs", "struct_fields_ordering", "struct_inputs", "submodules", "to_be_bytes", "to_bytes_consistent", "to_bytes_integration", "to_le_bytes", "trait_as_return_type", "trait_impl_base_type", "traits_in_crates_1", "traits_in_crates_2", "tuple_inputs", "tuples", "type_aliases", "u128", "u16_support", "unconstrained_empty", "unit_value", "unsafe_range_constraint", "witness_compression", "xor"))
TEST_P(AcirIntegrationSingleTest, DISABLED_ProveAndVerifyProgram)
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_PUBLIC_DATA_WRITES_ROW_IDX
#define AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH
#define PUBLIC_DATA_TREE_HEIGHT
static constexpr size_t SR_START_CONDITION
static constexpr size_t SR_LOW_LEAF_NEXT_INDEX_UPDATE
static constexpr size_t SR_VALUE_IS_CORRECT
static constexpr size_t SR_EXISTS_FLAG_CHECK
static constexpr size_t SR_NEXT_SLOT_IS_ZERO_CHECK
static constexpr size_t SR_LOW_LEAF_VALUE_UPDATE
static constexpr size_t SR_WRITE_IDX_INITIAL_VALUE
static constexpr size_t SR_UPDATE_ROOT_VALIDATION
static constexpr size_t SR_WRITE_IDX_INCREMENT
static constexpr size_t SR_LOW_LEAF_NEXT_SLOT_UPDATE
static constexpr size_t SR_START_CONDITION
static constexpr size_t SR_FINAL_VALUE_CHECK
static constexpr size_t SR_CHECK_SAME_LEAF_SLOT
static constexpr size_t SR_FINAL_VALUE_PROPAGATION
void set(Column col, uint32_t row, const FF &value)
static FF hash(const std::vector< FF > &input)
Hashes a vector of field elements.
Implements a parallelized batch insertion indexed tree Accepts template argument of the type of store...
RangeCheckTraceBuilder range_check_builder
PrecomputedTraceBuilder precomputed_builder
FieldGreaterThanTraceBuilder field_gt_builder
ExecutionIdManager execution_id_manager
NoopEventEmitter< Poseidon2PermutationEvent > perm_event_emitter
NoopEventEmitter< Poseidon2PermutationMemoryEvent > perm_mem_event_emitter
NiceMock< MockGreaterThan > mock_gt
EventEmitter< Poseidon2HashEvent > hash_event_emitter
NullifierTreeLeafPreimage low_leaf
AztecAddress contract_address
#define EXPECT_THROW_WITH_MESSAGE(code, expectedMessage)
TEST_F(AvmRecursiveTests, GoblinRecursion)
A test of the Goblinized AVM recursive verifier.
TEST(TxExecutionConstrainingTest, WriteTreeValue)
std::variant< PublicDataTreeReadWriteEvent, CheckPointEventType > PublicDataTreeCheckEvent
IndexedLeaf< PublicDataLeafValue > PublicDataTreeLeafPreimage
FF unconstrained_root_from_path(const FF &leaf_value, const uint64_t leaf_index, std::span< const FF > path)
::bb::crypto::merkle_tree::PublicDataLeafValue PublicDataLeafValue
FF unconstrained_compute_leaf_slot(const AztecAddress &contract_address, const FF &slot)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::vector< fr > get_hash_inputs() const
NiceMock< MockFieldGreaterThan > field_gt