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
6
#include "
barretenberg/common/op_count.hpp
"
7
#include "
barretenberg/relations/relation_parameters.hpp
"
8
#include "
barretenberg/relations/relation_types.hpp
"
9
#include "
barretenberg/vm2/generated/columns.hpp
"
10
11
namespace
bb::avm2
{
12
13
template
<
typename
FF_>
class
emit_unencrypted_logImpl
{
14
public
:
15
using
FF
= FF_;
16
17
static
constexpr
std::array<size_t, 46>
SUBRELATION_PARTIAL_LENGTHS
= { 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, 3,
18
3, 3, 3, 3, 4, 3, 5, 3, 4, 3, 3, 5,
19
3, 5, 5, 4, 4, 3, 3, 3, 5, 5, 4, 4,
20
4, 4, 4, 4, 3, 5, 3, 4, 4, 4 };
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
36
template
<
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
static
std::string
get_subrelation_label
(
size_t
index)
41
{
42
switch
(index) {
43
case
4:
44
return
"START_AFTER_LATCH"
;
45
case
5:
46
return
"SELECTOR_ON_START"
;
47
case
6:
48
return
"SELECTOR_CONSISTENCY"
;
49
case
7:
50
return
"SELECTOR_ON_END"
;
51
case
9:
52
return
"REMAINING_ROWS_DECREMENT"
;
53
case
16:
54
return
"ERROR_OUT_OF_BOUNDS_CONSISTENCY"
;
55
case
20:
56
return
"ERROR_TAG_MISMATCH_CONSISTENCY"
;
57
case
23:
58
return
"WRONG_TAG_CHECK"
;
59
case
28:
60
return
"SEL_SHOULD_WRITE_TO_PUBLIC_INPUTS_CONSISTENCY"
;
61
case
32:
62
return
"REMAINING_LOG_SIZE_DECREMENT"
;
63
case
35:
64
return
"LOG_ADDRESS_INCREMENT"
;
65
case
36:
66
return
"EXEC_CLK_CONSISTENCY"
;
67
case
37:
68
return
"SPACE_ID_CONSISTENCY"
;
69
case
44:
70
return
"CONTRACT_ADDRESS_CONSISTENCY"
;
71
case
45:
72
return
"LOG_SIZE_CONSISTENCY"
;
73
}
74
return
std::to_string
(index);
75
}
76
77
// Subrelation indices constants, to be used in tests.
78
static
constexpr
size_t
SR_START_AFTER_LATCH
= 4;
79
static
constexpr
size_t
SR_SELECTOR_ON_START
= 5;
80
static
constexpr
size_t
SR_SELECTOR_CONSISTENCY
= 6;
81
static
constexpr
size_t
SR_SELECTOR_ON_END
= 7;
82
static
constexpr
size_t
SR_REMAINING_ROWS_DECREMENT
= 9;
83
static
constexpr
size_t
SR_ERROR_OUT_OF_BOUNDS_CONSISTENCY
= 16;
84
static
constexpr
size_t
SR_ERROR_TAG_MISMATCH_CONSISTENCY
= 20;
85
static
constexpr
size_t
SR_WRONG_TAG_CHECK
= 23;
86
static
constexpr
size_t
SR_SEL_SHOULD_WRITE_TO_PUBLIC_INPUTS_CONSISTENCY
= 28;
87
static
constexpr
size_t
SR_REMAINING_LOG_SIZE_DECREMENT
= 32;
88
static
constexpr
size_t
SR_LOG_ADDRESS_INCREMENT
= 35;
89
static
constexpr
size_t
SR_EXEC_CLK_CONSISTENCY
= 36;
90
static
constexpr
size_t
SR_SPACE_ID_CONSISTENCY
= 37;
91
static
constexpr
size_t
SR_CONTRACT_ADDRESS_CONSISTENCY
= 44;
92
static
constexpr
size_t
SR_LOG_SIZE_CONSISTENCY
= 45;
93
};
94
95
}
// namespace bb::avm2
bb::Relation
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
Definition
relation_types.hpp:153
bb::avm2::emit_unencrypted_log
Definition
emit_unencrypted_log.hpp:36
bb::avm2::emit_unencrypted_log::SR_SPACE_ID_CONSISTENCY
static constexpr size_t SR_SPACE_ID_CONSISTENCY
Definition
emit_unencrypted_log.hpp:90
bb::avm2::emit_unencrypted_log::SR_REMAINING_LOG_SIZE_DECREMENT
static constexpr size_t SR_REMAINING_LOG_SIZE_DECREMENT
Definition
emit_unencrypted_log.hpp:87
bb::avm2::emit_unencrypted_log::get_subrelation_label
static std::string get_subrelation_label(size_t index)
Definition
emit_unencrypted_log.hpp:40
bb::avm2::emit_unencrypted_log::SR_SELECTOR_ON_END
static constexpr size_t SR_SELECTOR_ON_END
Definition
emit_unencrypted_log.hpp:81
bb::avm2::emit_unencrypted_log::SR_START_AFTER_LATCH
static constexpr size_t SR_START_AFTER_LATCH
Definition
emit_unencrypted_log.hpp:78
bb::avm2::emit_unencrypted_log::SR_LOG_ADDRESS_INCREMENT
static constexpr size_t SR_LOG_ADDRESS_INCREMENT
Definition
emit_unencrypted_log.hpp:88
bb::avm2::emit_unencrypted_log::SR_SEL_SHOULD_WRITE_TO_PUBLIC_INPUTS_CONSISTENCY
static constexpr size_t SR_SEL_SHOULD_WRITE_TO_PUBLIC_INPUTS_CONSISTENCY
Definition
emit_unencrypted_log.hpp:86
bb::avm2::emit_unencrypted_log::SR_LOG_SIZE_CONSISTENCY
static constexpr size_t SR_LOG_SIZE_CONSISTENCY
Definition
emit_unencrypted_log.hpp:92
bb::avm2::emit_unencrypted_log::SR_ERROR_TAG_MISMATCH_CONSISTENCY
static constexpr size_t SR_ERROR_TAG_MISMATCH_CONSISTENCY
Definition
emit_unencrypted_log.hpp:84
bb::avm2::emit_unencrypted_log::SR_SELECTOR_ON_START
static constexpr size_t SR_SELECTOR_ON_START
Definition
emit_unencrypted_log.hpp:79
bb::avm2::emit_unencrypted_log::SR_WRONG_TAG_CHECK
static constexpr size_t SR_WRONG_TAG_CHECK
Definition
emit_unencrypted_log.hpp:85
bb::avm2::emit_unencrypted_log::NAME
static constexpr const std::string_view NAME
Definition
emit_unencrypted_log.hpp:38
bb::avm2::emit_unencrypted_log::SR_REMAINING_ROWS_DECREMENT
static constexpr size_t SR_REMAINING_ROWS_DECREMENT
Definition
emit_unencrypted_log.hpp:82
bb::avm2::emit_unencrypted_log::SR_ERROR_OUT_OF_BOUNDS_CONSISTENCY
static constexpr size_t SR_ERROR_OUT_OF_BOUNDS_CONSISTENCY
Definition
emit_unencrypted_log.hpp:83
bb::avm2::emit_unencrypted_log::SR_EXEC_CLK_CONSISTENCY
static constexpr size_t SR_EXEC_CLK_CONSISTENCY
Definition
emit_unencrypted_log.hpp:89
bb::avm2::emit_unencrypted_log::SR_SELECTOR_CONSISTENCY
static constexpr size_t SR_SELECTOR_CONSISTENCY
Definition
emit_unencrypted_log.hpp:80
bb::avm2::emit_unencrypted_log::SR_CONTRACT_ADDRESS_CONSISTENCY
static constexpr size_t SR_CONTRACT_ADDRESS_CONSISTENCY
Definition
emit_unencrypted_log.hpp:91
bb::avm2::emit_unencrypted_logImpl
Definition
emit_unencrypted_log.hpp:13
bb::avm2::emit_unencrypted_logImpl::SUBRELATION_PARTIAL_LENGTHS
static constexpr std::array< size_t, 46 > SUBRELATION_PARTIAL_LENGTHS
Definition
emit_unencrypted_log.hpp:17
bb::avm2::emit_unencrypted_logImpl::FF
FF_ FF
Definition
emit_unencrypted_log.hpp:15
bb::avm2::emit_unencrypted_logImpl::skip
static bool skip(const AllEntities &in)
Definition
emit_unencrypted_log.hpp:22
bb::avm2::emit_unencrypted_logImpl::accumulate
static void accumulate(ContainerOverSubrelations &evals, const AllEntities &in, const RelationParameters< FF > &, const FF &scaling_factor)
Definition
emit_unencrypted_log_impl.hpp:10
columns.hpp
bb::avm2
Definition
flavor.hpp:472
bb::avm2::Column
Column
Definition
columns.hpp:32
bb::avm2::ColumnAndShifts
ColumnAndShifts
Definition
columns.hpp:35
bb::avm2::FF
AvmFlavorSettings::FF FF
Definition
field.hpp:10
std::to_string
std::string to_string(bb::avm2::ValueTag tag)
Definition
tagged_value.cpp:399
op_count.hpp
relation_parameters.hpp
relation_types.hpp
bb::RelationParameters
Container for parameters used by the grand product (permutation, lookup) Honk relations.
Definition
relation_parameters.hpp:19
src
barretenberg
vm2
generated
relations
emit_unencrypted_log.hpp
Generated by
1.9.8