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 = 4;
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_updated_class_ids_slot,
50 ColumnAndShifts::update_check_address,
51 ColumnAndShifts::precomputed_zero,
52 ColumnAndShifts::update_check_delayed_public_mutable_slot
53 };
54 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
55 ColumnAndShifts::poseidon2_hash_input_0,
56 ColumnAndShifts::poseidon2_hash_input_1,
57 ColumnAndShifts::poseidon2_hash_input_2,
58 ColumnAndShifts::poseidon2_hash_output
59 };
60};
61
64template <typename FF_>
67
69
71 static constexpr std::string_view NAME = "LOOKUP_UPDATE_CHECK_UPDATE_HASH_PUBLIC_DATA_READ";
72 static constexpr std::string_view RELATION_NAME = "update_check";
73 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
74 static constexpr Column SRC_SELECTOR = Column::update_check_sel;
75 static constexpr Column DST_SELECTOR = Column::public_data_check_sel;
76 static constexpr Column COUNTS = Column::lookup_update_check_update_hash_public_data_read_counts;
77 static constexpr Column INVERSES = Column::lookup_update_check_update_hash_public_data_read_inv;
78 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
79 ColumnAndShifts::update_check_deployer_protocol_contract_address,
80 ColumnAndShifts::update_check_delayed_public_mutable_hash_slot,
81 ColumnAndShifts::update_check_update_hash,
82 ColumnAndShifts::update_check_public_data_tree_root
83 };
84 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
85 ColumnAndShifts::public_data_check_address,
86 ColumnAndShifts::public_data_check_slot,
87 ColumnAndShifts::public_data_check_value,
88 ColumnAndShifts::public_data_check_root
89 };
90};
91
94template <typename FF_>
97
99
101 static constexpr std::string_view NAME = "LOOKUP_UPDATE_CHECK_UPDATE_HASH_POSEIDON2";
102 static constexpr std::string_view RELATION_NAME = "update_check";
103 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
104 static constexpr Column SRC_SELECTOR = Column::update_check_hash_not_zero;
105 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_end;
106 static constexpr Column COUNTS = Column::lookup_update_check_update_hash_poseidon2_counts;
107 static constexpr Column INVERSES = Column::lookup_update_check_update_hash_poseidon2_inv;
108 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
109 ColumnAndShifts::update_check_update_preimage_metadata,
110 ColumnAndShifts::update_check_update_preimage_pre_class_id,
111 ColumnAndShifts::update_check_update_preimage_post_class_id,
112 ColumnAndShifts::update_check_update_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_UPDATE_CHECK_UPDATE_HI_METADATA_RANGE";
132 static constexpr std::string_view RELATION_NAME = "update_check";
133 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
134 static constexpr Column SRC_SELECTOR = Column::update_check_hash_not_zero;
135 static constexpr Column DST_SELECTOR = Column::range_check_sel;
136 static constexpr Column COUNTS = Column::lookup_update_check_update_hi_metadata_range_counts;
137 static constexpr Column INVERSES = Column::lookup_update_check_update_hi_metadata_range_inv;
138 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
139 ColumnAndShifts::update_check_update_hi_metadata, ColumnAndShifts::update_check_update_hi_metadata_bit_size
140 };
141 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
142 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
143 };
144};
145
148template <typename FF_>
151
153
155 static constexpr std::string_view NAME = "LOOKUP_UPDATE_CHECK_UPDATE_LO_METADATA_RANGE";
156 static constexpr std::string_view RELATION_NAME = "update_check";
157 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
158 static constexpr Column SRC_SELECTOR = Column::update_check_hash_not_zero;
159 static constexpr Column DST_SELECTOR = Column::range_check_sel;
160 static constexpr Column COUNTS = Column::lookup_update_check_update_lo_metadata_range_counts;
161 static constexpr Column INVERSES = Column::lookup_update_check_update_lo_metadata_range_inv;
162 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
163 ColumnAndShifts::update_check_timestamp_of_change, ColumnAndShifts::update_check_timestamp_of_change_bit_size
164 };
165 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
166 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
167 };
168};
169
172template <typename FF_>
175
177
179 static constexpr std::string_view NAME = "LOOKUP_UPDATE_CHECK_TIMESTAMP_OF_CHANGE_CMP_RANGE";
180 static constexpr std::string_view RELATION_NAME = "update_check";
181 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
182 static constexpr Column SRC_SELECTOR = Column::update_check_hash_not_zero;
183 static constexpr Column DST_SELECTOR = Column::range_check_sel;
184 static constexpr Column COUNTS = Column::lookup_update_check_timestamp_of_change_cmp_range_counts;
185 static constexpr Column INVERSES = Column::lookup_update_check_timestamp_of_change_cmp_range_inv;
186 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
187 ColumnAndShifts::update_check_timestamp_of_change_subtraction,
188 ColumnAndShifts::update_check_timestamp_of_change_bit_size
189 };
190 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
191 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
192 };
193};
194
197template <typename FF_>
200
201} // 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