Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
perms_tx.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 = "PERM_TX_READ_CALLDATA_HASH";
18 static constexpr std::string_view RELATION_NAME = "tx";
19 static constexpr size_t COLUMNS_PER_SET = 3;
20 static constexpr Column SRC_SELECTOR = Column::tx_should_process_call_request;
21 static constexpr Column DST_SELECTOR = Column::calldata_hashing_latch;
22 static constexpr Column INVERSES = Column::perm_tx_read_calldata_hash_inv;
23 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET> SRC_COLUMNS = { ColumnAndShifts::tx_calldata_hash,
24 ColumnAndShifts::tx_calldata_size,
25 ColumnAndShifts::tx_next_context_id };
26 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET> DST_COLUMNS = {
27 ColumnAndShifts::calldata_hashing_output_hash,
28 ColumnAndShifts::calldata_hashing_calldata_size,
29 ColumnAndShifts::calldata_hashing_context_id
30 };
31};
32
34template <typename FF_>
36
38
40 static constexpr std::string_view NAME = "PERM_TX_DISPATCH_EXEC_START";
41 static constexpr std::string_view RELATION_NAME = "tx";
42 static constexpr size_t COLUMNS_PER_SET = 26;
43 static constexpr Column SRC_SELECTOR = Column::tx_should_process_call_request;
44 static constexpr Column DST_SELECTOR = Column::execution_enqueued_call_start;
45 static constexpr Column INVERSES = Column::perm_tx_dispatch_exec_start_inv;
46 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET> SRC_COLUMNS = {
47 ColumnAndShifts::tx_next_context_id,
48 ColumnAndShifts::tx_discard,
49 ColumnAndShifts::tx_msg_sender,
50 ColumnAndShifts::tx_contract_addr,
51 ColumnAndShifts::tx_fee,
52 ColumnAndShifts::tx_is_static,
53 ColumnAndShifts::tx_calldata_size,
54 ColumnAndShifts::tx_prev_note_hash_tree_root,
55 ColumnAndShifts::tx_prev_note_hash_tree_size,
56 ColumnAndShifts::tx_prev_num_note_hashes_emitted,
57 ColumnAndShifts::tx_prev_nullifier_tree_root,
58 ColumnAndShifts::tx_prev_nullifier_tree_size,
59 ColumnAndShifts::tx_prev_num_nullifiers_emitted,
60 ColumnAndShifts::tx_prev_public_data_tree_root,
61 ColumnAndShifts::tx_prev_public_data_tree_size,
62 ColumnAndShifts::tx_prev_written_public_data_slots_tree_root,
63 ColumnAndShifts::tx_prev_written_public_data_slots_tree_size,
64 ColumnAndShifts::tx_l1_l2_tree_root,
65 ColumnAndShifts::tx_prev_retrieved_bytecodes_tree_root,
66 ColumnAndShifts::tx_prev_retrieved_bytecodes_tree_size,
67 ColumnAndShifts::tx_prev_num_unencrypted_log_fields,
68 ColumnAndShifts::tx_prev_num_l2_to_l1_messages,
69 ColumnAndShifts::tx_prev_l2_gas_used_sent_to_enqueued_call,
70 ColumnAndShifts::tx_prev_da_gas_used_sent_to_enqueued_call,
71 ColumnAndShifts::tx_l2_gas_limit,
72 ColumnAndShifts::tx_da_gas_limit
73 };
74 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET> DST_COLUMNS = {
75 ColumnAndShifts::execution_context_id,
76 ColumnAndShifts::execution_discard,
77 ColumnAndShifts::execution_msg_sender,
78 ColumnAndShifts::execution_contract_address,
79 ColumnAndShifts::execution_transaction_fee,
80 ColumnAndShifts::execution_is_static,
81 ColumnAndShifts::execution_parent_calldata_size,
82 ColumnAndShifts::execution_prev_note_hash_tree_root,
83 ColumnAndShifts::execution_prev_note_hash_tree_size,
84 ColumnAndShifts::execution_prev_num_note_hashes_emitted,
85 ColumnAndShifts::execution_prev_nullifier_tree_root,
86 ColumnAndShifts::execution_prev_nullifier_tree_size,
87 ColumnAndShifts::execution_prev_num_nullifiers_emitted,
88 ColumnAndShifts::execution_prev_public_data_tree_root,
89 ColumnAndShifts::execution_prev_public_data_tree_size,
90 ColumnAndShifts::execution_prev_written_public_data_slots_tree_root,
91 ColumnAndShifts::execution_prev_written_public_data_slots_tree_size,
92 ColumnAndShifts::execution_l1_l2_tree_root,
93 ColumnAndShifts::execution_prev_retrieved_bytecodes_tree_root,
94 ColumnAndShifts::execution_prev_retrieved_bytecodes_tree_size,
95 ColumnAndShifts::execution_prev_num_unencrypted_log_fields,
96 ColumnAndShifts::execution_prev_num_l2_to_l1_messages,
97 ColumnAndShifts::execution_prev_l2_gas_used,
98 ColumnAndShifts::execution_prev_da_gas_used,
99 ColumnAndShifts::execution_l2_gas_limit,
100 ColumnAndShifts::execution_da_gas_limit
101 };
102};
103
105template <typename FF_>
107
109
111 static constexpr std::string_view NAME = "PERM_TX_DISPATCH_EXEC_END";
112 static constexpr std::string_view RELATION_NAME = "tx";
113 static constexpr size_t COLUMNS_PER_SET = 19;
114 static constexpr Column SRC_SELECTOR = Column::tx_should_process_call_request;
115 static constexpr Column DST_SELECTOR = Column::execution_enqueued_call_end;
116 static constexpr Column INVERSES = Column::perm_tx_dispatch_exec_end_inv;
117 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET> SRC_COLUMNS = {
118 ColumnAndShifts::tx_next_context_id,
119 ColumnAndShifts::tx_next_context_id_shift,
120 ColumnAndShifts::tx_reverted,
121 ColumnAndShifts::tx_next_note_hash_tree_root,
122 ColumnAndShifts::tx_next_note_hash_tree_size,
123 ColumnAndShifts::tx_next_num_note_hashes_emitted,
124 ColumnAndShifts::tx_next_nullifier_tree_root,
125 ColumnAndShifts::tx_next_nullifier_tree_size,
126 ColumnAndShifts::tx_next_num_nullifiers_emitted,
127 ColumnAndShifts::tx_next_public_data_tree_root,
128 ColumnAndShifts::tx_next_public_data_tree_size,
129 ColumnAndShifts::tx_next_written_public_data_slots_tree_root,
130 ColumnAndShifts::tx_next_written_public_data_slots_tree_size,
131 ColumnAndShifts::tx_next_retrieved_bytecodes_tree_root,
132 ColumnAndShifts::tx_next_retrieved_bytecodes_tree_size,
133 ColumnAndShifts::tx_next_num_unencrypted_log_fields,
134 ColumnAndShifts::tx_next_num_l2_to_l1_messages,
135 ColumnAndShifts::tx_next_l2_gas_used_sent_to_enqueued_call,
136 ColumnAndShifts::tx_next_da_gas_used_sent_to_enqueued_call
137 };
138 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET> DST_COLUMNS = {
139 ColumnAndShifts::execution_context_id,
140 ColumnAndShifts::execution_next_context_id,
141 ColumnAndShifts::execution_sel_failure,
142 ColumnAndShifts::execution_note_hash_tree_root,
143 ColumnAndShifts::execution_note_hash_tree_size,
144 ColumnAndShifts::execution_num_note_hashes_emitted,
145 ColumnAndShifts::execution_nullifier_tree_root,
146 ColumnAndShifts::execution_nullifier_tree_size,
147 ColumnAndShifts::execution_num_nullifiers_emitted,
148 ColumnAndShifts::execution_public_data_tree_root,
149 ColumnAndShifts::execution_public_data_tree_size,
150 ColumnAndShifts::execution_written_public_data_slots_tree_root,
151 ColumnAndShifts::execution_written_public_data_slots_tree_size,
152 ColumnAndShifts::execution_retrieved_bytecodes_tree_root,
153 ColumnAndShifts::execution_retrieved_bytecodes_tree_size,
154 ColumnAndShifts::execution_num_unencrypted_log_fields,
155 ColumnAndShifts::execution_num_l2_to_l1_messages,
156 ColumnAndShifts::execution_l2_gas_used,
157 ColumnAndShifts::execution_da_gas_used
158 };
159};
160
162template <typename FF_>
164
166
168 static constexpr std::string_view NAME = "PERM_TX_BALANCE_UPDATE";
169 static constexpr std::string_view RELATION_NAME = "tx";
170 static constexpr size_t COLUMNS_PER_SET = 9;
171 static constexpr Column SRC_SELECTOR = Column::tx_is_collect_fee;
172 static constexpr Column DST_SELECTOR = Column::public_data_check_protocol_write;
173 static constexpr Column INVERSES = Column::perm_tx_balance_update_inv;
174 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET> SRC_COLUMNS = {
175 ColumnAndShifts::tx_fee_payer_new_balance,
176 ColumnAndShifts::tx_fee_juice_contract_address,
177 ColumnAndShifts::tx_fee_juice_balance_slot,
178 ColumnAndShifts::tx_discard,
179 ColumnAndShifts::tx_prev_public_data_tree_root,
180 ColumnAndShifts::tx_next_public_data_tree_root,
181 ColumnAndShifts::tx_prev_public_data_tree_size,
182 ColumnAndShifts::tx_next_public_data_tree_size,
183 ColumnAndShifts::tx_uint32_max
184 };
185 static constexpr std::array<ColumnAndShifts, COLUMNS_PER_SET> DST_COLUMNS = {
186 ColumnAndShifts::public_data_check_value,
187 ColumnAndShifts::public_data_check_address,
188 ColumnAndShifts::public_data_check_slot,
189 ColumnAndShifts::public_data_check_discard,
190 ColumnAndShifts::public_data_check_root,
191 ColumnAndShifts::public_data_check_write_root,
192 ColumnAndShifts::public_data_check_tree_size_before_write,
193 ColumnAndShifts::public_data_check_tree_size_after_write,
194 ColumnAndShifts::public_data_check_clk
195 };
196};
197
199template <typename FF_>
201
202} // namespace bb::avm2
This file contains the template for the generic permutation that can be specialized to enforce variou...
static constexpr std::string_view NAME
Definition perms_tx.hpp:168
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > DST_COLUMNS
Definition perms_tx.hpp:185
static constexpr std::string_view RELATION_NAME
Definition perms_tx.hpp:169
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > SRC_COLUMNS
Definition perms_tx.hpp:174
static constexpr size_t COLUMNS_PER_SET
Definition perms_tx.hpp:170
static constexpr std::string_view NAME
Definition perms_tx.hpp:111
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > DST_COLUMNS
Definition perms_tx.hpp:138
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > SRC_COLUMNS
Definition perms_tx.hpp:117
static constexpr std::string_view RELATION_NAME
Definition perms_tx.hpp:112
static constexpr std::string_view NAME
Definition perms_tx.hpp:40
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > DST_COLUMNS
Definition perms_tx.hpp:74
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > SRC_COLUMNS
Definition perms_tx.hpp:46
static constexpr std::string_view RELATION_NAME
Definition perms_tx.hpp:41
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > SRC_COLUMNS
Definition perms_tx.hpp:23
static constexpr std::string_view RELATION_NAME
Definition perms_tx.hpp:18
static constexpr std::string_view NAME
Definition perms_tx.hpp:17
static constexpr std::array< ColumnAndShifts, COLUMNS_PER_SET > DST_COLUMNS
Definition perms_tx.hpp:26