1#include <gmock/gmock.h>
2#include <gtest/gtest.h>
24using testing::PublicInputsBuilder;
25using tracegen::PrecomputedTraceBuilder;
26using tracegen::PublicInputsTraceBuilder;
27using tracegen::TestTraceContainer;
28using tracegen::TxTraceBuilder;
35TEST(TxContextConstrainingTest, Continuity)
37 TestTraceContainer
trace({
41 { C::tx_reverted, 0 },
42 { C::tx_tx_reverted, 0 },
43 { C::tx_next_note_hash_tree_root, 1 },
44 { C::tx_next_note_hash_tree_size, 2 },
45 { C::tx_next_num_note_hashes_emitted, 3 },
46 { C::tx_next_nullifier_tree_root, 4 },
47 { C::tx_next_nullifier_tree_size, 5 },
48 { C::tx_next_num_nullifiers_emitted, 6 },
49 { C::tx_next_public_data_tree_root, 7 },
50 { C::tx_next_public_data_tree_size, 8 },
51 { C::tx_next_written_public_data_slots_tree_root, 9 },
52 { C::tx_next_written_public_data_slots_tree_size, 10 },
53 { C::tx_l1_l2_tree_root, 11 },
54 { C::tx_next_retrieved_bytecodes_tree_root, 12 },
55 { C::tx_next_retrieved_bytecodes_tree_size, 13 },
56 { C::tx_next_num_unencrypted_log_fields, 14 },
57 { C::tx_next_num_l2_to_l1_messages, 15 },
62 { C::tx_reverted, 1 },
63 { C::tx_tx_reverted, 1 },
64 { C::tx_prev_note_hash_tree_root, 1 },
65 { C::tx_prev_note_hash_tree_size, 2 },
66 { C::tx_prev_num_note_hashes_emitted, 3 },
67 { C::tx_prev_nullifier_tree_root, 4 },
68 { C::tx_prev_nullifier_tree_size, 5 },
69 { C::tx_prev_num_nullifiers_emitted, 6 },
70 { C::tx_prev_public_data_tree_root, 7 },
71 { C::tx_prev_public_data_tree_size, 8 },
72 { C::tx_prev_written_public_data_slots_tree_root, 9 },
73 { C::tx_prev_written_public_data_slots_tree_size, 10 },
74 { C::tx_l1_l2_tree_root, 11 },
75 { C::tx_prev_retrieved_bytecodes_tree_root, 12 },
76 { C::tx_prev_retrieved_bytecodes_tree_size, 13 },
77 { C::tx_prev_num_unencrypted_log_fields, 14 },
78 { C::tx_prev_num_l2_to_l1_messages, 15 },
79 { C::tx_next_note_hash_tree_root, 10 },
80 { C::tx_next_note_hash_tree_size, 20 },
81 { C::tx_next_num_note_hashes_emitted, 30 },
82 { C::tx_next_nullifier_tree_root, 40 },
83 { C::tx_next_nullifier_tree_size, 50 },
84 { C::tx_next_num_nullifiers_emitted, 60 },
85 { C::tx_next_public_data_tree_root, 70 },
86 { C::tx_next_public_data_tree_size, 80 },
87 { C::tx_next_written_public_data_slots_tree_root, 90 },
88 { C::tx_next_written_public_data_slots_tree_size, 100 },
89 { C::tx_next_retrieved_bytecodes_tree_root, 120 },
90 { C::tx_next_retrieved_bytecodes_tree_size, 130 },
91 { C::tx_next_num_unencrypted_log_fields, 140 },
92 { C::tx_next_num_l2_to_l1_messages, 150 },
97 { C::tx_reverted, 0 },
98 { C::tx_tx_reverted, 1 },
99 { C::tx_prev_note_hash_tree_root, 1 },
100 { C::tx_prev_note_hash_tree_size, 2 },
101 { C::tx_prev_num_note_hashes_emitted, 3 },
102 { C::tx_prev_nullifier_tree_root, 4 },
103 { C::tx_prev_nullifier_tree_size, 5 },
104 { C::tx_prev_num_nullifiers_emitted, 6 },
105 { C::tx_prev_public_data_tree_root, 7 },
106 { C::tx_prev_public_data_tree_size, 8 },
107 { C::tx_prev_written_public_data_slots_tree_root, 9 },
108 { C::tx_prev_written_public_data_slots_tree_size, 10 },
109 { C::tx_l1_l2_tree_root, 11 },
110 { C::tx_prev_retrieved_bytecodes_tree_root, 120 },
111 { C::tx_prev_retrieved_bytecodes_tree_size, 130 },
112 { C::tx_prev_num_unencrypted_log_fields, 14 },
113 { C::tx_prev_num_l2_to_l1_messages, 15 },
117 check_relation<tx_context>(trace,
140 "NOTE_HASH_ROOT_CONTINUITY");
142 "NOTE_HASH_TREE_SIZE_CONTINUITY");
144 "NUM_NOTE_HASHES_EMITTED_CONTINUITY");
146 "NULLIFIER_TREE_ROOT_CONTINUITY");
148 "NULLIFIER_TREE_SIZE_CONTINUITY");
150 "NUM_NULLIFIERS_EMITTED_CONTINUITY");
152 "PUBLIC_DATA_TREE_ROOT_CONTINUITY");
154 "PUBLIC_DATA_TREE_SIZE_CONTINUITY");
157 "WRITTEN_PUBLIC_DATA_SLOTS_TREE_ROOT_CONTINUITY");
160 "WRITTEN_PUBLIC_DATA_SLOTS_TREE_SIZE_CONTINUITY");
162 "NUM_UNENCRYPTED_LOGS_CONTINUITY");
164 "NUM_L2_TO_L1_MESSAGES_CONTINUITY");
166 "TX_REVERTED_CONTINUITY");
170 trace.
set(C::tx_l1_l2_tree_root, 1, 20);
173 "L1_L2_TREE_ROOT_CONTINUITY");
176 trace.
set(C::tx_prev_retrieved_bytecodes_tree_root, 2, 12);
177 trace.
set(C::tx_prev_retrieved_bytecodes_tree_size, 2, 13);
181 "RETRIEVED_BYTECODES_TREE_ROOT_CONTINUITY");
184 "RETRIEVED_BYTECODES_TREE_SIZE_CONTINUITY");
187TEST(TxContextConstrainingTest, StateMutability)
189 TestTraceContainer
trace({
192 { C::tx_is_public_call_request, 1 },
193 { C::tx_should_process_call_request, 1 },
194 { C::tx_prev_note_hash_tree_root, 1 },
195 { C::tx_prev_note_hash_tree_size, 2 },
196 { C::tx_prev_num_note_hashes_emitted, 3 },
197 { C::tx_prev_nullifier_tree_root, 4 },
198 { C::tx_prev_nullifier_tree_size, 5 },
199 { C::tx_prev_num_nullifiers_emitted, 6 },
200 { C::tx_prev_public_data_tree_root, 7 },
201 { C::tx_prev_public_data_tree_size, 8 },
202 { C::tx_prev_written_public_data_slots_tree_root, 9 },
203 { C::tx_prev_written_public_data_slots_tree_size, 10 },
204 { C::tx_l1_l2_tree_root, 11 },
205 { C::tx_prev_retrieved_bytecodes_tree_root, 12 },
206 { C::tx_prev_retrieved_bytecodes_tree_size, 13 },
207 { C::tx_prev_num_unencrypted_log_fields, 13 },
208 { C::tx_prev_num_l2_to_l1_messages, 14 },
209 { C::tx_next_note_hash_tree_root, 10 },
210 { C::tx_next_note_hash_tree_size, 20 },
211 { C::tx_next_num_note_hashes_emitted, 30 },
212 { C::tx_next_nullifier_tree_root, 40 },
213 { C::tx_next_nullifier_tree_size, 50 },
214 { C::tx_next_num_nullifiers_emitted, 60 },
215 { C::tx_next_public_data_tree_root, 70 },
216 { C::tx_next_public_data_tree_size, 80 },
217 { C::tx_next_written_public_data_slots_tree_root, 90 },
218 { C::tx_next_written_public_data_slots_tree_size, 100 },
219 { C::tx_l1_l2_tree_root, 110 },
220 { C::tx_next_retrieved_bytecodes_tree_root, 120 },
221 { C::tx_next_retrieved_bytecodes_tree_size, 130 },
222 { C::tx_next_num_unencrypted_log_fields, 140 },
223 { C::tx_next_num_l2_to_l1_messages, 150 },
227 check_relation<tx_context>(trace,
244 trace.
set(C::tx_is_public_call_request, 0, 0);
247 "NOTE_HASH_ROOT_IMMUTABILITY");
249 "NOTE_HASH_SIZE_IMMUTABILITY");
251 "NOTE_HASH_COUNT_IMMUTABILITY");
256 "NULLIFIER_ROOT_IMMUTABILITY");
258 "NULLIFIER_SIZE_IMMUTABILITY");
260 "NULLIFIER_COUNT_IMMUTABILITY");
265 "PUBLIC_DATA_ROOT_IMMUTABILITY");
267 "PUBLIC_DATA_SIZE_IMMUTABILITY");
270 "WRITTEN_PUBLIC_DATA_SLOTS_ROOT_IMMUTABILITY");
273 "WRITTEN_PUBLIC_DATA_SLOTS_SIZE_IMMUTABILITY");
278 "UNENCRYPTED_LOG_COUNT_IMMUTABILITY");
283 "L2_TO_L1_MESSAGE_COUNT_IMMUTABILITY");
286 trace.
set(C::tx_should_process_call_request, 0, 0);
290 "RETRIEVED_BYTECODES_TREE_ROOT_IMMUTABILITY");
293 "RETRIEVED_BYTECODES_TREE_SIZE_IMMUTABILITY");
296 trace.
set(C::tx_is_public_call_request, 0, 1);
300 "NOTE_HASH_ROOT_PADDED_IMMUTABILITY");
302 "NOTE_HASH_SIZE_PADDED_IMMUTABILITY");
304 "NOTE_HASH_COUNT_PADDED_IMMUTABILITY");
307 "NULLIFIER_ROOT_PADDED_IMMUTABILITY");
309 "NULLIFIER_SIZE_PADDED_IMMUTABILITY");
311 "NULLIFIER_COUNT_PADDED_IMMUTABILITY");
314 "PUBLIC_DATA_ROOT_PADDED_IMMUTABILITY");
316 "PUBLIC_DATA_SIZE_PADDED_IMMUTABILITY");
319 "WRITTEN_PUBLIC_DATA_SLOTS_ROOT_PADDED_IMMUTABILITY");
322 "WRITTEN_PUBLIC_DATA_SLOTS_SIZE_PADDED_IMMUTABILITY");
326 "UNENCRYPTED_LOG_COUNT_PADDED_IMMUTABILITY");
330 "L2_TO_L1_MESSAGE_COUNT_PADDED_IMMUTABILITY");
333TEST(TxContextConstrainingTest, InitialStateChecks)
335 Gas start_gas_used = { 1, 2 };
336 Gas gas_limit = { 1000, 2000 };
337 GasSettings gas_settings = { .gas_limits = gas_limit };
338 TreeSnapshots tree_snapshots = { .l1_to_l2_message_tree = { .root = 20, .next_available_leaf_index = 19 },
339 .note_hash_tree = { .root = 21, .next_available_leaf_index = 20 },
340 .nullifier_tree = { .root = 22, .next_available_leaf_index = 21 },
341 .public_data_tree = { .root = 23, .next_available_leaf_index = 22 } };
342 auto public_inputs = PublicInputsBuilder()
343 .with_start_gas_used(start_gas_used)
344 .with_gas_settings(gas_settings)
345 .with_start_tree_snapshots(tree_snapshots)
348 TestTraceContainer
trace({
351 { C::precomputed_first_row, 1 },
356 { C::tx_start_tx, 1 },
357 { C::tx_prev_note_hash_tree_root, tree_snapshots.note_hash_tree.root },
358 { C::tx_prev_note_hash_tree_size, tree_snapshots.note_hash_tree.next_available_leaf_index },
359 { C::tx_prev_nullifier_tree_root, tree_snapshots.nullifier_tree.root },
360 { C::tx_prev_nullifier_tree_size, tree_snapshots.nullifier_tree.next_available_leaf_index },
361 { C::tx_prev_public_data_tree_root, tree_snapshots.public_data_tree.root },
362 { C::tx_prev_public_data_tree_size, tree_snapshots.public_data_tree.next_available_leaf_index },
367 { C::tx_l1_l2_tree_root, tree_snapshots.l1_to_l2_message_tree.root },
368 { C::tx_l1_l2_tree_size, tree_snapshots.l1_to_l2_message_tree.next_available_leaf_index },
369 { C::tx_prev_l2_gas_used, start_gas_used.l2_gas },
370 { C::tx_prev_da_gas_used, start_gas_used.da_gas },
371 { C::tx_l2_gas_limit, gas_limit.l2_gas },
372 { C::tx_da_gas_limit, gas_limit.da_gas },
373 { C::tx_prev_num_unencrypted_log_fields, 0 },
374 { C::tx_prev_num_l2_to_l1_messages, 0 },
376 { C::tx_sel_read_trees_and_gas_used, 1 },
382 { C::tx_should_read_gas_limit, 1 },
383 { C::tx_next_note_hash_tree_root, tree_snapshots.note_hash_tree.root },
384 { C::tx_next_note_hash_tree_size, tree_snapshots.note_hash_tree.next_available_leaf_index },
385 { C::tx_next_nullifier_tree_root, tree_snapshots.nullifier_tree.root },
386 { C::tx_next_nullifier_tree_size, tree_snapshots.nullifier_tree.next_available_leaf_index },
387 { C::tx_next_public_data_tree_root, tree_snapshots.public_data_tree.root },
388 { C::tx_next_public_data_tree_size, tree_snapshots.public_data_tree.next_available_leaf_index },
393 { C::tx_next_l2_gas_used, start_gas_used.l2_gas },
394 { C::tx_next_da_gas_used, start_gas_used.da_gas },
396 { C::tx_next_context_id, 1 },
407 check_relation<tx_context>(trace);
423TEST(TxContextConstrainingTest, EndStateChecks)
425 Gas end_gas_used = { 1, 2 };
426 TreeSnapshots tree_snapshots = { .l1_to_l2_message_tree = { .root = 20, .next_available_leaf_index = 19 },
427 .note_hash_tree = { .root = 21, .next_available_leaf_index = 20 },
428 .nullifier_tree = { .root = 22, .next_available_leaf_index = 21 },
429 .public_data_tree = { .root = 23, .next_available_leaf_index = 22 } };
430 AvmAccumulatedDataArrayLengths array_lengths = { .note_hashes = 10, .nullifiers = 11, .l2_to_l1_msgs = 12 };
433 .fields = {
FF(4),
FF(5) },
434 .contract_address = 11223,
436 PublicLogs public_logs = {};
437 public_logs.add_log(log);
438 AvmAccumulatedData accumulated_data = { .public_logs = public_logs };
440 auto public_inputs = PublicInputsBuilder()
441 .set_end_gas_used(end_gas_used)
442 .set_end_tree_snapshots(tree_snapshots)
443 .set_accumulated_data_array_lengths(array_lengths)
444 .set_accumulated_data(accumulated_data)
447 TestTraceContainer
trace({
450 { C::precomputed_first_row, 1 },
455 { C::tx_is_cleanup, 1 },
456 { C::tx_prev_note_hash_tree_root, tree_snapshots.note_hash_tree.root },
457 { C::tx_prev_note_hash_tree_size, tree_snapshots.note_hash_tree.next_available_leaf_index },
458 { C::tx_prev_num_note_hashes_emitted, array_lengths.note_hashes },
459 { C::tx_prev_nullifier_tree_root, tree_snapshots.nullifier_tree.root },
460 { C::tx_prev_nullifier_tree_size, tree_snapshots.nullifier_tree.next_available_leaf_index },
461 { C::tx_prev_num_nullifiers_emitted, array_lengths.nullifiers },
462 { C::tx_prev_public_data_tree_root, tree_snapshots.public_data_tree.root },
463 { C::tx_prev_public_data_tree_size, tree_snapshots.public_data_tree.next_available_leaf_index },
464 { C::tx_l1_l2_tree_root, tree_snapshots.l1_to_l2_message_tree.root },
465 { C::tx_l1_l2_tree_size, tree_snapshots.l1_to_l2_message_tree.next_available_leaf_index },
466 { C::tx_prev_l2_gas_used, end_gas_used.l2_gas },
467 { C::tx_prev_da_gas_used, end_gas_used.da_gas },
468 { C::tx_prev_num_unencrypted_log_fields, public_logs.length },
469 { C::tx_prev_num_l2_to_l1_messages, array_lengths.l2_to_l1_msgs },
471 { C::tx_sel_read_trees_and_gas_used, 1 },
477 { C::tx_array_length_note_hashes_pi_offset,
479 { C::tx_array_length_nullifiers_pi_offset,
481 { C::tx_array_length_l2_to_l1_messages_pi_offset,
483 { C::tx_fields_length_unencrypted_logs_pi_offset,
485 { C::tx_next_note_hash_tree_root, tree_snapshots.note_hash_tree.root },
486 { C::tx_next_note_hash_tree_size, tree_snapshots.note_hash_tree.next_available_leaf_index },
487 { C::tx_next_num_note_hashes_emitted, array_lengths.note_hashes },
488 { C::tx_next_nullifier_tree_root, tree_snapshots.nullifier_tree.root },
489 { C::tx_next_nullifier_tree_size, tree_snapshots.nullifier_tree.next_available_leaf_index },
490 { C::tx_next_num_nullifiers_emitted, array_lengths.nullifiers },
491 { C::tx_next_public_data_tree_root, tree_snapshots.public_data_tree.root },
492 { C::tx_next_public_data_tree_size, tree_snapshots.public_data_tree.next_available_leaf_index },
493 { C::tx_next_l2_gas_used, end_gas_used.l2_gas },
494 { C::tx_next_da_gas_used, end_gas_used.da_gas },
495 { C::tx_next_num_unencrypted_log_fields, public_logs.length },
496 { C::tx_next_num_l2_to_l1_messages, array_lengths.l2_to_l1_msgs },
508 check_relation<tx_context>(trace);
525TEST(TxContextConstrainingTest, NegativeContextIdChecks)
527 TestTraceContainer
trace({
530 { C::precomputed_first_row, 1 },
535 { C::tx_start_tx, 1 },
536 { C::tx_next_context_id, 1 },
541 { C::tx_next_context_id, 1 },
542 { C::tx_should_process_call_request, 1 },
547 { C::tx_next_context_id, 5 },
550 check_relation<tx_context>(
554 trace.
set(C::tx_next_context_id, 1, 2);
556 "NEXT_CONTEXT_ID_INITIAL_VALUE");
559 trace.
set(C::tx_next_context_id, 2, 42);
561 "NEXT_CONTEXT_ID_CONTINUITY");
564TEST(TxContextConstrainingTest, NegativeTxRevertedChecks)
566 TestTraceContainer
trace({
569 { C::precomputed_first_row, 1 },
574 { C::tx_start_tx, 1 },
579 { C::tx_reverted, 1 },
580 { C::tx_tx_reverted, 1 },
585 { C::tx_tx_reverted, 1 },
588 check_relation<tx_context>(
598 "TX_REVERTED_CONTINUITY");
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_NOTE_HASHES_ROW_IDX
#define AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_L1_TO_L2_MESSAGE_TREE_ROW_IDX
#define AVM_RETRIEVED_BYTECODES_TREE_INITIAL_ROOT
#define AVM_RETRIEVED_BYTECODES_TREE_INITIAL_SIZE
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_END_GAS_USED_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_NULLIFIERS_ROW_IDX
#define AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_L1_TO_L2_MESSAGE_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_NULLIFIER_TREE_ROW_IDX
#define AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_ROOT
#define AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_NOTE_HASH_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_NOTE_HASH_TREE_ROW_IDX
#define AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_SIZE
#define AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_PUBLIC_DATA_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_REVERTED_ROW_IDX
#define AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_NULLIFIER_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_START_GAS_USED_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_PUBLIC_LOGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_GAS_SETTINGS_GAS_LIMITS_ROW_IDX
#define AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_PUBLIC_DATA_TREE_ROW_IDX
void process_misc(TraceContainer &trace, const uint32_t num_rows=MAX_AVM_TRACE_SIZE)
uint32_t get_num_rows() const
void set(Column col, uint32_t row, const FF &value)
static constexpr size_t SR_NULLIFIER_SIZE_IMMUTABILITY
static constexpr size_t SR_WRITTEN_PUBLIC_DATA_SLOTS_TREE_ROOT_CONTINUITY
static constexpr size_t SR_NULLIFIER_COUNT_PADDED_IMMUTABILITY
static constexpr size_t SR_INIT_TX_REVERTED
static constexpr size_t SR_NOTE_HASH_ROOT_PADDED_IMMUTABILITY
static constexpr size_t SR_NUM_UNENCRYPTED_LOGS_CONTINUITY
static constexpr size_t SR_NULLIFIER_COUNT_IMMUTABILITY
static constexpr size_t SR_NOTE_HASH_SIZE_PADDED_IMMUTABILITY
static constexpr size_t SR_NULLIFIER_SIZE_PADDED_IMMUTABILITY
static constexpr size_t SR_NUM_L2_TO_L1_MESSAGES_CONTINUITY
static constexpr size_t SR_NOTE_HASH_COUNT_PADDED_IMMUTABILITY
static constexpr size_t SR_RETRIEVED_BYTECODES_TREE_ROOT_IMMUTABILITY
static constexpr size_t SR_WRITTEN_PUBLIC_DATA_SLOTS_ROOT_PADDED_IMMUTABILITY
static constexpr size_t SR_PUBLIC_DATA_SIZE_PADDED_IMMUTABILITY
static constexpr size_t SR_NULLIFIER_TREE_SIZE_CONTINUITY
static constexpr size_t SR_UNENCRYPTED_LOG_COUNT_IMMUTABILITY
static constexpr size_t SR_L2_TO_L1_MESSAGE_COUNT_IMMUTABILITY
static constexpr size_t SR_RETRIEVED_BYTECODES_TREE_SIZE_CONTINUITY
static constexpr size_t SR_PUBLIC_DATA_ROOT_PADDED_IMMUTABILITY
static constexpr size_t SR_PUBLIC_DATA_TREE_ROOT_CONTINUITY
static constexpr size_t SR_NOTE_HASH_ROOT_IMMUTABILITY
static constexpr size_t SR_NEXT_CONTEXT_ID_CONTINUITY
static constexpr size_t SR_NOTE_HASH_SIZE_IMMUTABILITY
static constexpr size_t SR_RETRIEVED_BYTECODES_TREE_SIZE_IMMUTABILITY
static constexpr size_t SR_NOTE_HASH_TREE_SIZE_CONTINUITY
static constexpr size_t SR_NULLIFIER_ROOT_PADDED_IMMUTABILITY
static constexpr size_t SR_UNENCRYPTED_LOG_COUNT_PADDED_IMMUTABILITY
static constexpr size_t SR_WRITTEN_PUBLIC_DATA_SLOTS_TREE_SIZE_CONTINUITY
static constexpr size_t SR_NULLIFIER_ROOT_IMMUTABILITY
static constexpr size_t SR_NOTE_HASH_ROOT_CONTINUITY
static constexpr size_t SR_RETRIEVED_BYTECODES_TREE_ROOT_CONTINUITY
static constexpr size_t SR_PUBLIC_DATA_ROOT_IMMUTABILITY
static constexpr size_t SR_NUM_NOTE_HASHES_EMITTED_CONTINUITY
static constexpr size_t SR_PUBLIC_DATA_SIZE_IMMUTABILITY
static constexpr size_t SR_NUM_NULLIFIERS_EMITTED_CONTINUITY
static constexpr size_t SR_NOTE_HASH_COUNT_IMMUTABILITY
static constexpr size_t SR_WRITTEN_PUBLIC_DATA_SLOTS_SIZE_PADDED_IMMUTABILITY
static constexpr size_t SR_WRITTEN_PUBLIC_DATA_SLOTS_SIZE_IMMUTABILITY
static constexpr size_t SR_L2_TO_L1_MESSAGE_COUNT_PADDED_IMMUTABILITY
static constexpr size_t SR_NEXT_CONTEXT_ID_INITIAL_VALUE
static constexpr size_t SR_WRITTEN_PUBLIC_DATA_SLOTS_ROOT_IMMUTABILITY
static constexpr size_t SR_L1_L2_TREE_ROOT_CONTINUITY
static constexpr size_t SR_NULLIFIER_TREE_ROOT_CONTINUITY
static constexpr size_t SR_TX_REVERTED_CONTINUITY
static constexpr size_t SR_PUBLIC_DATA_TREE_SIZE_CONTINUITY
static constexpr size_t SR_SET_TX_REVERTED
PrecomputedTraceBuilder precomputed_builder
#define EXPECT_THROW_WITH_MESSAGE(code, expectedMessage)
void check_interaction(tracegen::TestTraceContainer &trace)
TEST(TxExecutionConstrainingTest, WriteTreeValue)
lookup_settings< lookup_tx_context_public_inputs_write_l2_to_l1_message_count_settings_ > lookup_tx_context_public_inputs_write_l2_to_l1_message_count_settings
lookup_settings< lookup_tx_context_public_inputs_note_hash_tree_settings_ > lookup_tx_context_public_inputs_note_hash_tree_settings
lookup_settings< lookup_tx_context_public_inputs_nullifier_tree_settings_ > lookup_tx_context_public_inputs_nullifier_tree_settings
lookup_settings< lookup_tx_context_public_inputs_read_gas_limit_settings_ > lookup_tx_context_public_inputs_read_gas_limit_settings
lookup_settings< lookup_tx_context_public_inputs_public_data_tree_settings_ > lookup_tx_context_public_inputs_public_data_tree_settings
lookup_settings< lookup_tx_context_public_inputs_gas_used_settings_ > lookup_tx_context_public_inputs_gas_used_settings
lookup_settings< lookup_tx_context_public_inputs_l1_l2_tree_settings_ > lookup_tx_context_public_inputs_l1_l2_tree_settings
lookup_settings< lookup_tx_context_restore_state_on_revert_settings_ > lookup_tx_context_restore_state_on_revert_settings
lookup_settings< lookup_tx_context_public_inputs_write_nullifier_count_settings_ > lookup_tx_context_public_inputs_write_nullifier_count_settings
lookup_settings< lookup_tx_context_public_inputs_write_note_hash_count_settings_ > lookup_tx_context_public_inputs_write_note_hash_count_settings
lookup_settings< lookup_tx_context_public_inputs_read_reverted_settings_ > lookup_tx_context_public_inputs_read_reverted_settings
lookup_settings< lookup_tx_context_public_inputs_write_unencrypted_log_count_settings_ > lookup_tx_context_public_inputs_write_unencrypted_log_count_settings
tracegen::PublicInputsTraceBuilder public_inputs_builder