Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_bc_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_BC_HASHING_CHECK_FINAL_BYTES_REMAINING";
18 static constexpr std::string_view RELATION_NAME = "bc_hashing";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 9;
20 static constexpr Column SRC_SELECTOR = Column::bc_hashing_latch;
21 static constexpr Column DST_SELECTOR = Column::bc_decomposition_sel_packed;
22 static constexpr Column COUNTS = Column::lookup_bc_hashing_check_final_bytes_remaining_counts;
23 static constexpr Column INVERSES = Column::lookup_bc_hashing_check_final_bytes_remaining_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
25 ColumnAndShifts::bc_hashing_pc_at_final_field,
26 ColumnAndShifts::bc_hashing_bytecode_id,
27 ColumnAndShifts::bc_hashing_sel,
28 ColumnAndShifts::precomputed_zero,
29 ColumnAndShifts::precomputed_zero,
30 ColumnAndShifts::precomputed_zero,
31 ColumnAndShifts::precomputed_zero,
32 ColumnAndShifts::precomputed_zero,
33 ColumnAndShifts::precomputed_zero
34 };
35 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
36 ColumnAndShifts::bc_decomposition_pc,
37 ColumnAndShifts::bc_decomposition_id,
38 ColumnAndShifts::bc_decomposition_sel_windows_gt_remaining,
39 ColumnAndShifts::bc_decomposition_bytes_pc_plus_31,
40 ColumnAndShifts::bc_decomposition_bytes_pc_plus_32,
41 ColumnAndShifts::bc_decomposition_bytes_pc_plus_33,
42 ColumnAndShifts::bc_decomposition_bytes_pc_plus_34,
43 ColumnAndShifts::bc_decomposition_bytes_pc_plus_35,
44 ColumnAndShifts::bc_decomposition_bytes_pc_plus_36
45 };
46};
47
50template <typename FF_>
53
55
57 static constexpr std::string_view NAME = "LOOKUP_BC_HASHING_POSEIDON2_HASH";
58 static constexpr std::string_view RELATION_NAME = "bc_hashing";
59 static constexpr size_t LOOKUP_TUPLE_SIZE = 8;
60 static constexpr Column SRC_SELECTOR = Column::bc_hashing_sel;
61 static constexpr Column DST_SELECTOR = Column::poseidon2_hash_sel;
62 static constexpr Column COUNTS = Column::lookup_bc_hashing_poseidon2_hash_counts;
63 static constexpr Column INVERSES = Column::lookup_bc_hashing_poseidon2_hash_inv;
64 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
65 ColumnAndShifts::bc_hashing_start, ColumnAndShifts::bc_hashing_latch,
66 ColumnAndShifts::bc_hashing_packed_fields_0, ColumnAndShifts::bc_hashing_packed_fields_1,
67 ColumnAndShifts::bc_hashing_packed_fields_2, ColumnAndShifts::bc_hashing_input_len,
68 ColumnAndShifts::bc_hashing_rounds_rem, ColumnAndShifts::bc_hashing_output_hash
69 };
70 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
71 ColumnAndShifts::poseidon2_hash_start,
72 ColumnAndShifts::poseidon2_hash_end,
73 ColumnAndShifts::poseidon2_hash_input_0,
74 ColumnAndShifts::poseidon2_hash_input_1,
75 ColumnAndShifts::poseidon2_hash_input_2,
76 ColumnAndShifts::poseidon2_hash_input_len,
77 ColumnAndShifts::poseidon2_hash_num_perm_rounds_rem,
78 ColumnAndShifts::poseidon2_hash_output
79 };
80};
81
83template <typename FF_>
85
86} // 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 > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS