1#include <gmock/gmock.h>
2#include <gtest/gtest.h>
32using tracegen::TestTraceContainer;
33using tracegen::TxTraceBuilder;
38TEST(TxExecutionConstrainingTest, NegativeEmptyTrace)
43TEST(TxExecutionConstrainingTest, NegativeEarlyEnd)
45 TestTraceContainer
trace({
48 { C::precomputed_first_row, 1 },
58TEST(TxExecutionConstrainingTest, NegativeNoExtraneousRows)
60 TestTraceContainer
trace({
63 { C::precomputed_first_row, 1 },
77class TxExecutionConstrainingTestHelper :
public ::testing::Test {
81 static void set_initial_columns(TestTraceContainer&
trace,
87 trace.set(row++, { { { C::precomputed_clk, 0 }, { C::precomputed_first_row, 1 } } });
93 { C::tx_start_tx, 1 },
95 { C::tx_is_padded, 1 },
96 { C::tx_is_tree_insert_phase, 1 },
97 { C::tx_sel_non_revertible_append_nullifier, 1 },
98 { C::tx_sel_can_emit_nullifier, 1 },
101 { C::tx_sel_read_phase_length, 1 },
102 { C::tx_read_pi_length_offset,
105 { C::tx_start_phase, 1 },
106 { C::tx_end_phase, 1 },
107 { C::tx_next_context_id, 1 },
113 { C::tx_is_padded, 1 },
114 { C::tx_is_tree_insert_phase, 1 },
115 { C::tx_sel_non_revertible_append_note_hash, 1 },
116 { C::tx_sel_can_emit_note_hash, 1 },
117 { C::tx_read_pi_offset,
119 { C::tx_sel_read_phase_length, 1 },
120 { C::tx_read_pi_length_offset,
122 { C::tx_start_phase, 1 },
123 { C::tx_end_phase, 1 },
124 { C::tx_next_context_id, 1 },
131 { C::tx_is_padded, 1 },
132 { C::tx_sel_non_revertible_append_l2_l1_msg, 1 },
133 { C::tx_sel_can_emit_l2_l1_msg, 1 },
135 { C::tx_read_pi_offset,
137 { C::tx_sel_read_phase_length, 1 },
138 { C::tx_read_pi_length_offset,
142 { C::tx_start_phase, 1 },
143 { C::tx_end_phase, 1 },
144 { C::tx_next_context_id, 1 },
147 auto calls_remaining = setup_call_requests.size();
149 for (
auto setup_call : setup_call_requests) {
150 bool is_first_call = calls_remaining == setup_call_requests.size();
156 { C::tx_start_phase, is_first_call ? 1 : 0 },
157 { C::tx_end_phase, calls_remaining == 1 ? 1 : 0 },
158 { C::tx_sel_read_phase_length, is_first_call ? 1 : 0 },
160 { C::tx_is_public_call_request, 1 },
161 { C::tx_should_process_call_request, 1 },
162 { C::tx_read_pi_offset, read_pi_offset },
163 { C::tx_read_pi_length_offset,
165 { C::tx_remaining_phase_counter, calls_remaining },
166 { C::tx_remaining_phase_inv,
FF(calls_remaining).invert() },
167 { C::tx_remaining_phase_minus_one_inv,
168 calls_remaining == 1 ? 0 :
FF(calls_remaining - 1).invert() },
169 { C::tx_sel_can_emit_note_hash, 1 },
170 { C::tx_sel_can_emit_nullifier, 1 },
171 { C::tx_sel_can_write_public_data, 1 },
172 { C::tx_sel_can_emit_unencrypted_log, 1 },
173 { C::tx_sel_can_emit_l2_l1_msg, 1 },
175 { C::tx_msg_sender, setup_call.msgSender },
176 { C::tx_contract_addr, setup_call.contractAddress },
177 { C::tx_is_static, setup_call.isStaticCall },
178 { C::tx_calldata_hash, setup_call.calldataHash },
189 { C::tx_is_padded, 1 },
190 { C::tx_is_tree_insert_phase, 1 },
191 { C::tx_sel_revertible_append_nullifier, 1 },
192 { C::tx_sel_can_emit_nullifier, 1 },
193 { C::tx_is_revertible, 1 },
195 { C::tx_sel_read_phase_length, 1 },
196 { C::tx_read_pi_length_offset,
198 { C::tx_start_phase, 1 },
199 { C::tx_end_phase, 1 },
206 { C::tx_is_padded, 1 },
207 { C::tx_is_tree_insert_phase, 1 },
208 { C::tx_sel_revertible_append_note_hash, 1 },
209 { C::tx_sel_can_emit_note_hash, 1 },
210 { C::tx_is_revertible, 1 },
212 { C::tx_sel_read_phase_length, 1 },
213 { C::tx_read_pi_length_offset,
215 { C::tx_start_phase, 1 },
216 { C::tx_end_phase, 1 },
223 { C::tx_is_padded, 1 },
224 { C::tx_sel_revertible_append_l2_l1_msg, 1 },
225 { C::tx_sel_can_emit_l2_l1_msg, 1 },
226 { C::tx_is_revertible, 1 },
228 { C::tx_sel_read_phase_length, 1 },
229 { C::tx_read_pi_length_offset,
232 { C::tx_start_phase, 1 },
233 { C::tx_end_phase, 1 },
236 calls_remaining = app_logic_call_requests.size();
238 for (
auto app_logic_call : app_logic_call_requests) {
239 bool is_first_call = calls_remaining == app_logic_call_requests.size();
245 { C::tx_start_phase, is_first_call ? 1 : 0 },
246 { C::tx_end_phase, calls_remaining == 1 ? 1 : 0 },
247 { C::tx_sel_read_phase_length, is_first_call ? 1 : 0 },
249 { C::tx_is_public_call_request, 1 },
250 { C::tx_should_process_call_request, 1 },
251 { C::tx_read_pi_offset, read_pi_offset },
252 { C::tx_read_pi_length_offset,
254 { C::tx_remaining_phase_counter, calls_remaining },
255 { C::tx_remaining_phase_inv,
FF(calls_remaining).invert() },
256 { C::tx_remaining_phase_minus_one_inv,
257 calls_remaining == 1 ? 0 :
FF(calls_remaining - 1).invert() },
258 { C::tx_is_revertible, 1 },
259 { C::tx_sel_can_emit_note_hash, 1 },
260 { C::tx_sel_can_emit_nullifier, 1 },
261 { C::tx_sel_can_write_public_data, 1 },
262 { C::tx_sel_can_emit_unencrypted_log, 1 },
263 { C::tx_sel_can_emit_l2_l1_msg, 1 },
265 { C::tx_msg_sender, app_logic_call.msgSender },
266 { C::tx_contract_addr, app_logic_call.contractAddress },
267 { C::tx_is_static, app_logic_call.isStaticCall },
268 { C::tx_calldata_hash, app_logic_call.calldataHash },
278 { C::tx_is_teardown_phase, 1 },
279 { C::tx_sel_read_phase_length, 1 },
280 { C::tx_read_pi_length_offset,
283 { C::tx_is_public_call_request, 1 },
284 { C::tx_is_revertible, 1 },
285 { C::tx_sel_can_emit_note_hash, 1 },
286 { C::tx_sel_can_emit_nullifier, 1 },
287 { C::tx_sel_can_write_public_data, 1 },
288 { C::tx_sel_can_emit_unencrypted_log, 1 },
289 { C::tx_sel_can_emit_l2_l1_msg, 1 },
290 { C::tx_start_phase, 1 },
291 { C::tx_end_phase, 1 },
298 { C::tx_remaining_phase_counter, 1 },
299 { C::tx_remaining_phase_inv, 1 },
300 { C::tx_is_collect_fee, 1 },
301 { C::tx_sel_can_write_public_data, 1 },
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 },
321 { C::tx_sel_can_emit_note_hash, 1 },
322 { C::tx_sel_can_emit_nullifier, 1 },
331 { C::tx_start_phase, 1 },
332 { C::tx_end_phase, 1 },
333 { C::tx_is_cleanup, 1 },
334 { C::tx_remaining_phase_counter, 1 },
335 { C::tx_remaining_phase_inv, 1 },
340TEST_F(TxExecutionConstrainingTestHelper, SimpleControlFlowRead)
342 auto test_public_inputs = testing::PublicInputsBuilder()
343 .rand_public_setup_call_requests(2)
344 .rand_public_app_logic_call_requests(1)
347 auto first_setup_call_request = test_public_inputs.publicSetupCallRequests[0];
348 auto second_setup_call_request = test_public_inputs.publicSetupCallRequests[1];
349 auto app_logic_call_request = test_public_inputs.publicAppLogicCallRequests[0];
351 TestTraceContainer
trace;
352 set_initial_columns(
trace, { first_setup_call_request, second_setup_call_request }, { app_logic_call_request });
357 { C::tx_is_padded, 1 },
366 check_relation<tx>(
trace);
373TEST_F(TxExecutionConstrainingTestHelper, JumpOnRevert)
375 TestTraceContainer
trace;
378 { PublicCallRequest{ .msgSender = 0, .contractAddress = 0, .isStaticCall =
false, .calldataHash = 0 } },
384 { C::tx_is_padded, 0 },
385 { C::tx_sel_revertible_append_l2_l1_msg, 0 },
386 { C::tx_remaining_phase_counter, 1 },
387 { C::tx_remaining_phase_inv, 1 },
388 { C::tx_is_revertible, 1 },
389 { C::tx_reverted, 1 },
392 trace.
set(8, { { { C::tx_is_padded, 1 } } });
396 check_relation<tx>(
trace);
397 check_interaction<TxTraceBuilder, lookup_tx_phase_jump_on_revert_settings>(
trace);
402TEST(TxExecutionConstrainingTest, WriteTreeValue)
406 auto pub_inputs_col = test_public_inputs.
to_columns();
409 { { C::precomputed_clk, 0 }, { C::precomputed_first_row, 1 } },
414 { C::tx_start_phase, 1 },
416 { C::tx_read_pi_length_offset,
420 { C::tx_is_tree_insert_phase, 1 },
421 { C::tx_leaf_value, test_public_inputs.previousNonRevertibleAccumulatedData.nullifiers[0] },
422 { C::tx_prev_num_nullifiers_emitted, 0 },
423 { C::tx_next_num_nullifiers_emitted, 1 },
424 { C::tx_end_phase, 1 } },
429 { C::tx_start_phase, 1 },
431 { C::tx_read_pi_length_offset,
435 { C::tx_is_tree_insert_phase, 1 },
436 { C::tx_leaf_value, test_public_inputs.previousNonRevertibleAccumulatedData.noteHashes[0] },
437 { C::tx_prev_num_note_hashes_emitted, 0 },
438 { C::tx_next_num_note_hashes_emitted, 1 },
439 { C::tx_end_phase, 1 } },
444 { C::tx_start_phase, 1 },
445 { C::tx_read_pi_length_offset,
450 { C::tx_sel_non_revertible_append_l2_l1_msg, 1 },
451 { C::tx_l2_l1_msg_content,
452 test_public_inputs.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].message.content },
453 { C::tx_l2_l1_msg_recipient,
454 test_public_inputs.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].message.recipient },
455 { C::tx_l2_l1_msg_contract_address,
456 test_public_inputs.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].contractAddress },
457 { C::tx_end_phase, 1 } },
463 { C::tx_start_phase, 1 },
464 { C::tx_is_padded, 1 },
466 { C::tx_end_phase, 1 } },
471 { C::tx_start_phase, 1 },
473 { C::tx_read_pi_length_offset,
477 { C::tx_is_tree_insert_phase, 1 },
478 { C::tx_leaf_value, test_public_inputs.previousRevertibleAccumulatedData.nullifiers[0] },
479 { C::tx_prev_num_nullifiers_emitted, 1 },
480 { C::tx_next_num_nullifiers_emitted, 2 },
481 { C::tx_end_phase, 1 } },
486 { C::tx_start_phase, 1 },
488 { C::tx_read_pi_length_offset,
492 { C::tx_is_tree_insert_phase, 1 },
493 { C::tx_leaf_value, test_public_inputs.previousRevertibleAccumulatedData.noteHashes[0] },
494 { C::tx_prev_num_note_hashes_emitted, 1 },
495 { C::tx_next_num_note_hashes_emitted, 2 },
496 { C::tx_end_phase, 1 } },
501 { C::tx_start_phase, 1 },
503 { C::tx_read_pi_length_offset,
508 { C::tx_sel_revertible_append_l2_l1_msg, 1 },
509 { C::tx_l2_l1_msg_content,
510 test_public_inputs.previousRevertibleAccumulatedData.l2ToL1Msgs[0].message.content },
511 { C::tx_l2_l1_msg_recipient,
512 test_public_inputs.previousRevertibleAccumulatedData.l2ToL1Msgs[0].message.recipient },
513 { C::tx_l2_l1_msg_contract_address,
514 test_public_inputs.previousRevertibleAccumulatedData.l2ToL1Msgs[0].contractAddress },
515 { C::tx_end_phase, 1 } },
521 { C::tx_start_phase, 1 },
522 { C::tx_is_padded, 1 },
524 { C::tx_end_phase, 1 } },
530 { C::tx_is_padded, 1 },
531 { C::tx_start_phase, 1 },
532 { C::tx_end_phase, 1 } },
547TEST_F(TxExecutionConstrainingTestHelper, CollectFees)
556 auto second_setup_call_request = test_public_inputs.publicSetupCallRequests[1];
557 auto app_logic_call_request = test_public_inputs.publicAppLogicCallRequests[0];
558 auto teardown_call_request = test_public_inputs.publicTeardownCallRequest;
561 set_initial_columns(
trace, { first_setup_call_request, second_setup_call_request }, { app_logic_call_request });
564 for (uint32_t i = 1; i < 4; i++) {
567 { C::tx_prev_da_gas_used, 1 },
568 { C::tx_prev_l2_gas_used, 100 },
569 { C::tx_next_da_gas_used, 1 },
570 { C::tx_next_l2_gas_used, 100 },
576 { C::tx_prev_da_gas_used, 1 },
577 { C::tx_prev_l2_gas_used, 100 },
578 { C::tx_prev_da_gas_used_sent_to_enqueued_call, 1 },
579 { C::tx_prev_l2_gas_used_sent_to_enqueued_call, 100 },
580 { C::tx_next_da_gas_used, 2 },
581 { C::tx_next_l2_gas_used, 200 },
582 { C::tx_next_da_gas_used_sent_to_enqueued_call, 2 },
583 { C::tx_next_l2_gas_used_sent_to_enqueued_call, 200 },
588 { C::tx_prev_da_gas_used, 2 },
589 { C::tx_prev_l2_gas_used, 200 },
590 { C::tx_prev_da_gas_used_sent_to_enqueued_call, 2 },
591 { C::tx_prev_l2_gas_used_sent_to_enqueued_call, 200 },
592 { C::tx_next_da_gas_used, 3 },
593 { C::tx_next_l2_gas_used, 300 },
594 { C::tx_next_da_gas_used_sent_to_enqueued_call, 3 },
595 { C::tx_next_l2_gas_used_sent_to_enqueued_call, 300 },
598 for (uint32_t i = 6; i < 9; i++) {
601 { C::tx_prev_da_gas_used, 3 },
602 { C::tx_prev_l2_gas_used, 300 },
603 { C::tx_next_da_gas_used, 3 },
604 { C::tx_next_l2_gas_used, 300 },
610 { C::tx_prev_da_gas_used, 3 },
611 { C::tx_prev_l2_gas_used, 300 },
612 { C::tx_prev_da_gas_used_sent_to_enqueued_call, 3 },
613 { C::tx_prev_l2_gas_used_sent_to_enqueued_call, 300 },
614 { C::tx_next_da_gas_used, 4 },
615 { C::tx_next_l2_gas_used, 400 },
616 { C::tx_next_da_gas_used_sent_to_enqueued_call, 4 },
617 { C::tx_next_l2_gas_used_sent_to_enqueued_call, 400 },
622 { C::tx_should_process_call_request, 1 },
623 { C::tx_remaining_phase_counter, 1 },
624 { C::tx_remaining_phase_inv, 1 },
626 { C::tx_msg_sender, teardown_call_request.msgSender },
627 { C::tx_contract_addr, teardown_call_request.contractAddress },
628 { C::tx_is_static, teardown_call_request.isStaticCall },
629 { C::tx_calldata_hash, teardown_call_request.calldataHash },
630 { C::tx_prev_da_gas_used, 4 },
631 { C::tx_prev_l2_gas_used, 400 },
632 { C::tx_prev_da_gas_used_sent_to_enqueued_call, 0 },
633 { C::tx_prev_l2_gas_used_sent_to_enqueued_call, 0 },
634 { C::tx_next_da_gas_used, 4 },
635 { C::tx_next_l2_gas_used, 400 },
636 { C::tx_next_da_gas_used_sent_to_enqueued_call, 13213 },
637 { C::tx_next_l2_gas_used_sent_to_enqueued_call, 456789 },
642 { C::tx_prev_da_gas_used, 4 },
643 { C::tx_prev_l2_gas_used, 400 },
644 { C::tx_next_da_gas_used, 4 },
645 { C::tx_next_l2_gas_used, 400 },
654 check_relation<tx>(
trace);
662TEST(TxExecutionConstrainingTest, NegativePaddingChecks)
667 { C::precomputed_first_row, 1 },
672 { C::tx_is_tree_padding, 1 },
673 { C::tx_prev_note_hash_tree_root, 42 },
674 { C::tx_next_note_hash_tree_root, 42 },
675 { C::tx_prev_note_hash_tree_size, 5 },
677 { C::tx_prev_num_note_hashes_emitted, 5 },
678 { C::tx_next_num_note_hashes_emitted, 5 },
679 { C::tx_prev_nullifier_tree_root, 43 },
680 { C::tx_next_nullifier_tree_root, 43 },
681 { C::tx_prev_nullifier_tree_size, 7 },
683 { C::tx_prev_num_nullifiers_emitted, 7 },
684 { C::tx_next_num_nullifiers_emitted, 7 },
687 check_relation<tx>(
trace,
696 trace.
set(C::tx_next_note_hash_tree_root, 1, 999);
698 "NOTE_HASH_TREE_ROOT_IMMUTABLE_IN_PADDING");
701 trace.
set(C::tx_next_num_note_hashes_emitted, 1, 999);
703 "NOTE_HASHES_EMITTED_IMMUTABLE_IN_PADDING");
706 trace.
set(C::tx_next_nullifier_tree_root, 1, 999);
708 "NULLIFIER_TREE_ROOT_IMMUTABLE_IN_PADDING");
711 trace.
set(C::tx_next_num_nullifiers_emitted, 1, 999);
713 "NULLIFIERS_EMITTED_IMMUTABLE_IN_PADDING");
730 ::testing::StrictMock<simulation::MockGreaterThan>
mock_gt;
746 std::vector<FF> dummy_setup_calldata = { 1, 2 };
747 std::vector<FF> dummy_setup_calldata_preimage = dummy_setup_calldata;
749 FF dummy_setup_calldata_hash =
poseidon2.
hash(dummy_setup_calldata_preimage);
750 test_public_inputs.publicSetupCallRequests[0].calldataHash = dummy_setup_calldata_hash;
752 std::vector<FF> non_empty_calldata = { 2, 3, 4 };
753 std::vector<FF> non_empty_calldata_preimage = non_empty_calldata;
755 FF non_empty_calldata_hash =
poseidon2.
hash(non_empty_calldata_preimage);
756 test_public_inputs.publicAppLogicCallRequests[0].calldataHash = non_empty_calldata_hash;
759 test_public_inputs.publicAppLogicCallRequests[1].calldataHash = empty_calldata_hash;
763 .calldata_size =
static_cast<uint32_t
>(dummy_setup_calldata.size()),
766 .calldata_size =
static_cast<uint32_t
>(non_empty_calldata.size()),
768 { .context_id = 6, .calldata_size = 0, .calldata = {} }
771 auto setup_call_request = test_public_inputs.publicSetupCallRequests[0];
772 auto non_empty_calldata_app_logic_call_request = test_public_inputs.publicAppLogicCallRequests[0];
773 auto empty_calldata_app_logic_call_request = test_public_inputs.publicAppLogicCallRequests[1];
777 set_initial_columns(
trace,
778 { setup_call_request },
779 { non_empty_calldata_app_logic_call_request, empty_calldata_app_logic_call_request });
782 trace.
set(4, { { { C::tx_calldata_size, 2 }, { C::tx_next_context_id, 1 } } });
785 trace.
set(8, { { { C::tx_calldata_size, 3 }, { C::tx_next_context_id, 5 } } });
788 trace.
set(9, { { { C::tx_calldata_size, 0 }, { C::tx_next_context_id, 6 } } });
791 trace.
set(10, { { { C::tx_is_padded, 1 } } });
804 check_relation<tx>(
trace);
810 check_relation<bb::avm2::calldata_hashing<FF>>(
trace);
811 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_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_NO_EARLY_END
static constexpr size_t SR_NO_EXTRANEOUS_ROWS
static constexpr size_t SR_NOTE_HASHES_EMITTED_IMMUTABLE_IN_PADDING
static constexpr size_t SR_NOTE_HASH_TREE_ROOT_IMMUTABLE_IN_PADDING
static constexpr size_t SR_NULLIFIER_TREE_ROOT_IMMUTABLE_IN_PADDING
static constexpr size_t SR_PAD_NOTE_HASH_TREE
static constexpr size_t SR_NULLIFIERS_EMITTED_IMMUTABLE_IN_PADDING
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_table_settings_ > lookup_tx_read_phase_table_settings
lookup_settings< lookup_tx_read_calldata_hash_settings_ > lookup_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