Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_tx_context.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_TX_CONTEXT_PUBLIC_INPUTS_NOTE_HASH_TREE";
18 static constexpr std::string_view RELATION_NAME = "tx_context";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
20 static constexpr Column SRC_SELECTOR = Column::tx_should_read_note_hash_tree;
21 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
22 static constexpr Column COUNTS = Column::lookup_tx_context_public_inputs_note_hash_tree_counts;
23 static constexpr Column INVERSES = Column::lookup_tx_context_public_inputs_note_hash_tree_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
25 ColumnAndShifts::tx_note_hash_pi_offset,
26 ColumnAndShifts::tx_prev_note_hash_tree_root,
27 ColumnAndShifts::tx_prev_note_hash_tree_size
28 };
29 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
30 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_, ColumnAndShifts::public_inputs_cols_1_
31 };
32};
33
36template <typename FF_>
39
41
43 static constexpr std::string_view NAME = "LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_NULLIFIER_TREE";
44 static constexpr std::string_view RELATION_NAME = "tx_context";
45 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
46 static constexpr Column SRC_SELECTOR = Column::tx_should_read_nullifier_tree;
47 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
48 static constexpr Column COUNTS = Column::lookup_tx_context_public_inputs_nullifier_tree_counts;
49 static constexpr Column INVERSES = Column::lookup_tx_context_public_inputs_nullifier_tree_inv;
50 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
51 ColumnAndShifts::tx_nullifier_pi_offset,
52 ColumnAndShifts::tx_prev_nullifier_tree_root,
53 ColumnAndShifts::tx_prev_nullifier_tree_size
54 };
55 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
56 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_, ColumnAndShifts::public_inputs_cols_1_
57 };
58};
59
62template <typename FF_>
65
67
69 static constexpr std::string_view NAME = "LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_PUBLIC_DATA_TREE";
70 static constexpr std::string_view RELATION_NAME = "tx_context";
71 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
72 static constexpr Column SRC_SELECTOR = Column::tx_should_read_public_data_tree;
73 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
74 static constexpr Column COUNTS = Column::lookup_tx_context_public_inputs_public_data_tree_counts;
75 static constexpr Column INVERSES = Column::lookup_tx_context_public_inputs_public_data_tree_inv;
76 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
77 ColumnAndShifts::tx_public_data_pi_offset,
78 ColumnAndShifts::tx_prev_public_data_tree_root,
79 ColumnAndShifts::tx_prev_public_data_tree_size
80 };
81 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
82 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_, ColumnAndShifts::public_inputs_cols_1_
83 };
84};
85
88template <typename FF_>
91
93
95 static constexpr std::string_view NAME = "LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_L1_L2_TREE";
96 static constexpr std::string_view RELATION_NAME = "tx_context";
97 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
98 static constexpr Column SRC_SELECTOR = Column::tx_should_read_l1_l2_tree;
99 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
100 static constexpr Column COUNTS = Column::lookup_tx_context_public_inputs_l1_l2_tree_counts;
101 static constexpr Column INVERSES = Column::lookup_tx_context_public_inputs_l1_l2_tree_inv;
102 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
103 ColumnAndShifts::tx_l1_l2_pi_offset, ColumnAndShifts::tx_l1_l2_tree_root
104 };
105 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
106 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
107 };
108};
109
112template <typename FF_>
115
117
119 static constexpr std::string_view NAME = "LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_GAS_USED";
120 static constexpr std::string_view RELATION_NAME = "tx_context";
121 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
122 static constexpr Column SRC_SELECTOR = Column::tx_should_read_gas_used;
123 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
124 static constexpr Column COUNTS = Column::lookup_tx_context_public_inputs_gas_used_counts;
125 static constexpr Column INVERSES = Column::lookup_tx_context_public_inputs_gas_used_inv;
126 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
127 ColumnAndShifts::tx_gas_used_pi_offset,
128 ColumnAndShifts::tx_prev_da_gas_used,
129 ColumnAndShifts::tx_prev_l2_gas_used
130 };
131 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
132 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_, ColumnAndShifts::public_inputs_cols_1_
133 };
134};
135
138template <typename FF_>
141
143
145 static constexpr std::string_view NAME = "LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_READ_GAS_LIMIT";
146 static constexpr std::string_view RELATION_NAME = "tx_context";
147 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
148 static constexpr Column SRC_SELECTOR = Column::tx_should_read_gas_limit;
149 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
150 static constexpr Column COUNTS = Column::lookup_tx_context_public_inputs_read_gas_limit_counts;
151 static constexpr Column INVERSES = Column::lookup_tx_context_public_inputs_read_gas_limit_inv;
152 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
153 ColumnAndShifts::tx_gas_limit_pi_offset, ColumnAndShifts::tx_da_gas_limit, ColumnAndShifts::tx_l2_gas_limit
154 };
155 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
156 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_, ColumnAndShifts::public_inputs_cols_1_
157 };
158};
159
162template <typename FF_>
165
167
169 static constexpr std::string_view NAME = "LOOKUP_TX_CONTEXT_RESTORE_STATE_ON_REVERT";
170 static constexpr std::string_view RELATION_NAME = "tx_context";
171 static constexpr size_t LOOKUP_TUPLE_SIZE = 14;
172 static constexpr Column SRC_SELECTOR = Column::tx_reverted;
173 static constexpr Column DST_SELECTOR = Column::tx_sel;
174 static constexpr Column COUNTS = Column::lookup_tx_context_restore_state_on_revert_counts;
175 static constexpr Column INVERSES = Column::lookup_tx_context_restore_state_on_revert_inv;
176 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
177 ColumnAndShifts::tx_setup_phase_value,
178 ColumnAndShifts::tx_reverted,
179 ColumnAndShifts::tx_prev_note_hash_tree_root_shift,
180 ColumnAndShifts::tx_prev_note_hash_tree_size_shift,
181 ColumnAndShifts::tx_prev_num_note_hashes_emitted_shift,
182 ColumnAndShifts::tx_prev_nullifier_tree_root_shift,
183 ColumnAndShifts::tx_prev_nullifier_tree_size_shift,
184 ColumnAndShifts::tx_prev_num_nullifiers_emitted_shift,
185 ColumnAndShifts::tx_prev_public_data_tree_root_shift,
186 ColumnAndShifts::tx_prev_public_data_tree_size_shift,
187 ColumnAndShifts::tx_prev_written_public_data_slots_tree_root_shift,
188 ColumnAndShifts::tx_prev_written_public_data_slots_tree_size_shift,
189 ColumnAndShifts::tx_prev_num_unencrypted_logs_shift,
190 ColumnAndShifts::tx_prev_num_l2_to_l1_messages_shift
191 };
192 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
193 ColumnAndShifts::tx_phase_value,
194 ColumnAndShifts::tx_end_phase,
195 ColumnAndShifts::tx_next_note_hash_tree_root,
196 ColumnAndShifts::tx_next_note_hash_tree_size,
197 ColumnAndShifts::tx_next_num_note_hashes_emitted,
198 ColumnAndShifts::tx_next_nullifier_tree_root,
199 ColumnAndShifts::tx_next_nullifier_tree_size,
200 ColumnAndShifts::tx_next_num_nullifiers_emitted,
201 ColumnAndShifts::tx_next_public_data_tree_root,
202 ColumnAndShifts::tx_next_public_data_tree_size,
203 ColumnAndShifts::tx_next_written_public_data_slots_tree_root,
204 ColumnAndShifts::tx_next_written_public_data_slots_tree_size,
205 ColumnAndShifts::tx_next_num_unencrypted_logs,
206 ColumnAndShifts::tx_next_num_l2_to_l1_messages
207 };
208};
209
212template <typename FF_>
215
217
219 static constexpr std::string_view NAME = "LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_WRITE_NOTE_HASH_COUNT";
220 static constexpr std::string_view RELATION_NAME = "tx_context";
221 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
222 static constexpr Column SRC_SELECTOR = Column::tx_is_cleanup;
223 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
224 static constexpr Column COUNTS = Column::lookup_tx_context_public_inputs_write_note_hash_count_counts;
225 static constexpr Column INVERSES = Column::lookup_tx_context_public_inputs_write_note_hash_count_inv;
226 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
227 ColumnAndShifts::tx_array_length_note_hashes_pi_offset, ColumnAndShifts::tx_prev_num_note_hashes_emitted
228 };
229 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
230 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
231 };
232};
233
236template <typename FF_>
239
241
243 static constexpr std::string_view NAME = "LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_WRITE_NULLIFIER_COUNT";
244 static constexpr std::string_view RELATION_NAME = "tx_context";
245 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
246 static constexpr Column SRC_SELECTOR = Column::tx_is_cleanup;
247 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
248 static constexpr Column COUNTS = Column::lookup_tx_context_public_inputs_write_nullifier_count_counts;
249 static constexpr Column INVERSES = Column::lookup_tx_context_public_inputs_write_nullifier_count_inv;
250 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
251 ColumnAndShifts::tx_array_length_nullifiers_pi_offset, ColumnAndShifts::tx_prev_num_nullifiers_emitted
252 };
253 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
254 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
255 };
256};
257
260template <typename FF_>
263
265
267 static constexpr std::string_view NAME = "LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_WRITE_L2_TO_L1_MESSAGE_COUNT";
268 static constexpr std::string_view RELATION_NAME = "tx_context";
269 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
270 static constexpr Column SRC_SELECTOR = Column::tx_is_cleanup;
271 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
272 static constexpr Column COUNTS = Column::lookup_tx_context_public_inputs_write_l2_to_l1_message_count_counts;
273 static constexpr Column INVERSES = Column::lookup_tx_context_public_inputs_write_l2_to_l1_message_count_inv;
274 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
275 ColumnAndShifts::tx_array_length_l2_to_l1_messages_pi_offset, ColumnAndShifts::tx_prev_num_l2_to_l1_messages
276 };
277 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
278 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
279 };
280};
281
284template <typename FF_>
287
289
291 static constexpr std::string_view NAME = "LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_WRITE_UNENCRYPTED_LOG_COUNT";
292 static constexpr std::string_view RELATION_NAME = "tx_context";
293 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
294 static constexpr Column SRC_SELECTOR = Column::tx_is_cleanup;
295 static constexpr Column DST_SELECTOR = Column::public_inputs_sel;
296 static constexpr Column COUNTS = Column::lookup_tx_context_public_inputs_write_unencrypted_log_count_counts;
297 static constexpr Column INVERSES = Column::lookup_tx_context_public_inputs_write_unencrypted_log_count_inv;
298 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
299 ColumnAndShifts::tx_array_length_unencrypted_logs_pi_offset, ColumnAndShifts::tx_prev_num_unencrypted_logs
300 };
301 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
302 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
303 };
304};
305
308template <typename FF_>
311
312} // 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 > 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 > 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 > 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