Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_public_data_check.hpp
Go to the documentation of this file.
1// AUTOGENERATED FILE
2#pragma once
3
4#include <cstddef>
5#include <string_view>
6#include <tuple>
7
8#include "../columns.hpp"
11
12namespace bb::avm2 {
13
15
17 static constexpr std::string_view NAME = "LOOKUP_PUBLIC_DATA_CHECK_SILO_POSEIDON2";
18 static constexpr std::string_view RELATION_NAME = "public_data_check";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
20 static constexpr Column SRC_SELECTOR = Column::public_data_check_sel;
21 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_end;
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
30 };
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
37 };
38};
39
42template <typename FF_>
45
47
49 static constexpr std::string_view NAME = "LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_SLOT_VALIDATION";
50 static constexpr std::string_view RELATION_NAME = "public_data_check";
51 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
52 static constexpr Column SRC_SELECTOR = Column::public_data_check_leaf_not_exists;
53 static constexpr Column DST_SELECTOR = Column::ff_gt_sel_gt;
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
60 };
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 };
64};
65
68template <typename FF_>
71
73
75 static constexpr std::string_view NAME = "LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_NEXT_SLOT_VALIDATION";
76 static constexpr std::string_view RELATION_NAME = "public_data_check";
77 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
78 static constexpr Column SRC_SELECTOR = Column::public_data_check_next_slot_is_nonzero;
79 static constexpr Column DST_SELECTOR = Column::ff_gt_sel_gt;
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
86 };
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 };
90};
91
94template <typename FF_>
97
99
101 static constexpr std::string_view NAME = "LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_POSEIDON2_0";
102 static constexpr std::string_view RELATION_NAME = "public_data_check";
103 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
104 static constexpr Column SRC_SELECTOR = Column::public_data_check_sel;
105 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_start;
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
113 };
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
119 };
120};
121
124template <typename FF_>
127
129
131 static constexpr std::string_view NAME = "LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_POSEIDON2_1";
132 static constexpr std::string_view RELATION_NAME = "public_data_check";
133 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
134 static constexpr Column SRC_SELECTOR = Column::public_data_check_sel;
135 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_end;
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
143 };
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
149 };
150};
151
154template <typename FF_>
157
159
161 static constexpr std::string_view NAME = "LOOKUP_PUBLIC_DATA_CHECK_UPDATED_LOW_LEAF_POSEIDON2_0";
162 static constexpr std::string_view RELATION_NAME = "public_data_check";
163 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
164 static constexpr Column SRC_SELECTOR = Column::public_data_check_write;
165 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_start;
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
173 };
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
179 };
180};
181
184template <typename FF_>
187
189
191 static constexpr std::string_view NAME = "LOOKUP_PUBLIC_DATA_CHECK_UPDATED_LOW_LEAF_POSEIDON2_1";
192 static constexpr std::string_view RELATION_NAME = "public_data_check";
193 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
194 static constexpr Column SRC_SELECTOR = Column::public_data_check_write;
195 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_end;
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
203 };
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
209 };
210};
211
214template <typename FF_>
217
219
221 static constexpr std::string_view NAME = "LOOKUP_PUBLIC_DATA_CHECK_LOW_LEAF_MERKLE_CHECK";
222 static constexpr std::string_view RELATION_NAME = "public_data_check";
223 static constexpr size_t LOOKUP_TUPLE_SIZE = 7;
224 static constexpr Column SRC_SELECTOR = Column::public_data_check_sel;
225 static constexpr Column DST_SELECTOR = Column::merkle_check_start;
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
236 };
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
242 };
243};
244
247template <typename FF_>
250
252
254 static constexpr std::string_view NAME = "LOOKUP_PUBLIC_DATA_CHECK_NEW_LEAF_POSEIDON2_0";
255 static constexpr std::string_view RELATION_NAME = "public_data_check";
256 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
257 static constexpr Column SRC_SELECTOR = Column::public_data_check_should_insert;
258 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_start;
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
266 };
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
272 };
273};
274
277template <typename FF_>
280
282
284 static constexpr std::string_view NAME = "LOOKUP_PUBLIC_DATA_CHECK_NEW_LEAF_POSEIDON2_1";
285 static constexpr std::string_view RELATION_NAME = "public_data_check";
286 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
287 static constexpr Column SRC_SELECTOR = Column::public_data_check_should_insert;
288 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_end;
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
296 };
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
302 };
303};
304
307template <typename FF_>
310
312
314 static constexpr std::string_view NAME = "LOOKUP_PUBLIC_DATA_CHECK_NEW_LEAF_MERKLE_CHECK";
315 static constexpr std::string_view RELATION_NAME = "public_data_check";
316 static constexpr size_t LOOKUP_TUPLE_SIZE = 7;
317 static constexpr Column SRC_SELECTOR = Column::public_data_check_should_insert;
318 static constexpr Column DST_SELECTOR = Column::merkle_check_start;
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
326 };
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
332 };
333};
334
337template <typename FF_>
340
342
344 static constexpr std::string_view NAME = "LOOKUP_PUBLIC_DATA_CHECK_WRITE_PUBLIC_DATA_TO_PUBLIC_INPUTS";
345 static constexpr std::string_view RELATION_NAME = "public_data_check";
346 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
347 static constexpr Column SRC_SELECTOR = Column::public_data_check_should_write_to_public_inputs;
348 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
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
355 };
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_
358 };
359};
360
363template <typename FF_>
366
368
370 static constexpr std::string_view NAME = "LOOKUP_PUBLIC_DATA_CHECK_WRITE_WRITES_LENGTH_TO_PUBLIC_INPUTS";
371 static constexpr std::string_view RELATION_NAME = "public_data_check";
372 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
373 static constexpr Column SRC_SELECTOR = Column::public_data_check_end;
374 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
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
379 };
380 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
381 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
382 };
383};
384
387template <typename FF_>
390
391} // namespace bb::avm2
This file contains the template for the generic lookup that can be specialized to enforce various loo...
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS