8#include "../columns.hpp"
17 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_CLK_DIFF_RANGE_LO";
22 static constexpr Column COUNTS = Column::lookup_public_data_check_clk_diff_range_lo_counts;
23 static constexpr Column INVERSES = Column::lookup_public_data_check_clk_diff_range_lo_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
25 ColumnAndShifts::public_data_check_clk_diff_lo
27 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::precomputed_clk };
32template <
typename FF_>
39 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_CLK_DIFF_RANGE_HI";
44 static constexpr Column COUNTS = Column::lookup_public_data_check_clk_diff_range_hi_counts;
45 static constexpr Column INVERSES = Column::lookup_public_data_check_clk_diff_range_hi_inv;
46 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
47 ColumnAndShifts::public_data_check_clk_diff_hi
49 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::precomputed_clk };
54template <
typename FF_>
61 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_SILO_POSEIDON2";
66 static constexpr Column COUNTS = Column::lookup_public_data_check_silo_poseidon2_counts;
67 static constexpr Column INVERSES = Column::lookup_public_data_check_silo_poseidon2_inv;
68 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
69 ColumnAndShifts::public_data_check_sel,
70 ColumnAndShifts::public_data_check_siloing_separator,
71 ColumnAndShifts::public_data_check_address,
72 ColumnAndShifts::public_data_check_slot,
73 ColumnAndShifts::public_data_check_leaf_slot
75 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
76 ColumnAndShifts::poseidon2_hash_start,
77 ColumnAndShifts::poseidon2_hash_input_0,
78 ColumnAndShifts::poseidon2_hash_input_1,
79 ColumnAndShifts::poseidon2_hash_input_2,
80 ColumnAndShifts::poseidon2_hash_output
86template <
typename FF_>
93 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_SLOT_VALIDATION";
98 static constexpr Column COUNTS = Column::lookup_public_data_check_low_leaf_slot_validation_counts;
99 static constexpr Column INVERSES = Column::lookup_public_data_check_low_leaf_slot_validation_inv;
100 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
101 ColumnAndShifts::public_data_check_leaf_slot,
102 ColumnAndShifts::public_data_check_low_leaf_slot,
103 ColumnAndShifts::public_data_check_sel
105 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
106 ColumnAndShifts::ff_gt_b,
107 ColumnAndShifts::ff_gt_result };
112template <
typename FF_>
119 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_NEXT_SLOT_VALIDATION";
124 static constexpr Column COUNTS = Column::lookup_public_data_check_low_leaf_next_slot_validation_counts;
125 static constexpr Column INVERSES = Column::lookup_public_data_check_low_leaf_next_slot_validation_inv;
126 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
127 ColumnAndShifts::public_data_check_low_leaf_next_slot,
128 ColumnAndShifts::public_data_check_leaf_slot,
129 ColumnAndShifts::public_data_check_sel
131 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
132 ColumnAndShifts::ff_gt_b,
133 ColumnAndShifts::ff_gt_result };
138template <
typename FF_>
145 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_POSEIDON2_0";
150 static constexpr Column COUNTS = Column::lookup_public_data_check_low_leaf_poseidon2_0_counts;
151 static constexpr Column INVERSES = Column::lookup_public_data_check_low_leaf_poseidon2_0_inv;
152 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
153 ColumnAndShifts::public_data_check_low_leaf_slot,
154 ColumnAndShifts::public_data_check_low_leaf_value,
155 ColumnAndShifts::public_data_check_low_leaf_next_index,
156 ColumnAndShifts::public_data_check_low_leaf_hash,
157 ColumnAndShifts::public_data_check_const_two
159 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
160 ColumnAndShifts::poseidon2_hash_input_0,
161 ColumnAndShifts::poseidon2_hash_input_1,
162 ColumnAndShifts::poseidon2_hash_input_2,
163 ColumnAndShifts::poseidon2_hash_output,
164 ColumnAndShifts::poseidon2_hash_num_perm_rounds_rem
170template <
typename FF_>
177 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_POSEIDON2_1";
182 static constexpr Column COUNTS = Column::lookup_public_data_check_low_leaf_poseidon2_1_counts;
183 static constexpr Column INVERSES = Column::lookup_public_data_check_low_leaf_poseidon2_1_inv;
184 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
185 ColumnAndShifts::public_data_check_low_leaf_next_slot,
186 ColumnAndShifts::precomputed_zero,
187 ColumnAndShifts::precomputed_zero,
188 ColumnAndShifts::public_data_check_low_leaf_hash
190 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
191 ColumnAndShifts::poseidon2_hash_input_0,
192 ColumnAndShifts::poseidon2_hash_input_1,
193 ColumnAndShifts::poseidon2_hash_input_2,
194 ColumnAndShifts::poseidon2_hash_output
200template <
typename FF_>
207 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_UPDATED_LOW_LEAF_POSEIDON2_0";
212 static constexpr Column COUNTS = Column::lookup_public_data_check_updated_low_leaf_poseidon2_0_counts;
213 static constexpr Column INVERSES = Column::lookup_public_data_check_updated_low_leaf_poseidon2_0_inv;
214 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
215 ColumnAndShifts::public_data_check_low_leaf_slot,
216 ColumnAndShifts::public_data_check_updated_low_leaf_value,
217 ColumnAndShifts::public_data_check_updated_low_leaf_next_index,
218 ColumnAndShifts::public_data_check_updated_low_leaf_hash,
219 ColumnAndShifts::public_data_check_const_two
221 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
222 ColumnAndShifts::poseidon2_hash_input_0,
223 ColumnAndShifts::poseidon2_hash_input_1,
224 ColumnAndShifts::poseidon2_hash_input_2,
225 ColumnAndShifts::poseidon2_hash_output,
226 ColumnAndShifts::poseidon2_hash_num_perm_rounds_rem
232template <
typename FF_>
239 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_UPDATED_LOW_LEAF_POSEIDON2_1";
244 static constexpr Column COUNTS = Column::lookup_public_data_check_updated_low_leaf_poseidon2_1_counts;
245 static constexpr Column INVERSES = Column::lookup_public_data_check_updated_low_leaf_poseidon2_1_inv;
246 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
247 ColumnAndShifts::public_data_check_updated_low_leaf_next_slot,
248 ColumnAndShifts::precomputed_zero,
249 ColumnAndShifts::precomputed_zero,
250 ColumnAndShifts::public_data_check_updated_low_leaf_hash
252 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
253 ColumnAndShifts::poseidon2_hash_input_0,
254 ColumnAndShifts::poseidon2_hash_input_1,
255 ColumnAndShifts::poseidon2_hash_input_2,
256 ColumnAndShifts::poseidon2_hash_output
262template <
typename FF_>
269 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_MERKLE_CHECK";
274 static constexpr Column COUNTS = Column::lookup_public_data_check_low_leaf_merkle_check_counts;
275 static constexpr Column INVERSES = Column::lookup_public_data_check_low_leaf_merkle_check_inv;
276 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
277 ColumnAndShifts::public_data_check_write,
278 ColumnAndShifts::public_data_check_low_leaf_hash,
279 ColumnAndShifts::public_data_check_updated_low_leaf_hash,
280 ColumnAndShifts::public_data_check_low_leaf_index,
281 ColumnAndShifts::public_data_check_tree_height,
282 ColumnAndShifts::public_data_check_root,
283 ColumnAndShifts::public_data_check_intermediate_root
285 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
286 ColumnAndShifts::merkle_check_write, ColumnAndShifts::merkle_check_read_node,
287 ColumnAndShifts::merkle_check_write_node, ColumnAndShifts::merkle_check_index,
288 ColumnAndShifts::merkle_check_path_len, ColumnAndShifts::merkle_check_read_root,
289 ColumnAndShifts::merkle_check_write_root
295template <
typename FF_>
302 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_NEW_LEAF_POSEIDON2_0";
307 static constexpr Column COUNTS = Column::lookup_public_data_check_new_leaf_poseidon2_0_counts;
308 static constexpr Column INVERSES = Column::lookup_public_data_check_new_leaf_poseidon2_0_inv;
309 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
310 ColumnAndShifts::public_data_check_leaf_slot,
311 ColumnAndShifts::public_data_check_value,
312 ColumnAndShifts::public_data_check_low_leaf_next_index,
313 ColumnAndShifts::public_data_check_new_leaf_hash,
314 ColumnAndShifts::public_data_check_const_two
316 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
317 ColumnAndShifts::poseidon2_hash_input_0,
318 ColumnAndShifts::poseidon2_hash_input_1,
319 ColumnAndShifts::poseidon2_hash_input_2,
320 ColumnAndShifts::poseidon2_hash_output,
321 ColumnAndShifts::poseidon2_hash_num_perm_rounds_rem
327template <
typename FF_>
334 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_NEW_LEAF_POSEIDON2_1";
339 static constexpr Column COUNTS = Column::lookup_public_data_check_new_leaf_poseidon2_1_counts;
340 static constexpr Column INVERSES = Column::lookup_public_data_check_new_leaf_poseidon2_1_inv;
341 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
342 ColumnAndShifts::public_data_check_low_leaf_next_slot,
343 ColumnAndShifts::precomputed_zero,
344 ColumnAndShifts::precomputed_zero,
345 ColumnAndShifts::public_data_check_new_leaf_hash
347 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
348 ColumnAndShifts::poseidon2_hash_input_0,
349 ColumnAndShifts::poseidon2_hash_input_1,
350 ColumnAndShifts::poseidon2_hash_input_2,
351 ColumnAndShifts::poseidon2_hash_output
357template <
typename FF_>
364 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_NEW_LEAF_MERKLE_CHECK";
369 static constexpr Column COUNTS = Column::lookup_public_data_check_new_leaf_merkle_check_counts;
370 static constexpr Column INVERSES = Column::lookup_public_data_check_new_leaf_merkle_check_inv;
371 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
372 ColumnAndShifts::public_data_check_sel, ColumnAndShifts::precomputed_zero,
373 ColumnAndShifts::public_data_check_new_leaf_hash, ColumnAndShifts::public_data_check_tree_size_before_write,
374 ColumnAndShifts::public_data_check_tree_height, ColumnAndShifts::public_data_check_intermediate_root,
375 ColumnAndShifts::public_data_check_write_root
377 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
378 ColumnAndShifts::merkle_check_write, ColumnAndShifts::merkle_check_read_node,
379 ColumnAndShifts::merkle_check_write_node, ColumnAndShifts::merkle_check_index,
380 ColumnAndShifts::merkle_check_path_len, ColumnAndShifts::merkle_check_read_root,
381 ColumnAndShifts::merkle_check_write_root
387template <
typename FF_>
394 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_WRITE_PUBLIC_DATA_TO_PUBLIC_INPUTS";
399 static constexpr Column COUNTS = Column::lookup_public_data_check_write_public_data_to_public_inputs_counts;
400 static constexpr Column INVERSES = Column::lookup_public_data_check_write_public_data_to_public_inputs_inv;
401 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
402 ColumnAndShifts::public_data_check_write_idx,
403 ColumnAndShifts::public_data_check_leaf_slot,
404 ColumnAndShifts::public_data_check_final_value
406 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
407 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_, ColumnAndShifts::public_inputs_cols_1_
413template <
typename FF_>
420 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_WRITE_WRITES_LENGTH_TO_PUBLIC_INPUTS";
425 static constexpr Column COUNTS = Column::lookup_public_data_check_write_writes_length_to_public_inputs_counts;
426 static constexpr Column INVERSES = Column::lookup_public_data_check_write_writes_length_to_public_inputs_inv;
427 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
428 ColumnAndShifts::public_data_check_length_pi_idx, ColumnAndShifts::public_data_check_public_data_writes_length
430 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
431 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
437template <
typename FF_>
This file contains the template for the generic lookup that can be specialized to enforce various loo...
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr std::string_view NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column COUNTS
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 DST_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr Column INVERSES
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column COUNTS
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column INVERSES
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr Column COUNTS
static constexpr std::string_view NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view RELATION_NAME
static constexpr Column INVERSES
static constexpr Column SRC_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column SRC_SELECTOR
static constexpr Column DST_SELECTOR
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 Column INVERSES
static constexpr Column INVERSES
static constexpr std::string_view RELATION_NAME
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 > DST_COLUMNS
static constexpr Column COUNTS
static constexpr Column SRC_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view RELATION_NAME
static constexpr Column INVERSES
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column COUNTS
static constexpr std::string_view NAME
static constexpr Column SRC_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
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
static constexpr Column INVERSES
static constexpr Column COUNTS
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 NAME
static constexpr Column DST_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view RELATION_NAME
static constexpr Column COUNTS
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 std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column INVERSES
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column DST_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column COUNTS
static constexpr Column SRC_SELECTOR
static constexpr Column INVERSES
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column COUNTS
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::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr Column COUNTS
static constexpr Column INVERSES
static constexpr std::string_view RELATION_NAME
static constexpr Column DST_SELECTOR
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE