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,
26 ColumnAndShifts::tx_is_public_call_request,
27 ColumnAndShifts::tx_is_teardown,
28 ColumnAndShifts::tx_is_collect_fee,
29 ColumnAndShifts::tx_is_tree_padding,
30 ColumnAndShifts::tx_is_cleanup,
31 ColumnAndShifts::tx_is_revertible,
32 ColumnAndShifts::tx_read_pi_start_offset,
33 ColumnAndShifts::tx_read_pi_length_offset,
34 ColumnAndShifts::tx_sel_non_revertible_append_note_hash,
35 ColumnAndShifts::tx_sel_non_revertible_append_nullifier,
36 ColumnAndShifts::tx_sel_non_revertible_append_l2_l1_msg,
37 ColumnAndShifts::tx_sel_revertible_append_note_hash,
38 ColumnAndShifts::tx_sel_revertible_append_nullifier,
39 ColumnAndShifts::tx_sel_revertible_append_l2_l1_msg,
40 ColumnAndShifts::tx_next_phase_on_revert
42 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
43 ColumnAndShifts::precomputed_idx,
44 ColumnAndShifts::precomputed_is_public_call_request,
45 ColumnAndShifts::precomputed_is_teardown,
46 ColumnAndShifts::precomputed_is_collect_fee,
47 ColumnAndShifts::precomputed_is_tree_padding,
48 ColumnAndShifts::precomputed_is_cleanup,
49 ColumnAndShifts::precomputed_is_revertible,
50 ColumnAndShifts::precomputed_read_pi_start_offset,
51 ColumnAndShifts::precomputed_read_pi_length_offset,
52 ColumnAndShifts::precomputed_sel_non_revertible_append_note_hash,
53 ColumnAndShifts::precomputed_sel_non_revertible_append_nullifier,
54 ColumnAndShifts::precomputed_sel_non_revertible_append_l2_l1_msg,
55 ColumnAndShifts::precomputed_sel_revertible_append_note_hash,
56 ColumnAndShifts::precomputed_sel_revertible_append_nullifier,
57 ColumnAndShifts::precomputed_sel_revertible_append_l2_l1_msg,
58 ColumnAndShifts::precomputed_next_phase_on_revert
63template <
typename FF_>
69 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_PHASE_LENGTH";
74 static constexpr Column COUNTS = Column::lookup_tx_read_phase_length_counts;
76 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
77 ColumnAndShifts::tx_read_pi_length_offset, ColumnAndShifts::tx_remaining_phase_counter
79 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
80 ColumnAndShifts::precomputed_idx, ColumnAndShifts::public_inputs_cols_0_
85template <
typename FF_>
91 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_PUBLIC_CALL_REQUEST_PHASE";
96 static constexpr Column COUNTS = Column::lookup_tx_read_public_call_request_phase_counts;
97 static constexpr Column INVERSES = Column::lookup_tx_read_public_call_request_phase_inv;
98 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::tx_read_pi_offset,
99 ColumnAndShifts::tx_msg_sender,
100 ColumnAndShifts::tx_contract_addr,
101 ColumnAndShifts::tx_is_static,
102 ColumnAndShifts::tx_calldata_hash };
103 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
104 ColumnAndShifts::precomputed_idx,
105 ColumnAndShifts::public_inputs_cols_0_,
106 ColumnAndShifts::public_inputs_cols_1_,
107 ColumnAndShifts::public_inputs_cols_2_,
108 ColumnAndShifts::public_inputs_cols_3_
114template <
typename FF_>
121 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_TREE_INSERT_VALUE";
126 static constexpr Column COUNTS = Column::lookup_tx_read_tree_insert_value_counts;
128 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::tx_read_pi_offset,
129 ColumnAndShifts::tx_leaf_value };
130 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
131 ColumnAndShifts::precomputed_idx, ColumnAndShifts::public_inputs_cols_0_
136template <
typename FF_>
142 static constexpr std::string_view
NAME =
"LOOKUP_TX_NOTE_HASH_APPEND";
147 static constexpr Column COUNTS = Column::lookup_tx_note_hash_append_counts;
149 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
150 ColumnAndShifts::tx_leaf_value,
151 ColumnAndShifts::tx_prev_note_hash_tree_size,
152 ColumnAndShifts::tx_prev_note_hash_tree_root,
153 ColumnAndShifts::precomputed_zero,
154 ColumnAndShifts::tx_sel_revertible_append_note_hash,
155 ColumnAndShifts::tx_prev_num_note_hashes_emitted,
156 ColumnAndShifts::tx_discard,
157 ColumnAndShifts::tx_next_note_hash_tree_root
159 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
160 ColumnAndShifts::note_hash_tree_check_note_hash, ColumnAndShifts::note_hash_tree_check_leaf_index,
161 ColumnAndShifts::note_hash_tree_check_prev_root, ColumnAndShifts::note_hash_tree_check_sel_silo,
162 ColumnAndShifts::note_hash_tree_check_sel_unique, ColumnAndShifts::note_hash_tree_check_note_hash_index,
163 ColumnAndShifts::note_hash_tree_check_discard, ColumnAndShifts::note_hash_tree_check_next_root
168template <
typename FF_>
174 static constexpr std::string_view
NAME =
"LOOKUP_TX_NULLIFIER_APPEND";
179 static constexpr Column COUNTS = Column::lookup_tx_nullifier_append_counts;
181 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
182 ColumnAndShifts::tx_leaf_value,
183 ColumnAndShifts::tx_prev_nullifier_tree_root,
184 ColumnAndShifts::tx_reverted,
185 ColumnAndShifts::tx_next_nullifier_tree_root,
186 ColumnAndShifts::tx_prev_nullifier_tree_size,
187 ColumnAndShifts::tx_discard,
188 ColumnAndShifts::tx_write_nullifier_pi_offset,
189 ColumnAndShifts::tx_nullifier_tree_height,
190 ColumnAndShifts::precomputed_zero
192 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
193 ColumnAndShifts::indexed_tree_check_value,
194 ColumnAndShifts::indexed_tree_check_root,
195 ColumnAndShifts::indexed_tree_check_exists,
196 ColumnAndShifts::indexed_tree_check_write_root,
197 ColumnAndShifts::indexed_tree_check_tree_size_before_write,
198 ColumnAndShifts::indexed_tree_check_discard,
199 ColumnAndShifts::indexed_tree_check_public_inputs_index,
200 ColumnAndShifts::indexed_tree_check_tree_height,
201 ColumnAndShifts::indexed_tree_check_sel_silo
206template <
typename FF_>
212 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_L2_L1_MSG";
217 static constexpr Column COUNTS = Column::lookup_tx_read_l2_l1_msg_counts;
219 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
220 ColumnAndShifts::tx_read_pi_offset,
221 ColumnAndShifts::tx_l2_l1_msg_recipient,
222 ColumnAndShifts::tx_l2_l1_msg_content,
223 ColumnAndShifts::tx_l2_l1_msg_contract_address
225 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
226 ColumnAndShifts::precomputed_idx,
227 ColumnAndShifts::public_inputs_cols_0_,
228 ColumnAndShifts::public_inputs_cols_1_,
229 ColumnAndShifts::public_inputs_cols_2_
234template <
typename FF_>
240 static constexpr std::string_view
NAME =
"LOOKUP_TX_WRITE_L2_L1_MSG";
245 static constexpr Column COUNTS = Column::lookup_tx_write_l2_l1_msg_counts;
247 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
248 ColumnAndShifts::tx_write_pi_offset,
249 ColumnAndShifts::tx_l2_l1_msg_recipient,
250 ColumnAndShifts::tx_l2_l1_msg_content,
251 ColumnAndShifts::tx_l2_l1_msg_contract_address
253 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
254 ColumnAndShifts::precomputed_idx,
255 ColumnAndShifts::public_inputs_cols_0_,
256 ColumnAndShifts::public_inputs_cols_1_,
257 ColumnAndShifts::public_inputs_cols_2_
262template <
typename FF_>
268 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_EFFECTIVE_FEE_PUBLIC_INPUTS";
273 static constexpr Column COUNTS = Column::lookup_tx_read_effective_fee_public_inputs_counts;
274 static constexpr Column INVERSES = Column::lookup_tx_read_effective_fee_public_inputs_inv;
275 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
276 ColumnAndShifts::tx_read_pi_offset,
277 ColumnAndShifts::tx_effective_fee_per_da_gas,
278 ColumnAndShifts::tx_effective_fee_per_l2_gas
280 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
281 ColumnAndShifts::precomputed_idx, ColumnAndShifts::public_inputs_cols_0_, ColumnAndShifts::public_inputs_cols_1_
287template <
typename FF_>
294 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_FEE_PAYER_PUBLIC_INPUTS";
299 static constexpr Column COUNTS = Column::lookup_tx_read_fee_payer_public_inputs_counts;
300 static constexpr Column INVERSES = Column::lookup_tx_read_fee_payer_public_inputs_inv;
301 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
302 ColumnAndShifts::tx_fee_payer_pi_offset, ColumnAndShifts::tx_fee_payer
304 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
305 ColumnAndShifts::precomputed_idx, ColumnAndShifts::public_inputs_cols_0_
311template <
typename FF_>
318 static constexpr std::string_view
NAME =
"LOOKUP_TX_BALANCE_SLOT_POSEIDON2";
323 static constexpr Column COUNTS = Column::lookup_tx_balance_slot_poseidon2_counts;
325 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
326 ColumnAndShifts::tx_dom_sep_public_storage_map_slot,
327 ColumnAndShifts::tx_fee_juice_balances_slot_constant,
328 ColumnAndShifts::tx_fee_payer,
329 ColumnAndShifts::tx_fee_juice_balance_slot,
330 ColumnAndShifts::tx_const_three
332 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
333 ColumnAndShifts::poseidon2_hash_input_0,
334 ColumnAndShifts::poseidon2_hash_input_1,
335 ColumnAndShifts::poseidon2_hash_input_2,
336 ColumnAndShifts::poseidon2_hash_output,
337 ColumnAndShifts::poseidon2_hash_input_len
342template <
typename FF_>
348 static constexpr std::string_view
NAME =
"LOOKUP_TX_BALANCE_READ";
353 static constexpr Column COUNTS = Column::lookup_tx_balance_read_counts;
355 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
356 ColumnAndShifts::tx_fee_payer_balance,
357 ColumnAndShifts::tx_fee_juice_contract_address,
358 ColumnAndShifts::tx_fee_juice_balance_slot,
359 ColumnAndShifts::tx_prev_public_data_tree_root
361 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
362 ColumnAndShifts::public_data_check_value,
363 ColumnAndShifts::public_data_check_address,
364 ColumnAndShifts::public_data_check_slot,
365 ColumnAndShifts::public_data_check_root
370template <
typename FF_>
376 static constexpr std::string_view
NAME =
"LOOKUP_TX_BALANCE_VALIDATION";
381 static constexpr Column COUNTS = Column::lookup_tx_balance_validation_counts;
383 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
384 ColumnAndShifts::tx_fee, ColumnAndShifts::tx_fee_payer_balance, ColumnAndShifts::precomputed_zero
386 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
387 ColumnAndShifts::ff_gt_b,
388 ColumnAndShifts::ff_gt_result };
392template <
typename FF_>
398 static constexpr std::string_view
NAME =
"LOOKUP_TX_WRITE_FEE_PUBLIC_INPUTS";
403 static constexpr Column COUNTS = Column::lookup_tx_write_fee_public_inputs_counts;
404 static constexpr Column INVERSES = Column::lookup_tx_write_fee_public_inputs_inv;
405 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::tx_write_pi_offset,
406 ColumnAndShifts::tx_fee };
407 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
408 ColumnAndShifts::precomputed_idx, ColumnAndShifts::public_inputs_cols_0_
413template <
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