8#include "../columns.hpp"
17 static constexpr std::string_view
NAME =
"LOOKUP_NULLIFIER_CHECK_SILO_POSEIDON2";
22 static constexpr Column COUNTS = Column::lookup_nullifier_check_silo_poseidon2_counts;
23 static constexpr Column INVERSES = Column::lookup_nullifier_check_silo_poseidon2_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
25 ColumnAndShifts::nullifier_check_sel,
26 ColumnAndShifts::nullifier_check_siloing_separator,
27 ColumnAndShifts::nullifier_check_address,
28 ColumnAndShifts::nullifier_check_nullifier,
29 ColumnAndShifts::nullifier_check_siloed_nullifier
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
41template <
typename FF_>
48 static constexpr std::string_view
NAME =
"LOOKUP_NULLIFIER_CHECK_LOW_LEAF_POSEIDON2";
53 static constexpr Column COUNTS = Column::lookup_nullifier_check_low_leaf_poseidon2_counts;
54 static constexpr Column INVERSES = Column::lookup_nullifier_check_low_leaf_poseidon2_inv;
55 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
56 ColumnAndShifts::nullifier_check_low_leaf_nullifier,
57 ColumnAndShifts::nullifier_check_low_leaf_next_nullifier,
58 ColumnAndShifts::nullifier_check_low_leaf_next_index,
59 ColumnAndShifts::nullifier_check_low_leaf_hash
61 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
62 ColumnAndShifts::poseidon2_hash_input_0,
63 ColumnAndShifts::poseidon2_hash_input_1,
64 ColumnAndShifts::poseidon2_hash_input_2,
65 ColumnAndShifts::poseidon2_hash_output
71template <
typename FF_>
78 static constexpr std::string_view
NAME =
"LOOKUP_NULLIFIER_CHECK_UPDATED_LOW_LEAF_POSEIDON2";
83 static constexpr Column COUNTS = Column::lookup_nullifier_check_updated_low_leaf_poseidon2_counts;
84 static constexpr Column INVERSES = Column::lookup_nullifier_check_updated_low_leaf_poseidon2_inv;
85 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
86 ColumnAndShifts::nullifier_check_low_leaf_nullifier,
87 ColumnAndShifts::nullifier_check_updated_low_leaf_next_nullifier,
88 ColumnAndShifts::nullifier_check_updated_low_leaf_next_index,
89 ColumnAndShifts::nullifier_check_updated_low_leaf_hash
91 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
92 ColumnAndShifts::poseidon2_hash_input_0,
93 ColumnAndShifts::poseidon2_hash_input_1,
94 ColumnAndShifts::poseidon2_hash_input_2,
95 ColumnAndShifts::poseidon2_hash_output
101template <
typename FF_>
108 static constexpr std::string_view
NAME =
"LOOKUP_NULLIFIER_CHECK_LOW_LEAF_MERKLE_CHECK";
113 static constexpr Column COUNTS = Column::lookup_nullifier_check_low_leaf_merkle_check_counts;
114 static constexpr Column INVERSES = Column::lookup_nullifier_check_low_leaf_merkle_check_inv;
115 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
116 ColumnAndShifts::nullifier_check_should_insert, ColumnAndShifts::nullifier_check_low_leaf_hash,
117 ColumnAndShifts::nullifier_check_updated_low_leaf_hash, ColumnAndShifts::nullifier_check_low_leaf_index,
118 ColumnAndShifts::nullifier_check_tree_height, ColumnAndShifts::nullifier_check_root,
119 ColumnAndShifts::nullifier_check_intermediate_root
121 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
122 ColumnAndShifts::merkle_check_write, ColumnAndShifts::merkle_check_read_node,
123 ColumnAndShifts::merkle_check_write_node, ColumnAndShifts::merkle_check_index,
124 ColumnAndShifts::merkle_check_path_len, ColumnAndShifts::merkle_check_read_root,
125 ColumnAndShifts::merkle_check_write_root
131template <
typename FF_>
138 static constexpr std::string_view
NAME =
"LOOKUP_NULLIFIER_CHECK_LOW_LEAF_NULLIFIER_VALIDATION";
143 static constexpr Column COUNTS = Column::lookup_nullifier_check_low_leaf_nullifier_validation_counts;
144 static constexpr Column INVERSES = Column::lookup_nullifier_check_low_leaf_nullifier_validation_inv;
145 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
146 ColumnAndShifts::nullifier_check_siloed_nullifier,
147 ColumnAndShifts::nullifier_check_low_leaf_nullifier,
148 ColumnAndShifts::nullifier_check_sel
150 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
151 ColumnAndShifts::ff_gt_b,
152 ColumnAndShifts::ff_gt_result };
157template <
typename FF_>
164 static constexpr std::string_view
NAME =
"LOOKUP_NULLIFIER_CHECK_LOW_LEAF_NEXT_NULLIFIER_VALIDATION";
169 static constexpr Column COUNTS = Column::lookup_nullifier_check_low_leaf_next_nullifier_validation_counts;
170 static constexpr Column INVERSES = Column::lookup_nullifier_check_low_leaf_next_nullifier_validation_inv;
171 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
172 ColumnAndShifts::nullifier_check_low_leaf_next_nullifier,
173 ColumnAndShifts::nullifier_check_siloed_nullifier,
174 ColumnAndShifts::nullifier_check_sel
176 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
177 ColumnAndShifts::ff_gt_b,
178 ColumnAndShifts::ff_gt_result };
183template <
typename FF_>
190 static constexpr std::string_view
NAME =
"LOOKUP_NULLIFIER_CHECK_NEW_LEAF_POSEIDON2";
195 static constexpr Column COUNTS = Column::lookup_nullifier_check_new_leaf_poseidon2_counts;
196 static constexpr Column INVERSES = Column::lookup_nullifier_check_new_leaf_poseidon2_inv;
197 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
198 ColumnAndShifts::nullifier_check_siloed_nullifier,
199 ColumnAndShifts::nullifier_check_low_leaf_next_nullifier,
200 ColumnAndShifts::nullifier_check_low_leaf_next_index,
201 ColumnAndShifts::nullifier_check_new_leaf_hash
203 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
204 ColumnAndShifts::poseidon2_hash_input_0,
205 ColumnAndShifts::poseidon2_hash_input_1,
206 ColumnAndShifts::poseidon2_hash_input_2,
207 ColumnAndShifts::poseidon2_hash_output
213template <
typename FF_>
220 static constexpr std::string_view
NAME =
"LOOKUP_NULLIFIER_CHECK_NEW_LEAF_MERKLE_CHECK";
225 static constexpr Column COUNTS = Column::lookup_nullifier_check_new_leaf_merkle_check_counts;
226 static constexpr Column INVERSES = Column::lookup_nullifier_check_new_leaf_merkle_check_inv;
227 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
228 ColumnAndShifts::nullifier_check_sel, ColumnAndShifts::precomputed_zero,
229 ColumnAndShifts::nullifier_check_new_leaf_hash, ColumnAndShifts::nullifier_check_tree_size_before_write,
230 ColumnAndShifts::nullifier_check_tree_height, ColumnAndShifts::nullifier_check_intermediate_root,
231 ColumnAndShifts::nullifier_check_write_root
233 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
234 ColumnAndShifts::merkle_check_write, ColumnAndShifts::merkle_check_read_node,
235 ColumnAndShifts::merkle_check_write_node, ColumnAndShifts::merkle_check_index,
236 ColumnAndShifts::merkle_check_path_len, ColumnAndShifts::merkle_check_read_root,
237 ColumnAndShifts::merkle_check_write_root
243template <
typename FF_>
250 static constexpr std::string_view
NAME =
"LOOKUP_NULLIFIER_CHECK_WRITE_NULLIFIER_TO_PUBLIC_INPUTS";
255 static constexpr Column COUNTS = Column::lookup_nullifier_check_write_nullifier_to_public_inputs_counts;
256 static constexpr Column INVERSES = Column::lookup_nullifier_check_write_nullifier_to_public_inputs_inv;
257 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
258 ColumnAndShifts::nullifier_check_public_inputs_index, ColumnAndShifts::nullifier_check_siloed_nullifier
260 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
261 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
267template <
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 Column COUNTS
static constexpr Column INVERSES
static constexpr Column DST_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr Column SRC_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column DST_SELECTOR
static constexpr Column INVERSES
static constexpr std::string_view RELATION_NAME
static constexpr Column COUNTS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column INVERSES
static constexpr Column DST_SELECTOR
static constexpr Column COUNTS
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 size_t LOOKUP_TUPLE_SIZE
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr Column SRC_SELECTOR
static constexpr Column COUNTS
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
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 INVERSES
static constexpr Column SRC_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column DST_SELECTOR
static constexpr Column INVERSES
static constexpr Column COUNTS
static constexpr Column DST_SELECTOR
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
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 DST_SELECTOR
static constexpr Column SRC_SELECTOR
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
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 INVERSES
static constexpr Column COUNTS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column SRC_SELECTOR
static constexpr std::string_view NAME
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