8#include "../columns.hpp"
17 static constexpr std::string_view
NAME =
"LOOKUP_EMIT_UNENCRYPTED_LOG_CHECK_LOG_SIZE_TOO_LARGE";
18 static constexpr std::string_view
RELATION_NAME =
"emit_unencrypted_log";
22 static constexpr Column COUNTS = Column::lookup_emit_unencrypted_log_check_log_size_too_large_counts;
23 static constexpr Column INVERSES = Column::lookup_emit_unencrypted_log_check_log_size_too_large_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
25 ColumnAndShifts::emit_unencrypted_log_log_size,
26 ColumnAndShifts::emit_unencrypted_log_max_log_size,
27 ColumnAndShifts::emit_unencrypted_log_error_too_large
29 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::gt_input_a,
30 ColumnAndShifts::gt_input_b,
31 ColumnAndShifts::gt_res };
36template <
typename FF_>
43 static constexpr std::string_view
NAME =
"LOOKUP_EMIT_UNENCRYPTED_LOG_CHECK_MEMORY_OUT_OF_BOUNDS";
44 static constexpr std::string_view
RELATION_NAME =
"emit_unencrypted_log";
48 static constexpr Column COUNTS = Column::lookup_emit_unencrypted_log_check_memory_out_of_bounds_counts;
49 static constexpr Column INVERSES = Column::lookup_emit_unencrypted_log_check_memory_out_of_bounds_inv;
50 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
51 ColumnAndShifts::emit_unencrypted_log_end_log_address,
52 ColumnAndShifts::emit_unencrypted_log_max_mem_addr,
53 ColumnAndShifts::emit_unencrypted_log_error_out_of_bounds
55 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::gt_input_a,
56 ColumnAndShifts::gt_input_b,
57 ColumnAndShifts::gt_res };
62template <
typename FF_>
69 static constexpr std::string_view
NAME =
"LOOKUP_EMIT_UNENCRYPTED_LOG_READ_MEM";
70 static constexpr std::string_view
RELATION_NAME =
"emit_unencrypted_log";
74 static constexpr Column COUNTS = Column::lookup_emit_unencrypted_log_read_mem_counts;
75 static constexpr Column INVERSES = Column::lookup_emit_unencrypted_log_read_mem_inv;
76 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
77 ColumnAndShifts::emit_unencrypted_log_execution_clk, ColumnAndShifts::emit_unencrypted_log_log_address,
78 ColumnAndShifts::emit_unencrypted_log_value, ColumnAndShifts::emit_unencrypted_log_tag,
79 ColumnAndShifts::emit_unencrypted_log_space_id, ColumnAndShifts::precomputed_zero
81 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
82 ColumnAndShifts::memory_clk, ColumnAndShifts::memory_address, ColumnAndShifts::memory_value,
83 ColumnAndShifts::memory_tag, ColumnAndShifts::memory_space_id, ColumnAndShifts::memory_rw
88template <
typename FF_>
95 static constexpr std::string_view
NAME =
"LOOKUP_EMIT_UNENCRYPTED_LOG_WRITE_LOG_TO_PUBLIC_INPUTS";
96 static constexpr std::string_view
RELATION_NAME =
"emit_unencrypted_log";
98 static constexpr Column SRC_SELECTOR = Column::emit_unencrypted_log_sel_should_write_to_public_inputs;
100 static constexpr Column COUNTS = Column::lookup_emit_unencrypted_log_write_log_to_public_inputs_counts;
101 static constexpr Column INVERSES = Column::lookup_emit_unencrypted_log_write_log_to_public_inputs_inv;
102 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
103 ColumnAndShifts::emit_unencrypted_log_public_inputs_index,
104 ColumnAndShifts::emit_unencrypted_log_contract_address,
105 ColumnAndShifts::emit_unencrypted_log_log_size,
106 ColumnAndShifts::emit_unencrypted_log_value
108 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
109 ColumnAndShifts::precomputed_clk,
110 ColumnAndShifts::public_inputs_cols_0_,
111 ColumnAndShifts::public_inputs_cols_1_,
112 ColumnAndShifts::public_inputs_cols_2_
118template <
typename FF_>
125 static constexpr std::string_view
NAME =
"LOOKUP_EMIT_UNENCRYPTED_LOG_DISPATCH_EXEC_EMIT_UNENCRYPTED_LOG";
130 static constexpr Column COUNTS = Column::lookup_emit_unencrypted_log_dispatch_exec_emit_unencrypted_log_counts;
131 static constexpr Column INVERSES = Column::lookup_emit_unencrypted_log_dispatch_exec_emit_unencrypted_log_inv;
132 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
133 ColumnAndShifts::precomputed_clk,
134 ColumnAndShifts::execution_context_id,
135 ColumnAndShifts::execution_rop_0_,
136 ColumnAndShifts::execution_register_1_,
137 ColumnAndShifts::execution_contract_address,
138 ColumnAndShifts::execution_prev_num_unencrypted_logs,
139 ColumnAndShifts::execution_num_unencrypted_logs,
140 ColumnAndShifts::execution_is_static,
141 ColumnAndShifts::execution_sel_opcode_error,
142 ColumnAndShifts::execution_discard
144 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
145 ColumnAndShifts::emit_unencrypted_log_execution_clk,
146 ColumnAndShifts::emit_unencrypted_log_space_id,
147 ColumnAndShifts::emit_unencrypted_log_log_address,
148 ColumnAndShifts::emit_unencrypted_log_log_size,
149 ColumnAndShifts::emit_unencrypted_log_contract_address,
150 ColumnAndShifts::emit_unencrypted_log_prev_num_unencrypted_logs,
151 ColumnAndShifts::emit_unencrypted_log_next_num_unencrypted_logs,
152 ColumnAndShifts::emit_unencrypted_log_is_static,
153 ColumnAndShifts::emit_unencrypted_log_error,
154 ColumnAndShifts::emit_unencrypted_log_discard
160template <
typename FF_>
This file contains the template for the generic lookup that can be specialized to enforce various loo...
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view NAME
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr Column COUNTS
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column COUNTS
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr Column INVERSES
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column INVERSES
static constexpr Column COUNTS
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::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr std::string_view NAME
static constexpr Column SRC_SELECTOR
static constexpr Column INVERSES
static constexpr Column COUNTS
static constexpr Column DST_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS