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 = 26;
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_prev_note_hash_tree_root_shift,
40 ColumnAndShifts::execution_prev_note_hash_tree_size_shift,
41 ColumnAndShifts::execution_prev_num_note_hashes_emitted_shift,
42 ColumnAndShifts::execution_prev_nullifier_tree_root_shift,
43 ColumnAndShifts::execution_prev_nullifier_tree_size_shift,
44 ColumnAndShifts::execution_prev_num_nullifiers_emitted_shift,
45 ColumnAndShifts::execution_prev_public_data_tree_root_shift,
46 ColumnAndShifts::execution_prev_public_data_tree_size_shift,
47 ColumnAndShifts::execution_prev_written_public_data_slots_tree_root_shift,
48 ColumnAndShifts::execution_prev_written_public_data_slots_tree_size_shift,
49 ColumnAndShifts::execution_prev_num_unencrypted_log_fields_shift,
50 ColumnAndShifts::execution_prev_num_l2_to_l1_messages_shift
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_log_fields,
78 ColumnAndShifts::context_stack_num_l2_to_l1_messages
79 };
80};
81
83template <typename FF_>
86
88
90 static constexpr std::string_view NAME = "LOOKUP_CONTEXT_CTX_STACK_RETURN";
91 static constexpr std::string_view RELATION_NAME = "context";
92 static constexpr size_t LOOKUP_TUPLE_SIZE = 14;
93 static constexpr Column SRC_SELECTOR = Column::execution_nested_return;
94 static constexpr Column DST_SELECTOR = Column::context_stack_sel;
95 static constexpr Column COUNTS = Column::lookup_context_ctx_stack_return_counts;
96 static constexpr Column INVERSES = Column::lookup_context_ctx_stack_return_inv;
97 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
98 ColumnAndShifts::execution_context_id,
99 ColumnAndShifts::execution_context_id_shift,
100 ColumnAndShifts::execution_parent_id_shift,
101 ColumnAndShifts::execution_pc_shift,
102 ColumnAndShifts::execution_msg_sender_shift,
103 ColumnAndShifts::execution_contract_address_shift,
104 ColumnAndShifts::execution_bytecode_id_shift,
105 ColumnAndShifts::execution_is_static_shift,
106 ColumnAndShifts::execution_parent_calldata_addr_shift,
107 ColumnAndShifts::execution_parent_calldata_size_shift,
108 ColumnAndShifts::execution_parent_l2_gas_limit_shift,
109 ColumnAndShifts::execution_parent_da_gas_limit_shift,
110 ColumnAndShifts::execution_parent_l2_gas_used_shift,
111 ColumnAndShifts::execution_parent_da_gas_used_shift
112 };
113 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
114 ColumnAndShifts::context_stack_entered_context_id,
115 ColumnAndShifts::context_stack_context_id,
116 ColumnAndShifts::context_stack_parent_id,
117 ColumnAndShifts::context_stack_next_pc,
118 ColumnAndShifts::context_stack_msg_sender,
119 ColumnAndShifts::context_stack_contract_address,
120 ColumnAndShifts::context_stack_bytecode_id,
121 ColumnAndShifts::context_stack_is_static,
122 ColumnAndShifts::context_stack_parent_calldata_addr,
123 ColumnAndShifts::context_stack_parent_calldata_size,
124 ColumnAndShifts::context_stack_parent_l2_gas_limit,
125 ColumnAndShifts::context_stack_parent_da_gas_limit,
126 ColumnAndShifts::context_stack_parent_l2_gas_used,
127 ColumnAndShifts::context_stack_parent_da_gas_used
128 };
129};
130
132template <typename FF_>
134
135} // 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