Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
translator_non_native_field_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
11
namespace
bb
{
12
13
template
<
typename
FF_>
class
TranslatorNonNativeFieldRelationImpl
{
14
public
:
15
using
FF
= FF_;
16
17
// 1 + polynomial degree of this relation
18
static
constexpr
std::array<size_t, 3>
SUBRELATION_PARTIAL_LENGTHS
{
19
4,
// Lower wide limb subrelation (checks result is 0 mod 2¹³⁶)
20
4,
// Higher wide limb subrelation (checks result is 0 in higher mod 2¹³⁶),
21
4
// Prime subrelation (checks result in native field)
22
};
23
28
template
<
typename
AllEntities>
inline
static
bool
skip
(
const
AllEntities
& in)
29
{
30
return
in.lagrange_even_in_minicircuit.is_zero();
31
}
94
template
<
typename
ContainerOverSubrelations,
typename
AllEntities,
typename
Parameters>
95
static
void
accumulate
(ContainerOverSubrelations& accumulators,
96
const
AllEntities
& in,
97
const
Parameters& params,
98
const
FF
& scaling_factor);
99
};
100
101
template
<
typename
FF>
using
TranslatorNonNativeFieldRelation
=
Relation<TranslatorNonNativeFieldRelationImpl<FF>
>;
102
103
}
// namespace bb
bb::MegaFlavor_Generated::AllEntities
Definition
mega_flavor_generated.hpp:277
bb::Relation
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
Definition
relation_types.hpp:129
bb::TranslatorNonNativeFieldRelationImpl
Definition
translator_non_native_field_relation.hpp:13
bb::TranslatorNonNativeFieldRelationImpl::SUBRELATION_PARTIAL_LENGTHS
static constexpr std::array< size_t, 3 > SUBRELATION_PARTIAL_LENGTHS
Definition
translator_non_native_field_relation.hpp:18
bb::TranslatorNonNativeFieldRelationImpl::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_relation.hpp:28
bb::TranslatorNonNativeFieldRelationImpl::FF
FF_ FF
Definition
translator_non_native_field_relation.hpp:15
bb::TranslatorNonNativeFieldRelationImpl::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_relation_impl.hpp:79
bn254.hpp
bb
Entry point for Barretenberg command-line interface.
Definition
api.hpp:5
relation_types.hpp
bb::field< bb::Bn254FrParams >
src
barretenberg
relations
translator_vm
translator_non_native_field_relation.hpp
Generated by
1.9.8