30 const auto constants_AVM_PUBLIC_INPUTS_END_GAS_USED_ROW_IDX =
FF(369);
31 const auto constants_AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_NOTE_HASHES_ROW_IDX =
FF(370);
32 const auto constants_AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_NULLIFIERS_ROW_IDX =
FF(371);
33 const auto constants_AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_L2_TO_L1_MSGS_ROW_IDX =
FF(372);
34 const auto constants_AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_PUBLIC_LOGS_ROW_IDX =
FF(373);
35 const auto constants_AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_ROOT =
36 FF(
uint256_t{ 18071747219918308973UL, 16614632998898105071UL, 15723772623334795496UL, 2914032580688149866UL });
37 const auto constants_AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_SIZE =
FF(1);
38 const auto tx_NOT_LAST_ROW = in.get(C::tx_sel) * in.get(C::tx_sel_shift);
39 const auto tx_NOT_LAST = in.get(C::tx_sel_shift) * in.get(C::tx_sel);
43 auto tmp = in.get(C::tx_start_tx) * (constants_AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_NOTE_HASH_TREE_ROW_IDX -
44 in.get(C::tx_note_hash_pi_offset));
45 tmp *= scaling_factor;
46 std::get<0>(evals) +=
typename Accumulator::View(tmp);
50 auto tmp = in.get(C::tx_is_cleanup) * (constants_AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_NOTE_HASH_TREE_ROW_IDX -
51 in.get(C::tx_note_hash_pi_offset));
52 tmp *= scaling_factor;
53 std::get<1>(evals) +=
typename Accumulator::View(tmp);
57 auto tmp = (in.get(C::tx_should_read_note_hash_tree) - (in.get(C::tx_start_tx) + in.get(C::tx_is_cleanup)));
58 tmp *= scaling_factor;
59 std::get<2>(evals) +=
typename Accumulator::View(tmp);
63 auto tmp = in.get(C::tx_start_tx) * in.get(C::tx_prev_num_note_hashes_emitted);
64 tmp *= scaling_factor;
65 std::get<3>(evals) +=
typename Accumulator::View(tmp);
69 auto tmp = in.get(C::tx_start_tx) * (constants_AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_NULLIFIER_TREE_ROW_IDX -
70 in.get(C::tx_nullifier_pi_offset));
71 tmp *= scaling_factor;
72 std::get<4>(evals) +=
typename Accumulator::View(tmp);
76 auto tmp = in.get(C::tx_is_cleanup) * (constants_AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_NULLIFIER_TREE_ROW_IDX -
77 in.get(C::tx_nullifier_pi_offset));
78 tmp *= scaling_factor;
79 std::get<5>(evals) +=
typename Accumulator::View(tmp);
83 auto tmp = (in.get(C::tx_should_read_nullifier_tree) - (in.get(C::tx_start_tx) + in.get(C::tx_is_cleanup)));
84 tmp *= scaling_factor;
85 std::get<6>(evals) +=
typename Accumulator::View(tmp);
89 auto tmp = in.get(C::tx_start_tx) * in.get(C::tx_prev_num_nullifiers_emitted);
90 tmp *= scaling_factor;
91 std::get<7>(evals) +=
typename Accumulator::View(tmp);
95 auto tmp = in.get(C::tx_start_tx) * (constants_AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_PUBLIC_DATA_TREE_ROW_IDX -
96 in.get(C::tx_public_data_pi_offset));
97 tmp *= scaling_factor;
98 std::get<8>(evals) +=
typename Accumulator::View(tmp);
102 auto tmp = in.get(C::tx_is_cleanup) * (constants_AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_PUBLIC_DATA_TREE_ROW_IDX -
103 in.get(C::tx_public_data_pi_offset));
104 tmp *= scaling_factor;
105 std::get<9>(evals) +=
typename Accumulator::View(tmp);
109 auto tmp = (in.get(C::tx_should_read_public_data_tree) - (in.get(C::tx_start_tx) + in.get(C::tx_is_cleanup)));
110 tmp *= scaling_factor;
115 auto tmp = in.get(C::tx_start_tx) * (constants_AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_ROOT -
116 in.get(C::tx_prev_written_public_data_slots_tree_root));
117 tmp *= scaling_factor;
122 auto tmp = in.get(C::tx_start_tx) * (constants_AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_SIZE -
123 in.get(C::tx_prev_written_public_data_slots_tree_size));
124 tmp *= scaling_factor;
130 in.get(C::tx_start_tx) * (constants_AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_L1_TO_L2_MESSAGE_TREE_ROW_IDX -
131 in.get(C::tx_l1_l2_pi_offset));
132 tmp *= scaling_factor;
138 in.get(C::tx_is_cleanup) * (constants_AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_L1_TO_L2_MESSAGE_TREE_ROW_IDX -
139 in.get(C::tx_l1_l2_pi_offset));
140 tmp *= scaling_factor;
145 auto tmp = (in.get(C::tx_should_read_l1_l2_tree) - (in.get(C::tx_start_tx) + in.get(C::tx_is_cleanup)));
146 tmp *= scaling_factor;
151 auto tmp = in.get(C::tx_start_tx) *
152 (constants_AVM_PUBLIC_INPUTS_START_GAS_USED_ROW_IDX - in.get(C::tx_gas_used_pi_offset));
153 tmp *= scaling_factor;
158 auto tmp = in.get(C::tx_is_cleanup) *
159 (constants_AVM_PUBLIC_INPUTS_END_GAS_USED_ROW_IDX - in.get(C::tx_gas_used_pi_offset));
160 tmp *= scaling_factor;
165 auto tmp = (in.get(C::tx_should_read_gas_used) - (in.get(C::tx_start_tx) + in.get(C::tx_is_cleanup)));
166 tmp *= scaling_factor;
171 auto tmp = in.get(C::tx_start_tx) *
172 (constants_AVM_PUBLIC_INPUTS_GAS_SETTINGS_GAS_LIMITS_ROW_IDX - in.get(C::tx_gas_limit_pi_offset));
173 tmp *= scaling_factor;
179 in.get(C::tx_is_teardown_phase) *
180 (constants_AVM_PUBLIC_INPUTS_GAS_SETTINGS_TEARDOWN_GAS_LIMITS_ROW_IDX - in.get(C::tx_gas_limit_pi_offset));
181 tmp *= scaling_factor;
186 auto tmp = (in.get(C::tx_should_read_gas_limit) - (in.get(C::tx_start_tx) + in.get(C::tx_is_teardown_phase)));
187 tmp *= scaling_factor;
192 auto tmp = in.get(C::tx_start_tx) * in.get(C::tx_prev_num_unencrypted_logs);
193 tmp *= scaling_factor;
198 auto tmp = in.get(C::tx_start_tx) * in.get(C::tx_prev_num_l2_to_l1_messages);
199 tmp *= scaling_factor;
204 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_reverted)) *
205 (in.get(C::tx_next_note_hash_tree_root) - in.get(C::tx_prev_note_hash_tree_root_shift));
206 tmp *= scaling_factor;
211 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_reverted)) *
212 (in.get(C::tx_next_note_hash_tree_size) - in.get(C::tx_prev_note_hash_tree_size_shift));
213 tmp *= scaling_factor;
218 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_reverted)) *
219 (in.get(C::tx_next_num_note_hashes_emitted) - in.get(C::tx_prev_num_note_hashes_emitted_shift));
220 tmp *= scaling_factor;
225 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_reverted)) *
226 (in.get(C::tx_next_nullifier_tree_root) - in.get(C::tx_prev_nullifier_tree_root_shift));
227 tmp *= scaling_factor;
232 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_reverted)) *
233 (in.get(C::tx_next_nullifier_tree_size) - in.get(C::tx_prev_nullifier_tree_size_shift));
234 tmp *= scaling_factor;
239 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_reverted)) *
240 (in.get(C::tx_next_num_nullifiers_emitted) - in.get(C::tx_prev_num_nullifiers_emitted_shift));
241 tmp *= scaling_factor;
246 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_reverted)) *
247 (in.get(C::tx_next_public_data_tree_root) - in.get(C::tx_prev_public_data_tree_root_shift));
248 tmp *= scaling_factor;
253 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_reverted)) *
254 (in.get(C::tx_next_public_data_tree_size) - in.get(C::tx_prev_public_data_tree_size_shift));
255 tmp *= scaling_factor;
260 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_reverted)) *
261 (in.get(C::tx_next_written_public_data_slots_tree_root) -
262 in.get(C::tx_prev_written_public_data_slots_tree_root_shift));
263 tmp *= scaling_factor;
268 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_reverted)) *
269 (in.get(C::tx_next_written_public_data_slots_tree_size) -
270 in.get(C::tx_prev_written_public_data_slots_tree_size_shift));
271 tmp *= scaling_factor;
276 auto tmp = tx_NOT_LAST_ROW * (in.get(C::tx_l1_l2_tree_root) - in.get(C::tx_l1_l2_tree_root_shift));
277 tmp *= scaling_factor;
282 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_reverted)) *
283 (in.get(C::tx_next_num_unencrypted_logs) - in.get(C::tx_prev_num_unencrypted_logs_shift));
284 tmp *= scaling_factor;
289 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_reverted)) *
290 (in.get(C::tx_next_num_l2_to_l1_messages) - in.get(C::tx_prev_num_l2_to_l1_messages_shift));
291 tmp *= scaling_factor;
296 auto tmp = in.get(C::tx_sel) * (
FF(4) - in.get(C::tx_setup_phase_value));
297 tmp *= scaling_factor;
302 auto tmp = tx_NOT_LAST_ROW * (in.get(C::tx_next_l2_gas_used) - in.get(C::tx_prev_l2_gas_used_shift));
303 tmp *= scaling_factor;
308 auto tmp = tx_NOT_LAST_ROW * (in.get(C::tx_next_da_gas_used) - in.get(C::tx_prev_da_gas_used_shift));
309 tmp *= scaling_factor;
314 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_is_teardown_phase_shift)) *
315 (in.get(C::tx_l2_gas_limit) - in.get(C::tx_l2_gas_limit_shift));
316 tmp *= scaling_factor;
321 auto tmp = tx_NOT_LAST_ROW * (
FF(1) - in.get(C::tx_is_teardown_phase_shift)) *
322 (in.get(C::tx_da_gas_limit) - in.get(C::tx_da_gas_limit_shift));
323 tmp *= scaling_factor;
328 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_sel_can_emit_note_hash)) *
329 (in.get(C::tx_prev_note_hash_tree_root) - in.get(C::tx_next_note_hash_tree_root));
330 tmp *= scaling_factor;
335 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_sel_can_emit_note_hash)) *
336 (in.get(C::tx_prev_note_hash_tree_size) - in.get(C::tx_next_note_hash_tree_size));
337 tmp *= scaling_factor;
342 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_sel_can_emit_note_hash)) *
343 (in.get(C::tx_prev_num_note_hashes_emitted) - in.get(C::tx_next_num_note_hashes_emitted));
344 tmp *= scaling_factor;
349 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_sel_can_emit_nullifier)) *
350 (in.get(C::tx_prev_nullifier_tree_root) - in.get(C::tx_next_nullifier_tree_root));
351 tmp *= scaling_factor;
356 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_sel_can_emit_nullifier)) *
357 (in.get(C::tx_prev_nullifier_tree_size) - in.get(C::tx_next_nullifier_tree_size));
358 tmp *= scaling_factor;
363 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_sel_can_emit_nullifier)) *
364 (in.get(C::tx_prev_num_nullifiers_emitted) - in.get(C::tx_next_num_nullifiers_emitted));
365 tmp *= scaling_factor;
370 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_sel_can_write_public_data)) *
371 (in.get(C::tx_prev_public_data_tree_root) - in.get(C::tx_next_public_data_tree_root));
372 tmp *= scaling_factor;
377 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_sel_can_write_public_data)) *
378 (in.get(C::tx_prev_public_data_tree_size) - in.get(C::tx_next_public_data_tree_size));
379 tmp *= scaling_factor;
384 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_sel_can_write_public_data)) *
385 (in.get(C::tx_prev_written_public_data_slots_tree_root) -
386 in.get(C::tx_next_written_public_data_slots_tree_root));
387 tmp *= scaling_factor;
392 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_sel_can_write_public_data)) *
393 (in.get(C::tx_prev_written_public_data_slots_tree_size) -
394 in.get(C::tx_next_written_public_data_slots_tree_size));
395 tmp *= scaling_factor;
400 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_sel_can_emit_unencrypted_log)) *
401 (in.get(C::tx_prev_num_unencrypted_logs) - in.get(C::tx_next_num_unencrypted_logs));
402 tmp *= scaling_factor;
407 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_sel_can_emit_l2_l1_msg)) *
408 (in.get(C::tx_prev_num_l2_to_l1_messages) - in.get(C::tx_next_num_l2_to_l1_messages));
409 tmp *= scaling_factor;
414 auto tmp = in.get(C::tx_sel) * in.get(C::tx_is_padded) *
415 (in.get(C::tx_prev_note_hash_tree_root) - in.get(C::tx_next_note_hash_tree_root));
416 tmp *= scaling_factor;
421 auto tmp = in.get(C::tx_sel) * in.get(C::tx_is_padded) *
422 (in.get(C::tx_prev_note_hash_tree_size) - in.get(C::tx_next_note_hash_tree_size));
423 tmp *= scaling_factor;
428 auto tmp = in.get(C::tx_sel) * in.get(C::tx_is_padded) *
429 (in.get(C::tx_prev_num_note_hashes_emitted) - in.get(C::tx_next_num_note_hashes_emitted));
430 tmp *= scaling_factor;
435 auto tmp = in.get(C::tx_sel) * in.get(C::tx_is_padded) *
436 (in.get(C::tx_prev_nullifier_tree_root) - in.get(C::tx_next_nullifier_tree_root));
437 tmp *= scaling_factor;
442 auto tmp = in.get(C::tx_sel) * in.get(C::tx_is_padded) *
443 (in.get(C::tx_prev_nullifier_tree_size) - in.get(C::tx_next_nullifier_tree_size));
444 tmp *= scaling_factor;
449 auto tmp = in.get(C::tx_sel) * in.get(C::tx_is_padded) *
450 (in.get(C::tx_prev_num_nullifiers_emitted) - in.get(C::tx_next_num_nullifiers_emitted));
451 tmp *= scaling_factor;
456 auto tmp = in.get(C::tx_sel) * in.get(C::tx_is_padded) *
457 (in.get(C::tx_prev_public_data_tree_root) - in.get(C::tx_next_public_data_tree_root));
458 tmp *= scaling_factor;
463 auto tmp = in.get(C::tx_sel) * in.get(C::tx_is_padded) *
464 (in.get(C::tx_prev_public_data_tree_size) - in.get(C::tx_next_public_data_tree_size));
465 tmp *= scaling_factor;
470 auto tmp = in.get(C::tx_sel) * in.get(C::tx_is_padded) *
471 (in.get(C::tx_prev_written_public_data_slots_tree_root) -
472 in.get(C::tx_next_written_public_data_slots_tree_root));
473 tmp *= scaling_factor;
478 auto tmp = in.get(C::tx_sel) * in.get(C::tx_is_padded) *
479 (in.get(C::tx_prev_written_public_data_slots_tree_size) -
480 in.get(C::tx_next_written_public_data_slots_tree_size));
481 tmp *= scaling_factor;
486 auto tmp = in.get(C::tx_sel) * in.get(C::tx_is_padded) *
487 (in.get(C::tx_prev_num_unencrypted_logs) - in.get(C::tx_next_num_unencrypted_logs));
488 tmp *= scaling_factor;
493 auto tmp = in.get(C::tx_sel) * in.get(C::tx_is_padded) *
494 (in.get(C::tx_prev_num_l2_to_l1_messages) - in.get(C::tx_next_num_l2_to_l1_messages));
495 tmp *= scaling_factor;
500 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_should_process_call_request)) *
501 (in.get(C::tx_prev_l2_gas_used) - in.get(C::tx_next_l2_gas_used));
502 tmp *= scaling_factor;
507 auto tmp = in.get(C::tx_sel) * (
FF(1) - in.get(C::tx_should_process_call_request)) *
508 (in.get(C::tx_prev_da_gas_used) - in.get(C::tx_next_da_gas_used));
509 tmp *= scaling_factor;
514 auto tmp = in.get(C::tx_is_cleanup) *
515 (constants_AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_NOTE_HASHES_ROW_IDX -
516 in.get(C::tx_array_length_note_hashes_pi_offset));
517 tmp *= scaling_factor;
522 auto tmp = in.get(C::tx_is_cleanup) *
523 (constants_AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_NULLIFIERS_ROW_IDX -
524 in.get(C::tx_array_length_nullifiers_pi_offset));
525 tmp *= scaling_factor;
530 auto tmp = in.get(C::tx_is_cleanup) *
531 (constants_AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_L2_TO_L1_MSGS_ROW_IDX -
532 in.get(C::tx_array_length_l2_to_l1_messages_pi_offset));
533 tmp *= scaling_factor;
538 auto tmp = in.get(C::tx_is_cleanup) *
539 (constants_AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_PUBLIC_LOGS_ROW_IDX -
540 in.get(C::tx_array_length_unencrypted_logs_pi_offset));
541 tmp *= scaling_factor;
546 auto tmp = in.get(C::tx_start_tx) * (
FF(1) - in.get(C::tx_next_context_id));
547 tmp *= scaling_factor;
552 auto tmp = tx_NOT_LAST * (
FF(1) - in.get(C::tx_should_process_call_request)) *
553 (in.get(C::tx_next_context_id_shift) - in.get(C::tx_next_context_id));
554 tmp *= scaling_factor;