Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
translator_delta_range_constraint_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
10
11namespace bb {
12
14 public:
15 using FF = FF_;
16
17 // 1 + polynomial degree of this relation
18 // degree((1-lagrange_real_last-lagrange_ordered_masking) * D(D-1)(D-2)(D-3)) = 4+1 = 5, so length = 6
19 static constexpr size_t RELATION_LENGTH = 6;
20
21 static constexpr std::array<size_t, 10> SUBRELATION_PARTIAL_LENGTHS{
22 6, // ordered_range_constraints_0 step in {0,1,2,3} subrelation
23 6, // ordered_range_constraints_1 step in {0,1,2,3} subrelation
24 6, // ordered_range_constraints_2 step in {0,1,2,3} subrelation
25 6, // ordered_range_constraints_3 step in {0,1,2,3} subrelation
26 6, // ordered_range_constraints_4 step in {0,1,2,3} subrelation
27 3, // ordered_range_constraints_0 ends with defined maximum value subrelation
28 3, // ordered_range_constraints_1 ends with defined maximum value subrelation
29 3, // ordered_range_constraints_2 ends with defined maximum value subrelation
30 3, // ordered_range_constraints_3 ends with defined maximum value subrelation
31 3 // ordered_range_constraints_4 ends with defined maximum value subrelation
32 };
33
45 template <typename AllEntities> static bool skip(const AllEntities& in)
46 {
47 return (in.ordered_range_constraints_0_shift - in.ordered_range_constraints_0).is_zero() &&
48 (in.ordered_range_constraints_1_shift - in.ordered_range_constraints_1).is_zero() &&
49 (in.ordered_range_constraints_2_shift - in.ordered_range_constraints_2).is_zero() &&
50 (in.ordered_range_constraints_3_shift - in.ordered_range_constraints_3).is_zero() &&
51 (in.ordered_range_constraints_4_shift - in.ordered_range_constraints_4).is_zero() &&
52 in.lagrange_real_last.is_zero();
53 }
54
76 template <typename ContainerOverSubrelations, typename AllEntities, typename Parameters>
77 static void accumulate(ContainerOverSubrelations& accumulators,
78 const AllEntities& in,
79 const Parameters&,
80 const FF& scaling_factor);
81};
82
83template <typename FF>
85
86} // namespace bb
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
static void accumulate(ContainerOverSubrelations &accumulators, const AllEntities &in, const Parameters &, const FF &scaling_factor)
Expression for the generalized permutation sort relation.
static bool skip(const AllEntities &in)
Returns true if the contribution from all subrelations for the provided inputs is identically zero.
Entry point for Barretenberg command-line interface.
Definition api.hpp:5