1#include <gmock/gmock.h>
2#include <gtest/gtest.h>
32using tracegen::TestTraceContainer;
33using tracegen::TxTraceBuilder;
39TEST(TxExecutionConstrainingTest, NegativeEmptyTrace)
44TEST(TxExecutionConstrainingTest, NegativeEarlyEnd)
46 TestTraceContainer
trace({
49 { C::precomputed_first_row, 1 },
59TEST(TxExecutionConstrainingTest, NegativeNoExtraneousRows)
61 TestTraceContainer
trace({
64 { C::precomputed_first_row, 1 },
78class TxExecutionConstrainingTestHelper :
public ::testing::Test {
82 static void set_initial_columns(TestTraceContainer& trace,
88 trace.set(row++, { { { C::precomputed_clk, 0 }, { C::precomputed_first_row, 1 } } });
94 { C::tx_start_tx, 1 },
96 { C::tx_is_padded, 1 },
97 { C::tx_is_tree_insert_phase, 1 },
98 { C::tx_sel_non_revertible_append_nullifier, 1 },
100 { C::tx_read_pi_start_offset,
103 { C::tx_sel_read_phase_length, 1 },
104 { C::tx_read_pi_length_offset,
107 { C::tx_start_phase, 1 },
108 { C::tx_end_phase, 1 },
109 { C::tx_next_context_id, 1 },
115 { C::tx_is_padded, 1 },
116 { C::tx_is_tree_insert_phase, 1 },
117 { C::tx_sel_non_revertible_append_note_hash, 1 },
118 { C::tx_read_pi_start_offset,
120 { C::tx_read_pi_offset,
122 { C::tx_sel_read_phase_length, 1 },
123 { C::tx_read_pi_length_offset,
125 { C::tx_start_phase, 1 },
126 { C::tx_end_phase, 1 },
127 { C::tx_next_context_id, 1 },
134 { C::tx_is_padded, 1 },
135 { C::tx_sel_non_revertible_append_l2_l1_msg, 1 },
137 { C::tx_read_pi_start_offset,
139 { C::tx_read_pi_offset,
141 { C::tx_sel_read_phase_length, 1 },
142 { C::tx_read_pi_length_offset,
146 { C::tx_start_phase, 1 },
147 { C::tx_end_phase, 1 },
148 { C::tx_next_context_id, 1 },
151 auto calls_remaining = setup_call_requests.size();
153 for (
auto setup_call : setup_call_requests) {
154 bool is_first_call = calls_remaining == setup_call_requests.size();
159 { C::tx_start_phase, is_first_call ? 1 : 0 },
160 { C::tx_end_phase, calls_remaining == 1 ? 1 : 0 },
161 { C::tx_sel_read_phase_length, is_first_call ? 1 : 0 },
163 { C::tx_is_public_call_request, 1 },
164 { C::tx_should_process_call_request, 1 },
166 { C::tx_read_pi_offset, read_pi_offset },
167 { C::tx_read_pi_length_offset,
169 { C::tx_remaining_phase_counter, calls_remaining },
170 { C::tx_remaining_phase_inv,
FF(calls_remaining).invert() },
171 { C::tx_remaining_phase_minus_one_inv,
172 calls_remaining == 1 ? 0 :
FF(calls_remaining - 1).invert() },
174 { C::tx_msg_sender, setup_call.msg_sender },
175 { C::tx_contract_addr, setup_call.contract_address },
176 { C::tx_is_static, setup_call.is_static_call },
177 { C::tx_calldata_hash, setup_call.calldata_hash },
188 { C::tx_is_padded, 1 },
189 { C::tx_is_tree_insert_phase, 1 },
190 { C::tx_sel_revertible_append_nullifier, 1 },
191 { C::tx_is_revertible, 1 },
192 { C::tx_read_pi_start_offset,
195 { C::tx_sel_read_phase_length, 1 },
196 { C::tx_read_pi_length_offset,
199 { C::tx_start_phase, 1 },
200 { C::tx_end_phase, 1 },
207 { C::tx_is_padded, 1 },
208 { C::tx_is_tree_insert_phase, 1 },
209 { C::tx_sel_revertible_append_note_hash, 1 },
210 { C::tx_is_revertible, 1 },
211 { C::tx_read_pi_start_offset,
214 { C::tx_sel_read_phase_length, 1 },
215 { C::tx_read_pi_length_offset,
218 { C::tx_start_phase, 1 },
219 { C::tx_end_phase, 1 },
226 { C::tx_is_padded, 1 },
227 { C::tx_sel_revertible_append_l2_l1_msg, 1 },
228 { C::tx_is_revertible, 1 },
229 { C::tx_read_pi_start_offset,
232 { C::tx_sel_read_phase_length, 1 },
233 { C::tx_read_pi_length_offset,
237 { C::tx_start_phase, 1 },
238 { C::tx_end_phase, 1 },
241 calls_remaining = app_logic_call_requests.size();
243 for (
auto app_logic_call : app_logic_call_requests) {
244 bool is_first_call = calls_remaining == app_logic_call_requests.size();
249 { C::tx_start_phase, is_first_call ? 1 : 0 },
250 { C::tx_end_phase, calls_remaining == 1 ? 1 : 0 },
251 { C::tx_sel_read_phase_length, is_first_call ? 1 : 0 },
253 { C::tx_is_public_call_request, 1 },
254 { C::tx_should_process_call_request, 1 },
256 { C::tx_read_pi_offset, read_pi_offset },
257 { C::tx_read_pi_length_offset,
259 { C::tx_remaining_phase_counter, calls_remaining },
260 { C::tx_remaining_phase_inv,
FF(calls_remaining).invert() },
261 { C::tx_remaining_phase_minus_one_inv,
262 calls_remaining == 1 ? 0 :
FF(calls_remaining - 1).invert() },
263 { C::tx_is_revertible, 1 },
266 { C::tx_msg_sender, app_logic_call.msg_sender },
267 { C::tx_contract_addr, app_logic_call.contract_address },
268 { C::tx_is_static, app_logic_call.is_static_call },
269 { C::tx_calldata_hash, app_logic_call.calldata_hash },
279 { C::tx_is_teardown, 1 },
280 { C::tx_sel_read_phase_length, 1 },
282 { C::tx_read_pi_length_offset,
285 { C::tx_is_public_call_request, 1 },
286 { C::tx_is_revertible, 1 },
288 { C::tx_start_phase, 1 },
289 { C::tx_end_phase, 1 },
296 { C::tx_remaining_phase_counter, 1 },
297 { C::tx_remaining_phase_inv, 1 },
298 { C::tx_is_collect_fee, 1 },
305 { C::tx_start_phase, 1 },
306 { C::tx_end_phase, 1 },
307 { C::tx_uint32_max, 0xffffffff },
314 { C::tx_start_phase, 1 },
315 { C::tx_end_phase, 1 },
316 { C::tx_is_tree_padding, 1 },
317 { C::tx_remaining_phase_counter, 1 },
318 { C::tx_remaining_phase_inv, 1 },
327 { C::tx_start_phase, 1 },
328 { C::tx_end_phase, 1 },
329 { C::tx_is_cleanup, 1 },
330 { C::tx_remaining_phase_counter, 1 },
331 { C::tx_remaining_phase_inv, 1 },
336TEST_F(TxExecutionConstrainingTestHelper, SimpleControlFlowRead)
338 auto test_public_inputs = testing::PublicInputsBuilder()
339 .rand_public_setup_call_requests(2)
340 .rand_public_app_logic_call_requests(1)
343 auto first_setup_call_request = test_public_inputs.public_setup_call_requests[0];
344 auto second_setup_call_request = test_public_inputs.public_setup_call_requests[1];
345 auto app_logic_call_request = test_public_inputs.public_app_logic_call_requests[0];
347 TestTraceContainer
trace;
348 set_initial_columns(trace, { first_setup_call_request, second_setup_call_request }, { app_logic_call_request });
353 { C::tx_is_padded, 1 },
362 check_relation<tx>(trace);
369TEST_F(TxExecutionConstrainingTestHelper, SimpleHandleRevert)
371 auto test_public_inputs = testing::PublicInputsBuilder()
372 .rand_public_setup_call_requests(2)
373 .rand_public_app_logic_call_requests(2)
377 auto first_setup_call_request = test_public_inputs.public_setup_call_requests[0];
378 auto second_setup_call_request = test_public_inputs.public_setup_call_requests[1];
379 auto first_app_logic_call_request = test_public_inputs.public_app_logic_call_requests[0];
380 auto second_app_logic_call_request = test_public_inputs.public_app_logic_call_requests[1];
382 TestTraceContainer
trace;
383 set_initial_columns(trace,
384 { first_setup_call_request, second_setup_call_request },
385 { first_app_logic_call_request, second_app_logic_call_request });
388 trace.
set(11, { { { C::tx_is_padded, 1 } } });
391 trace.
set(10, { { { C::tx_reverted, 1 } } });
394 trace.
set(1, { { { C::tx_start_tx, 1 } } });
395 for (uint32_t i = 10; i < 15; i++) {
396 trace.
set(i, { { { C::tx_tx_reverted, 1 } } });
406 check_relation<tx>(trace);
407 check_relation<tx_context>(
409 check_interaction<TxTraceBuilder, lookup_tx_context_public_inputs_read_reverted_settings>(trace);
412TEST_F(TxExecutionConstrainingTestHelper, JumpOnRevert)
414 TestTraceContainer
trace;
417 { PublicCallRequest{ .msg_sender = 0, .contract_address = 0, .is_static_call =
false, .calldata_hash = 0 } },
423 { C::tx_is_padded, 0 },
424 { C::tx_sel_revertible_append_l2_l1_msg, 0 },
425 { C::tx_remaining_phase_counter, 1 },
426 { C::tx_remaining_phase_inv, 1 },
427 { C::tx_is_revertible, 1 },
428 { C::tx_reverted, 1 },
431 trace.
set(8, { { { C::tx_is_padded, 1 } } });
436 check_relation<tx>(trace);
441TEST(TxExecutionConstrainingTest, WriteTreeValue)
445 auto pub_inputs_col = test_public_inputs.
to_columns();
448 { { C::precomputed_clk, 0 }, { C::precomputed_first_row, 1 } },
453 { C::tx_start_phase, 1 },
455 { C::tx_read_pi_length_offset,
459 { C::tx_is_tree_insert_phase, 1 },
460 { C::tx_leaf_value, test_public_inputs.previous_non_revertible_accumulated_data.nullifiers[0] },
461 { C::tx_prev_num_nullifiers_emitted, 0 },
462 { C::tx_next_num_nullifiers_emitted, 1 },
463 { C::tx_end_phase, 1 } },
468 { C::tx_start_phase, 1 },
470 { C::tx_read_pi_length_offset,
474 { C::tx_is_tree_insert_phase, 1 },
475 { C::tx_leaf_value, test_public_inputs.previous_non_revertible_accumulated_data.note_hashes[0] },
476 { C::tx_prev_num_note_hashes_emitted, 0 },
477 { C::tx_next_num_note_hashes_emitted, 1 },
478 { C::tx_end_phase, 1 } },
483 { C::tx_start_phase, 1 },
484 { C::tx_read_pi_length_offset,
489 { C::tx_sel_non_revertible_append_l2_l1_msg, 1 },
490 { C::tx_l2_l1_msg_content,
491 test_public_inputs.previous_non_revertible_accumulated_data.l2_to_l1_msgs[0].message.content },
492 { C::tx_l2_l1_msg_recipient,
493 test_public_inputs.previous_non_revertible_accumulated_data.l2_to_l1_msgs[0].message.recipient },
494 { C::tx_l2_l1_msg_contract_address,
495 test_public_inputs.previous_non_revertible_accumulated_data.l2_to_l1_msgs[0].contract_address },
496 { C::tx_end_phase, 1 } },
502 { C::tx_start_phase, 1 },
503 { C::tx_is_padded, 1 },
505 { C::tx_end_phase, 1 } },
510 { C::tx_start_phase, 1 },
512 { C::tx_read_pi_length_offset,
516 { C::tx_is_tree_insert_phase, 1 },
517 { C::tx_leaf_value, test_public_inputs.previous_revertible_accumulated_data.nullifiers[0] },
518 { C::tx_prev_num_nullifiers_emitted, 1 },
519 { C::tx_next_num_nullifiers_emitted, 2 },
520 { C::tx_end_phase, 1 } },
525 { C::tx_start_phase, 1 },
527 { C::tx_read_pi_length_offset,
531 { C::tx_is_tree_insert_phase, 1 },
532 { C::tx_leaf_value, test_public_inputs.previous_revertible_accumulated_data.note_hashes[0] },
533 { C::tx_prev_num_note_hashes_emitted, 1 },
534 { C::tx_next_num_note_hashes_emitted, 2 },
535 { C::tx_end_phase, 1 } },
540 { C::tx_start_phase, 1 },
542 { C::tx_read_pi_length_offset,
547 { C::tx_sel_revertible_append_l2_l1_msg, 1 },
548 { C::tx_l2_l1_msg_content,
549 test_public_inputs.previous_revertible_accumulated_data.l2_to_l1_msgs[0].message.content },
550 { C::tx_l2_l1_msg_recipient,
551 test_public_inputs.previous_revertible_accumulated_data.l2_to_l1_msgs[0].message.recipient },
552 { C::tx_l2_l1_msg_contract_address,
553 test_public_inputs.previous_revertible_accumulated_data.l2_to_l1_msgs[0].contract_address },
554 { C::tx_end_phase, 1 } },
560 { C::tx_start_phase, 1 },
561 { C::tx_is_padded, 1 },
563 { C::tx_end_phase, 1 } },
569 { C::tx_is_padded, 1 },
570 { C::tx_start_phase, 1 },
571 { C::tx_end_phase, 1 } },
586TEST_F(TxExecutionConstrainingTestHelper, CollectFees)
590 .rand_public_app_logic_call_requests(1)
591 .rand_public_teardown_call_request()
595 auto second_setup_call_request = test_public_inputs.public_setup_call_requests[1];
596 auto app_logic_call_request = test_public_inputs.public_app_logic_call_requests[0];
597 auto teardown_call_request = test_public_inputs.public_teardown_call_request;
600 set_initial_columns(
trace, { first_setup_call_request, second_setup_call_request }, { app_logic_call_request });
603 for (uint32_t i = 1; i < 4; i++) {
606 { C::tx_prev_da_gas_used, 1 },
607 { C::tx_prev_l2_gas_used, 100 },
608 { C::tx_next_da_gas_used, 1 },
609 { C::tx_next_l2_gas_used, 100 },
615 { C::tx_prev_da_gas_used, 1 },
616 { C::tx_prev_l2_gas_used, 100 },
617 { C::tx_prev_da_gas_used_sent_to_enqueued_call, 1 },
618 { C::tx_prev_l2_gas_used_sent_to_enqueued_call, 100 },
619 { C::tx_next_da_gas_used, 2 },
620 { C::tx_next_l2_gas_used, 200 },
621 { C::tx_next_da_gas_used_sent_to_enqueued_call, 2 },
622 { C::tx_next_l2_gas_used_sent_to_enqueued_call, 200 },
627 { C::tx_prev_da_gas_used, 2 },
628 { C::tx_prev_l2_gas_used, 200 },
629 { C::tx_prev_da_gas_used_sent_to_enqueued_call, 2 },
630 { C::tx_prev_l2_gas_used_sent_to_enqueued_call, 200 },
631 { C::tx_next_da_gas_used, 3 },
632 { C::tx_next_l2_gas_used, 300 },
633 { C::tx_next_da_gas_used_sent_to_enqueued_call, 3 },
634 { C::tx_next_l2_gas_used_sent_to_enqueued_call, 300 },
637 for (uint32_t i = 6; i < 9; i++) {
640 { C::tx_prev_da_gas_used, 3 },
641 { C::tx_prev_l2_gas_used, 300 },
642 { C::tx_next_da_gas_used, 3 },
643 { C::tx_next_l2_gas_used, 300 },
649 { C::tx_prev_da_gas_used, 3 },
650 { C::tx_prev_l2_gas_used, 300 },
651 { C::tx_prev_da_gas_used_sent_to_enqueued_call, 3 },
652 { C::tx_prev_l2_gas_used_sent_to_enqueued_call, 300 },
653 { C::tx_next_da_gas_used, 4 },
654 { C::tx_next_l2_gas_used, 400 },
655 { C::tx_next_da_gas_used_sent_to_enqueued_call, 4 },
656 { C::tx_next_l2_gas_used_sent_to_enqueued_call, 400 },
661 { C::tx_should_process_call_request, 1 },
662 { C::tx_remaining_phase_counter, 1 },
663 { C::tx_remaining_phase_inv, 1 },
665 { C::tx_msg_sender, teardown_call_request.msg_sender },
666 { C::tx_contract_addr, teardown_call_request.contract_address },
667 { C::tx_is_static, teardown_call_request.is_static_call },
668 { C::tx_calldata_hash, teardown_call_request.calldata_hash },
669 { C::tx_prev_da_gas_used, 4 },
670 { C::tx_prev_l2_gas_used, 400 },
671 { C::tx_prev_da_gas_used_sent_to_enqueued_call, 0 },
672 { C::tx_prev_l2_gas_used_sent_to_enqueued_call, 0 },
673 { C::tx_next_da_gas_used, 4 },
674 { C::tx_next_l2_gas_used, 400 },
675 { C::tx_next_da_gas_used_sent_to_enqueued_call, 13213 },
676 { C::tx_next_l2_gas_used_sent_to_enqueued_call, 456789 },
681 { C::tx_prev_da_gas_used, 4 },
682 { C::tx_prev_l2_gas_used, 400 },
683 { C::tx_next_da_gas_used, 4 },
684 { C::tx_next_l2_gas_used, 400 },
693 check_relation<tx>(
trace);
701TEST(TxExecutionConstrainingTest, NegativeTreePaddingChecks)
706 { C::precomputed_first_row, 1 },
711 { C::tx_is_tree_padding, 1 },
712 { C::tx_prev_note_hash_tree_root, 42 },
713 { C::tx_next_note_hash_tree_root, 42 },
714 { C::tx_prev_note_hash_tree_size, 5 },
716 { C::tx_prev_num_note_hashes_emitted, 5 },
717 { C::tx_next_num_note_hashes_emitted, 5 },
718 { C::tx_prev_nullifier_tree_root, 43 },
719 { C::tx_next_nullifier_tree_root, 43 },
720 { C::tx_prev_nullifier_tree_size, 7 },
722 { C::tx_prev_num_nullifiers_emitted, 7 },
723 { C::tx_next_num_nullifiers_emitted, 7 },
728 check_relation<tx_context>(
trace,
737 trace.
set(C::tx_next_note_hash_tree_root, 1, 999);
739 "NOTE_HASH_ROOT_IMMUTABILITY");
742 trace.
set(C::tx_next_num_note_hashes_emitted, 1, 999);
744 "NOTE_HASH_COUNT_IMMUTABILITY");
747 trace.
set(C::tx_next_nullifier_tree_root, 1, 999);
749 "NULLIFIER_ROOT_IMMUTABILITY");
752 trace.
set(C::tx_next_num_nullifiers_emitted, 1, 999);
754 "NULLIFIER_COUNT_IMMUTABILITY");
771 ::testing::StrictMock<simulation::MockGreaterThan>
mock_gt;
784 .rand_public_app_logic_call_requests(2)
787 std::vector<FF> dummy_setup_calldata = { 1, 2 };
788 std::vector<FF> dummy_setup_calldata_preimage = dummy_setup_calldata;
790 FF dummy_setup_calldata_hash =
poseidon2.
hash(dummy_setup_calldata_preimage);
791 test_public_inputs.public_setup_call_requests[0].calldata_hash = dummy_setup_calldata_hash;
793 std::vector<FF> non_empty_calldata = { 2, 3, 4 };
794 std::vector<FF> non_empty_calldata_preimage = non_empty_calldata;
796 FF non_empty_calldata_hash =
poseidon2.
hash(non_empty_calldata_preimage);
797 test_public_inputs.public_app_logic_call_requests[0].calldata_hash = non_empty_calldata_hash;
800 test_public_inputs.public_app_logic_call_requests[1].calldata_hash = empty_calldata_hash;
803 { .context_id = 1, .calldata = dummy_setup_calldata },
804 { .context_id = 5, .calldata = non_empty_calldata },
805 { .context_id = 6, .calldata = {} },
808 auto setup_call_request = test_public_inputs.public_setup_call_requests[0];
809 auto non_empty_calldata_app_logic_call_request = test_public_inputs.public_app_logic_call_requests[0];
810 auto empty_calldata_app_logic_call_request = test_public_inputs.public_app_logic_call_requests[1];
814 set_initial_columns(
trace,
815 { setup_call_request },
816 { non_empty_calldata_app_logic_call_request, empty_calldata_app_logic_call_request });
819 trace.
set(4, { { { C::tx_calldata_size, 2 }, { C::tx_next_context_id, 1 } } });
822 trace.
set(8, { { { C::tx_calldata_size, 3 }, { C::tx_next_context_id, 5 } } });
825 trace.
set(9, { { { C::tx_calldata_size, 0 }, { C::tx_next_context_id, 6 } } });
828 trace.
set(10, { { { C::tx_is_padded, 1 } } });
841 check_relation<tx>(
trace);
847 check_relation<bb::avm2::calldata_hashing<FF>>(
trace);
848 check_all_interactions<tracegen::CalldataTraceBuilder>(
trace);
#define AVM_PUBLIC_INPUTS_PUBLIC_APP_LOGIC_CALL_REQUESTS_ROW_IDX
#define AVM_PUBLIC_INPUTS_EFFECTIVE_GAS_FEES_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_TEARDOWN_CALL_REQUEST_ROW_IDX
#define AVM_PUBLIC_INPUTS_FEE_PAYER_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_NULLIFIERS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_NULLIFIERS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_NOTE_HASHES_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_TRANSACTION_FEE_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_REVERTIBLE_ACCUMULATED_DATA_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_NOTE_HASHES_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_SETUP_CALL_REQUESTS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_CALL_REQUEST_ARRAY_LENGTHS_APP_LOGIC_CALLS_ROW_IDX
#define FEE_JUICE_ADDRESS
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_NULLIFIERS_ROW_IDX
#define GENERATOR_INDEX__PUBLIC_CALLDATA
#define MAX_NOTE_HASHES_PER_TX
#define AVM_PUBLIC_INPUTS_REVERTED_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_CALL_REQUEST_ARRAY_LENGTHS_TEARDOWN_CALL_ROW_IDX
#define FEE_JUICE_BALANCES_SLOT
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_L2_TO_L1_MSGS_ROW_IDX
#define MAX_NULLIFIERS_PER_TX
#define AVM_PUBLIC_INPUTS_PUBLIC_CALL_REQUEST_ARRAY_LENGTHS_SETUP_CALLS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_NOTE_HASHES_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_REVERTIBLE_ACCUMULATED_DATA_NOTE_HASHES_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_REVERTIBLE_ACCUMULATED_DATA_NULLIFIERS_ROW_IDX
#define AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH
StrictMock< MockGreaterThan > mock_gt
EventEmitter< Poseidon2PermutationMemoryEvent > perm_mem_event_emitter
EventEmitter< Poseidon2PermutationEvent > perm_event_emitter
EventEmitter< Poseidon2HashEvent > hash_event_emitter
Poseidon2TraceBuilder poseidon2_builder
StrictMock< MockExecutionIdManager > mock_execution_id_manager
simulation::EventEmitter< simulation::Poseidon2HashEvent > hash_event_emitter
::testing::StrictMock< simulation::MockGreaterThan > mock_gt
simulation::EventEmitter< simulation::Poseidon2PermutationEvent > perm_event_emitter
tracegen::Poseidon2TraceBuilder poseidon2_builder
::testing::StrictMock< simulation::MockExecutionIdManager > mock_execution_id_manager
simulation::EventEmitter< simulation::Poseidon2PermutationMemoryEvent > perm_mem_event_emitter
tracegen::CalldataTraceBuilder calldata_builder
std::unique_ptr< InteractionBuilderInterface > get_test_job(const std::string &interaction_name) const
void process_hash(const simulation::EventEmitterInterface< simulation::Poseidon2HashEvent >::Container &hash_events, TraceContainer &trace)
void process_misc(TraceContainer &trace, const uint32_t num_rows=MAX_AVM_TRACE_SIZE)
void process_phase_table(TraceContainer &trace)
void set(Column col, uint32_t row, const FF &value)
static const InteractionDefinition interactions
static constexpr size_t SR_NULLIFIER_SIZE_IMMUTABILITY
static constexpr size_t SR_INIT_TX_REVERTED
static constexpr size_t SR_NULLIFIER_COUNT_IMMUTABILITY
static constexpr size_t SR_NOTE_HASH_ROOT_IMMUTABILITY
static constexpr size_t SR_NOTE_HASH_SIZE_IMMUTABILITY
static constexpr size_t SR_NULLIFIER_ROOT_IMMUTABILITY
static constexpr size_t SR_NOTE_HASH_COUNT_IMMUTABILITY
static constexpr size_t SR_TX_REVERTED_CONTINUITY
static constexpr size_t SR_SET_TX_REVERTED
static constexpr size_t SR_NO_EARLY_END
static constexpr size_t SR_PAD_NOTE_HASH_TREE
static constexpr size_t SR_TRACE_CONTINUITY
static constexpr size_t SR_PAD_NULLIFIER_TREE
static FF hash(const std::vector< FF > &input)
Hashes a vector of field elements.
PrecomputedTraceBuilder precomputed_builder
#define EXPECT_THROW_WITH_MESSAGE(code, expectedMessage)
TEST_F(AvmRecursiveTests, GoblinRecursion)
A test of the Goblinized AVM recursive verifier.
void check_interaction(tracegen::TestTraceContainer &trace)
TEST(TxExecutionConstrainingTest, WriteTreeValue)
TestTraceContainer empty_trace()
lookup_settings< lookup_tx_read_phase_spec_settings_ > lookup_tx_read_phase_spec_settings
permutation_settings< perm_tx_read_calldata_hash_settings_ > perm_tx_read_calldata_hash_settings
lookup_settings< lookup_tx_read_public_call_request_phase_settings_ > lookup_tx_read_public_call_request_phase_settings
lookup_settings< lookup_tx_read_phase_length_settings_ > lookup_tx_read_phase_length_settings
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
EventEmitter< CalldataEvent > calldata_events
tracegen::PublicInputsTraceBuilder public_inputs_builder