Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_update_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_UPDATE_CHECK_TIMESTAMP_FROM_PUBLIC_INPUTS";
18 static constexpr std::string_view RELATION_NAME = "update_check";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
20 static constexpr Column SRC_SELECTOR = Column::update_check_sel;
21 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
22 static constexpr Column COUNTS = Column::lookup_update_check_timestamp_from_public_inputs_counts;
23 static constexpr Column INVERSES = Column::lookup_update_check_timestamp_from_public_inputs_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
25 ColumnAndShifts::update_check_timestamp_pi_offset, ColumnAndShifts::update_check_timestamp
26 };
27 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
28 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
29 };
30};
31
34template <typename FF_>
37
39
41 static constexpr std::string_view NAME = "LOOKUP_UPDATE_CHECK_DELAYED_PUBLIC_MUTABLE_SLOT_POSEIDON2";
42 static constexpr std::string_view RELATION_NAME = "update_check";
43 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
44 static constexpr Column SRC_SELECTOR = Column::update_check_sel;
45 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_end;
46 static constexpr Column COUNTS = Column::lookup_update_check_delayed_public_mutable_slot_poseidon2_counts;
47 static constexpr Column INVERSES = Column::lookup_update_check_delayed_public_mutable_slot_poseidon2_inv;
48 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
49 ColumnAndShifts::update_check_sel,
50 ColumnAndShifts::update_check_updated_class_ids_slot,
51 ColumnAndShifts::update_check_address,
52 ColumnAndShifts::precomputed_zero,
53 ColumnAndShifts::update_check_delayed_public_mutable_slot
54 };
55 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
56 ColumnAndShifts::poseidon2_hash_start,
57 ColumnAndShifts::poseidon2_hash_input_0,
58 ColumnAndShifts::poseidon2_hash_input_1,
59 ColumnAndShifts::poseidon2_hash_input_2,
60 ColumnAndShifts::poseidon2_hash_output
61 };
62};
63
66template <typename FF_>
69
71
73 static constexpr std::string_view NAME = "LOOKUP_UPDATE_CHECK_UPDATE_HASH_PUBLIC_DATA_READ";
74 static constexpr std::string_view RELATION_NAME = "update_check";
75 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
76 static constexpr Column SRC_SELECTOR = Column::update_check_sel;
77 static constexpr Column DST_SELECTOR = Column::public_data_check_sel;
78 static constexpr Column COUNTS = Column::lookup_update_check_update_hash_public_data_read_counts;
79 static constexpr Column INVERSES = Column::lookup_update_check_update_hash_public_data_read_inv;
80 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
81 ColumnAndShifts::update_check_deployer_protocol_contract_address,
82 ColumnAndShifts::update_check_delayed_public_mutable_hash_slot,
83 ColumnAndShifts::update_check_update_hash,
84 ColumnAndShifts::update_check_public_data_tree_root
85 };
86 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
87 ColumnAndShifts::public_data_check_address,
88 ColumnAndShifts::public_data_check_slot,
89 ColumnAndShifts::public_data_check_value,
90 ColumnAndShifts::public_data_check_root
91 };
92};
93
96template <typename FF_>
99
101
103 static constexpr std::string_view NAME = "LOOKUP_UPDATE_CHECK_UPDATE_HASH_POSEIDON2";
104 static constexpr std::string_view RELATION_NAME = "update_check";
105 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
106 static constexpr Column SRC_SELECTOR = Column::update_check_hash_not_zero;
107 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_end;
108 static constexpr Column COUNTS = Column::lookup_update_check_update_hash_poseidon2_counts;
109 static constexpr Column INVERSES = Column::lookup_update_check_update_hash_poseidon2_inv;
110 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
111 ColumnAndShifts::update_check_sel,
112 ColumnAndShifts::update_check_update_preimage_metadata,
113 ColumnAndShifts::update_check_update_preimage_pre_class_id,
114 ColumnAndShifts::update_check_update_preimage_post_class_id,
115 ColumnAndShifts::update_check_update_hash
116 };
117 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
118 ColumnAndShifts::poseidon2_hash_start,
119 ColumnAndShifts::poseidon2_hash_input_0,
120 ColumnAndShifts::poseidon2_hash_input_1,
121 ColumnAndShifts::poseidon2_hash_input_2,
122 ColumnAndShifts::poseidon2_hash_output
123 };
124};
125
128template <typename FF_>
131
133
135 static constexpr std::string_view NAME = "LOOKUP_UPDATE_CHECK_UPDATE_HI_METADATA_RANGE";
136 static constexpr std::string_view RELATION_NAME = "update_check";
137 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
138 static constexpr Column SRC_SELECTOR = Column::update_check_hash_not_zero;
139 static constexpr Column DST_SELECTOR = Column::range_check_sel;
140 static constexpr Column COUNTS = Column::lookup_update_check_update_hi_metadata_range_counts;
141 static constexpr Column INVERSES = Column::lookup_update_check_update_hi_metadata_range_inv;
142 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
143 ColumnAndShifts::update_check_update_hi_metadata, ColumnAndShifts::update_check_update_hi_metadata_bit_size
144 };
145 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
146 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
147 };
148};
149
152template <typename FF_>
155
157
159 static constexpr std::string_view NAME = "LOOKUP_UPDATE_CHECK_UPDATE_LO_METADATA_RANGE";
160 static constexpr std::string_view RELATION_NAME = "update_check";
161 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
162 static constexpr Column SRC_SELECTOR = Column::update_check_hash_not_zero;
163 static constexpr Column DST_SELECTOR = Column::range_check_sel;
164 static constexpr Column COUNTS = Column::lookup_update_check_update_lo_metadata_range_counts;
165 static constexpr Column INVERSES = Column::lookup_update_check_update_lo_metadata_range_inv;
166 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
167 ColumnAndShifts::update_check_timestamp_of_change, ColumnAndShifts::update_check_timestamp_of_change_bit_size
168 };
169 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
170 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
171 };
172};
173
176template <typename FF_>
179
181
183 static constexpr std::string_view NAME = "LOOKUP_UPDATE_CHECK_TIMESTAMP_IS_LT_TIMESTAMP_OF_CHANGE";
184 static constexpr std::string_view RELATION_NAME = "update_check";
185 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
186 static constexpr Column SRC_SELECTOR = Column::update_check_hash_not_zero;
187 static constexpr Column DST_SELECTOR = Column::gt_sel_others;
188 static constexpr Column COUNTS = Column::lookup_update_check_timestamp_is_lt_timestamp_of_change_counts;
189 static constexpr Column INVERSES = Column::lookup_update_check_timestamp_is_lt_timestamp_of_change_inv;
190 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
191 ColumnAndShifts::update_check_timestamp_of_change,
192 ColumnAndShifts::update_check_timestamp,
193 ColumnAndShifts::update_check_timestamp_is_lt_timestamp_of_change
194 };
195 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
196 ColumnAndShifts::gt_input_b,
197 ColumnAndShifts::gt_res };
198};
199
202template <typename FF_>
205
206} // 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 > 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