8#include "../columns.hpp"
17 static constexpr std::string_view
NAME =
"LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_NOTE_HASH_TREE";
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
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_
36template <
typename FF_>
43 static constexpr std::string_view
NAME =
"LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_NULLIFIER_TREE";
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
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_
62template <
typename FF_>
69 static constexpr std::string_view
NAME =
"LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_PUBLIC_DATA_TREE";
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
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_
88template <
typename FF_>
95 static constexpr std::string_view
NAME =
"LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_L1_L2_TREE";
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
105 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
106 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
112template <
typename FF_>
119 static constexpr std::string_view
NAME =
"LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_GAS_USED";
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
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_
138template <
typename FF_>
145 static constexpr std::string_view
NAME =
"LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_READ_GAS_LIMIT";
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
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_
162template <
typename FF_>
169 static constexpr std::string_view
NAME =
"LOOKUP_TX_CONTEXT_RESTORE_STATE_ON_REVERT";
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
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
212template <
typename FF_>
219 static constexpr std::string_view
NAME =
"LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_WRITE_NOTE_HASH_COUNT";
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
229 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
230 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
236template <
typename FF_>
243 static constexpr std::string_view
NAME =
"LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_WRITE_NULLIFIER_COUNT";
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
253 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
254 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
260template <
typename FF_>
267 static constexpr std::string_view
NAME =
"LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_WRITE_L2_TO_L1_MESSAGE_COUNT";
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
277 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
278 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
284template <
typename FF_>
291 static constexpr std::string_view
NAME =
"LOOKUP_TX_CONTEXT_PUBLIC_INPUTS_WRITE_UNENCRYPTED_LOG_COUNT";
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
301 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
302 ColumnAndShifts::precomputed_clk, ColumnAndShifts::public_inputs_cols_0_
308template <
typename FF_>
This file contains the template for the generic lookup that can be specialized to enforce various loo...
static constexpr Column INVERSES
static constexpr size_t LOOKUP_TUPLE_SIZE
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 Column DST_SELECTOR
static constexpr Column SRC_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr Column INVERSES
static constexpr Column SRC_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column COUNTS
static constexpr Column DST_SELECTOR
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 std::string_view NAME
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view RELATION_NAME
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 SRC_SELECTOR
static constexpr Column INVERSES
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr Column DST_SELECTOR
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column COUNTS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column DST_SELECTOR
static constexpr Column INVERSES
static constexpr std::string_view NAME
static constexpr Column SRC_SELECTOR
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column COUNTS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr std::string_view NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view NAME
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_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 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 size_t LOOKUP_TUPLE_SIZE
static constexpr Column DST_SELECTOR
static constexpr Column COUNTS
static constexpr std::string_view RELATION_NAME
static constexpr Column INVERSES
static constexpr std::string_view NAME
static constexpr Column SRC_SELECTOR
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr Column INVERSES
static constexpr Column DST_SELECTOR
static constexpr Column COUNTS
static constexpr Column DST_SELECTOR
static constexpr Column INVERSES
static constexpr std::string_view NAME
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 Column COUNTS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view RELATION_NAME
static constexpr Column INVERSES
static constexpr Column COUNTS
static constexpr Column SRC_SELECTOR
static constexpr Column DST_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 size_t LOOKUP_TUPLE_SIZE