Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ecc_point_table_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
12
13namespace bb {
14
15template <typename FF_> class ECCVMPointTableDoubleShortRelationImpl {
16 public:
17 using FF = FF_;
18
19 // Local indices map to base point-table subrelations DOUBLE_X and DOUBLE_Y.
25
26 static constexpr std::array<size_t, 2> SUBRELATION_PARTIAL_LENGTHS{
27 6, // DOUBLE_X (deg 5)
28 5, // DOUBLE_Y (deg 4)
29 };
30 static_assert(NUM_SUBRELATIONS == SUBRELATION_PARTIAL_LENGTHS.size());
31
32 template <typename AllEntities> inline static bool skip(const AllEntities& in)
33 {
34 return in.precompute_point_transition.is_zero();
35 }
36
37 template <typename ContainerOverSubrelations, typename AllEntities, typename Parameters>
38 static void accumulate(ContainerOverSubrelations& accumulator,
39 const AllEntities& in,
40 const Parameters& params,
41 const FF& scaling_factor);
42};
43
45
46template <typename FF_> class ECCVMPointTableShortRelationImpl {
47 public:
48 using FF = FF_;
49
50 // Local indices map in order to base point-table subrelations D_PROPAGATE_X..ADD_Y.
58
59 static constexpr std::array<size_t, 4> SUBRELATION_PARTIAL_LENGTHS{
60 4, // D_PROPAGATE_X (deg 3)
61 4, // D_PROPAGATE_Y (deg 3)
62 6, // ADD_X (deg 5)
63 5, // ADD_Y (deg 4)
64 };
65 static_assert(NUM_SUBRELATIONS == SUBRELATION_PARTIAL_LENGTHS.size());
66
67 template <typename ContainerOverSubrelations, typename AllEntities, typename Parameters>
68 static void accumulate(ContainerOverSubrelations& accumulator,
69 const AllEntities& in,
70 const Parameters& params,
71 const FF& scaling_factor);
72};
73
75
76} // namespace bb
static constexpr std::array< size_t, 2 > SUBRELATION_PARTIAL_LENGTHS
static void accumulate(ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters &params, const FF &scaling_factor)
static void accumulate(ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters &params, const FF &scaling_factor)
static constexpr std::array< size_t, 4 > SUBRELATION_PARTIAL_LENGTHS
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
Entry point for Barretenberg command-line interface.
Definition api.hpp:5