Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
emit_unencrypted_log.hpp
Go to the documentation of this file.
1// AUTOGENERATED FILE
2#pragma once
3
4#include <string_view>
5
10
11namespace bb::avm2 {
12
13template <typename FF_> class emit_unencrypted_logImpl {
14 public:
15 using FF = FF_;
16
17 static constexpr std::array<size_t, 47> SUBRELATION_PARTIAL_LENGTHS = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, 3,
18 3, 4, 3, 3, 3, 3, 4, 3, 3, 5, 3, 5,
19 4, 4, 3, 2, 3, 3, 4, 3, 4, 4, 4, 4,
20 4, 3, 5, 4, 4, 3, 4, 4, 3, 3, 3 };
21
22 template <typename AllEntities> inline static bool skip(const AllEntities& in)
23 {
24 using C = ColumnAndShifts;
25
26 return (in.get(C::emit_unencrypted_log_sel)).is_zero();
27 }
28
29 template <typename ContainerOverSubrelations, typename AllEntities>
30 void static accumulate(ContainerOverSubrelations& evals,
31 const AllEntities& in,
32 [[maybe_unused]] const RelationParameters<FF>&,
33 [[maybe_unused]] const FF& scaling_factor);
34};
35
36template <typename FF> class emit_unencrypted_log : public Relation<emit_unencrypted_logImpl<FF>> {
37 public:
38 static constexpr const std::string_view NAME = "emit_unencrypted_log";
39
40 // Subrelation indices constants, to be used in tests.
41 static constexpr size_t SR_START_AFTER_LATCH = 4;
42 static constexpr size_t SR_SELECTOR_ON_START = 5;
43 static constexpr size_t SR_SELECTOR_CONSISTENCY = 6;
44 static constexpr size_t SR_SELECTOR_ON_END = 7;
45 static constexpr size_t SR_REMAINING_ROWS_DECREMENT = 9;
46 static constexpr size_t SR_ERROR_OUT_OF_BOUNDS_CONSISTENCY = 13;
47 static constexpr size_t SR_ERROR_TAG_MISMATCH_CONSISTENCY = 18;
48 static constexpr size_t SR_WRONG_TAG_CHECK = 21;
49 static constexpr size_t SR_LOG_ADDRESS_INCREMENT = 32;
50 static constexpr size_t SR_EXEC_CLK_CONSISTENCY = 33;
51 static constexpr size_t SR_SPACE_ID_CONSISTENCY = 34;
53 static constexpr size_t SR_CONTRACT_ADDRESS_CONSISTENCY = 43;
54
55 static std::string get_subrelation_label(size_t index)
56 {
57 switch (index) {
59 return "START_AFTER_LATCH";
61 return "SELECTOR_ON_START";
63 return "SELECTOR_CONSISTENCY";
65 return "SELECTOR_ON_END";
67 return "REMAINING_ROWS_DECREMENT";
69 return "ERROR_OUT_OF_BOUNDS_CONSISTENCY";
71 return "ERROR_TAG_MISMATCH_CONSISTENCY";
73 return "WRONG_TAG_CHECK";
75 return "LOG_ADDRESS_INCREMENT";
77 return "EXEC_CLK_CONSISTENCY";
79 return "SPACE_ID_CONSISTENCY";
81 return "SEL_SHOULD_WRITE_TO_PUBLIC_INPUTS_CONSISTENCY";
83 return "CONTRACT_ADDRESS_CONSISTENCY";
84 }
85 return std::to_string(index);
86 }
87};
88
89} // namespace bb::avm2
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
static constexpr size_t SR_SPACE_ID_CONSISTENCY
static std::string get_subrelation_label(size_t index)
static constexpr size_t SR_SELECTOR_ON_END
static constexpr size_t SR_START_AFTER_LATCH
static constexpr size_t SR_LOG_ADDRESS_INCREMENT
static constexpr size_t SR_SEL_SHOULD_WRITE_TO_PUBLIC_INPUTS_CONSISTENCY
static constexpr size_t SR_ERROR_TAG_MISMATCH_CONSISTENCY
static constexpr size_t SR_SELECTOR_ON_START
static constexpr size_t SR_WRONG_TAG_CHECK
static constexpr const std::string_view NAME
static constexpr size_t SR_REMAINING_ROWS_DECREMENT
static constexpr size_t SR_ERROR_OUT_OF_BOUNDS_CONSISTENCY
static constexpr size_t SR_EXEC_CLK_CONSISTENCY
static constexpr size_t SR_SELECTOR_CONSISTENCY
static constexpr size_t SR_CONTRACT_ADDRESS_CONSISTENCY
static constexpr std::array< size_t, 47 > SUBRELATION_PARTIAL_LENGTHS
static bool skip(const AllEntities &in)
static void accumulate(ContainerOverSubrelations &evals, const AllEntities &in, const RelationParameters< FF > &, const FF &scaling_factor)
ColumnAndShifts
Definition columns.hpp:34
AvmFlavorSettings::FF FF
Definition field.hpp:10
std::string to_string(bb::avm2::ValueTag tag)
Container for parameters used by the grand product (permutation, lookup) Honk relations.