Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
translator_non_native_field_short_relation.hpp
Go to the documentation of this file.
1
// === AUDIT STATUS ===
2
// internal: { status: Planned, auditors: [], commit: }
3
// external_1: { status: not started, auditors: [], commit: }
4
// external_2: { status: not started, auditors: [], commit: }
5
// =====================
6
7
#pragma once
8
#include "
barretenberg/ecc/curves/bn254/bn254.hpp
"
9
#include "
barretenberg/relations/relation_types.hpp
"
10
#include "
barretenberg/relations/translator_vm/translator_short_monomial_relation_utils.hpp
"
11
12
namespace
bb
{
13
14
template
<
typename
FF_>
class
TranslatorNonNativeFieldShortRelationImpl
{
15
public
:
16
using
FF
= FF_;
17
18
// 1 + polynomial degree of this relation
19
static
constexpr
std::array<size_t, 3>
SUBRELATION_PARTIAL_LENGTHS
{
20
4,
// Lower wide limb subrelation (checks result is 0 mod 2¹³⁶)
21
4,
// Higher wide limb subrelation (checks result is 0 in higher mod 2¹³⁶),
22
4
// Prime subrelation (checks result in native field)
23
};
24
29
template
<
typename
AllEntities>
inline
static
bool
skip
(
const
AllEntities& in)
30
{
31
return
in.lagrange_even_in_minicircuit.is_zero();
32
}
95
template
<
typename
ContainerOverSubrelations,
typename
AllEntities,
typename
Parameters>
96
static
void
accumulate
(ContainerOverSubrelations& accumulators,
97
const
AllEntities& in,
98
const
Parameters& params,
99
const
FF
& scaling_factor);
100
};
101
102
template
<
typename
FF>
103
using
TranslatorNonNativeFieldShortRelation
=
Relation<TranslatorNonNativeFieldShortRelationImpl<FF>
>;
104
105
}
// namespace bb
bb::Relation
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
Definition
relation_types.hpp:96
bb::TranslatorNonNativeFieldShortRelationImpl
Definition
translator_non_native_field_short_relation.hpp:14
bb::TranslatorNonNativeFieldShortRelationImpl::accumulate
static void accumulate(ContainerOverSubrelations &accumulators, const AllEntities &in, const Parameters ¶ms, const FF &scaling_factor)
Expression for the computation of Translator accumulator in integers through 68-bit limbs and native ...
Definition
translator_non_native_field_short_relation_impl.hpp:79
bb::TranslatorNonNativeFieldShortRelationImpl::skip
static bool skip(const AllEntities &in)
Returns true if the contribution from all subrelations for the provided inputs is identically zero.
Definition
translator_non_native_field_short_relation.hpp:29
bb::TranslatorNonNativeFieldShortRelationImpl::FF
FF_ FF
Definition
translator_non_native_field_short_relation.hpp:16
bb::TranslatorNonNativeFieldShortRelationImpl::SUBRELATION_PARTIAL_LENGTHS
static constexpr std::array< size_t, 3 > SUBRELATION_PARTIAL_LENGTHS
Definition
translator_non_native_field_short_relation.hpp:19
bn254.hpp
bb
Entry point for Barretenberg command-line interface.
Definition
api.hpp:5
relation_types.hpp
bb::field< bb::Bn254FrParams >
translator_short_monomial_relation_utils.hpp
src
barretenberg
relations
translator_vm
translator_non_native_field_short_relation.hpp
Generated by
1.9.8