8#include "../columns.hpp"
17 static constexpr std::string_view
NAME =
"PERM_EXECUTION_DISPATCH_TO_CD_COPY";
22 static constexpr Column INVERSES = Column::perm_execution_dispatch_to_cd_copy_inv;
23 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
SRC_COLUMNS = {
24 ColumnAndShifts::precomputed_clk,
25 ColumnAndShifts::execution_parent_id,
26 ColumnAndShifts::execution_context_id,
27 ColumnAndShifts::execution_register_0_,
28 ColumnAndShifts::execution_register_1_,
29 ColumnAndShifts::execution_rop_2_,
30 ColumnAndShifts::execution_parent_calldata_addr,
31 ColumnAndShifts::execution_parent_calldata_size,
32 ColumnAndShifts::execution_sel_exec_dispatch_calldata_copy,
33 ColumnAndShifts::execution_sel_opcode_error
35 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
DST_COLUMNS = {
36 ColumnAndShifts::data_copy_clk,
37 ColumnAndShifts::data_copy_src_context_id,
38 ColumnAndShifts::data_copy_dst_context_id,
39 ColumnAndShifts::data_copy_copy_size,
40 ColumnAndShifts::data_copy_offset,
41 ColumnAndShifts::data_copy_dst_addr,
42 ColumnAndShifts::data_copy_src_addr,
43 ColumnAndShifts::data_copy_src_data_size,
44 ColumnAndShifts::data_copy_sel_cd_copy,
45 ColumnAndShifts::data_copy_err
50template <
typename FF_>
57 static constexpr std::string_view
NAME =
"PERM_EXECUTION_DISPATCH_TO_RD_COPY";
62 static constexpr Column INVERSES = Column::perm_execution_dispatch_to_rd_copy_inv;
63 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
SRC_COLUMNS = {
64 ColumnAndShifts::precomputed_clk,
65 ColumnAndShifts::execution_last_child_id,
66 ColumnAndShifts::execution_context_id,
67 ColumnAndShifts::execution_register_0_,
68 ColumnAndShifts::execution_register_1_,
69 ColumnAndShifts::execution_rop_2_,
70 ColumnAndShifts::execution_last_child_returndata_addr,
71 ColumnAndShifts::execution_last_child_returndata_size,
72 ColumnAndShifts::execution_sel_exec_dispatch_returndata_copy,
73 ColumnAndShifts::execution_sel_opcode_error
75 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
DST_COLUMNS = {
76 ColumnAndShifts::data_copy_clk,
77 ColumnAndShifts::data_copy_src_context_id,
78 ColumnAndShifts::data_copy_dst_context_id,
79 ColumnAndShifts::data_copy_copy_size,
80 ColumnAndShifts::data_copy_offset,
81 ColumnAndShifts::data_copy_dst_addr,
82 ColumnAndShifts::data_copy_src_addr,
83 ColumnAndShifts::data_copy_src_data_size,
84 ColumnAndShifts::data_copy_sel_rd_copy,
85 ColumnAndShifts::data_copy_err
90template <
typename FF_>
97 static constexpr std::string_view
NAME =
"PERM_EXECUTION_DISPATCH_TO_GET_CONTRACT_INSTANCE";
102 static constexpr Column INVERSES = Column::perm_execution_dispatch_to_get_contract_instance_inv;
103 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
SRC_COLUMNS = {
104 ColumnAndShifts::precomputed_clk,
105 ColumnAndShifts::execution_register_0_,
106 ColumnAndShifts::execution_rop_1_,
107 ColumnAndShifts::execution_rop_2_,
108 ColumnAndShifts::execution_context_id,
109 ColumnAndShifts::execution_nullifier_tree_root,
110 ColumnAndShifts::execution_public_data_tree_root,
111 ColumnAndShifts::execution_sel_opcode_error
113 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
DST_COLUMNS = {
114 ColumnAndShifts::get_contract_instance_clk,
115 ColumnAndShifts::get_contract_instance_contract_address,
116 ColumnAndShifts::get_contract_instance_dst_offset,
117 ColumnAndShifts::get_contract_instance_member_enum,
118 ColumnAndShifts::get_contract_instance_space_id,
119 ColumnAndShifts::get_contract_instance_nullifier_tree_root,
120 ColumnAndShifts::get_contract_instance_public_data_tree_root,
121 ColumnAndShifts::get_contract_instance_sel_error
127template <
typename FF_>
134 static constexpr std::string_view
NAME =
"PERM_EXECUTION_DISPATCH_TO_POSEIDON2_PERM";
139 static constexpr Column INVERSES = Column::perm_execution_dispatch_to_poseidon2_perm_inv;
140 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
SRC_COLUMNS = {
141 ColumnAndShifts::precomputed_clk,
142 ColumnAndShifts::execution_context_id,
143 ColumnAndShifts::execution_rop_0_,
144 ColumnAndShifts::execution_rop_1_,
145 ColumnAndShifts::execution_sel_opcode_error
147 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
DST_COLUMNS = {
148 ColumnAndShifts::poseidon2_perm_mem_execution_clk,
149 ColumnAndShifts::poseidon2_perm_mem_space_id,
150 ColumnAndShifts::poseidon2_perm_mem_read_address_0_,
151 ColumnAndShifts::poseidon2_perm_mem_write_address_0_,
152 ColumnAndShifts::poseidon2_perm_mem_err
158template <
typename FF_>
165 static constexpr std::string_view
NAME =
"PERM_EXECUTION_DISPATCH_TO_SHA256_COMPRESSION";
170 static constexpr Column INVERSES = Column::perm_execution_dispatch_to_sha256_compression_inv;
171 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
SRC_COLUMNS = {
172 ColumnAndShifts::precomputed_clk, ColumnAndShifts::execution_context_id,
173 ColumnAndShifts::execution_rop_0_, ColumnAndShifts::execution_rop_1_,
174 ColumnAndShifts::execution_rop_2_, ColumnAndShifts::execution_sel_opcode_error
176 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
DST_COLUMNS = {
177 ColumnAndShifts::sha256_execution_clk, ColumnAndShifts::sha256_space_id, ColumnAndShifts::sha256_output_addr,
178 ColumnAndShifts::sha256_state_addr, ColumnAndShifts::sha256_input_addr, ColumnAndShifts::sha256_err
184template <
typename FF_>
191 static constexpr std::string_view
NAME =
"PERM_EXECUTION_DISPATCH_TO_KECCAKF1600";
196 static constexpr Column INVERSES = Column::perm_execution_dispatch_to_keccakf1600_inv;
197 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
SRC_COLUMNS = {
198 ColumnAndShifts::precomputed_clk,
199 ColumnAndShifts::execution_rop_0_,
200 ColumnAndShifts::execution_rop_1_,
201 ColumnAndShifts::execution_context_id,
202 ColumnAndShifts::execution_sel_opcode_error
204 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
DST_COLUMNS = { ColumnAndShifts::keccakf1600_clk,
205 ColumnAndShifts::keccakf1600_dst_addr,
206 ColumnAndShifts::keccakf1600_src_addr,
207 ColumnAndShifts::keccakf1600_space_id,
208 ColumnAndShifts::keccakf1600_error };
213template <
typename FF_>
220 static constexpr std::string_view
NAME =
"PERM_EXECUTION_DISPATCH_TO_ECC_ADD";
225 static constexpr Column INVERSES = Column::perm_execution_dispatch_to_ecc_add_inv;
226 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
SRC_COLUMNS = {
227 ColumnAndShifts::precomputed_clk, ColumnAndShifts::execution_context_id,
228 ColumnAndShifts::execution_register_0_, ColumnAndShifts::execution_register_1_,
229 ColumnAndShifts::execution_register_2_, ColumnAndShifts::execution_register_3_,
230 ColumnAndShifts::execution_register_4_, ColumnAndShifts::execution_register_5_,
231 ColumnAndShifts::execution_rop_6_, ColumnAndShifts::execution_sel_opcode_error
233 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
DST_COLUMNS = {
234 ColumnAndShifts::ecc_add_mem_execution_clk, ColumnAndShifts::ecc_add_mem_space_id,
235 ColumnAndShifts::ecc_add_mem_p_x, ColumnAndShifts::ecc_add_mem_p_y,
236 ColumnAndShifts::ecc_add_mem_p_is_inf, ColumnAndShifts::ecc_add_mem_q_x,
237 ColumnAndShifts::ecc_add_mem_q_y, ColumnAndShifts::ecc_add_mem_q_is_inf,
238 ColumnAndShifts::ecc_add_mem_dst_addr_0_, ColumnAndShifts::ecc_add_mem_err
243template <
typename FF_>
250 static constexpr std::string_view
NAME =
"PERM_EXECUTION_DISPATCH_TO_TO_RADIX";
255 static constexpr Column INVERSES = Column::perm_execution_dispatch_to_to_radix_inv;
256 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
SRC_COLUMNS = {
257 ColumnAndShifts::precomputed_clk, ColumnAndShifts::execution_context_id,
258 ColumnAndShifts::execution_register_0_, ColumnAndShifts::execution_register_1_,
259 ColumnAndShifts::execution_register_2_, ColumnAndShifts::execution_register_3_,
260 ColumnAndShifts::execution_rop_4_, ColumnAndShifts::execution_sel_opcode_error
262 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET>
DST_COLUMNS = {
263 ColumnAndShifts::to_radix_mem_execution_clk, ColumnAndShifts::to_radix_mem_space_id,
264 ColumnAndShifts::to_radix_mem_value_to_decompose, ColumnAndShifts::to_radix_mem_radix,
265 ColumnAndShifts::to_radix_mem_num_limbs, ColumnAndShifts::to_radix_mem_is_output_bits,
266 ColumnAndShifts::to_radix_mem_dst_addr, ColumnAndShifts::to_radix_mem_err
272template <
typename FF_>
This file contains the template for the generic permutation that can be specialized to enforce variou...
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr Column DST_SELECTOR
static constexpr size_t COLUMNS_PER_SET
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr Column INVERSES
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr Column SRC_SELECTOR
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > DST_COLUMNS
static constexpr size_t COLUMNS_PER_SET
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > SRC_COLUMNS
static constexpr Column INVERSES
static constexpr Column DST_SELECTOR
static constexpr Column DST_SELECTOR
static constexpr Column INVERSES
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > SRC_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr size_t COLUMNS_PER_SET
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > DST_COLUMNS
static constexpr size_t COLUMNS_PER_SET
static constexpr std::string_view NAME
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr Column DST_SELECTOR
static constexpr Column SRC_SELECTOR
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > DST_COLUMNS
static constexpr size_t COLUMNS_PER_SET
static constexpr std::string_view NAME
static constexpr Column INVERSES
static constexpr Column DST_SELECTOR
static constexpr Column INVERSES
static constexpr size_t COLUMNS_PER_SET
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr size_t COLUMNS_PER_SET
static constexpr Column INVERSES
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > SRC_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr std::string_view NAME
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > DST_COLUMNS
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > SRC_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > DST_COLUMNS
static constexpr Column INVERSES
static constexpr size_t COLUMNS_PER_SET
static constexpr std::string_view RELATION_NAME