Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
tx_context.test.cpp
Go to the documentation of this file.
1#include <gmock/gmock.h>
2#include <gtest/gtest.h>
3
4#include <cstdint>
5
20
21namespace bb::avm2::constraining {
22namespace {
23
24using testing::PublicInputsBuilder;
25using tracegen::PrecomputedTraceBuilder;
26using tracegen::PublicInputsTraceBuilder;
27using tracegen::TestTraceContainer;
28using tracegen::TxTraceBuilder;
29
31using C = Column;
32using tx = bb::avm2::tx<FF>;
33using tx_context = bb::avm2::tx_context<FF>;
34
35TEST(TxContextConstrainingTest, Continuity)
36{
37 TestTraceContainer trace({
38 {
39 // Row 0: end of setup
40 { C::tx_sel, 1 },
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_num_unencrypted_logs, 12 },
54 { C::tx_next_num_l2_to_l1_messages, 13 },
55 },
56 {
57 // Row 1: app logic, reverts
58 { C::tx_sel, 1 },
59 { C::tx_reverted, 1 },
60 { C::tx_prev_note_hash_tree_root, 1 },
61 { C::tx_prev_note_hash_tree_size, 2 },
62 { C::tx_prev_num_note_hashes_emitted, 3 },
63 { C::tx_prev_nullifier_tree_root, 4 },
64 { C::tx_prev_nullifier_tree_size, 5 },
65 { C::tx_prev_num_nullifiers_emitted, 6 },
66 { C::tx_prev_public_data_tree_root, 7 },
67 { C::tx_prev_public_data_tree_size, 8 },
68 { C::tx_prev_written_public_data_slots_tree_root, 9 },
69 { C::tx_prev_written_public_data_slots_tree_size, 10 },
70 { C::tx_l1_l2_tree_root, 11 },
71 { C::tx_prev_num_unencrypted_logs, 12 },
72 { C::tx_prev_num_l2_to_l1_messages, 13 },
73 { C::tx_next_note_hash_tree_root, 10 },
74 { C::tx_next_note_hash_tree_size, 20 },
75 { C::tx_next_num_note_hashes_emitted, 30 },
76 { C::tx_next_nullifier_tree_root, 40 },
77 { C::tx_next_nullifier_tree_size, 50 },
78 { C::tx_next_num_nullifiers_emitted, 60 },
79 { C::tx_next_public_data_tree_root, 70 },
80 { C::tx_next_public_data_tree_size, 80 },
81 { C::tx_next_written_public_data_slots_tree_root, 90 },
82 { C::tx_next_written_public_data_slots_tree_size, 100 },
83 { C::tx_next_num_unencrypted_logs, 120 },
84 { C::tx_next_num_l2_to_l1_messages, 130 },
85 },
86 {
87 // Row 2: restored end of setup state
88 { C::tx_sel, 1 },
89 { C::tx_reverted, 0 },
90 { C::tx_prev_note_hash_tree_root, 1 },
91 { C::tx_prev_note_hash_tree_size, 2 },
92 { C::tx_prev_num_note_hashes_emitted, 3 },
93 { C::tx_prev_nullifier_tree_root, 4 },
94 { C::tx_prev_nullifier_tree_size, 5 },
95 { C::tx_prev_num_nullifiers_emitted, 6 },
96 { C::tx_prev_public_data_tree_root, 7 },
97 { C::tx_prev_public_data_tree_size, 8 },
98 { C::tx_prev_written_public_data_slots_tree_root, 9 },
99 { C::tx_prev_written_public_data_slots_tree_size, 10 },
100 { C::tx_l1_l2_tree_root, 11 },
101 { C::tx_prev_num_unencrypted_logs, 12 },
102 { C::tx_prev_num_l2_to_l1_messages, 13 },
103 },
104 });
105
106 check_relation<tx_context>(trace,
120
121 // Negative test: if not reverted, it shouldn't be able to rollback state from row 1 to row 2
122
123 trace.set(C::tx_reverted, 1, 0);
124
126 "NOTE_HASH_ROOT_CONTINUITY");
128 "NOTE_HASH_TREE_SIZE_CONTINUITY");
130 "NUM_NOTE_HASHES_EMITTED_CONTINUITY");
132 "NULLIFIER_TREE_ROOT_CONTINUITY");
134 "NULLIFIER_TREE_SIZE_CONTINUITY");
136 "NUM_NULLIFIERS_EMITTED_CONTINUITY");
138 "PUBLIC_DATA_TREE_ROOT_CONTINUITY");
140 "PUBLIC_DATA_TREE_SIZE_CONTINUITY");
143 "WRITTEN_PUBLIC_DATA_SLOTS_TREE_ROOT_CONTINUITY");
146 "WRITTEN_PUBLIC_DATA_SLOTS_TREE_SIZE_CONTINUITY");
148 "NUM_UNENCRYPTED_LOGS_CONTINUITY");
150 "NUM_L2_TO_L1_MESSAGES_CONTINUITY");
151
152 // Negative test: l1 to l2 root should not change
153
154 trace.set(C::tx_l1_l2_tree_root, 1, 20);
155
157 "L1_L2_TREE_ROOT_CONTINUITY");
158}
159
160TEST(TxContextConstrainingTest, StateMutability)
161{
162 TestTraceContainer trace({
163 {
164 { C::tx_sel, 1 },
165 { C::tx_sel_can_emit_note_hash, 1 },
166 { C::tx_sel_can_emit_nullifier, 1 },
167 { C::tx_sel_can_write_public_data, 1 },
168 { C::tx_sel_can_emit_unencrypted_log, 1 },
169 { C::tx_sel_can_emit_l2_l1_msg, 1 },
170 { C::tx_prev_note_hash_tree_root, 1 },
171 { C::tx_prev_note_hash_tree_size, 2 },
172 { C::tx_prev_num_note_hashes_emitted, 3 },
173 { C::tx_prev_nullifier_tree_root, 4 },
174 { C::tx_prev_nullifier_tree_size, 5 },
175 { C::tx_prev_num_nullifiers_emitted, 6 },
176 { C::tx_prev_public_data_tree_root, 7 },
177 { C::tx_prev_public_data_tree_size, 8 },
178 { C::tx_prev_written_public_data_slots_tree_root, 9 },
179 { C::tx_prev_written_public_data_slots_tree_size, 10 },
180 { C::tx_l1_l2_tree_root, 11 },
181 { C::tx_prev_num_unencrypted_logs, 12 },
182 { C::tx_prev_num_l2_to_l1_messages, 13 },
183 { C::tx_next_note_hash_tree_root, 10 },
184 { C::tx_next_note_hash_tree_size, 20 },
185 { C::tx_next_num_note_hashes_emitted, 30 },
186 { C::tx_next_nullifier_tree_root, 40 },
187 { C::tx_next_nullifier_tree_size, 50 },
188 { C::tx_next_num_nullifiers_emitted, 60 },
189 { C::tx_next_public_data_tree_root, 70 },
190 { C::tx_next_public_data_tree_size, 80 },
191 { C::tx_next_written_public_data_slots_tree_root, 90 },
192 { C::tx_next_written_public_data_slots_tree_size, 100 },
193 { C::tx_l1_l2_tree_root, 110 },
194 { C::tx_next_num_unencrypted_logs, 120 },
195 { C::tx_next_num_l2_to_l1_messages, 130 },
196 },
197 });
198
199 check_relation<tx_context>(trace,
212
213 // Negative test: immutability check on note hashes
214 trace.set(C::tx_sel_can_emit_note_hash, 0, 0);
215
217 "NOTE_HASH_ROOT_IMMUTABILITY");
219 "NOTE_HASH_SIZE_IMMUTABILITY");
221 "NOTE_HASH_COUNT_IMMUTABILITY");
222
223 // Negative test: immutability check on nullifiers
224 trace.set(C::tx_sel_can_emit_nullifier, 0, 0);
225
227 "NULLIFIER_ROOT_IMMUTABILITY");
229 "NULLIFIER_SIZE_IMMUTABILITY");
231 "NULLIFIER_COUNT_IMMUTABILITY");
232
233 // Negative test: immutability check on public data
234 trace.set(C::tx_sel_can_write_public_data, 0, 0);
235
237 "PUBLIC_DATA_ROOT_IMMUTABILITY");
239 "PUBLIC_DATA_SIZE_IMMUTABILITY");
242 "WRITTEN_PUBLIC_DATA_SLOTS_ROOT_IMMUTABILITY");
245 "WRITTEN_PUBLIC_DATA_SLOTS_SIZE_IMMUTABILITY");
246
247 // Negative test: immutability check on unencrypted logs
248 trace.set(C::tx_sel_can_emit_unencrypted_log, 0, 0);
249
251 "UNENCRYPTED_LOG_COUNT_IMMUTABILITY");
252
253 // Negative test: immutability check on l2 to l1 messages
254 trace.set(C::tx_sel_can_emit_l2_l1_msg, 0, 0);
255
257 "L2_TO_L1_MESSAGE_COUNT_IMMUTABILITY");
258
259 // Negative test: selectors enabled but it's a padded row
260 trace.set(C::tx_sel_can_emit_note_hash, 0, 1);
261 trace.set(C::tx_sel_can_emit_nullifier, 0, 1);
262 trace.set(C::tx_sel_can_write_public_data, 0, 1);
263 trace.set(C::tx_sel_can_emit_unencrypted_log, 0, 1);
264 trace.set(C::tx_is_padded, 0, 1);
265
267 "NOTE_HASH_ROOT_PADDED_IMMUTABILITY");
269 "NOTE_HASH_SIZE_PADDED_IMMUTABILITY");
271 "NOTE_HASH_COUNT_PADDED_IMMUTABILITY");
272
274 "NULLIFIER_ROOT_PADDED_IMMUTABILITY");
276 "NULLIFIER_SIZE_PADDED_IMMUTABILITY");
278 "NULLIFIER_COUNT_PADDED_IMMUTABILITY");
279
281 "PUBLIC_DATA_ROOT_PADDED_IMMUTABILITY");
283 "PUBLIC_DATA_SIZE_PADDED_IMMUTABILITY");
286 "WRITTEN_PUBLIC_DATA_SLOTS_ROOT_PADDED_IMMUTABILITY");
289 "WRITTEN_PUBLIC_DATA_SLOTS_SIZE_PADDED_IMMUTABILITY");
290
293 "UNENCRYPTED_LOG_COUNT_PADDED_IMMUTABILITY");
294
297 "L2_TO_L1_MESSAGE_COUNT_PADDED_IMMUTABILITY");
298}
299
300TEST(TxContextConstrainingTest, InitialStateChecks)
301{
302 Gas start_gas_used = { 1, 2 };
303 Gas gas_limit = { 1000, 2000 };
304 GasSettings gas_settings = { .gasLimits = gas_limit };
305 TreeSnapshots tree_snapshots = { .l1ToL2MessageTree = { .root = 20, .nextAvailableLeafIndex = 19 },
306 .noteHashTree = { .root = 21, .nextAvailableLeafIndex = 20 },
307 .nullifierTree = { .root = 22, .nextAvailableLeafIndex = 21 },
308 .publicDataTree = { .root = 23, .nextAvailableLeafIndex = 22 } };
309 auto public_inputs = PublicInputsBuilder()
310 .with_start_gas_used(start_gas_used)
311 .with_gas_settings(gas_settings)
312 .with_start_tree_snapshots(tree_snapshots)
313 .build();
314
315 TestTraceContainer trace({
316 {
317 // Row 0
318 { C::precomputed_first_row, 1 },
319 },
320 {
321 // Row 1
322 { C::tx_sel, 1 },
323 { C::tx_start_tx, 1 },
324 { C::tx_prev_note_hash_tree_root, tree_snapshots.noteHashTree.root },
325 { C::tx_prev_note_hash_tree_size, tree_snapshots.noteHashTree.nextAvailableLeafIndex },
326 { C::tx_prev_nullifier_tree_root, tree_snapshots.nullifierTree.root },
327 { C::tx_prev_nullifier_tree_size, tree_snapshots.nullifierTree.nextAvailableLeafIndex },
328 { C::tx_prev_public_data_tree_root, tree_snapshots.publicDataTree.root },
329 { C::tx_prev_public_data_tree_size, tree_snapshots.publicDataTree.nextAvailableLeafIndex },
330 { C::tx_prev_written_public_data_slots_tree_root, FF(AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_ROOT) },
331 { C::tx_prev_written_public_data_slots_tree_size, FF(AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_SIZE) },
332 { C::tx_l1_l2_tree_root, tree_snapshots.l1ToL2MessageTree.root },
333 { C::tx_prev_l2_gas_used, start_gas_used.l2Gas },
334 { C::tx_prev_da_gas_used, start_gas_used.daGas },
335 { C::tx_l2_gas_limit, gas_limit.l2Gas },
336 { C::tx_da_gas_limit, gas_limit.daGas },
337 { C::tx_prev_num_unencrypted_logs, 0 },
338 { C::tx_prev_num_l2_to_l1_messages, 0 },
340 { C::tx_should_read_note_hash_tree, 1 },
342 { C::tx_should_read_nullifier_tree, 1 },
344 { C::tx_should_read_public_data_tree, 1 },
346 { C::tx_should_read_l1_l2_tree, 1 },
347 { C::tx_gas_used_pi_offset, FF(AVM_PUBLIC_INPUTS_START_GAS_USED_ROW_IDX) },
348 { C::tx_should_read_gas_used, 1 },
349 { C::tx_gas_limit_pi_offset, FF(AVM_PUBLIC_INPUTS_GAS_SETTINGS_GAS_LIMITS_ROW_IDX) },
350 { C::tx_should_read_gas_limit, 1 },
351 { C::tx_next_note_hash_tree_root, tree_snapshots.noteHashTree.root },
352 { C::tx_next_note_hash_tree_size, tree_snapshots.noteHashTree.nextAvailableLeafIndex },
353 { C::tx_next_nullifier_tree_root, tree_snapshots.nullifierTree.root },
354 { C::tx_next_nullifier_tree_size, tree_snapshots.nullifierTree.nextAvailableLeafIndex },
355 { C::tx_next_public_data_tree_root, tree_snapshots.publicDataTree.root },
356 { C::tx_next_public_data_tree_size, tree_snapshots.publicDataTree.nextAvailableLeafIndex },
357 { C::tx_next_written_public_data_slots_tree_root, FF(AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_ROOT) },
358 { C::tx_next_written_public_data_slots_tree_size, FF(AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_SIZE) },
359 { C::tx_next_l2_gas_used, start_gas_used.l2Gas },
360 { C::tx_next_da_gas_used, start_gas_used.daGas },
361 { C::tx_setup_phase_value, static_cast<uint8_t>(TransactionPhase::SETUP) },
362 { C::tx_next_context_id, 1 },
363 },
364 });
365
366 PublicInputsTraceBuilder public_inputs_builder;
367 public_inputs_builder.process_public_inputs(trace, public_inputs);
368 public_inputs_builder.process_public_inputs_aux_precomputed(trace);
369
370 PrecomputedTraceBuilder precomputed_builder;
372
373 check_relation<tx_context>(trace);
374 // All tx_context interactions
375 check_interaction<TxTraceBuilder,
387}
388
389TEST(TxContextConstrainingTest, EndStateChecks)
390{
391 Gas end_gas_used = { 1, 2 };
392 TreeSnapshots tree_snapshots = { .l1ToL2MessageTree = { .root = 20, .nextAvailableLeafIndex = 19 },
393 .noteHashTree = { .root = 21, .nextAvailableLeafIndex = 20 },
394 .nullifierTree = { .root = 22, .nextAvailableLeafIndex = 21 },
395 .publicDataTree = { .root = 23, .nextAvailableLeafIndex = 22 } };
396 AvmAccumulatedDataArrayLengths array_lengths = {
397 .noteHashes = 10, .nullifiers = 11, .l2ToL1Msgs = 12, .publicLogs = 13
398 };
399 auto public_inputs = PublicInputsBuilder()
400 .set_end_gas_used(end_gas_used)
401 .set_end_tree_snapshots(tree_snapshots)
402 .set_accumulated_data_array_lengths(array_lengths)
403 .build();
404
405 TestTraceContainer trace({
406 {
407 // Row 0
408 { C::precomputed_first_row, 1 },
409 },
410 {
411 // Row 1
412 { C::tx_sel, 1 },
413 { C::tx_is_cleanup, 1 },
414 { C::tx_prev_note_hash_tree_root, tree_snapshots.noteHashTree.root },
415 { C::tx_prev_note_hash_tree_size, tree_snapshots.noteHashTree.nextAvailableLeafIndex },
416 { C::tx_prev_num_note_hashes_emitted, array_lengths.noteHashes },
417 { C::tx_prev_nullifier_tree_root, tree_snapshots.nullifierTree.root },
418 { C::tx_prev_nullifier_tree_size, tree_snapshots.nullifierTree.nextAvailableLeafIndex },
419 { C::tx_prev_num_nullifiers_emitted, array_lengths.nullifiers },
420 { C::tx_prev_public_data_tree_root, tree_snapshots.publicDataTree.root },
421 { C::tx_prev_public_data_tree_size, tree_snapshots.publicDataTree.nextAvailableLeafIndex },
422 { C::tx_l1_l2_tree_root, tree_snapshots.l1ToL2MessageTree.root },
423 { C::tx_prev_l2_gas_used, end_gas_used.l2Gas },
424 { C::tx_prev_da_gas_used, end_gas_used.daGas },
425 { C::tx_prev_num_unencrypted_logs, array_lengths.publicLogs },
426 { C::tx_prev_num_l2_to_l1_messages, array_lengths.l2ToL1Msgs },
428 { C::tx_should_read_note_hash_tree, 1 },
430 { C::tx_should_read_nullifier_tree, 1 },
432 { C::tx_should_read_public_data_tree, 1 },
434 { C::tx_should_read_l1_l2_tree, 1 },
435 { C::tx_gas_used_pi_offset, FF(AVM_PUBLIC_INPUTS_END_GAS_USED_ROW_IDX) },
436 { C::tx_should_read_gas_used, 1 },
437 { C::tx_array_length_note_hashes_pi_offset,
439 { C::tx_array_length_nullifiers_pi_offset,
441 { C::tx_array_length_l2_to_l1_messages_pi_offset,
443 { C::tx_array_length_unencrypted_logs_pi_offset,
445 { C::tx_next_note_hash_tree_root, tree_snapshots.noteHashTree.root },
446 { C::tx_next_note_hash_tree_size, tree_snapshots.noteHashTree.nextAvailableLeafIndex },
447 { C::tx_next_num_note_hashes_emitted, array_lengths.noteHashes },
448 { C::tx_next_nullifier_tree_root, tree_snapshots.nullifierTree.root },
449 { C::tx_next_nullifier_tree_size, tree_snapshots.nullifierTree.nextAvailableLeafIndex },
450 { C::tx_next_num_nullifiers_emitted, array_lengths.nullifiers },
451 { C::tx_next_public_data_tree_root, tree_snapshots.publicDataTree.root },
452 { C::tx_next_public_data_tree_size, tree_snapshots.publicDataTree.nextAvailableLeafIndex },
453 { C::tx_next_l2_gas_used, end_gas_used.l2Gas },
454 { C::tx_next_da_gas_used, end_gas_used.daGas },
455 { C::tx_next_num_unencrypted_logs, array_lengths.publicLogs },
456 { C::tx_next_num_l2_to_l1_messages, array_lengths.l2ToL1Msgs },
457 { C::tx_setup_phase_value, static_cast<uint8_t>(TransactionPhase::SETUP) },
458 },
459 });
460
461 PublicInputsTraceBuilder public_inputs_builder;
462 public_inputs_builder.process_public_inputs(trace, public_inputs);
463 public_inputs_builder.process_public_inputs_aux_precomputed(trace);
464
465 PrecomputedTraceBuilder precomputed_builder;
467
468 check_relation<tx_context>(trace);
469 // All tx_context interactions
470 check_interaction<TxTraceBuilder,
482}
483
484TEST(TxContextConstrainingTest, NegativeContextIdChecks)
485{
486 TestTraceContainer trace({
487 {
488 // Row 0
489 { C::precomputed_first_row, 1 },
490 },
491 {
492 // Row 1
493 { C::tx_sel, 1 },
494 { C::tx_start_tx, 1 },
495 { C::tx_next_context_id, 1 },
496 },
497 {
498 // Row 2
499 { C::tx_sel, 1 },
500 { C::tx_next_context_id, 1 },
501 { C::tx_should_process_call_request, 1 },
502 },
503 {
504 // Row 3
505 { C::tx_sel, 1 },
506 { C::tx_next_context_id, 5 },
507 },
508 });
509 check_relation<tx_context>(
511
512 // Negative test: initial context id should be 1
513 trace.set(C::tx_next_context_id, 1, 2);
515 "NEXT_CONTEXT_ID_INITIAL_VALUE");
516
517 // Negative test: continuity check
518 trace.set(C::tx_next_context_id, 2, 42);
520 "NEXT_CONTEXT_ID_CONTINUITY");
521}
522
523} // namespace
524} // namespace bb::avm2::constraining
#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_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_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_PUBLIC_LOGS_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_GAS_SETTINGS_GAS_LIMITS_ROW_IDX
#define AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_PUBLIC_DATA_TREE_ROW_IDX
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_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_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_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_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
Definition alu.test.cpp:119
TestTraceContainer trace
#define EXPECT_THROW_WITH_MESSAGE(code, expectedMessage)
Definition macros.hpp:7
void check_interaction(tracegen::TestTraceContainer &trace)
AvmFlavorSettings::FF FF
TEST(TxExecutionConstrainingTest, WriteTreeValue)
Definition tx.test.cpp:508
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
typename Flavor::FF FF