Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ecc_shiftable_init_relation.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: not started, auditors: [], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
9
10namespace bb {
11
64template <typename FF_> class ECCVMShiftableInitRelationImpl {
65 public:
66 using FF = FF_;
67
68 enum SubrelationIndex : size_t {
69 // Load-bearing for soundness:
70 //
71 // Z_PERM_INIT and TRANSCRIPT_ACCUMULATOR_NOT_EMPTY_INIT were previously housed in
72 // ECCVMSetRelation and ECCVMTranscriptRelation respectively; centralizing them here
73 // keeps every direct `lagrange_first · col = 0` constraint in one place.
79
80 // Defense-in-depth (values not currently read at lagrange_first, but pinning makes
81 // the invariant explicit and robust to future relation changes):
99 };
100
101 // Every subrelation is `lagrange_first · col · scaling_factor` (degree 2 in witnesses → partial length 3).
102 static constexpr std::array<size_t, 21> SUBRELATION_PARTIAL_LENGTHS{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
103 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };
104 static_assert(NUM_SUBRELATIONS == SUBRELATION_PARTIAL_LENGTHS.size());
105
106 // skip after lagrange_first row
107 template <typename AllEntities> inline static bool skip(const AllEntities& in)
108 {
109 return in.lagrange_first.is_zero();
110 }
111
112 template <typename ContainerOverSubrelations, typename AllEntities, typename Parameters>
113 static void accumulate(ContainerOverSubrelations& accumulator,
114 const AllEntities& in,
115 const Parameters& /* unused */,
116 const FF& scaling_factor);
117};
118
120
121} // namespace bb
Pins every shiftable wire to 0 at the lagrange_first row (TRACE_OFFSET).
static constexpr std::array< size_t, 21 > SUBRELATION_PARTIAL_LENGTHS
static bool skip(const AllEntities &in)
static void accumulate(ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters &, const FF &scaling_factor)
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