8#include "../columns.hpp"
17 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_SILO_POSEIDON2";
22 static constexpr Column COUNTS = Column::lookup_public_data_check_silo_poseidon2_counts;
23 static constexpr Column INVERSES = Column::lookup_public_data_check_silo_poseidon2_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
25 ColumnAndShifts::public_data_check_sel,
26 ColumnAndShifts::public_data_check_siloing_separator,
27 ColumnAndShifts::public_data_check_address,
28 ColumnAndShifts::public_data_check_slot,
29 ColumnAndShifts::public_data_check_leaf_slot
31 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
32 ColumnAndShifts::poseidon2_hash_start,
33 ColumnAndShifts::poseidon2_hash_input_0,
34 ColumnAndShifts::poseidon2_hash_input_1,
35 ColumnAndShifts::poseidon2_hash_input_2,
36 ColumnAndShifts::poseidon2_hash_output
42template <
typename FF_>
49 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_SLOT_VALIDATION";
54 static constexpr Column COUNTS = Column::lookup_public_data_check_low_leaf_slot_validation_counts;
55 static constexpr Column INVERSES = Column::lookup_public_data_check_low_leaf_slot_validation_inv;
56 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
57 ColumnAndShifts::public_data_check_leaf_slot,
58 ColumnAndShifts::public_data_check_low_leaf_slot,
59 ColumnAndShifts::public_data_check_sel
61 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
62 ColumnAndShifts::ff_gt_b,
63 ColumnAndShifts::ff_gt_result };
68template <
typename FF_>
75 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_NEXT_SLOT_VALIDATION";
80 static constexpr Column COUNTS = Column::lookup_public_data_check_low_leaf_next_slot_validation_counts;
81 static constexpr Column INVERSES = Column::lookup_public_data_check_low_leaf_next_slot_validation_inv;
82 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
83 ColumnAndShifts::public_data_check_low_leaf_next_slot,
84 ColumnAndShifts::public_data_check_leaf_slot,
85 ColumnAndShifts::public_data_check_sel
87 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
88 ColumnAndShifts::ff_gt_b,
89 ColumnAndShifts::ff_gt_result };
94template <
typename FF_>
101 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_POSEIDON2_0";
106 static constexpr Column COUNTS = Column::lookup_public_data_check_low_leaf_poseidon2_0_counts;
107 static constexpr Column INVERSES = Column::lookup_public_data_check_low_leaf_poseidon2_0_inv;
108 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
109 ColumnAndShifts::public_data_check_low_leaf_slot,
110 ColumnAndShifts::public_data_check_low_leaf_value,
111 ColumnAndShifts::public_data_check_low_leaf_next_index,
112 ColumnAndShifts::public_data_check_low_leaf_hash
114 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
115 ColumnAndShifts::poseidon2_hash_input_0,
116 ColumnAndShifts::poseidon2_hash_input_1,
117 ColumnAndShifts::poseidon2_hash_input_2,
118 ColumnAndShifts::poseidon2_hash_output
124template <
typename FF_>
131 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_POSEIDON2_1";
136 static constexpr Column COUNTS = Column::lookup_public_data_check_low_leaf_poseidon2_1_counts;
137 static constexpr Column INVERSES = Column::lookup_public_data_check_low_leaf_poseidon2_1_inv;
138 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
139 ColumnAndShifts::public_data_check_low_leaf_next_slot,
140 ColumnAndShifts::precomputed_zero,
141 ColumnAndShifts::precomputed_zero,
142 ColumnAndShifts::public_data_check_low_leaf_hash
144 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
145 ColumnAndShifts::poseidon2_hash_input_0,
146 ColumnAndShifts::poseidon2_hash_input_1,
147 ColumnAndShifts::poseidon2_hash_input_2,
148 ColumnAndShifts::poseidon2_hash_output
154template <
typename FF_>
161 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_UPDATED_LOW_LEAF_POSEIDON2_0";
166 static constexpr Column COUNTS = Column::lookup_public_data_check_updated_low_leaf_poseidon2_0_counts;
167 static constexpr Column INVERSES = Column::lookup_public_data_check_updated_low_leaf_poseidon2_0_inv;
168 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
169 ColumnAndShifts::public_data_check_low_leaf_slot,
170 ColumnAndShifts::public_data_check_updated_low_leaf_value,
171 ColumnAndShifts::public_data_check_updated_low_leaf_next_index,
172 ColumnAndShifts::public_data_check_updated_low_leaf_hash
174 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
175 ColumnAndShifts::poseidon2_hash_input_0,
176 ColumnAndShifts::poseidon2_hash_input_1,
177 ColumnAndShifts::poseidon2_hash_input_2,
178 ColumnAndShifts::poseidon2_hash_output
184template <
typename FF_>
191 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_UPDATED_LOW_LEAF_POSEIDON2_1";
196 static constexpr Column COUNTS = Column::lookup_public_data_check_updated_low_leaf_poseidon2_1_counts;
197 static constexpr Column INVERSES = Column::lookup_public_data_check_updated_low_leaf_poseidon2_1_inv;
198 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
199 ColumnAndShifts::public_data_check_updated_low_leaf_next_slot,
200 ColumnAndShifts::precomputed_zero,
201 ColumnAndShifts::precomputed_zero,
202 ColumnAndShifts::public_data_check_updated_low_leaf_hash
204 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
205 ColumnAndShifts::poseidon2_hash_input_0,
206 ColumnAndShifts::poseidon2_hash_input_1,
207 ColumnAndShifts::poseidon2_hash_input_2,
208 ColumnAndShifts::poseidon2_hash_output
214template <
typename FF_>
221 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_MERKLE_CHECK";
226 static constexpr Column COUNTS = Column::lookup_public_data_check_low_leaf_merkle_check_counts;
227 static constexpr Column INVERSES = Column::lookup_public_data_check_low_leaf_merkle_check_inv;
228 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
229 ColumnAndShifts::public_data_check_write,
230 ColumnAndShifts::public_data_check_low_leaf_hash,
231 ColumnAndShifts::public_data_check_updated_low_leaf_hash,
232 ColumnAndShifts::public_data_check_low_leaf_index,
233 ColumnAndShifts::public_data_check_tree_height,
234 ColumnAndShifts::public_data_check_root,
235 ColumnAndShifts::public_data_check_intermediate_root
237 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
238 ColumnAndShifts::merkle_check_write, ColumnAndShifts::merkle_check_read_node,
239 ColumnAndShifts::merkle_check_write_node, ColumnAndShifts::merkle_check_index,
240 ColumnAndShifts::merkle_check_path_len, ColumnAndShifts::merkle_check_read_root,
241 ColumnAndShifts::merkle_check_write_root
247template <
typename FF_>
254 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_NEW_LEAF_POSEIDON2_0";
259 static constexpr Column COUNTS = Column::lookup_public_data_check_new_leaf_poseidon2_0_counts;
260 static constexpr Column INVERSES = Column::lookup_public_data_check_new_leaf_poseidon2_0_inv;
261 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
262 ColumnAndShifts::public_data_check_leaf_slot,
263 ColumnAndShifts::public_data_check_value,
264 ColumnAndShifts::public_data_check_low_leaf_next_index,
265 ColumnAndShifts::public_data_check_new_leaf_hash
267 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
268 ColumnAndShifts::poseidon2_hash_input_0,
269 ColumnAndShifts::poseidon2_hash_input_1,
270 ColumnAndShifts::poseidon2_hash_input_2,
271 ColumnAndShifts::poseidon2_hash_output
277template <
typename FF_>
284 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_NEW_LEAF_POSEIDON2_1";
289 static constexpr Column COUNTS = Column::lookup_public_data_check_new_leaf_poseidon2_1_counts;
290 static constexpr Column INVERSES = Column::lookup_public_data_check_new_leaf_poseidon2_1_inv;
291 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
292 ColumnAndShifts::public_data_check_low_leaf_next_slot,
293 ColumnAndShifts::precomputed_zero,
294 ColumnAndShifts::precomputed_zero,
295 ColumnAndShifts::public_data_check_new_leaf_hash
297 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
298 ColumnAndShifts::poseidon2_hash_input_0,
299 ColumnAndShifts::poseidon2_hash_input_1,
300 ColumnAndShifts::poseidon2_hash_input_2,
301 ColumnAndShifts::poseidon2_hash_output
307template <
typename FF_>
314 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_NEW_LEAF_MERKLE_CHECK";
319 static constexpr Column COUNTS = Column::lookup_public_data_check_new_leaf_merkle_check_counts;
320 static constexpr Column INVERSES = Column::lookup_public_data_check_new_leaf_merkle_check_inv;
321 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
322 ColumnAndShifts::public_data_check_sel, ColumnAndShifts::precomputed_zero,
323 ColumnAndShifts::public_data_check_new_leaf_hash, ColumnAndShifts::public_data_check_tree_size_before_write,
324 ColumnAndShifts::public_data_check_tree_height, ColumnAndShifts::public_data_check_intermediate_root,
325 ColumnAndShifts::public_data_check_write_root
327 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
328 ColumnAndShifts::merkle_check_write, ColumnAndShifts::merkle_check_read_node,
329 ColumnAndShifts::merkle_check_write_node, ColumnAndShifts::merkle_check_index,
330 ColumnAndShifts::merkle_check_path_len, ColumnAndShifts::merkle_check_read_root,
331 ColumnAndShifts::merkle_check_write_root
337template <
typename FF_>
344 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_WRITE_PUBLIC_DATA_TO_PUBLIC_INPUTS";
349 static constexpr Column COUNTS = Column::lookup_public_data_check_write_public_data_to_public_inputs_counts;
350 static constexpr Column INVERSES = Column::lookup_public_data_check_write_public_data_to_public_inputs_inv;
351 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
352 ColumnAndShifts::public_data_check_write_idx,
353 ColumnAndShifts::public_data_check_leaf_slot,
354 ColumnAndShifts::public_data_check_final_value
356 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
357 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_, ColumnAndShifts::public_inputs_cols_1_
363template <
typename FF_>
370 static constexpr std::string_view
NAME =
"LOOKUP_PUBLIC_DATA_CHECK_WRITE_WRITES_LENGTH_TO_PUBLIC_INPUTS";
375 static constexpr Column COUNTS = Column::lookup_public_data_check_write_writes_length_to_public_inputs_counts;
376 static constexpr Column INVERSES = Column::lookup_public_data_check_write_writes_length_to_public_inputs_inv;
377 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
378 ColumnAndShifts::public_data_check_length_pi_idx, ColumnAndShifts::public_data_check_public_data_writes_length
380 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
381 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
387template <
typename FF_>
This file contains the template for the generic lookup that can be specialized to enforce various loo...
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