Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
tx_context_impl.hpp
Go to the documentation of this file.
1// AUTOGENERATED FILE
2#pragma once
3
5
6namespace bb::avm2 {
7
8template <typename FF_>
9template <typename ContainerOverSubrelations, typename AllEntities>
10void tx_contextImpl<FF_>::accumulate(ContainerOverSubrelations& evals,
11 const AllEntities& in,
12 [[maybe_unused]] const RelationParameters<FF_>&,
13 [[maybe_unused]] const FF_& scaling_factor)
14{
15 using C = ColumnAndShifts;
16
17 PROFILE_THIS_NAME("accumulate/tx_context");
18
19 const auto constants_AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_L1_TO_L2_MESSAGE_TREE_ROW_IDX = FF(8);
20 const auto constants_AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_NOTE_HASH_TREE_ROW_IDX = FF(9);
21 const auto constants_AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_NULLIFIER_TREE_ROW_IDX = FF(10);
22 const auto constants_AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_PUBLIC_DATA_TREE_ROW_IDX = FF(11);
23 const auto constants_AVM_PUBLIC_INPUTS_START_GAS_USED_ROW_IDX = FF(12);
24 const auto constants_AVM_PUBLIC_INPUTS_GAS_SETTINGS_GAS_LIMITS_ROW_IDX = FF(13);
25 const auto constants_AVM_PUBLIC_INPUTS_GAS_SETTINGS_TEARDOWN_GAS_LIMITS_ROW_IDX = FF(14);
26 const auto constants_AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_L1_TO_L2_MESSAGE_TREE_ROW_IDX = FF(365);
27 const auto constants_AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_NOTE_HASH_TREE_ROW_IDX = FF(366);
28 const auto constants_AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_NULLIFIER_TREE_ROW_IDX = FF(367);
29 const auto constants_AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_PUBLIC_DATA_TREE_ROW_IDX = FF(368);
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);
40
41 {
42 using Accumulator = typename std::tuple_element_t<0, ContainerOverSubrelations>;
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);
47 }
48 {
49 using Accumulator = typename std::tuple_element_t<1, ContainerOverSubrelations>;
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);
54 }
55 {
56 using Accumulator = typename std::tuple_element_t<2, ContainerOverSubrelations>;
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);
60 }
61 {
62 using Accumulator = typename std::tuple_element_t<3, ContainerOverSubrelations>;
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);
66 }
67 {
68 using Accumulator = typename std::tuple_element_t<4, ContainerOverSubrelations>;
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);
73 }
74 {
75 using Accumulator = typename std::tuple_element_t<5, ContainerOverSubrelations>;
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);
80 }
81 {
82 using Accumulator = typename std::tuple_element_t<6, ContainerOverSubrelations>;
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);
86 }
87 {
88 using Accumulator = typename std::tuple_element_t<7, ContainerOverSubrelations>;
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);
92 }
93 {
94 using Accumulator = typename std::tuple_element_t<8, ContainerOverSubrelations>;
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);
99 }
100 {
101 using Accumulator = typename std::tuple_element_t<9, ContainerOverSubrelations>;
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);
106 }
107 {
108 using Accumulator = typename std::tuple_element_t<10, ContainerOverSubrelations>;
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;
111 std::get<10>(evals) += typename Accumulator::View(tmp);
112 }
113 {
114 using Accumulator = typename std::tuple_element_t<11, ContainerOverSubrelations>;
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;
118 std::get<11>(evals) += typename Accumulator::View(tmp);
119 }
120 {
121 using Accumulator = typename std::tuple_element_t<12, ContainerOverSubrelations>;
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;
125 std::get<12>(evals) += typename Accumulator::View(tmp);
126 }
127 {
128 using Accumulator = typename std::tuple_element_t<13, ContainerOverSubrelations>;
129 auto tmp =
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;
133 std::get<13>(evals) += typename Accumulator::View(tmp);
134 }
135 {
136 using Accumulator = typename std::tuple_element_t<14, ContainerOverSubrelations>;
137 auto tmp =
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;
141 std::get<14>(evals) += typename Accumulator::View(tmp);
142 }
143 {
144 using Accumulator = typename std::tuple_element_t<15, ContainerOverSubrelations>;
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;
147 std::get<15>(evals) += typename Accumulator::View(tmp);
148 }
149 {
150 using Accumulator = typename std::tuple_element_t<16, ContainerOverSubrelations>;
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;
154 std::get<16>(evals) += typename Accumulator::View(tmp);
155 }
156 {
157 using Accumulator = typename std::tuple_element_t<17, ContainerOverSubrelations>;
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;
161 std::get<17>(evals) += typename Accumulator::View(tmp);
162 }
163 {
164 using Accumulator = typename std::tuple_element_t<18, ContainerOverSubrelations>;
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;
167 std::get<18>(evals) += typename Accumulator::View(tmp);
168 }
169 {
170 using Accumulator = typename std::tuple_element_t<19, ContainerOverSubrelations>;
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;
174 std::get<19>(evals) += typename Accumulator::View(tmp);
175 }
176 {
177 using Accumulator = typename std::tuple_element_t<20, ContainerOverSubrelations>;
178 auto tmp =
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;
182 std::get<20>(evals) += typename Accumulator::View(tmp);
183 }
184 {
185 using Accumulator = typename std::tuple_element_t<21, ContainerOverSubrelations>;
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;
188 std::get<21>(evals) += typename Accumulator::View(tmp);
189 }
190 {
191 using Accumulator = typename std::tuple_element_t<22, ContainerOverSubrelations>;
192 auto tmp = in.get(C::tx_start_tx) * in.get(C::tx_prev_num_unencrypted_logs);
193 tmp *= scaling_factor;
194 std::get<22>(evals) += typename Accumulator::View(tmp);
195 }
196 {
197 using Accumulator = typename std::tuple_element_t<23, ContainerOverSubrelations>;
198 auto tmp = in.get(C::tx_start_tx) * in.get(C::tx_prev_num_l2_to_l1_messages);
199 tmp *= scaling_factor;
200 std::get<23>(evals) += typename Accumulator::View(tmp);
201 }
202 { // NOTE_HASH_ROOT_CONTINUITY
203 using Accumulator = typename std::tuple_element_t<24, ContainerOverSubrelations>;
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;
207 std::get<24>(evals) += typename Accumulator::View(tmp);
208 }
209 { // NOTE_HASH_TREE_SIZE_CONTINUITY
210 using Accumulator = typename std::tuple_element_t<25, ContainerOverSubrelations>;
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;
214 std::get<25>(evals) += typename Accumulator::View(tmp);
215 }
216 { // NUM_NOTE_HASHES_EMITTED_CONTINUITY
217 using Accumulator = typename std::tuple_element_t<26, ContainerOverSubrelations>;
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;
221 std::get<26>(evals) += typename Accumulator::View(tmp);
222 }
223 { // NULLIFIER_TREE_ROOT_CONTINUITY
224 using Accumulator = typename std::tuple_element_t<27, ContainerOverSubrelations>;
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;
228 std::get<27>(evals) += typename Accumulator::View(tmp);
229 }
230 { // NULLIFIER_TREE_SIZE_CONTINUITY
231 using Accumulator = typename std::tuple_element_t<28, ContainerOverSubrelations>;
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;
235 std::get<28>(evals) += typename Accumulator::View(tmp);
236 }
237 { // NUM_NULLIFIERS_EMITTED_CONTINUITY
238 using Accumulator = typename std::tuple_element_t<29, ContainerOverSubrelations>;
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;
242 std::get<29>(evals) += typename Accumulator::View(tmp);
243 }
244 { // PUBLIC_DATA_TREE_ROOT_CONTINUITY
245 using Accumulator = typename std::tuple_element_t<30, ContainerOverSubrelations>;
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;
249 std::get<30>(evals) += typename Accumulator::View(tmp);
250 }
251 { // PUBLIC_DATA_TREE_SIZE_CONTINUITY
252 using Accumulator = typename std::tuple_element_t<31, ContainerOverSubrelations>;
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;
256 std::get<31>(evals) += typename Accumulator::View(tmp);
257 }
258 { // WRITTEN_PUBLIC_DATA_SLOTS_TREE_ROOT_CONTINUITY
259 using Accumulator = typename std::tuple_element_t<32, ContainerOverSubrelations>;
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;
264 std::get<32>(evals) += typename Accumulator::View(tmp);
265 }
266 { // WRITTEN_PUBLIC_DATA_SLOTS_TREE_SIZE_CONTINUITY
267 using Accumulator = typename std::tuple_element_t<33, ContainerOverSubrelations>;
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;
272 std::get<33>(evals) += typename Accumulator::View(tmp);
273 }
274 { // L1_L2_TREE_ROOT_CONTINUITY
275 using Accumulator = typename std::tuple_element_t<34, ContainerOverSubrelations>;
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;
278 std::get<34>(evals) += typename Accumulator::View(tmp);
279 }
280 { // NUM_UNENCRYPTED_LOGS_CONTINUITY
281 using Accumulator = typename std::tuple_element_t<35, ContainerOverSubrelations>;
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;
285 std::get<35>(evals) += typename Accumulator::View(tmp);
286 }
287 { // NUM_L2_TO_L1_MESSAGES_CONTINUITY
288 using Accumulator = typename std::tuple_element_t<36, ContainerOverSubrelations>;
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;
292 std::get<36>(evals) += typename Accumulator::View(tmp);
293 }
294 {
295 using Accumulator = typename std::tuple_element_t<37, ContainerOverSubrelations>;
296 auto tmp = in.get(C::tx_sel) * (FF(4) - in.get(C::tx_setup_phase_value));
297 tmp *= scaling_factor;
298 std::get<37>(evals) += typename Accumulator::View(tmp);
299 }
300 { // PROPAGATE_L2_GAS_USED
301 using Accumulator = typename std::tuple_element_t<38, ContainerOverSubrelations>;
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;
304 std::get<38>(evals) += typename Accumulator::View(tmp);
305 }
306 { // PROPAGATE_DA_GAS_USED
307 using Accumulator = typename std::tuple_element_t<39, ContainerOverSubrelations>;
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;
310 std::get<39>(evals) += typename Accumulator::View(tmp);
311 }
312 { // PROPAGATE_L2_GAS_LIMIT
313 using Accumulator = typename std::tuple_element_t<40, ContainerOverSubrelations>;
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;
317 std::get<40>(evals) += typename Accumulator::View(tmp);
318 }
319 { // PROPAGATE_DA_GAS_LIMIT
320 using Accumulator = typename std::tuple_element_t<41, ContainerOverSubrelations>;
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;
324 std::get<41>(evals) += typename Accumulator::View(tmp);
325 }
326 { // NOTE_HASH_ROOT_IMMUTABILITY
327 using Accumulator = typename std::tuple_element_t<42, ContainerOverSubrelations>;
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;
331 std::get<42>(evals) += typename Accumulator::View(tmp);
332 }
333 { // NOTE_HASH_SIZE_IMMUTABILITY
334 using Accumulator = typename std::tuple_element_t<43, ContainerOverSubrelations>;
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;
338 std::get<43>(evals) += typename Accumulator::View(tmp);
339 }
340 { // NOTE_HASH_COUNT_IMMUTABILITY
341 using Accumulator = typename std::tuple_element_t<44, ContainerOverSubrelations>;
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;
345 std::get<44>(evals) += typename Accumulator::View(tmp);
346 }
347 { // NULLIFIER_ROOT_IMMUTABILITY
348 using Accumulator = typename std::tuple_element_t<45, ContainerOverSubrelations>;
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;
352 std::get<45>(evals) += typename Accumulator::View(tmp);
353 }
354 { // NULLIFIER_SIZE_IMMUTABILITY
355 using Accumulator = typename std::tuple_element_t<46, ContainerOverSubrelations>;
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;
359 std::get<46>(evals) += typename Accumulator::View(tmp);
360 }
361 { // NULLIFIER_COUNT_IMMUTABILITY
362 using Accumulator = typename std::tuple_element_t<47, ContainerOverSubrelations>;
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;
366 std::get<47>(evals) += typename Accumulator::View(tmp);
367 }
368 { // PUBLIC_DATA_ROOT_IMMUTABILITY
369 using Accumulator = typename std::tuple_element_t<48, ContainerOverSubrelations>;
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;
373 std::get<48>(evals) += typename Accumulator::View(tmp);
374 }
375 { // PUBLIC_DATA_SIZE_IMMUTABILITY
376 using Accumulator = typename std::tuple_element_t<49, ContainerOverSubrelations>;
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;
380 std::get<49>(evals) += typename Accumulator::View(tmp);
381 }
382 { // WRITTEN_PUBLIC_DATA_SLOTS_ROOT_IMMUTABILITY
383 using Accumulator = typename std::tuple_element_t<50, ContainerOverSubrelations>;
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;
388 std::get<50>(evals) += typename Accumulator::View(tmp);
389 }
390 { // WRITTEN_PUBLIC_DATA_SLOTS_SIZE_IMMUTABILITY
391 using Accumulator = typename std::tuple_element_t<51, ContainerOverSubrelations>;
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;
396 std::get<51>(evals) += typename Accumulator::View(tmp);
397 }
398 { // UNENCRYPTED_LOG_COUNT_IMMUTABILITY
399 using Accumulator = typename std::tuple_element_t<52, ContainerOverSubrelations>;
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;
403 std::get<52>(evals) += typename Accumulator::View(tmp);
404 }
405 { // L2_TO_L1_MESSAGE_COUNT_IMMUTABILITY
406 using Accumulator = typename std::tuple_element_t<53, ContainerOverSubrelations>;
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;
410 std::get<53>(evals) += typename Accumulator::View(tmp);
411 }
412 { // NOTE_HASH_ROOT_PADDED_IMMUTABILITY
413 using Accumulator = typename std::tuple_element_t<54, ContainerOverSubrelations>;
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;
417 std::get<54>(evals) += typename Accumulator::View(tmp);
418 }
419 { // NOTE_HASH_SIZE_PADDED_IMMUTABILITY
420 using Accumulator = typename std::tuple_element_t<55, ContainerOverSubrelations>;
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;
424 std::get<55>(evals) += typename Accumulator::View(tmp);
425 }
426 { // NOTE_HASH_COUNT_PADDED_IMMUTABILITY
427 using Accumulator = typename std::tuple_element_t<56, ContainerOverSubrelations>;
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;
431 std::get<56>(evals) += typename Accumulator::View(tmp);
432 }
433 { // NULLIFIER_ROOT_PADDED_IMMUTABILITY
434 using Accumulator = typename std::tuple_element_t<57, ContainerOverSubrelations>;
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;
438 std::get<57>(evals) += typename Accumulator::View(tmp);
439 }
440 { // NULLIFIER_SIZE_PADDED_IMMUTABILITY
441 using Accumulator = typename std::tuple_element_t<58, ContainerOverSubrelations>;
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;
445 std::get<58>(evals) += typename Accumulator::View(tmp);
446 }
447 { // NULLIFIER_COUNT_PADDED_IMMUTABILITY
448 using Accumulator = typename std::tuple_element_t<59, ContainerOverSubrelations>;
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;
452 std::get<59>(evals) += typename Accumulator::View(tmp);
453 }
454 { // PUBLIC_DATA_ROOT_PADDED_IMMUTABILITY
455 using Accumulator = typename std::tuple_element_t<60, ContainerOverSubrelations>;
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;
459 std::get<60>(evals) += typename Accumulator::View(tmp);
460 }
461 { // PUBLIC_DATA_SIZE_PADDED_IMMUTABILITY
462 using Accumulator = typename std::tuple_element_t<61, ContainerOverSubrelations>;
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;
466 std::get<61>(evals) += typename Accumulator::View(tmp);
467 }
468 { // WRITTEN_PUBLIC_DATA_SLOTS_ROOT_PADDED_IMMUTABILITY
469 using Accumulator = typename std::tuple_element_t<62, ContainerOverSubrelations>;
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;
474 std::get<62>(evals) += typename Accumulator::View(tmp);
475 }
476 { // WRITTEN_PUBLIC_DATA_SLOTS_SIZE_PADDED_IMMUTABILITY
477 using Accumulator = typename std::tuple_element_t<63, ContainerOverSubrelations>;
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;
482 std::get<63>(evals) += typename Accumulator::View(tmp);
483 }
484 { // UNENCRYPTED_LOG_COUNT_PADDED_IMMUTABILITY
485 using Accumulator = typename std::tuple_element_t<64, ContainerOverSubrelations>;
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;
489 std::get<64>(evals) += typename Accumulator::View(tmp);
490 }
491 { // L2_TO_L1_MESSAGE_COUNT_PADDED_IMMUTABILITY
492 using Accumulator = typename std::tuple_element_t<65, ContainerOverSubrelations>;
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;
496 std::get<65>(evals) += typename Accumulator::View(tmp);
497 }
498 { // L2_GAS_USED_IMMUTABILITY
499 using Accumulator = typename std::tuple_element_t<66, ContainerOverSubrelations>;
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;
503 std::get<66>(evals) += typename Accumulator::View(tmp);
504 }
505 { // DA_GAS_USED_IMMUTABILITY
506 using Accumulator = typename std::tuple_element_t<67, ContainerOverSubrelations>;
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;
510 std::get<67>(evals) += typename Accumulator::View(tmp);
511 }
512 {
513 using Accumulator = typename std::tuple_element_t<68, ContainerOverSubrelations>;
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;
518 std::get<68>(evals) += typename Accumulator::View(tmp);
519 }
520 {
521 using Accumulator = typename std::tuple_element_t<69, ContainerOverSubrelations>;
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;
526 std::get<69>(evals) += typename Accumulator::View(tmp);
527 }
528 {
529 using Accumulator = typename std::tuple_element_t<70, ContainerOverSubrelations>;
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;
534 std::get<70>(evals) += typename Accumulator::View(tmp);
535 }
536 {
537 using Accumulator = typename std::tuple_element_t<71, ContainerOverSubrelations>;
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;
542 std::get<71>(evals) += typename Accumulator::View(tmp);
543 }
544 { // NEXT_CONTEXT_ID_INITIAL_VALUE
545 using Accumulator = typename std::tuple_element_t<72, ContainerOverSubrelations>;
546 auto tmp = in.get(C::tx_start_tx) * (FF(1) - in.get(C::tx_next_context_id));
547 tmp *= scaling_factor;
548 std::get<72>(evals) += typename Accumulator::View(tmp);
549 }
550 { // NEXT_CONTEXT_ID_CONTINUITY
551 using Accumulator = typename std::tuple_element_t<73, ContainerOverSubrelations>;
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;
555 std::get<73>(evals) += typename Accumulator::View(tmp);
556 }
557}
558
559} // namespace bb::avm2
static void accumulate(ContainerOverSubrelations &evals, const AllEntities &in, const RelationParameters< FF > &, const FF &scaling_factor)
ColumnAndShifts
Definition columns.hpp:35
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
#define PROFILE_THIS_NAME(name)
Definition op_count.hpp:16
Container for parameters used by the grand product (permutation, lookup) Honk relations.