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_next_note_hash_tree_root, 1 },
43 { C::tx_next_note_hash_tree_size, 2 },
44 { C::tx_next_num_note_hashes_emitted, 3 },
45 { C::tx_next_nullifier_tree_root, 4 },
46 { C::tx_next_nullifier_tree_size, 5 },
47 { C::tx_next_num_nullifiers_emitted, 6 },
48 { C::tx_next_public_data_tree_root, 7 },
49 { C::tx_next_public_data_tree_size, 8 },
50 { C::tx_next_written_public_data_slots_tree_root, 9 },
51 { C::tx_next_written_public_data_slots_tree_size, 10 },
52 { C::tx_l1_l2_tree_root, 11 },
53 { C::tx_next_retrieved_bytecodes_tree_root, 12 },
54 { C::tx_next_retrieved_bytecodes_tree_size, 13 },
55 { C::tx_next_num_unencrypted_log_fields, 14 },
56 { C::tx_next_num_l2_to_l1_messages, 15 },
61 { C::tx_reverted, 1 },
62 { C::tx_prev_note_hash_tree_root, 1 },
63 { C::tx_prev_note_hash_tree_size, 2 },
64 { C::tx_prev_num_note_hashes_emitted, 3 },
65 { C::tx_prev_nullifier_tree_root, 4 },
66 { C::tx_prev_nullifier_tree_size, 5 },
67 { C::tx_prev_num_nullifiers_emitted, 6 },
68 { C::tx_prev_public_data_tree_root, 7 },
69 { C::tx_prev_public_data_tree_size, 8 },
70 { C::tx_prev_written_public_data_slots_tree_root, 9 },
71 { C::tx_prev_written_public_data_slots_tree_size, 10 },
72 { C::tx_l1_l2_tree_root, 11 },
73 { C::tx_prev_retrieved_bytecodes_tree_root, 12 },
74 { C::tx_prev_retrieved_bytecodes_tree_size, 13 },
75 { C::tx_prev_num_unencrypted_log_fields, 14 },
76 { C::tx_prev_num_l2_to_l1_messages, 15 },
77 { C::tx_next_note_hash_tree_root, 10 },
78 { C::tx_next_note_hash_tree_size, 20 },
79 { C::tx_next_num_note_hashes_emitted, 30 },
80 { C::tx_next_nullifier_tree_root, 40 },
81 { C::tx_next_nullifier_tree_size, 50 },
82 { C::tx_next_num_nullifiers_emitted, 60 },
83 { C::tx_next_public_data_tree_root, 70 },
84 { C::tx_next_public_data_tree_size, 80 },
85 { C::tx_next_written_public_data_slots_tree_root, 90 },
86 { C::tx_next_written_public_data_slots_tree_size, 100 },
87 { C::tx_next_retrieved_bytecodes_tree_root, 120 },
88 { C::tx_next_retrieved_bytecodes_tree_size, 130 },
89 { C::tx_next_num_unencrypted_log_fields, 140 },
90 { C::tx_next_num_l2_to_l1_messages, 150 },
95 { C::tx_reverted, 0 },
96 { C::tx_prev_note_hash_tree_root, 1 },
97 { C::tx_prev_note_hash_tree_size, 2 },
98 { C::tx_prev_num_note_hashes_emitted, 3 },
99 { C::tx_prev_nullifier_tree_root, 4 },
100 { C::tx_prev_nullifier_tree_size, 5 },
101 { C::tx_prev_num_nullifiers_emitted, 6 },
102 { C::tx_prev_public_data_tree_root, 7 },
103 { C::tx_prev_public_data_tree_size, 8 },
104 { C::tx_prev_written_public_data_slots_tree_root, 9 },
105 { C::tx_prev_written_public_data_slots_tree_size, 10 },
106 { C::tx_l1_l2_tree_root, 11 },
107 { C::tx_prev_retrieved_bytecodes_tree_root, 120 },
108 { C::tx_prev_retrieved_bytecodes_tree_size, 130 },
109 { C::tx_prev_num_unencrypted_log_fields, 14 },
110 { C::tx_prev_num_l2_to_l1_messages, 15 },
114 check_relation<tx_context>(
trace,
136 "NOTE_HASH_ROOT_CONTINUITY");
138 "NOTE_HASH_TREE_SIZE_CONTINUITY");
140 "NUM_NOTE_HASHES_EMITTED_CONTINUITY");
142 "NULLIFIER_TREE_ROOT_CONTINUITY");
144 "NULLIFIER_TREE_SIZE_CONTINUITY");
146 "NUM_NULLIFIERS_EMITTED_CONTINUITY");
148 "PUBLIC_DATA_TREE_ROOT_CONTINUITY");
150 "PUBLIC_DATA_TREE_SIZE_CONTINUITY");
153 "WRITTEN_PUBLIC_DATA_SLOTS_TREE_ROOT_CONTINUITY");
156 "WRITTEN_PUBLIC_DATA_SLOTS_TREE_SIZE_CONTINUITY");
158 "NUM_UNENCRYPTED_LOGS_CONTINUITY");
160 "NUM_L2_TO_L1_MESSAGES_CONTINUITY");
164 trace.
set(C::tx_l1_l2_tree_root, 1, 20);
167 "L1_L2_TREE_ROOT_CONTINUITY");
170 trace.
set(C::tx_prev_retrieved_bytecodes_tree_root, 2, 12);
171 trace.
set(C::tx_prev_retrieved_bytecodes_tree_size, 2, 13);
175 "RETRIEVED_BYTECODES_TREE_ROOT_CONTINUITY");
178 "RETRIEVED_BYTECODES_TREE_SIZE_CONTINUITY");
181TEST(TxContextConstrainingTest, StateMutability)
183 TestTraceContainer
trace({
186 { C::tx_sel_can_emit_note_hash, 1 },
187 { C::tx_sel_can_emit_nullifier, 1 },
188 { C::tx_sel_can_write_public_data, 1 },
189 { C::tx_sel_can_emit_unencrypted_log, 1 },
190 { C::tx_sel_can_emit_l2_l1_msg, 1 },
191 { C::tx_should_process_call_request, 1 },
192 { C::tx_prev_note_hash_tree_root, 1 },
193 { C::tx_prev_note_hash_tree_size, 2 },
194 { C::tx_prev_num_note_hashes_emitted, 3 },
195 { C::tx_prev_nullifier_tree_root, 4 },
196 { C::tx_prev_nullifier_tree_size, 5 },
197 { C::tx_prev_num_nullifiers_emitted, 6 },
198 { C::tx_prev_public_data_tree_root, 7 },
199 { C::tx_prev_public_data_tree_size, 8 },
200 { C::tx_prev_written_public_data_slots_tree_root, 9 },
201 { C::tx_prev_written_public_data_slots_tree_size, 10 },
202 { C::tx_l1_l2_tree_root, 11 },
203 { C::tx_prev_retrieved_bytecodes_tree_root, 12 },
204 { C::tx_prev_retrieved_bytecodes_tree_size, 13 },
205 { C::tx_prev_num_unencrypted_log_fields, 13 },
206 { C::tx_prev_num_l2_to_l1_messages, 14 },
207 { C::tx_next_note_hash_tree_root, 10 },
208 { C::tx_next_note_hash_tree_size, 20 },
209 { C::tx_next_num_note_hashes_emitted, 30 },
210 { C::tx_next_nullifier_tree_root, 40 },
211 { C::tx_next_nullifier_tree_size, 50 },
212 { C::tx_next_num_nullifiers_emitted, 60 },
213 { C::tx_next_public_data_tree_root, 70 },
214 { C::tx_next_public_data_tree_size, 80 },
215 { C::tx_next_written_public_data_slots_tree_root, 90 },
216 { C::tx_next_written_public_data_slots_tree_size, 100 },
217 { C::tx_l1_l2_tree_root, 110 },
218 { C::tx_next_retrieved_bytecodes_tree_root, 120 },
219 { C::tx_next_retrieved_bytecodes_tree_size, 130 },
220 { C::tx_next_num_unencrypted_log_fields, 140 },
221 { C::tx_next_num_l2_to_l1_messages, 150 },
225 check_relation<tx_context>(
trace,
242 trace.
set(C::tx_sel_can_emit_note_hash, 0, 0);
245 "NOTE_HASH_ROOT_IMMUTABILITY");
247 "NOTE_HASH_SIZE_IMMUTABILITY");
249 "NOTE_HASH_COUNT_IMMUTABILITY");
252 trace.
set(C::tx_sel_can_emit_nullifier, 0, 0);
255 "NULLIFIER_ROOT_IMMUTABILITY");
257 "NULLIFIER_SIZE_IMMUTABILITY");
259 "NULLIFIER_COUNT_IMMUTABILITY");
262 trace.
set(C::tx_sel_can_write_public_data, 0, 0);
265 "PUBLIC_DATA_ROOT_IMMUTABILITY");
267 "PUBLIC_DATA_SIZE_IMMUTABILITY");
270 "WRITTEN_PUBLIC_DATA_SLOTS_ROOT_IMMUTABILITY");
273 "WRITTEN_PUBLIC_DATA_SLOTS_SIZE_IMMUTABILITY");
276 trace.
set(C::tx_sel_can_emit_unencrypted_log, 0, 0);
279 "UNENCRYPTED_LOG_COUNT_IMMUTABILITY");
282 trace.
set(C::tx_sel_can_emit_l2_l1_msg, 0, 0);
285 "L2_TO_L1_MESSAGE_COUNT_IMMUTABILITY");
288 trace.
set(C::tx_should_process_call_request, 0, 0);
292 "RETRIEVED_BYTECODES_TREE_ROOT_IMMUTABILITY");
295 "RETRIEVED_BYTECODES_TREE_SIZE_IMMUTABILITY");
298 trace.
set(C::tx_sel_can_emit_note_hash, 0, 1);
299 trace.
set(C::tx_sel_can_emit_nullifier, 0, 1);
300 trace.
set(C::tx_sel_can_write_public_data, 0, 1);
301 trace.
set(C::tx_sel_can_emit_unencrypted_log, 0, 1);
305 "NOTE_HASH_ROOT_PADDED_IMMUTABILITY");
307 "NOTE_HASH_SIZE_PADDED_IMMUTABILITY");
309 "NOTE_HASH_COUNT_PADDED_IMMUTABILITY");
312 "NULLIFIER_ROOT_PADDED_IMMUTABILITY");
314 "NULLIFIER_SIZE_PADDED_IMMUTABILITY");
316 "NULLIFIER_COUNT_PADDED_IMMUTABILITY");
319 "PUBLIC_DATA_ROOT_PADDED_IMMUTABILITY");
321 "PUBLIC_DATA_SIZE_PADDED_IMMUTABILITY");
324 "WRITTEN_PUBLIC_DATA_SLOTS_ROOT_PADDED_IMMUTABILITY");
327 "WRITTEN_PUBLIC_DATA_SLOTS_SIZE_PADDED_IMMUTABILITY");
331 "UNENCRYPTED_LOG_COUNT_PADDED_IMMUTABILITY");
335 "L2_TO_L1_MESSAGE_COUNT_PADDED_IMMUTABILITY");
338TEST(TxContextConstrainingTest, InitialStateChecks)
340 Gas start_gas_used = { 1, 2 };
341 Gas gas_limit = { 1000, 2000 };
342 GasSettings gas_settings = { .gasLimits = gas_limit };
343 TreeSnapshots tree_snapshots = { .l1ToL2MessageTree = { .root = 20, .nextAvailableLeafIndex = 19 },
344 .noteHashTree = { .root = 21, .nextAvailableLeafIndex = 20 },
345 .nullifierTree = { .root = 22, .nextAvailableLeafIndex = 21 },
346 .publicDataTree = { .root = 23, .nextAvailableLeafIndex = 22 } };
347 auto public_inputs = PublicInputsBuilder()
348 .with_start_gas_used(start_gas_used)
349 .with_gas_settings(gas_settings)
350 .with_start_tree_snapshots(tree_snapshots)
353 TestTraceContainer
trace({
356 { C::precomputed_first_row, 1 },
361 { C::tx_start_tx, 1 },
362 { C::tx_prev_note_hash_tree_root, tree_snapshots.noteHashTree.root },
363 { C::tx_prev_note_hash_tree_size, tree_snapshots.noteHashTree.nextAvailableLeafIndex },
364 { C::tx_prev_nullifier_tree_root, tree_snapshots.nullifierTree.root },
365 { C::tx_prev_nullifier_tree_size, tree_snapshots.nullifierTree.nextAvailableLeafIndex },
366 { C::tx_prev_public_data_tree_root, tree_snapshots.publicDataTree.root },
367 { C::tx_prev_public_data_tree_size, tree_snapshots.publicDataTree.nextAvailableLeafIndex },
372 { C::tx_l1_l2_tree_root, tree_snapshots.l1ToL2MessageTree.root },
373 { C::tx_prev_l2_gas_used, start_gas_used.l2Gas },
374 { C::tx_prev_da_gas_used, start_gas_used.daGas },
375 { C::tx_l2_gas_limit, gas_limit.l2Gas },
376 { C::tx_da_gas_limit, gas_limit.daGas },
377 { C::tx_prev_num_unencrypted_log_fields, 0 },
378 { C::tx_prev_num_l2_to_l1_messages, 0 },
380 { C::tx_should_read_note_hash_tree, 1 },
382 { C::tx_should_read_nullifier_tree, 1 },
384 { C::tx_should_read_public_data_tree, 1 },
386 { C::tx_should_read_l1_l2_tree, 1 },
388 { C::tx_should_read_gas_used, 1 },
390 { C::tx_should_read_gas_limit, 1 },
391 { C::tx_next_note_hash_tree_root, tree_snapshots.noteHashTree.root },
392 { C::tx_next_note_hash_tree_size, tree_snapshots.noteHashTree.nextAvailableLeafIndex },
393 { C::tx_next_nullifier_tree_root, tree_snapshots.nullifierTree.root },
394 { C::tx_next_nullifier_tree_size, tree_snapshots.nullifierTree.nextAvailableLeafIndex },
395 { C::tx_next_public_data_tree_root, tree_snapshots.publicDataTree.root },
396 { C::tx_next_public_data_tree_size, tree_snapshots.publicDataTree.nextAvailableLeafIndex },
401 { C::tx_next_l2_gas_used, start_gas_used.l2Gas },
402 { C::tx_next_da_gas_used, start_gas_used.daGas },
404 { C::tx_next_context_id, 1 },
415 check_relation<tx_context>(
trace);
431TEST(TxContextConstrainingTest, EndStateChecks)
433 Gas end_gas_used = { 1, 2 };
434 TreeSnapshots tree_snapshots = { .l1ToL2MessageTree = { .root = 20, .nextAvailableLeafIndex = 19 },
435 .noteHashTree = { .root = 21, .nextAvailableLeafIndex = 20 },
436 .nullifierTree = { .root = 22, .nextAvailableLeafIndex = 21 },
437 .publicDataTree = { .root = 23, .nextAvailableLeafIndex = 22 } };
438 AvmAccumulatedDataArrayLengths array_lengths = { .noteHashes = 10, .nullifiers = 11, .l2ToL1Msgs = 12 };
441 .fields = {
FF(4),
FF(5) },
442 .contractAddress = 11223,
444 PublicLogs public_logs = {};
445 public_logs.add_log(log);
446 AvmAccumulatedData accumulated_data = { .publicLogs = public_logs };
448 auto public_inputs = PublicInputsBuilder()
449 .set_end_gas_used(end_gas_used)
450 .set_end_tree_snapshots(tree_snapshots)
451 .set_accumulated_data_array_lengths(array_lengths)
452 .set_accumulated_data(accumulated_data)
455 TestTraceContainer
trace({
458 { C::precomputed_first_row, 1 },
463 { C::tx_is_cleanup, 1 },
464 { C::tx_prev_note_hash_tree_root, tree_snapshots.noteHashTree.root },
465 { C::tx_prev_note_hash_tree_size, tree_snapshots.noteHashTree.nextAvailableLeafIndex },
466 { C::tx_prev_num_note_hashes_emitted, array_lengths.noteHashes },
467 { C::tx_prev_nullifier_tree_root, tree_snapshots.nullifierTree.root },
468 { C::tx_prev_nullifier_tree_size, tree_snapshots.nullifierTree.nextAvailableLeafIndex },
469 { C::tx_prev_num_nullifiers_emitted, array_lengths.nullifiers },
470 { C::tx_prev_public_data_tree_root, tree_snapshots.publicDataTree.root },
471 { C::tx_prev_public_data_tree_size, tree_snapshots.publicDataTree.nextAvailableLeafIndex },
472 { C::tx_l1_l2_tree_root, tree_snapshots.l1ToL2MessageTree.root },
473 { C::tx_prev_l2_gas_used, end_gas_used.l2Gas },
474 { C::tx_prev_da_gas_used, end_gas_used.daGas },
475 { C::tx_prev_num_unencrypted_log_fields, public_logs.length },
476 { C::tx_prev_num_l2_to_l1_messages, array_lengths.l2ToL1Msgs },
478 { C::tx_should_read_note_hash_tree, 1 },
480 { C::tx_should_read_nullifier_tree, 1 },
482 { C::tx_should_read_public_data_tree, 1 },
484 { C::tx_should_read_l1_l2_tree, 1 },
486 { C::tx_should_read_gas_used, 1 },
487 { C::tx_array_length_note_hashes_pi_offset,
489 { C::tx_array_length_nullifiers_pi_offset,
491 { C::tx_array_length_l2_to_l1_messages_pi_offset,
493 { C::tx_fields_length_unencrypted_logs_pi_offset,
495 { C::tx_next_note_hash_tree_root, tree_snapshots.noteHashTree.root },
496 { C::tx_next_note_hash_tree_size, tree_snapshots.noteHashTree.nextAvailableLeafIndex },
497 { C::tx_next_num_note_hashes_emitted, array_lengths.noteHashes },
498 { C::tx_next_nullifier_tree_root, tree_snapshots.nullifierTree.root },
499 { C::tx_next_nullifier_tree_size, tree_snapshots.nullifierTree.nextAvailableLeafIndex },
500 { C::tx_next_num_nullifiers_emitted, array_lengths.nullifiers },
501 { C::tx_next_public_data_tree_root, tree_snapshots.publicDataTree.root },
502 { C::tx_next_public_data_tree_size, tree_snapshots.publicDataTree.nextAvailableLeafIndex },
503 { C::tx_next_l2_gas_used, end_gas_used.l2Gas },
504 { C::tx_next_da_gas_used, end_gas_used.daGas },
505 { C::tx_next_num_unencrypted_log_fields, public_logs.length },
506 { C::tx_next_num_l2_to_l1_messages, array_lengths.l2ToL1Msgs },
518 check_relation<tx_context>(
trace);
534TEST(TxContextConstrainingTest, NegativeContextIdChecks)
536 TestTraceContainer
trace({
539 { C::precomputed_first_row, 1 },
544 { C::tx_start_tx, 1 },
545 { C::tx_next_context_id, 1 },
550 { C::tx_next_context_id, 1 },
551 { C::tx_should_process_call_request, 1 },
556 { C::tx_next_context_id, 5 },
559 check_relation<tx_context>(
563 trace.
set(C::tx_next_context_id, 1, 2);
565 "NEXT_CONTEXT_ID_INITIAL_VALUE");
568 trace.
set(C::tx_next_context_id, 2, 42);
570 "NEXT_CONTEXT_ID_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_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_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_PUBLIC_DATA_TREE_SIZE_CONTINUITY
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_write_unencrypted_log_count_settings_ > lookup_tx_context_public_inputs_write_unencrypted_log_count_settings
tracegen::PublicInputsTraceBuilder public_inputs_builder