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, 48> SUBRELATION_PARTIAL_LENGTHS = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5,
18 3, 3, 4, 3, 3, 3, 3, 4, 3, 3, 5, 3,
19 5, 4, 4, 3, 2, 3, 3, 4, 4, 4, 4, 4,
20 4, 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 = 5;
42 static constexpr size_t SR_SELECTOR_ON_START = 6;
43 static constexpr size_t SR_SELECTOR_CONSISTENCY = 7;
44 static constexpr size_t SR_SELECTOR_ON_END = 8;
45 static constexpr size_t SR_REMAINING_ROWS_DECREMENT = 10;
46 static constexpr size_t SR_ERROR_OUT_OF_BOUNDS_CONSISTENCY = 14;
47 static constexpr size_t SR_ERROR_TAG_MISMATCH_CONSISTENCY = 19;
48 static constexpr size_t SR_WRONG_TAG_CHECK = 22;
50 static constexpr size_t SR_LOG_ADDRESS_INCREMENT = 33;
51 static constexpr size_t SR_EXEC_CLK_CONSISTENCY = 34;
52 static constexpr size_t SR_SPACE_ID_CONSISTENCY = 35;
54 static constexpr size_t SR_CONTRACT_ADDRESS_CONSISTENCY = 44;
55
56 static std::string get_subrelation_label(size_t index)
57 {
58 switch (index) {
60 return "START_AFTER_LATCH";
62 return "SELECTOR_ON_START";
64 return "SELECTOR_CONSISTENCY";
66 return "SELECTOR_ON_END";
68 return "REMAINING_ROWS_DECREMENT";
70 return "ERROR_OUT_OF_BOUNDS_CONSISTENCY";
72 return "ERROR_TAG_MISMATCH_CONSISTENCY";
74 return "WRONG_TAG_CHECK";
76 return "SEL_SHOULD_READ_MEMORY_IS_SEL_AND_WRITE_MEM_AND_NO_ERR";
78 return "LOG_ADDRESS_INCREMENT";
80 return "EXEC_CLK_CONSISTENCY";
82 return "SPACE_ID_CONSISTENCY";
84 return "SEL_SHOULD_WRITE_TO_PUBLIC_INPUTS_CONSISTENCY";
86 return "CONTRACT_ADDRESS_CONSISTENCY";
87 }
88 return std::to_string(index);
89 }
90};
91
92} // 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 size_t SR_SEL_SHOULD_READ_MEMORY_IS_SEL_AND_WRITE_MEM_AND_NO_ERR
static bool skip(const AllEntities &in)
static constexpr std::array< size_t, 48 > SUBRELATION_PARTIAL_LENGTHS
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.