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::execution_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 },
306 { C::tx_const_three, 3 },
307 { C::tx_start_phase, 1 },
308 { C::tx_end_phase, 1 },
309 { C::tx_uint32_max, 0xffffffff },
316 { C::tx_start_phase, 1 },
317 { C::tx_end_phase, 1 },
318 { C::tx_is_tree_padding, 1 },
319 { C::tx_remaining_phase_counter, 1 },
320 { C::tx_remaining_phase_inv, 1 },
329 { C::tx_start_phase, 1 },
330 { C::tx_end_phase, 1 },
331 { C::tx_is_cleanup, 1 },
332 { C::tx_remaining_phase_counter, 1 },
333 { C::tx_remaining_phase_inv, 1 },
338TEST_F(TxExecutionConstrainingTestHelper, SimpleControlFlowRead)
340 auto test_public_inputs = testing::PublicInputsBuilder()
341 .rand_public_setup_call_requests(2)
342 .rand_public_app_logic_call_requests(1)
345 auto first_setup_call_request = test_public_inputs.public_setup_call_requests[0];
346 auto second_setup_call_request = test_public_inputs.public_setup_call_requests[1];
347 auto app_logic_call_request = test_public_inputs.public_app_logic_call_requests[0];
349 TestTraceContainer
trace;
350 set_initial_columns(trace, { first_setup_call_request, second_setup_call_request }, { app_logic_call_request });
355 { C::tx_is_padded, 1 },
364 check_relation<tx>(trace);
371TEST_F(TxExecutionConstrainingTestHelper, SimpleHandleRevert)
373 auto test_public_inputs = testing::PublicInputsBuilder()
374 .rand_public_setup_call_requests(2)
375 .rand_public_app_logic_call_requests(2)
379 auto first_setup_call_request = test_public_inputs.public_setup_call_requests[0];
380 auto second_setup_call_request = test_public_inputs.public_setup_call_requests[1];
381 auto first_app_logic_call_request = test_public_inputs.public_app_logic_call_requests[0];
382 auto second_app_logic_call_request = test_public_inputs.public_app_logic_call_requests[1];
384 TestTraceContainer
trace;
385 set_initial_columns(trace,
386 { first_setup_call_request, second_setup_call_request },
387 { first_app_logic_call_request, second_app_logic_call_request });
390 trace.
set(11, { { { C::tx_is_padded, 1 } } });
393 trace.
set(10, { { { C::tx_reverted, 1 } } });
396 trace.
set(1, { { { C::tx_start_tx, 1 } } });
397 for (uint32_t i = 10; i < 15; i++) {
398 trace.
set(i, { { { C::tx_tx_reverted, 1 } } });
408 check_relation<tx>(trace);
409 check_relation<tx_context>(
411 check_interaction<TxTraceBuilder, lookup_tx_context_public_inputs_read_reverted_settings>(trace);
414TEST_F(TxExecutionConstrainingTestHelper, JumpOnRevert)
416 TestTraceContainer
trace;
419 { PublicCallRequest{ .msg_sender = 0, .contract_address = 0, .is_static_call =
false, .calldata_hash = 0 } },
425 { C::tx_is_padded, 0 },
426 { C::tx_sel_revertible_append_l2_l1_msg, 0 },
427 { C::tx_remaining_phase_counter, 1 },
428 { C::tx_remaining_phase_inv, 1 },
429 { C::tx_is_revertible, 1 },
430 { C::tx_reverted, 1 },
433 trace.
set(8, { { { C::tx_is_padded, 1 } } });
438 check_relation<tx>(trace);
443TEST(TxExecutionConstrainingTest, WriteTreeValue)
447 auto pub_inputs_col = test_public_inputs.
to_columns();
450 { { C::execution_clk, 0 }, { C::precomputed_first_row, 1 } },
455 { C::tx_start_phase, 1 },
457 { C::tx_read_pi_length_offset,
461 { C::tx_is_tree_insert_phase, 1 },
462 { C::tx_leaf_value, test_public_inputs.previous_non_revertible_accumulated_data.nullifiers[0] },
463 { C::tx_prev_num_nullifiers_emitted, 0 },
464 { C::tx_next_num_nullifiers_emitted, 1 },
465 { C::tx_end_phase, 1 } },
470 { C::tx_start_phase, 1 },
472 { C::tx_read_pi_length_offset,
476 { C::tx_is_tree_insert_phase, 1 },
477 { C::tx_leaf_value, test_public_inputs.previous_non_revertible_accumulated_data.note_hashes[0] },
478 { C::tx_prev_num_note_hashes_emitted, 0 },
479 { C::tx_next_num_note_hashes_emitted, 1 },
480 { C::tx_end_phase, 1 } },
485 { C::tx_start_phase, 1 },
486 { C::tx_read_pi_length_offset,
491 { C::tx_sel_non_revertible_append_l2_l1_msg, 1 },
492 { C::tx_l2_l1_msg_content,
493 test_public_inputs.previous_non_revertible_accumulated_data.l2_to_l1_msgs[0].message.content },
494 { C::tx_l2_l1_msg_recipient,
495 test_public_inputs.previous_non_revertible_accumulated_data.l2_to_l1_msgs[0].message.recipient },
496 { C::tx_l2_l1_msg_contract_address,
497 test_public_inputs.previous_non_revertible_accumulated_data.l2_to_l1_msgs[0].contract_address },
498 { C::tx_end_phase, 1 } },
504 { C::tx_start_phase, 1 },
505 { C::tx_is_padded, 1 },
507 { C::tx_end_phase, 1 } },
512 { C::tx_start_phase, 1 },
514 { C::tx_read_pi_length_offset,
518 { C::tx_is_tree_insert_phase, 1 },
519 { C::tx_leaf_value, test_public_inputs.previous_revertible_accumulated_data.nullifiers[0] },
520 { C::tx_prev_num_nullifiers_emitted, 1 },
521 { C::tx_next_num_nullifiers_emitted, 2 },
522 { C::tx_end_phase, 1 } },
527 { C::tx_start_phase, 1 },
529 { C::tx_read_pi_length_offset,
533 { C::tx_is_tree_insert_phase, 1 },
534 { C::tx_leaf_value, test_public_inputs.previous_revertible_accumulated_data.note_hashes[0] },
535 { C::tx_prev_num_note_hashes_emitted, 1 },
536 { C::tx_next_num_note_hashes_emitted, 2 },
537 { C::tx_end_phase, 1 } },
542 { C::tx_start_phase, 1 },
544 { C::tx_read_pi_length_offset,
549 { C::tx_sel_revertible_append_l2_l1_msg, 1 },
550 { C::tx_l2_l1_msg_content,
551 test_public_inputs.previous_revertible_accumulated_data.l2_to_l1_msgs[0].message.content },
552 { C::tx_l2_l1_msg_recipient,
553 test_public_inputs.previous_revertible_accumulated_data.l2_to_l1_msgs[0].message.recipient },
554 { C::tx_l2_l1_msg_contract_address,
555 test_public_inputs.previous_revertible_accumulated_data.l2_to_l1_msgs[0].contract_address },
556 { C::tx_end_phase, 1 } },
562 { C::tx_start_phase, 1 },
563 { C::tx_is_padded, 1 },
565 { C::tx_end_phase, 1 } },
571 { C::tx_is_padded, 1 },
572 { C::tx_start_phase, 1 },
573 { C::tx_end_phase, 1 } },
583 check_interaction<TxTraceBuilder, lookup_tx_read_tree_insert_value_settings>(
trace);
584 check_interaction<TxTraceBuilder, lookup_tx_read_l2_l1_msg_settings>(
trace);
585 check_interaction<TxTraceBuilder, lookup_tx_write_l2_l1_msg_settings>(
trace);
588TEST_F(TxExecutionConstrainingTestHelper, CollectFees)
592 .rand_public_app_logic_call_requests(1)
593 .rand_public_teardown_call_request()
597 auto second_setup_call_request = test_public_inputs.public_setup_call_requests[1];
598 auto app_logic_call_request = test_public_inputs.public_app_logic_call_requests[0];
599 auto teardown_call_request = test_public_inputs.public_teardown_call_request;
602 set_initial_columns(
trace, { first_setup_call_request, second_setup_call_request }, { app_logic_call_request });
605 for (uint32_t i = 1; i < 4; i++) {
608 { C::tx_prev_da_gas_used, 1 },
609 { C::tx_prev_l2_gas_used, 100 },
610 { C::tx_next_da_gas_used, 1 },
611 { C::tx_next_l2_gas_used, 100 },
617 { C::tx_prev_da_gas_used, 1 },
618 { C::tx_prev_l2_gas_used, 100 },
619 { C::tx_prev_da_gas_used_sent_to_enqueued_call, 1 },
620 { C::tx_prev_l2_gas_used_sent_to_enqueued_call, 100 },
621 { C::tx_next_da_gas_used, 2 },
622 { C::tx_next_l2_gas_used, 200 },
623 { C::tx_next_da_gas_used_sent_to_enqueued_call, 2 },
624 { C::tx_next_l2_gas_used_sent_to_enqueued_call, 200 },
629 { C::tx_prev_da_gas_used, 2 },
630 { C::tx_prev_l2_gas_used, 200 },
631 { C::tx_prev_da_gas_used_sent_to_enqueued_call, 2 },
632 { C::tx_prev_l2_gas_used_sent_to_enqueued_call, 200 },
633 { C::tx_next_da_gas_used, 3 },
634 { C::tx_next_l2_gas_used, 300 },
635 { C::tx_next_da_gas_used_sent_to_enqueued_call, 3 },
636 { C::tx_next_l2_gas_used_sent_to_enqueued_call, 300 },
639 for (uint32_t i = 6; i < 9; i++) {
642 { C::tx_prev_da_gas_used, 3 },
643 { C::tx_prev_l2_gas_used, 300 },
644 { C::tx_next_da_gas_used, 3 },
645 { C::tx_next_l2_gas_used, 300 },
651 { C::tx_prev_da_gas_used, 3 },
652 { C::tx_prev_l2_gas_used, 300 },
653 { C::tx_prev_da_gas_used_sent_to_enqueued_call, 3 },
654 { C::tx_prev_l2_gas_used_sent_to_enqueued_call, 300 },
655 { C::tx_next_da_gas_used, 4 },
656 { C::tx_next_l2_gas_used, 400 },
657 { C::tx_next_da_gas_used_sent_to_enqueued_call, 4 },
658 { C::tx_next_l2_gas_used_sent_to_enqueued_call, 400 },
663 { C::tx_should_process_call_request, 1 },
664 { C::tx_remaining_phase_counter, 1 },
665 { C::tx_remaining_phase_inv, 1 },
667 { C::tx_msg_sender, teardown_call_request.msg_sender },
668 { C::tx_contract_addr, teardown_call_request.contract_address },
669 { C::tx_is_static, teardown_call_request.is_static_call },
670 { C::tx_calldata_hash, teardown_call_request.calldata_hash },
671 { C::tx_prev_da_gas_used, 4 },
672 { C::tx_prev_l2_gas_used, 400 },
673 { C::tx_prev_da_gas_used_sent_to_enqueued_call, 0 },
674 { C::tx_prev_l2_gas_used_sent_to_enqueued_call, 0 },
675 { C::tx_next_da_gas_used, 4 },
676 { C::tx_next_l2_gas_used, 400 },
677 { C::tx_next_da_gas_used_sent_to_enqueued_call, 13213 },
678 { C::tx_next_l2_gas_used_sent_to_enqueued_call, 456789 },
683 { C::tx_prev_da_gas_used, 4 },
684 { C::tx_prev_l2_gas_used, 400 },
685 { C::tx_next_da_gas_used, 4 },
686 { C::tx_next_l2_gas_used, 400 },
695 check_relation<tx>(
trace);
696 check_interaction<TxTraceBuilder, lookup_tx_read_phase_spec_settings>(
trace);
697 check_interaction<TxTraceBuilder, lookup_tx_read_phase_length_settings>(
trace);
698 check_interaction<TxTraceBuilder, lookup_tx_read_public_call_request_phase_settings>(
trace);
699 check_interaction<TxTraceBuilder, lookup_tx_read_effective_fee_public_inputs_settings>(
trace);
700 check_interaction<TxTraceBuilder, lookup_tx_read_fee_payer_public_inputs_settings>(
trace);
703TEST(TxExecutionConstrainingTest, NegativeTreePaddingChecks)
708 { C::precomputed_first_row, 1 },
713 { C::tx_is_tree_padding, 1 },
714 { C::tx_prev_note_hash_tree_root, 42 },
715 { C::tx_next_note_hash_tree_root, 42 },
716 { C::tx_prev_note_hash_tree_size, 5 },
718 { C::tx_prev_num_note_hashes_emitted, 5 },
719 { C::tx_next_num_note_hashes_emitted, 5 },
720 { C::tx_prev_nullifier_tree_root, 43 },
721 { C::tx_next_nullifier_tree_root, 43 },
722 { C::tx_prev_nullifier_tree_size, 7 },
724 { C::tx_prev_num_nullifiers_emitted, 7 },
725 { C::tx_next_num_nullifiers_emitted, 7 },
730 check_relation<tx_context>(
trace,
739 trace.
set(C::tx_next_note_hash_tree_root, 1, 999);
741 "NOTE_HASH_ROOT_IMMUTABILITY");
744 trace.
set(C::tx_next_num_note_hashes_emitted, 1, 999);
746 "NOTE_HASH_COUNT_IMMUTABILITY");
749 trace.
set(C::tx_next_nullifier_tree_root, 1, 999);
751 "NULLIFIER_ROOT_IMMUTABILITY");
754 trace.
set(C::tx_next_num_nullifiers_emitted, 1, 999);
756 "NULLIFIER_COUNT_IMMUTABILITY");
773 ::testing::StrictMock<simulation::MockGreaterThan>
mock_gt;
786 .rand_public_app_logic_call_requests(2)
789 std::vector<FF> dummy_setup_calldata = { 1, 2 };
790 std::vector<FF> dummy_setup_calldata_preimage = dummy_setup_calldata;
792 FF dummy_setup_calldata_hash =
poseidon2.
hash(dummy_setup_calldata_preimage);
793 test_public_inputs.public_setup_call_requests[0].calldata_hash = dummy_setup_calldata_hash;
795 std::vector<FF> non_empty_calldata = { 2, 3, 4 };
796 std::vector<FF> non_empty_calldata_preimage = non_empty_calldata;
798 FF non_empty_calldata_hash =
poseidon2.
hash(non_empty_calldata_preimage);
799 test_public_inputs.public_app_logic_call_requests[0].calldata_hash = non_empty_calldata_hash;
802 test_public_inputs.public_app_logic_call_requests[1].calldata_hash = empty_calldata_hash;
805 { .context_id = 1, .calldata = dummy_setup_calldata },
806 { .context_id = 5, .calldata = non_empty_calldata },
807 { .context_id = 6, .calldata = {} },
810 auto setup_call_request = test_public_inputs.public_setup_call_requests[0];
811 auto non_empty_calldata_app_logic_call_request = test_public_inputs.public_app_logic_call_requests[0];
812 auto empty_calldata_app_logic_call_request = test_public_inputs.public_app_logic_call_requests[1];
816 set_initial_columns(
trace,
817 { setup_call_request },
818 { non_empty_calldata_app_logic_call_request, empty_calldata_app_logic_call_request });
821 trace.
set(4, { { { C::tx_calldata_size, 2 }, { C::tx_next_context_id, 1 } } });
824 trace.
set(8, { { { C::tx_calldata_size, 3 }, { C::tx_next_context_id, 5 } } });
827 trace.
set(9, { { { C::tx_calldata_size, 0 }, { C::tx_next_context_id, 6 } } });
830 trace.
set(10, { { { C::tx_is_padded, 1 } } });
843 check_relation<tx>(
trace);
849 check_relation<bb::avm2::calldata_hashing<FF>>(
trace);
850 check_all_interactions<tracegen::CalldataTraceBuilder>(
trace);
#define EXPECT_THROW_WITH_MESSAGE(code, expectedMessageRegex)
#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 DOM_SEP__PUBLIC_STORAGE_MAP_SLOT
#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 DOM_SEP__PUBLIC_CALLDATA
#define FEE_JUICE_ADDRESS
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_NULLIFIERS_ROW_IDX
#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
void process_hash(const simulation::EventEmitterInterface< simulation::Poseidon2HashEvent >::Container &hash_events, TraceContainer &trace)
Processes the hash events for the Poseidon2 hash function. It populates the columns for the poseidon2...
void process_misc(TraceContainer &trace, const uint32_t num_rows=PRECOMPUTED_TRACE_SIZE)
void process_phase_table(TraceContainer &trace)
void set(Column col, uint32_t row, const FF &value)
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
void check_interaction(tracegen::TestTraceContainer &trace)
TEST(AvmFixedVKTests, FixedVKCommitments)
Test that the fixed VK commitments agree with the ones computed from precomputed columns.
TEST_F(AvmRecursiveTests, TwoLayerAvmRecursionFailsWithWrongPIs)
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
Settings to be passed ot GenericLookupRelationImpl.
tracegen::PublicInputsTraceBuilder public_inputs_builder