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_CALLDATA_HASH";
120 static constexpr std::string_view RELATION_NAME = "tx";
121 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
122 static constexpr Column SRC_SELECTOR = Column::tx_should_process_call_request;
123 static constexpr Column DST_SELECTOR = Column::calldata_hashing_latch;
124 static constexpr Column COUNTS = Column::lookup_tx_read_calldata_hash_counts;
125 static constexpr Column INVERSES = Column::lookup_tx_read_calldata_hash_inv;
126 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
127 ColumnAndShifts::tx_calldata_hash, ColumnAndShifts::tx_calldata_size, ColumnAndShifts::tx_next_context_id
128 };
129 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
130 ColumnAndShifts::calldata_hashing_output_hash,
131 ColumnAndShifts::calldata_hashing_calldata_size,
132 ColumnAndShifts::calldata_hashing_context_id
133 };
134};
135
137template <typename FF_>
139
141
143 static constexpr std::string_view NAME = "LOOKUP_TX_READ_PUBLIC_CALL_REQUEST_PHASE";
144 static constexpr std::string_view RELATION_NAME = "tx";
145 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
146 static constexpr Column SRC_SELECTOR = Column::tx_is_public_call_request;
147 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
148 static constexpr Column COUNTS = Column::lookup_tx_read_public_call_request_phase_counts;
149 static constexpr Column INVERSES = Column::lookup_tx_read_public_call_request_phase_inv;
150 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::tx_read_pi_offset,
151 ColumnAndShifts::tx_msg_sender,
152 ColumnAndShifts::tx_contract_addr,
153 ColumnAndShifts::tx_is_static,
154 ColumnAndShifts::tx_calldata_hash };
155 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
156 ColumnAndShifts::precomputed_clk,
157 ColumnAndShifts::public_inputs_cols_0_,
158 ColumnAndShifts::public_inputs_cols_1_,
159 ColumnAndShifts::public_inputs_cols_2_,
160 ColumnAndShifts::public_inputs_cols_3_
161 };
162};
163
166template <typename FF_>
169
171
173 static constexpr std::string_view NAME = "LOOKUP_TX_DISPATCH_EXEC_START";
174 static constexpr std::string_view RELATION_NAME = "tx";
175 static constexpr size_t LOOKUP_TUPLE_SIZE = 26;
176 static constexpr Column SRC_SELECTOR = Column::tx_should_process_call_request;
177 static constexpr Column DST_SELECTOR = Column::execution_enqueued_call_start;
178 static constexpr Column COUNTS = Column::lookup_tx_dispatch_exec_start_counts;
179 static constexpr Column INVERSES = Column::lookup_tx_dispatch_exec_start_inv;
180 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
181 ColumnAndShifts::tx_next_context_id,
182 ColumnAndShifts::tx_discard,
183 ColumnAndShifts::tx_msg_sender,
184 ColumnAndShifts::tx_contract_addr,
185 ColumnAndShifts::tx_fee,
186 ColumnAndShifts::tx_is_static,
187 ColumnAndShifts::tx_calldata_size,
188 ColumnAndShifts::tx_prev_note_hash_tree_root,
189 ColumnAndShifts::tx_prev_note_hash_tree_size,
190 ColumnAndShifts::tx_prev_num_note_hashes_emitted,
191 ColumnAndShifts::tx_prev_nullifier_tree_root,
192 ColumnAndShifts::tx_prev_nullifier_tree_size,
193 ColumnAndShifts::tx_prev_num_nullifiers_emitted,
194 ColumnAndShifts::tx_prev_public_data_tree_root,
195 ColumnAndShifts::tx_prev_public_data_tree_size,
196 ColumnAndShifts::tx_prev_written_public_data_slots_tree_root,
197 ColumnAndShifts::tx_prev_written_public_data_slots_tree_size,
198 ColumnAndShifts::tx_l1_l2_tree_root,
199 ColumnAndShifts::tx_prev_retrieved_bytecodes_tree_root,
200 ColumnAndShifts::tx_prev_retrieved_bytecodes_tree_size,
201 ColumnAndShifts::tx_prev_num_unencrypted_log_fields,
202 ColumnAndShifts::tx_prev_num_l2_to_l1_messages,
203 ColumnAndShifts::tx_prev_l2_gas_used_sent_to_enqueued_call,
204 ColumnAndShifts::tx_prev_da_gas_used_sent_to_enqueued_call,
205 ColumnAndShifts::tx_l2_gas_limit,
206 ColumnAndShifts::tx_da_gas_limit
207 };
208 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
209 ColumnAndShifts::execution_context_id,
210 ColumnAndShifts::execution_discard,
211 ColumnAndShifts::execution_msg_sender,
212 ColumnAndShifts::execution_contract_address,
213 ColumnAndShifts::execution_transaction_fee,
214 ColumnAndShifts::execution_is_static,
215 ColumnAndShifts::execution_parent_calldata_size,
216 ColumnAndShifts::execution_prev_note_hash_tree_root,
217 ColumnAndShifts::execution_prev_note_hash_tree_size,
218 ColumnAndShifts::execution_prev_num_note_hashes_emitted,
219 ColumnAndShifts::execution_prev_nullifier_tree_root,
220 ColumnAndShifts::execution_prev_nullifier_tree_size,
221 ColumnAndShifts::execution_prev_num_nullifiers_emitted,
222 ColumnAndShifts::execution_prev_public_data_tree_root,
223 ColumnAndShifts::execution_prev_public_data_tree_size,
224 ColumnAndShifts::execution_prev_written_public_data_slots_tree_root,
225 ColumnAndShifts::execution_prev_written_public_data_slots_tree_size,
226 ColumnAndShifts::execution_l1_l2_tree_root,
227 ColumnAndShifts::execution_prev_retrieved_bytecodes_tree_root,
228 ColumnAndShifts::execution_prev_retrieved_bytecodes_tree_size,
229 ColumnAndShifts::execution_prev_num_unencrypted_log_fields,
230 ColumnAndShifts::execution_prev_num_l2_to_l1_messages,
231 ColumnAndShifts::execution_prev_l2_gas_used,
232 ColumnAndShifts::execution_prev_da_gas_used,
233 ColumnAndShifts::execution_l2_gas_limit,
234 ColumnAndShifts::execution_da_gas_limit
235 };
236};
237
239template <typename FF_>
241
243
245 static constexpr std::string_view NAME = "LOOKUP_TX_DISPATCH_EXEC_END";
246 static constexpr std::string_view RELATION_NAME = "tx";
247 static constexpr size_t LOOKUP_TUPLE_SIZE = 21;
248 static constexpr Column SRC_SELECTOR = Column::tx_should_process_call_request;
249 static constexpr Column DST_SELECTOR = Column::execution_enqueued_call_end;
250 static constexpr Column COUNTS = Column::lookup_tx_dispatch_exec_end_counts;
251 static constexpr Column INVERSES = Column::lookup_tx_dispatch_exec_end_inv;
252 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
253 ColumnAndShifts::tx_next_context_id,
254 ColumnAndShifts::tx_next_context_id_shift,
255 ColumnAndShifts::tx_reverted,
256 ColumnAndShifts::tx_discard,
257 ColumnAndShifts::tx_next_note_hash_tree_root,
258 ColumnAndShifts::tx_next_note_hash_tree_size,
259 ColumnAndShifts::tx_next_num_note_hashes_emitted,
260 ColumnAndShifts::tx_next_nullifier_tree_root,
261 ColumnAndShifts::tx_next_nullifier_tree_size,
262 ColumnAndShifts::tx_next_num_nullifiers_emitted,
263 ColumnAndShifts::tx_next_public_data_tree_root,
264 ColumnAndShifts::tx_next_public_data_tree_size,
265 ColumnAndShifts::tx_next_written_public_data_slots_tree_root,
266 ColumnAndShifts::tx_next_written_public_data_slots_tree_size,
267 ColumnAndShifts::tx_l1_l2_tree_root,
268 ColumnAndShifts::tx_next_retrieved_bytecodes_tree_root,
269 ColumnAndShifts::tx_next_retrieved_bytecodes_tree_size,
270 ColumnAndShifts::tx_next_num_unencrypted_log_fields,
271 ColumnAndShifts::tx_next_num_l2_to_l1_messages,
272 ColumnAndShifts::tx_next_l2_gas_used_sent_to_enqueued_call,
273 ColumnAndShifts::tx_next_da_gas_used_sent_to_enqueued_call
274 };
275 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
276 ColumnAndShifts::execution_context_id,
277 ColumnAndShifts::execution_next_context_id,
278 ColumnAndShifts::execution_sel_failure,
279 ColumnAndShifts::execution_discard,
280 ColumnAndShifts::execution_note_hash_tree_root,
281 ColumnAndShifts::execution_note_hash_tree_size,
282 ColumnAndShifts::execution_num_note_hashes_emitted,
283 ColumnAndShifts::execution_nullifier_tree_root,
284 ColumnAndShifts::execution_nullifier_tree_size,
285 ColumnAndShifts::execution_num_nullifiers_emitted,
286 ColumnAndShifts::execution_public_data_tree_root,
287 ColumnAndShifts::execution_public_data_tree_size,
288 ColumnAndShifts::execution_written_public_data_slots_tree_root,
289 ColumnAndShifts::execution_written_public_data_slots_tree_size,
290 ColumnAndShifts::execution_l1_l2_tree_root,
291 ColumnAndShifts::execution_retrieved_bytecodes_tree_root,
292 ColumnAndShifts::execution_retrieved_bytecodes_tree_size,
293 ColumnAndShifts::execution_num_unencrypted_log_fields,
294 ColumnAndShifts::execution_num_l2_to_l1_messages,
295 ColumnAndShifts::execution_l2_gas_used,
296 ColumnAndShifts::execution_da_gas_used
297 };
298};
299
301template <typename FF_>
303
305
307 static constexpr std::string_view NAME = "LOOKUP_TX_READ_TREE_INSERT_VALUE";
308 static constexpr std::string_view RELATION_NAME = "tx";
309 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
310 static constexpr Column SRC_SELECTOR = Column::tx_is_tree_insert_phase;
311 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
312 static constexpr Column COUNTS = Column::lookup_tx_read_tree_insert_value_counts;
313 static constexpr Column INVERSES = Column::lookup_tx_read_tree_insert_value_inv;
314 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::tx_read_pi_offset,
315 ColumnAndShifts::tx_leaf_value };
316 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
317 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
318 };
319};
320
322template <typename FF_>
324
326
328 static constexpr std::string_view NAME = "LOOKUP_TX_NOTE_HASH_APPEND";
329 static constexpr std::string_view RELATION_NAME = "tx";
330 static constexpr size_t LOOKUP_TUPLE_SIZE = 8;
331 static constexpr Column SRC_SELECTOR = Column::tx_should_note_hash_append;
332 static constexpr Column DST_SELECTOR = Column::note_hash_tree_check_write;
333 static constexpr Column COUNTS = Column::lookup_tx_note_hash_append_counts;
334 static constexpr Column INVERSES = Column::lookup_tx_note_hash_append_inv;
335 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
336 ColumnAndShifts::tx_leaf_value,
337 ColumnAndShifts::tx_prev_note_hash_tree_size,
338 ColumnAndShifts::tx_prev_note_hash_tree_root,
339 ColumnAndShifts::precomputed_zero,
340 ColumnAndShifts::tx_sel_revertible_append_note_hash,
341 ColumnAndShifts::tx_prev_num_note_hashes_emitted,
342 ColumnAndShifts::tx_discard,
343 ColumnAndShifts::tx_next_note_hash_tree_root
344 };
345 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
346 ColumnAndShifts::note_hash_tree_check_note_hash, ColumnAndShifts::note_hash_tree_check_leaf_index,
347 ColumnAndShifts::note_hash_tree_check_prev_root, ColumnAndShifts::note_hash_tree_check_should_silo,
348 ColumnAndShifts::note_hash_tree_check_should_unique, ColumnAndShifts::note_hash_tree_check_note_hash_index,
349 ColumnAndShifts::note_hash_tree_check_discard, ColumnAndShifts::note_hash_tree_check_next_root
350 };
351};
352
354template <typename FF_>
356
358
360 static constexpr std::string_view NAME = "LOOKUP_TX_NULLIFIER_APPEND";
361 static constexpr std::string_view RELATION_NAME = "tx";
362 static constexpr size_t LOOKUP_TUPLE_SIZE = 8;
363 static constexpr Column SRC_SELECTOR = Column::tx_should_nullifier_append;
364 static constexpr Column DST_SELECTOR = Column::nullifier_check_write;
365 static constexpr Column COUNTS = Column::lookup_tx_nullifier_append_counts;
366 static constexpr Column INVERSES = Column::lookup_tx_nullifier_append_inv;
367 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
368 ColumnAndShifts::tx_reverted,
369 ColumnAndShifts::tx_leaf_value,
370 ColumnAndShifts::tx_prev_nullifier_tree_root,
371 ColumnAndShifts::tx_next_nullifier_tree_root,
372 ColumnAndShifts::tx_prev_nullifier_tree_size,
373 ColumnAndShifts::tx_discard,
374 ColumnAndShifts::tx_prev_num_nullifiers_emitted,
375 ColumnAndShifts::precomputed_zero
376 };
377 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
378 ColumnAndShifts::nullifier_check_exists,
379 ColumnAndShifts::nullifier_check_nullifier,
380 ColumnAndShifts::nullifier_check_root,
381 ColumnAndShifts::nullifier_check_write_root,
382 ColumnAndShifts::nullifier_check_tree_size_before_write,
383 ColumnAndShifts::nullifier_check_discard,
384 ColumnAndShifts::nullifier_check_nullifier_index,
385 ColumnAndShifts::nullifier_check_should_silo
386 };
387};
388
390template <typename FF_>
392
394
396 static constexpr std::string_view NAME = "LOOKUP_TX_READ_L2_L1_MSG";
397 static constexpr std::string_view RELATION_NAME = "tx";
398 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
399 static constexpr Column SRC_SELECTOR = Column::tx_should_try_l2_l1_msg_append;
400 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
401 static constexpr Column COUNTS = Column::lookup_tx_read_l2_l1_msg_counts;
402 static constexpr Column INVERSES = Column::lookup_tx_read_l2_l1_msg_inv;
403 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
404 ColumnAndShifts::tx_read_pi_offset,
405 ColumnAndShifts::tx_l2_l1_msg_recipient,
406 ColumnAndShifts::tx_l2_l1_msg_content,
407 ColumnAndShifts::tx_l2_l1_msg_contract_address
408 };
409 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
410 ColumnAndShifts::precomputed_clk,
411 ColumnAndShifts::public_inputs_cols_0_,
412 ColumnAndShifts::public_inputs_cols_1_,
413 ColumnAndShifts::public_inputs_cols_2_
414 };
415};
416
418template <typename FF_>
420
422
424 static constexpr std::string_view NAME = "LOOKUP_TX_WRITE_L2_L1_MSG";
425 static constexpr std::string_view RELATION_NAME = "tx";
426 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
427 static constexpr Column SRC_SELECTOR = Column::tx_should_l2_l1_msg_append;
428 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
429 static constexpr Column COUNTS = Column::lookup_tx_write_l2_l1_msg_counts;
430 static constexpr Column INVERSES = Column::lookup_tx_write_l2_l1_msg_inv;
431 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
432 ColumnAndShifts::tx_write_pi_offset,
433 ColumnAndShifts::tx_l2_l1_msg_recipient,
434 ColumnAndShifts::tx_l2_l1_msg_content,
435 ColumnAndShifts::tx_l2_l1_msg_contract_address
436 };
437 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
438 ColumnAndShifts::precomputed_clk,
439 ColumnAndShifts::public_inputs_cols_0_,
440 ColumnAndShifts::public_inputs_cols_1_,
441 ColumnAndShifts::public_inputs_cols_2_
442 };
443};
444
446template <typename FF_>
448
450
452 static constexpr std::string_view NAME = "LOOKUP_TX_READ_EFFECTIVE_FEE_PUBLIC_INPUTS";
453 static constexpr std::string_view RELATION_NAME = "tx";
454 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
455 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
456 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
457 static constexpr Column COUNTS = Column::lookup_tx_read_effective_fee_public_inputs_counts;
458 static constexpr Column INVERSES = Column::lookup_tx_read_effective_fee_public_inputs_inv;
459 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
460 ColumnAndShifts::tx_read_pi_offset,
461 ColumnAndShifts::tx_effective_fee_per_da_gas,
462 ColumnAndShifts::tx_effective_fee_per_l2_gas
463 };
464 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
465 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_, ColumnAndShifts::public_inputs_cols_1_
466 };
467};
468
471template <typename FF_>
474
476
478 static constexpr std::string_view NAME = "LOOKUP_TX_READ_FEE_PAYER_PUBLIC_INPUTS";
479 static constexpr std::string_view RELATION_NAME = "tx";
480 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
481 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
482 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
483 static constexpr Column COUNTS = Column::lookup_tx_read_fee_payer_public_inputs_counts;
484 static constexpr Column INVERSES = Column::lookup_tx_read_fee_payer_public_inputs_inv;
485 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
486 ColumnAndShifts::tx_fee_payer_pi_offset, ColumnAndShifts::tx_fee_payer
487 };
488 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
489 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
490 };
491};
492
495template <typename FF_>
498
500
502 static constexpr std::string_view NAME = "LOOKUP_TX_BALANCE_SLOT_POSEIDON2";
503 static constexpr std::string_view RELATION_NAME = "tx";
504 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
505 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
506 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_end;
507 static constexpr Column COUNTS = Column::lookup_tx_balance_slot_poseidon2_counts;
508 static constexpr Column INVERSES = Column::lookup_tx_balance_slot_poseidon2_inv;
509 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
510 ColumnAndShifts::tx_is_collect_fee,
511 ColumnAndShifts::tx_fee_juice_balances_slot,
512 ColumnAndShifts::tx_fee_payer,
513 ColumnAndShifts::precomputed_zero,
514 ColumnAndShifts::tx_fee_juice_balance_slot
515 };
516 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
517 ColumnAndShifts::poseidon2_hash_start,
518 ColumnAndShifts::poseidon2_hash_input_0,
519 ColumnAndShifts::poseidon2_hash_input_1,
520 ColumnAndShifts::poseidon2_hash_input_2,
521 ColumnAndShifts::poseidon2_hash_output
522 };
523};
524
526template <typename FF_>
528
530
532 static constexpr std::string_view NAME = "LOOKUP_TX_BALANCE_READ";
533 static constexpr std::string_view RELATION_NAME = "tx";
534 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
535 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
536 static constexpr Column DST_SELECTOR = Column::public_data_check_sel;
537 static constexpr Column COUNTS = Column::lookup_tx_balance_read_counts;
538 static constexpr Column INVERSES = Column::lookup_tx_balance_read_inv;
539 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
540 ColumnAndShifts::tx_fee_payer_balance,
541 ColumnAndShifts::tx_fee_juice_contract_address,
542 ColumnAndShifts::tx_fee_juice_balance_slot,
543 ColumnAndShifts::tx_prev_public_data_tree_root
544 };
545 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
546 ColumnAndShifts::public_data_check_value,
547 ColumnAndShifts::public_data_check_address,
548 ColumnAndShifts::public_data_check_slot,
549 ColumnAndShifts::public_data_check_root
550 };
551};
552
554template <typename FF_>
556
558
560 static constexpr std::string_view NAME = "LOOKUP_TX_BALANCE_VALIDATION";
561 static constexpr std::string_view RELATION_NAME = "tx";
562 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
563 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
564 static constexpr Column DST_SELECTOR = Column::ff_gt_sel_gt;
565 static constexpr Column COUNTS = Column::lookup_tx_balance_validation_counts;
566 static constexpr Column INVERSES = Column::lookup_tx_balance_validation_inv;
567 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
568 ColumnAndShifts::tx_fee, ColumnAndShifts::tx_fee_payer_balance, ColumnAndShifts::precomputed_zero
569 };
570 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
571 ColumnAndShifts::ff_gt_b,
572 ColumnAndShifts::ff_gt_result };
573};
574
576template <typename FF_>
578
580
582 static constexpr std::string_view NAME = "LOOKUP_TX_WRITE_FEE_PUBLIC_INPUTS";
583 static constexpr std::string_view RELATION_NAME = "tx";
584 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
585 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
586 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
587 static constexpr Column COUNTS = Column::lookup_tx_write_fee_public_inputs_counts;
588 static constexpr Column INVERSES = Column::lookup_tx_write_fee_public_inputs_inv;
589 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::tx_write_pi_offset,
590 ColumnAndShifts::tx_fee };
591 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
592 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
593 };
594};
595
597template <typename FF_>
600
601} // 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::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::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::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 > 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