Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
partially_evaluated_multivariates.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Complete, auditors: [Sergei], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6#pragma once
7
10
11namespace bb {
12
24template <typename AllEntitiesBase, typename ProverPolynomialsType, typename Polynomial>
25class PartiallyEvaluatedMultivariatesBase : public AllEntitiesBase {
26 public:
27 // One-past the last relation-active row at this round; the sumcheck prover skips rows beyond it. Halved each round
28 // to track the trace folding (here and in SumcheckProver::partially_evaluate). Populated only by flavors with a
29 // static row-skip manifest; 0 means scan every row.
31
36 PartiallyEvaluatedMultivariatesBase(const ProverPolynomialsType& full_polynomials, size_t circuit_size)
37 {
38 for (auto [poly, full_poly] : zip_view(this->get_all(), full_polynomials.get_all())) {
39 // After the initial sumcheck round, the new size is CEIL(size/2).
40 size_t desired_size = (full_poly.end_index() / 2) + (full_poly.end_index() % 2);
41 // partially_evaluate writes to [0, desired_size) before any read; backing memory can be left uninitialized.
42 poly = Polynomial(desired_size, circuit_size / 2, 0, Polynomial::DontZeroMemory::FLAG);
43 }
44 if constexpr (requires { full_polynomials.row_skip_active_prefix_end; }) {
46 (full_polynomials.row_skip_active_prefix_end / 2) + (full_polynomials.row_skip_active_prefix_end % 2);
47 }
48 }
49};
50
51} // namespace bb
A container for storing the partially evaluated multivariates produced by sumcheck.
PartiallyEvaluatedMultivariatesBase(const ProverPolynomialsType &full_polynomials, size_t circuit_size)
Construct from full polynomials, allocating based on their actual sizes.
Structured polynomial class that represents the coefficients 'a' of a_0 + a_1 x .....
Entry point for Barretenberg command-line interface.
Definition api.hpp:5