Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_tx.hpp
Go to the documentation of this file.
1// AUTOGENERATED FILE
2#pragma once
3
4#include <cstddef>
5#include <string_view>
6#include <tuple>
7
8#include "../columns.hpp"
11
12namespace bb::avm2 {
13
15
17 static constexpr std::string_view NAME = "LOOKUP_TX_READ_PHASE_TABLE";
18 static constexpr std::string_view RELATION_NAME = "tx";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 19;
20 static constexpr Column SRC_SELECTOR = Column::tx_start_phase;
21 static constexpr Column DST_SELECTOR = Column::precomputed_sel_phase;
22 static constexpr Column COUNTS = Column::lookup_tx_read_phase_table_counts;
23 static constexpr Column INVERSES = Column::lookup_tx_read_phase_table_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
25 ColumnAndShifts::tx_phase_value,
26 ColumnAndShifts::tx_is_public_call_request,
27 ColumnAndShifts::tx_is_collect_fee,
28 ColumnAndShifts::tx_is_tree_padding,
29 ColumnAndShifts::tx_is_cleanup,
30 ColumnAndShifts::tx_is_revertible,
31 ColumnAndShifts::tx_read_pi_offset,
32 ColumnAndShifts::tx_read_pi_length_offset,
33 ColumnAndShifts::tx_sel_non_revertible_append_note_hash,
34 ColumnAndShifts::tx_sel_non_revertible_append_nullifier,
35 ColumnAndShifts::tx_sel_non_revertible_append_l2_l1_msg,
36 ColumnAndShifts::tx_sel_revertible_append_note_hash,
37 ColumnAndShifts::tx_sel_revertible_append_nullifier,
38 ColumnAndShifts::tx_sel_revertible_append_l2_l1_msg,
39 ColumnAndShifts::tx_sel_can_emit_note_hash,
40 ColumnAndShifts::tx_sel_can_emit_nullifier,
41 ColumnAndShifts::tx_sel_can_write_public_data,
42 ColumnAndShifts::tx_sel_can_emit_unencrypted_log,
43 ColumnAndShifts::tx_sel_can_emit_l2_l1_msg
44 };
45 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
46 ColumnAndShifts::precomputed_phase_value,
47 ColumnAndShifts::precomputed_is_public_call_request_phase,
48 ColumnAndShifts::precomputed_sel_collect_fee,
49 ColumnAndShifts::precomputed_sel_tree_padding,
50 ColumnAndShifts::precomputed_sel_cleanup,
51 ColumnAndShifts::precomputed_is_revertible,
52 ColumnAndShifts::precomputed_read_public_input_offset,
53 ColumnAndShifts::precomputed_read_public_input_length_offset,
54 ColumnAndShifts::precomputed_sel_non_revertible_append_note_hash,
55 ColumnAndShifts::precomputed_sel_non_revertible_append_nullifier,
56 ColumnAndShifts::precomputed_sel_non_revertible_append_l2_l1_msg,
57 ColumnAndShifts::precomputed_sel_revertible_append_note_hash,
58 ColumnAndShifts::precomputed_sel_revertible_append_nullifier,
59 ColumnAndShifts::precomputed_sel_revertible_append_l2_l1_msg,
60 ColumnAndShifts::precomputed_sel_can_emit_note_hash,
61 ColumnAndShifts::precomputed_sel_can_emit_nullifier,
62 ColumnAndShifts::precomputed_sel_can_write_public_data,
63 ColumnAndShifts::precomputed_sel_can_emit_unencrypted_log,
64 ColumnAndShifts::precomputed_sel_can_emit_l2_l1_msg
65 };
66};
67
69template <typename FF_>
71
73
75 static constexpr std::string_view NAME = "LOOKUP_TX_PHASE_JUMP_ON_REVERT";
76 static constexpr std::string_view RELATION_NAME = "tx";
77 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
78 static constexpr Column SRC_SELECTOR = Column::tx_reverted;
79 static constexpr Column DST_SELECTOR = Column::precomputed_sel_phase;
80 static constexpr Column COUNTS = Column::lookup_tx_phase_jump_on_revert_counts;
81 static constexpr Column INVERSES = Column::lookup_tx_phase_jump_on_revert_inv;
82 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
83 ColumnAndShifts::tx_phase_value, ColumnAndShifts::tx_phase_value_shift
84 };
85 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
86 ColumnAndShifts::precomputed_phase_value, ColumnAndShifts::precomputed_next_phase_on_revert
87 };
88};
89
91template <typename FF_>
93
95
97 static constexpr std::string_view NAME = "LOOKUP_TX_READ_PHASE_LENGTH";
98 static constexpr std::string_view RELATION_NAME = "tx";
99 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
100 static constexpr Column SRC_SELECTOR = Column::tx_sel_read_phase_length;
101 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
102 static constexpr Column COUNTS = Column::lookup_tx_read_phase_length_counts;
103 static constexpr Column INVERSES = Column::lookup_tx_read_phase_length_inv;
104 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
105 ColumnAndShifts::tx_read_pi_length_offset, ColumnAndShifts::tx_remaining_phase_counter
106 };
107 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
108 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
109 };
110};
111
113template <typename FF_>
115
117
119 static constexpr std::string_view NAME = "LOOKUP_TX_READ_PUBLIC_CALL_REQUEST_PHASE";
120 static constexpr std::string_view RELATION_NAME = "tx";
121 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
122 static constexpr Column SRC_SELECTOR = Column::tx_is_public_call_request;
123 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
124 static constexpr Column COUNTS = Column::lookup_tx_read_public_call_request_phase_counts;
125 static constexpr Column INVERSES = Column::lookup_tx_read_public_call_request_phase_inv;
126 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::tx_read_pi_offset,
127 ColumnAndShifts::tx_msg_sender,
128 ColumnAndShifts::tx_contract_addr,
129 ColumnAndShifts::tx_is_static,
130 ColumnAndShifts::tx_calldata_hash };
131 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
132 ColumnAndShifts::precomputed_clk,
133 ColumnAndShifts::public_inputs_cols_0_,
134 ColumnAndShifts::public_inputs_cols_1_,
135 ColumnAndShifts::public_inputs_cols_2_,
136 ColumnAndShifts::public_inputs_cols_3_
137 };
138};
139
142template <typename FF_>
145
147
149 static constexpr std::string_view NAME = "LOOKUP_TX_DISPATCH_EXEC_START";
150 static constexpr std::string_view RELATION_NAME = "tx";
151 static constexpr size_t LOOKUP_TUPLE_SIZE = 23;
152 static constexpr Column SRC_SELECTOR = Column::tx_should_process_call_request;
153 static constexpr Column DST_SELECTOR = Column::execution_enqueued_call_start;
154 static constexpr Column COUNTS = Column::lookup_tx_dispatch_exec_start_counts;
155 static constexpr Column INVERSES = Column::lookup_tx_dispatch_exec_start_inv;
156 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
157 ColumnAndShifts::tx_next_context_id,
158 ColumnAndShifts::tx_discard,
159 ColumnAndShifts::tx_msg_sender,
160 ColumnAndShifts::tx_contract_addr,
161 ColumnAndShifts::tx_fee,
162 ColumnAndShifts::tx_is_static,
163 ColumnAndShifts::tx_prev_note_hash_tree_root,
164 ColumnAndShifts::tx_prev_note_hash_tree_size,
165 ColumnAndShifts::tx_prev_num_note_hashes_emitted,
166 ColumnAndShifts::tx_prev_nullifier_tree_root,
167 ColumnAndShifts::tx_prev_nullifier_tree_size,
168 ColumnAndShifts::tx_prev_num_nullifiers_emitted,
169 ColumnAndShifts::tx_prev_public_data_tree_root,
170 ColumnAndShifts::tx_prev_public_data_tree_size,
171 ColumnAndShifts::tx_prev_written_public_data_slots_tree_root,
172 ColumnAndShifts::tx_prev_written_public_data_slots_tree_size,
173 ColumnAndShifts::tx_l1_l2_tree_root,
174 ColumnAndShifts::tx_prev_num_unencrypted_logs,
175 ColumnAndShifts::tx_prev_num_l2_to_l1_messages,
176 ColumnAndShifts::tx_prev_l2_gas_used_sent_to_enqueued_call,
177 ColumnAndShifts::tx_prev_da_gas_used_sent_to_enqueued_call,
178 ColumnAndShifts::tx_l2_gas_limit,
179 ColumnAndShifts::tx_da_gas_limit
180 };
181 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
182 ColumnAndShifts::execution_context_id,
183 ColumnAndShifts::execution_discard,
184 ColumnAndShifts::execution_msg_sender,
185 ColumnAndShifts::execution_contract_address,
186 ColumnAndShifts::execution_transaction_fee,
187 ColumnAndShifts::execution_is_static,
188 ColumnAndShifts::execution_prev_note_hash_tree_root,
189 ColumnAndShifts::execution_prev_note_hash_tree_size,
190 ColumnAndShifts::execution_prev_num_note_hashes_emitted,
191 ColumnAndShifts::execution_prev_nullifier_tree_root,
192 ColumnAndShifts::execution_prev_nullifier_tree_size,
193 ColumnAndShifts::execution_prev_num_nullifiers_emitted,
194 ColumnAndShifts::execution_prev_public_data_tree_root,
195 ColumnAndShifts::execution_prev_public_data_tree_size,
196 ColumnAndShifts::execution_prev_written_public_data_slots_tree_root,
197 ColumnAndShifts::execution_prev_written_public_data_slots_tree_size,
198 ColumnAndShifts::execution_l1_l2_tree_root,
199 ColumnAndShifts::execution_prev_num_unencrypted_logs,
200 ColumnAndShifts::execution_prev_num_l2_to_l1_messages,
201 ColumnAndShifts::execution_prev_l2_gas_used,
202 ColumnAndShifts::execution_prev_da_gas_used,
203 ColumnAndShifts::execution_l2_gas_limit,
204 ColumnAndShifts::execution_da_gas_limit
205 };
206};
207
209template <typename FF_>
211
213
215 static constexpr std::string_view NAME = "LOOKUP_TX_DISPATCH_EXEC_END";
216 static constexpr std::string_view RELATION_NAME = "tx";
217 static constexpr size_t LOOKUP_TUPLE_SIZE = 19;
218 static constexpr Column SRC_SELECTOR = Column::tx_should_process_call_request;
219 static constexpr Column DST_SELECTOR = Column::execution_enqueued_call_end;
220 static constexpr Column COUNTS = Column::lookup_tx_dispatch_exec_end_counts;
221 static constexpr Column INVERSES = Column::lookup_tx_dispatch_exec_end_inv;
222 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
223 ColumnAndShifts::tx_next_context_id,
224 ColumnAndShifts::tx_next_context_id_shift,
225 ColumnAndShifts::tx_reverted,
226 ColumnAndShifts::tx_discard,
227 ColumnAndShifts::tx_next_note_hash_tree_root,
228 ColumnAndShifts::tx_next_note_hash_tree_size,
229 ColumnAndShifts::tx_next_num_note_hashes_emitted,
230 ColumnAndShifts::tx_next_nullifier_tree_root,
231 ColumnAndShifts::tx_next_nullifier_tree_size,
232 ColumnAndShifts::tx_next_num_nullifiers_emitted,
233 ColumnAndShifts::tx_next_public_data_tree_root,
234 ColumnAndShifts::tx_next_public_data_tree_size,
235 ColumnAndShifts::tx_next_written_public_data_slots_tree_root,
236 ColumnAndShifts::tx_next_written_public_data_slots_tree_size,
237 ColumnAndShifts::tx_l1_l2_tree_root,
238 ColumnAndShifts::tx_next_num_unencrypted_logs,
239 ColumnAndShifts::tx_next_num_l2_to_l1_messages,
240 ColumnAndShifts::tx_next_l2_gas_used_sent_to_enqueued_call,
241 ColumnAndShifts::tx_next_da_gas_used_sent_to_enqueued_call
242 };
243 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
244 ColumnAndShifts::execution_context_id,
245 ColumnAndShifts::execution_next_context_id,
246 ColumnAndShifts::execution_sel_failure,
247 ColumnAndShifts::execution_discard,
248 ColumnAndShifts::execution_note_hash_tree_root,
249 ColumnAndShifts::execution_note_hash_tree_size,
250 ColumnAndShifts::execution_num_note_hashes_emitted,
251 ColumnAndShifts::execution_nullifier_tree_root,
252 ColumnAndShifts::execution_nullifier_tree_size,
253 ColumnAndShifts::execution_num_nullifiers_emitted,
254 ColumnAndShifts::execution_public_data_tree_root,
255 ColumnAndShifts::execution_public_data_tree_size,
256 ColumnAndShifts::execution_written_public_data_slots_tree_root,
257 ColumnAndShifts::execution_written_public_data_slots_tree_size,
258 ColumnAndShifts::execution_l1_l2_tree_root,
259 ColumnAndShifts::execution_num_unencrypted_logs,
260 ColumnAndShifts::execution_num_l2_to_l1_messages,
261 ColumnAndShifts::execution_l2_gas_used,
262 ColumnAndShifts::execution_da_gas_used
263 };
264};
265
267template <typename FF_>
269
271
273 static constexpr std::string_view NAME = "LOOKUP_TX_READ_TREE_INSERT_VALUE";
274 static constexpr std::string_view RELATION_NAME = "tx";
275 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
276 static constexpr Column SRC_SELECTOR = Column::tx_is_tree_insert_phase;
277 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
278 static constexpr Column COUNTS = Column::lookup_tx_read_tree_insert_value_counts;
279 static constexpr Column INVERSES = Column::lookup_tx_read_tree_insert_value_inv;
280 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::tx_read_pi_offset,
281 ColumnAndShifts::tx_leaf_value };
282 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
283 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
284 };
285};
286
288template <typename FF_>
290
292
294 static constexpr std::string_view NAME = "LOOKUP_TX_NOTE_HASH_APPEND";
295 static constexpr std::string_view RELATION_NAME = "tx";
296 static constexpr size_t LOOKUP_TUPLE_SIZE = 8;
297 static constexpr Column SRC_SELECTOR = Column::tx_should_note_hash_append;
298 static constexpr Column DST_SELECTOR = Column::note_hash_tree_check_write;
299 static constexpr Column COUNTS = Column::lookup_tx_note_hash_append_counts;
300 static constexpr Column INVERSES = Column::lookup_tx_note_hash_append_inv;
301 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
302 ColumnAndShifts::tx_leaf_value,
303 ColumnAndShifts::tx_prev_note_hash_tree_size,
304 ColumnAndShifts::tx_prev_note_hash_tree_root,
305 ColumnAndShifts::precomputed_zero,
306 ColumnAndShifts::tx_sel_revertible_append_note_hash,
307 ColumnAndShifts::tx_prev_num_note_hashes_emitted,
308 ColumnAndShifts::tx_discard,
309 ColumnAndShifts::tx_next_note_hash_tree_root
310 };
311 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
312 ColumnAndShifts::note_hash_tree_check_note_hash, ColumnAndShifts::note_hash_tree_check_leaf_index,
313 ColumnAndShifts::note_hash_tree_check_prev_root, ColumnAndShifts::note_hash_tree_check_should_silo,
314 ColumnAndShifts::note_hash_tree_check_should_unique, ColumnAndShifts::note_hash_tree_check_note_hash_index,
315 ColumnAndShifts::note_hash_tree_check_discard, ColumnAndShifts::note_hash_tree_check_next_root
316 };
317};
318
320template <typename FF_>
322
324
326 static constexpr std::string_view NAME = "LOOKUP_TX_NULLIFIER_APPEND";
327 static constexpr std::string_view RELATION_NAME = "tx";
328 static constexpr size_t LOOKUP_TUPLE_SIZE = 8;
329 static constexpr Column SRC_SELECTOR = Column::tx_should_nullifier_append;
330 static constexpr Column DST_SELECTOR = Column::nullifier_check_write;
331 static constexpr Column COUNTS = Column::lookup_tx_nullifier_append_counts;
332 static constexpr Column INVERSES = Column::lookup_tx_nullifier_append_inv;
333 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
334 ColumnAndShifts::tx_reverted,
335 ColumnAndShifts::tx_leaf_value,
336 ColumnAndShifts::tx_prev_nullifier_tree_root,
337 ColumnAndShifts::tx_next_nullifier_tree_root,
338 ColumnAndShifts::tx_prev_nullifier_tree_size,
339 ColumnAndShifts::tx_discard,
340 ColumnAndShifts::tx_prev_num_nullifiers_emitted,
341 ColumnAndShifts::precomputed_zero
342 };
343 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
344 ColumnAndShifts::nullifier_check_exists,
345 ColumnAndShifts::nullifier_check_nullifier,
346 ColumnAndShifts::nullifier_check_root,
347 ColumnAndShifts::nullifier_check_write_root,
348 ColumnAndShifts::nullifier_check_tree_size_before_write,
349 ColumnAndShifts::nullifier_check_discard,
350 ColumnAndShifts::nullifier_check_nullifier_index,
351 ColumnAndShifts::nullifier_check_should_silo
352 };
353};
354
356template <typename FF_>
358
360
362 static constexpr std::string_view NAME = "LOOKUP_TX_READ_L2_L1_MSG";
363 static constexpr std::string_view RELATION_NAME = "tx";
364 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
365 static constexpr Column SRC_SELECTOR = Column::tx_should_try_l2_l1_msg_append;
366 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
367 static constexpr Column COUNTS = Column::lookup_tx_read_l2_l1_msg_counts;
368 static constexpr Column INVERSES = Column::lookup_tx_read_l2_l1_msg_inv;
369 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
370 ColumnAndShifts::tx_read_pi_offset,
371 ColumnAndShifts::tx_l2_l1_msg_recipient,
372 ColumnAndShifts::tx_l2_l1_msg_content,
373 ColumnAndShifts::tx_l2_l1_msg_contract_address
374 };
375 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
376 ColumnAndShifts::precomputed_clk,
377 ColumnAndShifts::public_inputs_cols_0_,
378 ColumnAndShifts::public_inputs_cols_1_,
379 ColumnAndShifts::public_inputs_cols_2_
380 };
381};
382
384template <typename FF_>
386
388
390 static constexpr std::string_view NAME = "LOOKUP_TX_WRITE_L2_L1_MSG";
391 static constexpr std::string_view RELATION_NAME = "tx";
392 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
393 static constexpr Column SRC_SELECTOR = Column::tx_should_l2_l1_msg_append;
394 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
395 static constexpr Column COUNTS = Column::lookup_tx_write_l2_l1_msg_counts;
396 static constexpr Column INVERSES = Column::lookup_tx_write_l2_l1_msg_inv;
397 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
398 ColumnAndShifts::tx_write_pi_offset,
399 ColumnAndShifts::tx_l2_l1_msg_recipient,
400 ColumnAndShifts::tx_l2_l1_msg_content,
401 ColumnAndShifts::tx_l2_l1_msg_contract_address
402 };
403 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
404 ColumnAndShifts::precomputed_clk,
405 ColumnAndShifts::public_inputs_cols_0_,
406 ColumnAndShifts::public_inputs_cols_1_,
407 ColumnAndShifts::public_inputs_cols_2_
408 };
409};
410
412template <typename FF_>
414
416
418 static constexpr std::string_view NAME = "LOOKUP_TX_READ_EFFECTIVE_FEE_PUBLIC_INPUTS";
419 static constexpr std::string_view RELATION_NAME = "tx";
420 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
421 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
422 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
423 static constexpr Column COUNTS = Column::lookup_tx_read_effective_fee_public_inputs_counts;
424 static constexpr Column INVERSES = Column::lookup_tx_read_effective_fee_public_inputs_inv;
425 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
426 ColumnAndShifts::tx_read_pi_offset,
427 ColumnAndShifts::tx_effective_fee_per_da_gas,
428 ColumnAndShifts::tx_effective_fee_per_l2_gas
429 };
430 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
431 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_, ColumnAndShifts::public_inputs_cols_1_
432 };
433};
434
437template <typename FF_>
440
442
444 static constexpr std::string_view NAME = "LOOKUP_TX_READ_FEE_PAYER_PUBLIC_INPUTS";
445 static constexpr std::string_view RELATION_NAME = "tx";
446 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
447 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
448 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
449 static constexpr Column COUNTS = Column::lookup_tx_read_fee_payer_public_inputs_counts;
450 static constexpr Column INVERSES = Column::lookup_tx_read_fee_payer_public_inputs_inv;
451 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
452 ColumnAndShifts::tx_fee_payer_pi_offset, ColumnAndShifts::tx_fee_payer
453 };
454 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
455 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
456 };
457};
458
461template <typename FF_>
464
466
468 static constexpr std::string_view NAME = "LOOKUP_TX_BALANCE_SLOT_POSEIDON2";
469 static constexpr std::string_view RELATION_NAME = "tx";
470 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
471 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
472 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_end;
473 static constexpr Column COUNTS = Column::lookup_tx_balance_slot_poseidon2_counts;
474 static constexpr Column INVERSES = Column::lookup_tx_balance_slot_poseidon2_inv;
475 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
476 ColumnAndShifts::tx_is_collect_fee,
477 ColumnAndShifts::tx_fee_juice_balances_slot,
478 ColumnAndShifts::tx_fee_payer,
479 ColumnAndShifts::precomputed_zero,
480 ColumnAndShifts::tx_fee_juice_balance_slot
481 };
482 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
483 ColumnAndShifts::poseidon2_hash_start,
484 ColumnAndShifts::poseidon2_hash_input_0,
485 ColumnAndShifts::poseidon2_hash_input_1,
486 ColumnAndShifts::poseidon2_hash_input_2,
487 ColumnAndShifts::poseidon2_hash_output
488 };
489};
490
492template <typename FF_>
494
496
498 static constexpr std::string_view NAME = "LOOKUP_TX_BALANCE_READ";
499 static constexpr std::string_view RELATION_NAME = "tx";
500 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
501 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
502 static constexpr Column DST_SELECTOR = Column::public_data_check_sel;
503 static constexpr Column COUNTS = Column::lookup_tx_balance_read_counts;
504 static constexpr Column INVERSES = Column::lookup_tx_balance_read_inv;
505 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
506 ColumnAndShifts::tx_fee_payer_balance,
507 ColumnAndShifts::tx_fee_juice_contract_address,
508 ColumnAndShifts::tx_fee_juice_balance_slot,
509 ColumnAndShifts::tx_prev_public_data_tree_root
510 };
511 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
512 ColumnAndShifts::public_data_check_value,
513 ColumnAndShifts::public_data_check_address,
514 ColumnAndShifts::public_data_check_slot,
515 ColumnAndShifts::public_data_check_root
516 };
517};
518
520template <typename FF_>
522
524
526 static constexpr std::string_view NAME = "LOOKUP_TX_BALANCE_VALIDATION";
527 static constexpr std::string_view RELATION_NAME = "tx";
528 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
529 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
530 static constexpr Column DST_SELECTOR = Column::ff_gt_sel_gt;
531 static constexpr Column COUNTS = Column::lookup_tx_balance_validation_counts;
532 static constexpr Column INVERSES = Column::lookup_tx_balance_validation_inv;
533 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
534 ColumnAndShifts::tx_fee, ColumnAndShifts::tx_fee_payer_balance, ColumnAndShifts::precomputed_zero
535 };
536 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
537 ColumnAndShifts::ff_gt_b,
538 ColumnAndShifts::ff_gt_result };
539};
540
542template <typename FF_>
544
546
548 static constexpr std::string_view NAME = "LOOKUP_TX_BALANCE_UPDATE";
549 static constexpr std::string_view RELATION_NAME = "tx";
550 static constexpr size_t LOOKUP_TUPLE_SIZE = 8;
551 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
552 static constexpr Column DST_SELECTOR = Column::public_data_check_write;
553 static constexpr Column COUNTS = Column::lookup_tx_balance_update_counts;
554 static constexpr Column INVERSES = Column::lookup_tx_balance_update_inv;
555 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
556 ColumnAndShifts::tx_fee_payer_new_balance, ColumnAndShifts::tx_fee_juice_contract_address,
557 ColumnAndShifts::tx_fee_juice_balance_slot, ColumnAndShifts::tx_prev_public_data_tree_root,
558 ColumnAndShifts::tx_next_public_data_tree_root, ColumnAndShifts::tx_prev_public_data_tree_size,
559 ColumnAndShifts::tx_next_public_data_tree_size, ColumnAndShifts::tx_uint32_max
560 };
561 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
562 ColumnAndShifts::public_data_check_value,
563 ColumnAndShifts::public_data_check_address,
564 ColumnAndShifts::public_data_check_slot,
565 ColumnAndShifts::public_data_check_root,
566 ColumnAndShifts::public_data_check_write_root,
567 ColumnAndShifts::public_data_check_tree_size_before_write,
568 ColumnAndShifts::public_data_check_tree_size_after_write,
569 ColumnAndShifts::public_data_check_clk
570 };
571};
572
574template <typename FF_>
576
578
580 static constexpr std::string_view NAME = "LOOKUP_TX_WRITE_FEE_PUBLIC_INPUTS";
581 static constexpr std::string_view RELATION_NAME = "tx";
582 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
583 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
584 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
585 static constexpr Column COUNTS = Column::lookup_tx_write_fee_public_inputs_counts;
586 static constexpr Column INVERSES = Column::lookup_tx_write_fee_public_inputs_inv;
587 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::tx_write_pi_offset,
588 ColumnAndShifts::tx_fee };
589 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
590 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
591 };
592};
593
595template <typename FF_>
598
599} // namespace bb::avm2
This file contains the template for the generic lookup that can be specialized to enforce various loo...
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME