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_ROLLBACK";
18 static constexpr std::string_view RELATION_NAME = "context";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 29;
20 static constexpr Column SRC_SELECTOR = Column::execution_nested_failure;
21 static constexpr Column DST_SELECTOR = Column::context_stack_sel;
22 static constexpr Column COUNTS = Column::lookup_context_ctx_stack_rollback_counts;
23 static constexpr Column INVERSES = Column::lookup_context_ctx_stack_rollback_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
25 ColumnAndShifts::execution_context_id,
26 ColumnAndShifts::execution_context_id_shift,
27 ColumnAndShifts::execution_parent_id_shift,
28 ColumnAndShifts::execution_pc_shift,
29 ColumnAndShifts::execution_msg_sender_shift,
30 ColumnAndShifts::execution_contract_address_shift,
31 ColumnAndShifts::execution_bytecode_id_shift,
32 ColumnAndShifts::execution_is_static_shift,
33 ColumnAndShifts::execution_parent_calldata_addr_shift,
34 ColumnAndShifts::execution_parent_calldata_size_shift,
35 ColumnAndShifts::execution_parent_l2_gas_limit_shift,
36 ColumnAndShifts::execution_parent_da_gas_limit_shift,
37 ColumnAndShifts::execution_parent_l2_gas_used_shift,
38 ColumnAndShifts::execution_parent_da_gas_used_shift,
39 ColumnAndShifts::execution_internal_call_id_shift,
40 ColumnAndShifts::execution_internal_call_return_id_shift,
41 ColumnAndShifts::execution_next_internal_call_id_shift,
42 ColumnAndShifts::execution_prev_note_hash_tree_root_shift,
43 ColumnAndShifts::execution_prev_note_hash_tree_size_shift,
44 ColumnAndShifts::execution_prev_num_note_hashes_emitted_shift,
45 ColumnAndShifts::execution_prev_nullifier_tree_root_shift,
46 ColumnAndShifts::execution_prev_nullifier_tree_size_shift,
47 ColumnAndShifts::execution_prev_num_nullifiers_emitted_shift,
48 ColumnAndShifts::execution_prev_public_data_tree_root_shift,
49 ColumnAndShifts::execution_prev_public_data_tree_size_shift,
50 ColumnAndShifts::execution_prev_written_public_data_slots_tree_root_shift,
51 ColumnAndShifts::execution_prev_written_public_data_slots_tree_size_shift,
52 ColumnAndShifts::execution_prev_num_unencrypted_log_fields_shift,
53 ColumnAndShifts::execution_prev_num_l2_to_l1_messages_shift
54 };
55 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
56 ColumnAndShifts::context_stack_entered_context_id,
57 ColumnAndShifts::context_stack_context_id,
58 ColumnAndShifts::context_stack_parent_id,
59 ColumnAndShifts::context_stack_next_pc,
60 ColumnAndShifts::context_stack_msg_sender,
61 ColumnAndShifts::context_stack_contract_address,
62 ColumnAndShifts::context_stack_bytecode_id,
63 ColumnAndShifts::context_stack_is_static,
64 ColumnAndShifts::context_stack_parent_calldata_addr,
65 ColumnAndShifts::context_stack_parent_calldata_size,
66 ColumnAndShifts::context_stack_parent_l2_gas_limit,
67 ColumnAndShifts::context_stack_parent_da_gas_limit,
68 ColumnAndShifts::context_stack_parent_l2_gas_used,
69 ColumnAndShifts::context_stack_parent_da_gas_used,
70 ColumnAndShifts::context_stack_internal_call_id,
71 ColumnAndShifts::context_stack_internal_call_return_id,
72 ColumnAndShifts::context_stack_next_internal_call_id,
73 ColumnAndShifts::context_stack_note_hash_tree_root,
74 ColumnAndShifts::context_stack_note_hash_tree_size,
75 ColumnAndShifts::context_stack_num_note_hashes_emitted,
76 ColumnAndShifts::context_stack_nullifier_tree_root,
77 ColumnAndShifts::context_stack_nullifier_tree_size,
78 ColumnAndShifts::context_stack_num_nullifiers_emitted,
79 ColumnAndShifts::context_stack_public_data_tree_root,
80 ColumnAndShifts::context_stack_public_data_tree_size,
81 ColumnAndShifts::context_stack_written_public_data_slots_tree_root,
82 ColumnAndShifts::context_stack_written_public_data_slots_tree_size,
83 ColumnAndShifts::context_stack_num_unencrypted_log_fields,
84 ColumnAndShifts::context_stack_num_l2_to_l1_messages
85 };
86};
87
89template <typename FF_>
92
94
96 static constexpr std::string_view NAME = "LOOKUP_CONTEXT_CTX_STACK_RETURN";
97 static constexpr std::string_view RELATION_NAME = "context";
98 static constexpr size_t LOOKUP_TUPLE_SIZE = 17;
99 static constexpr Column SRC_SELECTOR = Column::execution_nested_return;
100 static constexpr Column DST_SELECTOR = Column::context_stack_sel;
101 static constexpr Column COUNTS = Column::lookup_context_ctx_stack_return_counts;
102 static constexpr Column INVERSES = Column::lookup_context_ctx_stack_return_inv;
103 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
104 ColumnAndShifts::execution_context_id,
105 ColumnAndShifts::execution_context_id_shift,
106 ColumnAndShifts::execution_parent_id_shift,
107 ColumnAndShifts::execution_pc_shift,
108 ColumnAndShifts::execution_msg_sender_shift,
109 ColumnAndShifts::execution_contract_address_shift,
110 ColumnAndShifts::execution_bytecode_id_shift,
111 ColumnAndShifts::execution_is_static_shift,
112 ColumnAndShifts::execution_parent_calldata_addr_shift,
113 ColumnAndShifts::execution_parent_calldata_size_shift,
114 ColumnAndShifts::execution_parent_l2_gas_limit_shift,
115 ColumnAndShifts::execution_parent_da_gas_limit_shift,
116 ColumnAndShifts::execution_parent_l2_gas_used_shift,
117 ColumnAndShifts::execution_parent_da_gas_used_shift,
118 ColumnAndShifts::execution_internal_call_id_shift,
119 ColumnAndShifts::execution_internal_call_return_id_shift,
120 ColumnAndShifts::execution_next_internal_call_id_shift
121 };
122 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
123 ColumnAndShifts::context_stack_entered_context_id,
124 ColumnAndShifts::context_stack_context_id,
125 ColumnAndShifts::context_stack_parent_id,
126 ColumnAndShifts::context_stack_next_pc,
127 ColumnAndShifts::context_stack_msg_sender,
128 ColumnAndShifts::context_stack_contract_address,
129 ColumnAndShifts::context_stack_bytecode_id,
130 ColumnAndShifts::context_stack_is_static,
131 ColumnAndShifts::context_stack_parent_calldata_addr,
132 ColumnAndShifts::context_stack_parent_calldata_size,
133 ColumnAndShifts::context_stack_parent_l2_gas_limit,
134 ColumnAndShifts::context_stack_parent_da_gas_limit,
135 ColumnAndShifts::context_stack_parent_l2_gas_used,
136 ColumnAndShifts::context_stack_parent_da_gas_used,
137 ColumnAndShifts::context_stack_internal_call_id,
138 ColumnAndShifts::context_stack_internal_call_return_id,
139 ColumnAndShifts::context_stack_next_internal_call_id
140 };
141};
142
144template <typename FF_>
146
147} // 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 > 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