Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_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_CONTEXT_CTX_STACK_CALL";
18 static constexpr std::string_view RELATION_NAME = "context";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 26;
20 static constexpr Column SRC_SELECTOR = Column::execution_sel_enter_call;
21 static constexpr Column DST_SELECTOR = Column::context_stack_sel;
22 static constexpr Column COUNTS = Column::lookup_context_ctx_stack_call_counts;
23 static constexpr Column INVERSES = Column::lookup_context_ctx_stack_call_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
25 ColumnAndShifts::execution_next_context_id,
26 ColumnAndShifts::execution_context_id,
27 ColumnAndShifts::execution_parent_id,
28 ColumnAndShifts::execution_next_pc,
29 ColumnAndShifts::execution_msg_sender,
30 ColumnAndShifts::execution_contract_address,
31 ColumnAndShifts::execution_bytecode_id,
32 ColumnAndShifts::execution_is_static,
33 ColumnAndShifts::execution_parent_calldata_addr,
34 ColumnAndShifts::execution_parent_calldata_size,
35 ColumnAndShifts::execution_parent_l2_gas_limit,
36 ColumnAndShifts::execution_parent_da_gas_limit,
37 ColumnAndShifts::execution_parent_l2_gas_used,
38 ColumnAndShifts::execution_parent_da_gas_used,
39 ColumnAndShifts::execution_note_hash_tree_root,
40 ColumnAndShifts::execution_note_hash_tree_size,
41 ColumnAndShifts::execution_num_note_hashes_emitted,
42 ColumnAndShifts::execution_nullifier_tree_root,
43 ColumnAndShifts::execution_nullifier_tree_size,
44 ColumnAndShifts::execution_num_nullifiers_emitted,
45 ColumnAndShifts::execution_public_data_tree_root,
46 ColumnAndShifts::execution_public_data_tree_size,
47 ColumnAndShifts::execution_written_public_data_slots_tree_root,
48 ColumnAndShifts::execution_written_public_data_slots_tree_size,
49 ColumnAndShifts::execution_num_unencrypted_logs,
50 ColumnAndShifts::execution_num_l2_to_l1_messages
51 };
52 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
53 ColumnAndShifts::context_stack_entered_context_id,
54 ColumnAndShifts::context_stack_context_id,
55 ColumnAndShifts::context_stack_parent_id,
56 ColumnAndShifts::context_stack_next_pc,
57 ColumnAndShifts::context_stack_msg_sender,
58 ColumnAndShifts::context_stack_contract_address,
59 ColumnAndShifts::context_stack_bytecode_id,
60 ColumnAndShifts::context_stack_is_static,
61 ColumnAndShifts::context_stack_parent_calldata_addr,
62 ColumnAndShifts::context_stack_parent_calldata_size,
63 ColumnAndShifts::context_stack_parent_l2_gas_limit,
64 ColumnAndShifts::context_stack_parent_da_gas_limit,
65 ColumnAndShifts::context_stack_parent_l2_gas_used,
66 ColumnAndShifts::context_stack_parent_da_gas_used,
67 ColumnAndShifts::context_stack_note_hash_tree_root,
68 ColumnAndShifts::context_stack_note_hash_tree_size,
69 ColumnAndShifts::context_stack_num_note_hashes_emitted,
70 ColumnAndShifts::context_stack_nullifier_tree_root,
71 ColumnAndShifts::context_stack_nullifier_tree_size,
72 ColumnAndShifts::context_stack_num_nullifiers_emitted,
73 ColumnAndShifts::context_stack_public_data_tree_root,
74 ColumnAndShifts::context_stack_public_data_tree_size,
75 ColumnAndShifts::context_stack_written_public_data_slots_tree_root,
76 ColumnAndShifts::context_stack_written_public_data_slots_tree_size,
77 ColumnAndShifts::context_stack_num_unencrypted_logs,
78 ColumnAndShifts::context_stack_num_l2_to_l1_messages
79 };
80};
81
83template <typename FF_>
85
87
89 static constexpr std::string_view NAME = "LOOKUP_CONTEXT_CTX_STACK_ROLLBACK";
90 static constexpr std::string_view RELATION_NAME = "context";
91 static constexpr size_t LOOKUP_TUPLE_SIZE = 26;
92 static constexpr Column SRC_SELECTOR = Column::execution_rollback_context;
93 static constexpr Column DST_SELECTOR = Column::context_stack_sel;
94 static constexpr Column COUNTS = Column::lookup_context_ctx_stack_rollback_counts;
95 static constexpr Column INVERSES = Column::lookup_context_ctx_stack_rollback_inv;
96 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
97 ColumnAndShifts::execution_context_id,
98 ColumnAndShifts::execution_context_id_shift,
99 ColumnAndShifts::execution_parent_id_shift,
100 ColumnAndShifts::execution_pc_shift,
101 ColumnAndShifts::execution_msg_sender_shift,
102 ColumnAndShifts::execution_contract_address_shift,
103 ColumnAndShifts::execution_bytecode_id_shift,
104 ColumnAndShifts::execution_is_static_shift,
105 ColumnAndShifts::execution_parent_calldata_addr_shift,
106 ColumnAndShifts::execution_parent_calldata_size_shift,
107 ColumnAndShifts::execution_parent_l2_gas_limit_shift,
108 ColumnAndShifts::execution_parent_da_gas_limit_shift,
109 ColumnAndShifts::execution_parent_l2_gas_used_shift,
110 ColumnAndShifts::execution_parent_da_gas_used_shift,
111 ColumnAndShifts::execution_prev_note_hash_tree_root_shift,
112 ColumnAndShifts::execution_prev_note_hash_tree_size_shift,
113 ColumnAndShifts::execution_prev_num_note_hashes_emitted_shift,
114 ColumnAndShifts::execution_prev_nullifier_tree_root_shift,
115 ColumnAndShifts::execution_prev_nullifier_tree_size_shift,
116 ColumnAndShifts::execution_prev_num_nullifiers_emitted_shift,
117 ColumnAndShifts::execution_prev_public_data_tree_root_shift,
118 ColumnAndShifts::execution_prev_public_data_tree_size_shift,
119 ColumnAndShifts::execution_prev_written_public_data_slots_tree_root_shift,
120 ColumnAndShifts::execution_prev_written_public_data_slots_tree_size_shift,
121 ColumnAndShifts::execution_prev_num_unencrypted_logs_shift,
122 ColumnAndShifts::execution_prev_num_l2_to_l1_messages_shift
123 };
124 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
125 ColumnAndShifts::context_stack_entered_context_id,
126 ColumnAndShifts::context_stack_context_id,
127 ColumnAndShifts::context_stack_parent_id,
128 ColumnAndShifts::context_stack_next_pc,
129 ColumnAndShifts::context_stack_msg_sender,
130 ColumnAndShifts::context_stack_contract_address,
131 ColumnAndShifts::context_stack_bytecode_id,
132 ColumnAndShifts::context_stack_is_static,
133 ColumnAndShifts::context_stack_parent_calldata_addr,
134 ColumnAndShifts::context_stack_parent_calldata_size,
135 ColumnAndShifts::context_stack_parent_l2_gas_limit,
136 ColumnAndShifts::context_stack_parent_da_gas_limit,
137 ColumnAndShifts::context_stack_parent_l2_gas_used,
138 ColumnAndShifts::context_stack_parent_da_gas_used,
139 ColumnAndShifts::context_stack_note_hash_tree_root,
140 ColumnAndShifts::context_stack_note_hash_tree_size,
141 ColumnAndShifts::context_stack_num_note_hashes_emitted,
142 ColumnAndShifts::context_stack_nullifier_tree_root,
143 ColumnAndShifts::context_stack_nullifier_tree_size,
144 ColumnAndShifts::context_stack_num_nullifiers_emitted,
145 ColumnAndShifts::context_stack_public_data_tree_root,
146 ColumnAndShifts::context_stack_public_data_tree_size,
147 ColumnAndShifts::context_stack_written_public_data_slots_tree_root,
148 ColumnAndShifts::context_stack_written_public_data_slots_tree_size,
149 ColumnAndShifts::context_stack_num_unencrypted_logs,
150 ColumnAndShifts::context_stack_num_l2_to_l1_messages
151 };
152};
153
155template <typename FF_>
158
160
162 static constexpr std::string_view NAME = "LOOKUP_CONTEXT_CTX_STACK_RETURN";
163 static constexpr std::string_view RELATION_NAME = "context";
164 static constexpr size_t LOOKUP_TUPLE_SIZE = 14;
165 static constexpr Column SRC_SELECTOR = Column::execution_nested_return;
166 static constexpr Column DST_SELECTOR = Column::context_stack_sel;
167 static constexpr Column COUNTS = Column::lookup_context_ctx_stack_return_counts;
168 static constexpr Column INVERSES = Column::lookup_context_ctx_stack_return_inv;
169 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
170 ColumnAndShifts::execution_context_id,
171 ColumnAndShifts::execution_context_id_shift,
172 ColumnAndShifts::execution_parent_id_shift,
173 ColumnAndShifts::execution_pc_shift,
174 ColumnAndShifts::execution_msg_sender_shift,
175 ColumnAndShifts::execution_contract_address_shift,
176 ColumnAndShifts::execution_bytecode_id_shift,
177 ColumnAndShifts::execution_is_static_shift,
178 ColumnAndShifts::execution_parent_calldata_addr_shift,
179 ColumnAndShifts::execution_parent_calldata_size_shift,
180 ColumnAndShifts::execution_parent_l2_gas_limit_shift,
181 ColumnAndShifts::execution_parent_da_gas_limit_shift,
182 ColumnAndShifts::execution_parent_l2_gas_used_shift,
183 ColumnAndShifts::execution_parent_da_gas_used_shift
184 };
185 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
186 ColumnAndShifts::context_stack_entered_context_id,
187 ColumnAndShifts::context_stack_context_id,
188 ColumnAndShifts::context_stack_parent_id,
189 ColumnAndShifts::context_stack_next_pc,
190 ColumnAndShifts::context_stack_msg_sender,
191 ColumnAndShifts::context_stack_contract_address,
192 ColumnAndShifts::context_stack_bytecode_id,
193 ColumnAndShifts::context_stack_is_static,
194 ColumnAndShifts::context_stack_parent_calldata_addr,
195 ColumnAndShifts::context_stack_parent_calldata_size,
196 ColumnAndShifts::context_stack_parent_l2_gas_limit,
197 ColumnAndShifts::context_stack_parent_da_gas_limit,
198 ColumnAndShifts::context_stack_parent_l2_gas_used,
199 ColumnAndShifts::context_stack_parent_da_gas_used
200 };
201};
202
204template <typename FF_>
206
207} // 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 > SRC_COLUMNS
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 > 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