Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_calldata_hashing.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_CALLDATA_HASHING_GET_CALLDATA_FIELD_0";
18 static constexpr std::string_view RELATION_NAME = "calldata_hashing";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
20 static constexpr Column SRC_SELECTOR = Column::calldata_hashing_sel_not_start;
21 static constexpr Column DST_SELECTOR = Column::calldata_sel;
22 static constexpr Column COUNTS = Column::lookup_calldata_hashing_get_calldata_field_0_counts;
23 static constexpr Column INVERSES = Column::lookup_calldata_hashing_get_calldata_field_0_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
25 ColumnAndShifts::calldata_hashing_index_0_,
26 ColumnAndShifts::calldata_hashing_context_id,
27 ColumnAndShifts::calldata_hashing_input_0_
28 };
29 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
30 ColumnAndShifts::calldata_index, ColumnAndShifts::calldata_context_id, ColumnAndShifts::calldata_value
31 };
32};
33
36template <typename FF_>
39
41
43 static constexpr std::string_view NAME = "LOOKUP_CALLDATA_HASHING_GET_CALLDATA_FIELD_1";
44 static constexpr std::string_view RELATION_NAME = "calldata_hashing";
45 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
46 static constexpr Column SRC_SELECTOR = Column::calldata_hashing_sel_not_padding_1;
47 static constexpr Column DST_SELECTOR = Column::calldata_sel;
48 static constexpr Column COUNTS = Column::lookup_calldata_hashing_get_calldata_field_1_counts;
49 static constexpr Column INVERSES = Column::lookup_calldata_hashing_get_calldata_field_1_inv;
50 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
51 ColumnAndShifts::calldata_hashing_index_1_,
52 ColumnAndShifts::calldata_hashing_context_id,
53 ColumnAndShifts::calldata_hashing_input_1_
54 };
55 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
56 ColumnAndShifts::calldata_index, ColumnAndShifts::calldata_context_id, ColumnAndShifts::calldata_value
57 };
58};
59
62template <typename FF_>
65
67
69 static constexpr std::string_view NAME = "LOOKUP_CALLDATA_HASHING_GET_CALLDATA_FIELD_2";
70 static constexpr std::string_view RELATION_NAME = "calldata_hashing";
71 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
72 static constexpr Column SRC_SELECTOR = Column::calldata_hashing_sel_not_padding_2;
73 static constexpr Column DST_SELECTOR = Column::calldata_sel;
74 static constexpr Column COUNTS = Column::lookup_calldata_hashing_get_calldata_field_2_counts;
75 static constexpr Column INVERSES = Column::lookup_calldata_hashing_get_calldata_field_2_inv;
76 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
77 ColumnAndShifts::calldata_hashing_index_2_,
78 ColumnAndShifts::calldata_hashing_context_id,
79 ColumnAndShifts::calldata_hashing_input_2_
80 };
81 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
82 ColumnAndShifts::calldata_index, ColumnAndShifts::calldata_context_id, ColumnAndShifts::calldata_value
83 };
84};
85
88template <typename FF_>
91
93
95 static constexpr std::string_view NAME = "LOOKUP_CALLDATA_HASHING_CHECK_FINAL_SIZE";
96 static constexpr std::string_view RELATION_NAME = "calldata_hashing";
97 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
98 static constexpr Column SRC_SELECTOR = Column::calldata_hashing_latch;
99 static constexpr Column DST_SELECTOR = Column::calldata_latch;
100 static constexpr Column COUNTS = Column::lookup_calldata_hashing_check_final_size_counts;
101 static constexpr Column INVERSES = Column::lookup_calldata_hashing_check_final_size_inv;
102 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
103 ColumnAndShifts::calldata_hashing_calldata_size, ColumnAndShifts::calldata_hashing_context_id
104 };
105 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
106 ColumnAndShifts::calldata_index, ColumnAndShifts::calldata_context_id
107 };
108};
109
112template <typename FF_>
115
117
119 static constexpr std::string_view NAME = "LOOKUP_CALLDATA_HASHING_POSEIDON2_HASH";
120 static constexpr std::string_view RELATION_NAME = "calldata_hashing";
121 static constexpr size_t LOOKUP_TUPLE_SIZE = 8;
122 static constexpr Column SRC_SELECTOR = Column::calldata_hashing_sel;
123 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_sel;
124 static constexpr Column COUNTS = Column::lookup_calldata_hashing_poseidon2_hash_counts;
125 static constexpr Column INVERSES = Column::lookup_calldata_hashing_poseidon2_hash_inv;
126 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
127 ColumnAndShifts::calldata_hashing_start, ColumnAndShifts::calldata_hashing_latch,
128 ColumnAndShifts::calldata_hashing_input_0_, ColumnAndShifts::calldata_hashing_input_1_,
129 ColumnAndShifts::calldata_hashing_input_2_, ColumnAndShifts::calldata_hashing_input_len,
130 ColumnAndShifts::calldata_hashing_rounds_rem, ColumnAndShifts::calldata_hashing_output_hash
131 };
132 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
133 ColumnAndShifts::poseidon2_hash_start,
134 ColumnAndShifts::poseidon2_hash_end,
135 ColumnAndShifts::poseidon2_hash_input_0,
136 ColumnAndShifts::poseidon2_hash_input_1,
137 ColumnAndShifts::poseidon2_hash_input_2,
138 ColumnAndShifts::poseidon2_hash_input_len,
139 ColumnAndShifts::poseidon2_hash_num_perm_rounds_rem,
140 ColumnAndShifts::poseidon2_hash_output
141 };
142};
143
146template <typename FF_>
149
150} // 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::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 > SRC_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
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS