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::precomputed_zero,
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::tx_nullifier_merkle_separator,
191 ColumnAndShifts::precomputed_zero
193 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
194 ColumnAndShifts::indexed_tree_check_value,
195 ColumnAndShifts::indexed_tree_check_root,
196 ColumnAndShifts::indexed_tree_check_exists,
197 ColumnAndShifts::indexed_tree_check_write_root,
198 ColumnAndShifts::indexed_tree_check_tree_size_before_write,
199 ColumnAndShifts::indexed_tree_check_discard,
200 ColumnAndShifts::indexed_tree_check_public_inputs_index,
201 ColumnAndShifts::indexed_tree_check_tree_height,
202 ColumnAndShifts::indexed_tree_check_merkle_hash_separator,
203 ColumnAndShifts::indexed_tree_check_sel_silo
208template <
typename FF_>
214 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_L2_L1_MSG";
219 static constexpr Column COUNTS = Column::lookup_tx_read_l2_l1_msg_counts;
221 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
222 ColumnAndShifts::tx_read_pi_offset,
223 ColumnAndShifts::tx_l2_l1_msg_recipient,
224 ColumnAndShifts::tx_l2_l1_msg_content,
225 ColumnAndShifts::tx_l2_l1_msg_contract_address
227 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
228 ColumnAndShifts::precomputed_idx,
229 ColumnAndShifts::public_inputs_cols_0_,
230 ColumnAndShifts::public_inputs_cols_1_,
231 ColumnAndShifts::public_inputs_cols_2_
236template <
typename FF_>
242 static constexpr std::string_view
NAME =
"LOOKUP_TX_WRITE_L2_L1_MSG";
247 static constexpr Column COUNTS = Column::lookup_tx_write_l2_l1_msg_counts;
249 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
250 ColumnAndShifts::tx_write_pi_offset,
251 ColumnAndShifts::tx_l2_l1_msg_recipient,
252 ColumnAndShifts::tx_l2_l1_msg_content,
253 ColumnAndShifts::tx_l2_l1_msg_contract_address
255 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
256 ColumnAndShifts::precomputed_idx,
257 ColumnAndShifts::public_inputs_cols_0_,
258 ColumnAndShifts::public_inputs_cols_1_,
259 ColumnAndShifts::public_inputs_cols_2_
264template <
typename FF_>
270 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_EFFECTIVE_FEE_PUBLIC_INPUTS";
275 static constexpr Column COUNTS = Column::lookup_tx_read_effective_fee_public_inputs_counts;
276 static constexpr Column INVERSES = Column::lookup_tx_read_effective_fee_public_inputs_inv;
277 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
278 ColumnAndShifts::tx_read_pi_offset,
279 ColumnAndShifts::tx_effective_fee_per_da_gas,
280 ColumnAndShifts::tx_effective_fee_per_l2_gas
282 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
283 ColumnAndShifts::precomputed_idx, ColumnAndShifts::public_inputs_cols_0_, ColumnAndShifts::public_inputs_cols_1_
289template <
typename FF_>
296 static constexpr std::string_view
NAME =
"LOOKUP_TX_READ_FEE_PAYER_PUBLIC_INPUTS";
301 static constexpr Column COUNTS = Column::lookup_tx_read_fee_payer_public_inputs_counts;
302 static constexpr Column INVERSES = Column::lookup_tx_read_fee_payer_public_inputs_inv;
303 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
304 ColumnAndShifts::tx_fee_payer_pi_offset, ColumnAndShifts::tx_fee_payer
306 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
307 ColumnAndShifts::precomputed_idx, ColumnAndShifts::public_inputs_cols_0_
313template <
typename FF_>
320 static constexpr std::string_view
NAME =
"LOOKUP_TX_BALANCE_SLOT_POSEIDON2";
325 static constexpr Column COUNTS = Column::lookup_tx_balance_slot_poseidon2_counts;
327 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
328 ColumnAndShifts::tx_dom_sep_public_storage_map_slot,
329 ColumnAndShifts::tx_fee_juice_balances_slot_constant,
330 ColumnAndShifts::tx_fee_payer,
331 ColumnAndShifts::tx_fee_juice_balance_slot,
332 ColumnAndShifts::tx_const_three
334 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
335 ColumnAndShifts::poseidon2_hash_input_0,
336 ColumnAndShifts::poseidon2_hash_input_1,
337 ColumnAndShifts::poseidon2_hash_input_2,
338 ColumnAndShifts::poseidon2_hash_output,
339 ColumnAndShifts::poseidon2_hash_input_len
344template <
typename FF_>
350 static constexpr std::string_view
NAME =
"LOOKUP_TX_BALANCE_READ";
355 static constexpr Column COUNTS = Column::lookup_tx_balance_read_counts;
357 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
358 ColumnAndShifts::tx_fee_payer_balance,
359 ColumnAndShifts::tx_fee_juice_contract_address,
360 ColumnAndShifts::tx_fee_juice_balance_slot,
361 ColumnAndShifts::tx_prev_public_data_tree_root
363 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
364 ColumnAndShifts::public_data_check_value,
365 ColumnAndShifts::public_data_check_address,
366 ColumnAndShifts::public_data_check_slot,
367 ColumnAndShifts::public_data_check_root
372template <
typename FF_>
378 static constexpr std::string_view
NAME =
"LOOKUP_TX_BALANCE_VALIDATION";
383 static constexpr Column COUNTS = Column::lookup_tx_balance_validation_counts;
385 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
386 ColumnAndShifts::tx_fee, ColumnAndShifts::tx_fee_payer_balance, ColumnAndShifts::precomputed_zero
388 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
389 ColumnAndShifts::ff_gt_b,
390 ColumnAndShifts::ff_gt_result };
394template <
typename FF_>
400 static constexpr std::string_view
NAME =
"LOOKUP_TX_WRITE_FEE_PUBLIC_INPUTS";
405 static constexpr Column COUNTS = Column::lookup_tx_write_fee_public_inputs_counts;
406 static constexpr Column INVERSES = Column::lookup_tx_write_fee_public_inputs_inv;
407 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::tx_write_pi_offset,
408 ColumnAndShifts::tx_fee };
409 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
410 ColumnAndShifts::precomputed_idx, ColumnAndShifts::public_inputs_cols_0_
415template <
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