8#include "../columns.hpp"
17 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_PHASE_SPEC";
22 static constexpr Column COUNTS = Column::lookup_tx_read_phase_spec_counts;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
25 ColumnAndShifts::tx_phase_value, ColumnAndShifts::tx_is_public_call_request,
26 ColumnAndShifts::tx_is_teardown, ColumnAndShifts::tx_is_collect_fee,
27 ColumnAndShifts::tx_is_tree_padding, ColumnAndShifts::tx_is_cleanup,
28 ColumnAndShifts::tx_is_revertible, ColumnAndShifts::tx_read_pi_start_offset,
29 ColumnAndShifts::tx_read_pi_length_offset, ColumnAndShifts::tx_sel_append_note_hash,
30 ColumnAndShifts::tx_sel_append_nullifier, ColumnAndShifts::tx_sel_append_l2_l1_msg,
31 ColumnAndShifts::tx_next_phase_on_revert
33 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
34 ColumnAndShifts::precomputed_idx,
35 ColumnAndShifts::precomputed_is_public_call_request,
36 ColumnAndShifts::precomputed_is_teardown,
37 ColumnAndShifts::precomputed_is_collect_fee,
38 ColumnAndShifts::precomputed_is_tree_padding,
39 ColumnAndShifts::precomputed_is_cleanup,
40 ColumnAndShifts::precomputed_is_revertible,
41 ColumnAndShifts::precomputed_read_pi_start_offset,
42 ColumnAndShifts::precomputed_read_pi_length_offset,
43 ColumnAndShifts::precomputed_sel_append_note_hash,
44 ColumnAndShifts::precomputed_sel_append_nullifier,
45 ColumnAndShifts::precomputed_sel_append_l2_l1_msg,
46 ColumnAndShifts::precomputed_next_phase_on_revert
51template <
typename FF_>
57 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_PHASE_LENGTH";
62 static constexpr Column COUNTS = Column::lookup_tx_read_phase_length_counts;
64 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
65 ColumnAndShifts::tx_read_pi_length_offset, ColumnAndShifts::tx_remaining_phase_counter
67 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
68 ColumnAndShifts::precomputed_idx, ColumnAndShifts::public_inputs_cols_0_
73template <
typename FF_>
79 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_PUBLIC_CALL_REQUEST_PHASE";
84 static constexpr Column COUNTS = Column::lookup_tx_read_public_call_request_phase_counts;
85 static constexpr Column INVERSES = Column::lookup_tx_read_public_call_request_phase_inv;
86 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::tx_read_pi_offset,
87 ColumnAndShifts::tx_msg_sender,
88 ColumnAndShifts::tx_contract_addr,
89 ColumnAndShifts::tx_is_static,
90 ColumnAndShifts::tx_calldata_hash };
91 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
92 ColumnAndShifts::precomputed_idx,
93 ColumnAndShifts::public_inputs_cols_0_,
94 ColumnAndShifts::public_inputs_cols_1_,
95 ColumnAndShifts::public_inputs_cols_2_,
96 ColumnAndShifts::public_inputs_cols_3_
102template <
typename FF_>
109 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_TREE_INSERT_VALUE";
114 static constexpr Column COUNTS = Column::lookup_tx_read_tree_insert_value_counts;
116 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::tx_read_pi_offset,
117 ColumnAndShifts::tx_leaf_value };
118 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
119 ColumnAndShifts::precomputed_idx, ColumnAndShifts::public_inputs_cols_0_
124template <
typename FF_>
130 static constexpr std::string_view
NAME =
"LOOKUP_TX_NOTE_HASH_APPEND";
135 static constexpr Column COUNTS = Column::lookup_tx_note_hash_append_counts;
137 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
138 ColumnAndShifts::tx_leaf_value,
139 ColumnAndShifts::tx_prev_note_hash_tree_size,
140 ColumnAndShifts::tx_prev_note_hash_tree_root,
141 ColumnAndShifts::precomputed_zero,
142 ColumnAndShifts::tx_is_revertible,
143 ColumnAndShifts::tx_prev_num_note_hashes_emitted,
144 ColumnAndShifts::tx_discard,
145 ColumnAndShifts::tx_next_note_hash_tree_root
147 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
148 ColumnAndShifts::note_hash_tree_check_note_hash, ColumnAndShifts::note_hash_tree_check_leaf_index,
149 ColumnAndShifts::note_hash_tree_check_prev_root, ColumnAndShifts::note_hash_tree_check_sel_silo,
150 ColumnAndShifts::note_hash_tree_check_sel_unique, ColumnAndShifts::note_hash_tree_check_note_hash_index,
151 ColumnAndShifts::note_hash_tree_check_discard, ColumnAndShifts::note_hash_tree_check_next_root
156template <
typename FF_>
162 static constexpr std::string_view
NAME =
"LOOKUP_TX_NULLIFIER_APPEND";
167 static constexpr Column COUNTS = Column::lookup_tx_nullifier_append_counts;
169 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
170 ColumnAndShifts::tx_leaf_value,
171 ColumnAndShifts::tx_prev_nullifier_tree_root,
172 ColumnAndShifts::precomputed_zero,
173 ColumnAndShifts::tx_next_nullifier_tree_root,
174 ColumnAndShifts::tx_prev_nullifier_tree_size,
175 ColumnAndShifts::tx_discard,
176 ColumnAndShifts::tx_write_nullifier_pi_offset,
177 ColumnAndShifts::tx_nullifier_tree_height,
178 ColumnAndShifts::tx_nullifier_merkle_separator,
179 ColumnAndShifts::precomputed_zero
181 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
182 ColumnAndShifts::indexed_tree_check_value,
183 ColumnAndShifts::indexed_tree_check_root,
184 ColumnAndShifts::indexed_tree_check_exists,
185 ColumnAndShifts::indexed_tree_check_write_root,
186 ColumnAndShifts::indexed_tree_check_tree_size_before_write,
187 ColumnAndShifts::indexed_tree_check_discard,
188 ColumnAndShifts::indexed_tree_check_public_inputs_index,
189 ColumnAndShifts::indexed_tree_check_tree_height,
190 ColumnAndShifts::indexed_tree_check_merkle_hash_separator,
191 ColumnAndShifts::indexed_tree_check_sel_silo
196template <
typename FF_>
202 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_L2_L1_MSG";
207 static constexpr Column COUNTS = Column::lookup_tx_read_l2_l1_msg_counts;
209 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
210 ColumnAndShifts::tx_read_pi_offset,
211 ColumnAndShifts::tx_l2_l1_msg_recipient,
212 ColumnAndShifts::tx_l2_l1_msg_content,
213 ColumnAndShifts::tx_l2_l1_msg_contract_address
215 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
216 ColumnAndShifts::precomputed_idx,
217 ColumnAndShifts::public_inputs_cols_0_,
218 ColumnAndShifts::public_inputs_cols_1_,
219 ColumnAndShifts::public_inputs_cols_2_
224template <
typename FF_>
230 static constexpr std::string_view
NAME =
"LOOKUP_TX_WRITE_L2_L1_MSG";
235 static constexpr Column COUNTS = Column::lookup_tx_write_l2_l1_msg_counts;
237 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
238 ColumnAndShifts::tx_write_pi_offset,
239 ColumnAndShifts::tx_l2_l1_msg_recipient,
240 ColumnAndShifts::tx_l2_l1_msg_content,
241 ColumnAndShifts::tx_l2_l1_msg_contract_address
243 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
244 ColumnAndShifts::precomputed_idx,
245 ColumnAndShifts::public_inputs_cols_0_,
246 ColumnAndShifts::public_inputs_cols_1_,
247 ColumnAndShifts::public_inputs_cols_2_
252template <
typename FF_>
258 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_EFFECTIVE_FEE_PUBLIC_INPUTS";
263 static constexpr Column COUNTS = Column::lookup_tx_read_effective_fee_public_inputs_counts;
264 static constexpr Column INVERSES = Column::lookup_tx_read_effective_fee_public_inputs_inv;
265 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
266 ColumnAndShifts::tx_read_pi_offset,
267 ColumnAndShifts::tx_effective_fee_per_da_gas,
268 ColumnAndShifts::tx_effective_fee_per_l2_gas
270 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
271 ColumnAndShifts::precomputed_idx, ColumnAndShifts::public_inputs_cols_0_, ColumnAndShifts::public_inputs_cols_1_
277template <
typename FF_>
284 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_FEE_PAYER_PUBLIC_INPUTS";
289 static constexpr Column COUNTS = Column::lookup_tx_read_fee_payer_public_inputs_counts;
290 static constexpr Column INVERSES = Column::lookup_tx_read_fee_payer_public_inputs_inv;
291 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
292 ColumnAndShifts::tx_fee_payer_pi_offset, ColumnAndShifts::tx_fee_payer
294 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
295 ColumnAndShifts::precomputed_idx, ColumnAndShifts::public_inputs_cols_0_
301template <
typename FF_>
308 static constexpr std::string_view
NAME =
"LOOKUP_TX_BALANCE_SLOT_POSEIDON2";
313 static constexpr Column COUNTS = Column::lookup_tx_balance_slot_poseidon2_counts;
315 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
316 ColumnAndShifts::tx_dom_sep_public_storage_map_slot,
317 ColumnAndShifts::tx_fee_juice_balances_slot_constant,
318 ColumnAndShifts::tx_fee_payer,
319 ColumnAndShifts::tx_fee_juice_balance_slot,
320 ColumnAndShifts::tx_const_three
322 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
323 ColumnAndShifts::poseidon2_hash_input_0,
324 ColumnAndShifts::poseidon2_hash_input_1,
325 ColumnAndShifts::poseidon2_hash_input_2,
326 ColumnAndShifts::poseidon2_hash_output,
327 ColumnAndShifts::poseidon2_hash_input_len
332template <
typename FF_>
338 static constexpr std::string_view
NAME =
"LOOKUP_TX_BALANCE_READ";
343 static constexpr Column COUNTS = Column::lookup_tx_balance_read_counts;
345 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
346 ColumnAndShifts::tx_fee_payer_balance,
347 ColumnAndShifts::tx_fee_juice_contract_address,
348 ColumnAndShifts::tx_fee_juice_balance_slot,
349 ColumnAndShifts::tx_prev_public_data_tree_root
351 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
352 ColumnAndShifts::public_data_check_value,
353 ColumnAndShifts::public_data_check_address,
354 ColumnAndShifts::public_data_check_slot,
355 ColumnAndShifts::public_data_check_root
360template <
typename FF_>
366 static constexpr std::string_view
NAME =
"LOOKUP_TX_BALANCE_VALIDATION";
371 static constexpr Column COUNTS = Column::lookup_tx_balance_validation_counts;
373 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
374 ColumnAndShifts::tx_fee, ColumnAndShifts::tx_fee_payer_balance, ColumnAndShifts::precomputed_zero
376 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
377 ColumnAndShifts::ff_gt_b,
378 ColumnAndShifts::ff_gt_result };
382template <
typename FF_>
388 static constexpr std::string_view
NAME =
"LOOKUP_TX_WRITE_FEE_PUBLIC_INPUTS";
393 static constexpr Column COUNTS = Column::lookup_tx_write_fee_public_inputs_counts;
394 static constexpr Column INVERSES = Column::lookup_tx_write_fee_public_inputs_inv;
395 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::tx_write_pi_offset,
396 ColumnAndShifts::tx_fee };
397 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
398 ColumnAndShifts::precomputed_idx, ColumnAndShifts::public_inputs_cols_0_
403template <
typename FF_>
Settings to be passed ot GenericLookupRelationImpl.
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr Column COUNTS
static constexpr Column INVERSES
static constexpr Column COUNTS
static constexpr Column SRC_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column DST_SELECTOR
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 Column DST_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
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 Column INVERSES
static constexpr std::string_view RELATION_NAME
static constexpr Column SRC_SELECTOR
static constexpr Column COUNTS
static constexpr Column SRC_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr std::string_view NAME
static constexpr Column INVERSES
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column COUNTS
static constexpr Column DST_SELECTOR
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr Column INVERSES
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column INVERSES
static constexpr std::string_view RELATION_NAME
static constexpr Column COUNTS
static constexpr Column SRC_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr std::string_view NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr Column INVERSES
static constexpr Column COUNTS
static constexpr Column DST_SELECTOR
static constexpr std::string_view NAME
static constexpr Column SRC_SELECTOR
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column COUNTS
static constexpr Column DST_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr Column COUNTS
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column SRC_SELECTOR
static constexpr Column COUNTS
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr Column DST_SELECTOR
static constexpr Column SRC_SELECTOR
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column COUNTS
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME