Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
row_disabling_polynomial.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Complete, auditors: [Khashayar], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
12
13#include <cstddef>
14#include <vector>
15namespace bb {
122template <typename FF> struct RowDisablingPolynomial {
123 // initialized as a constant linear polynomial = 1
126
138 void update_evaluations(FF round_challenge, size_t round_idx)
139 {
140 if (round_idx == 1) {
141 eval_at_1 = FF{ 0 };
142 }
143 if (round_idx >= 2) {
144 eval_at_0 *= (FF{ 1 } - round_challenge);
145 }
146 }
154 static FF evaluate_at_challenge(std::span<const FF> multivariate_challenge, const size_t log_circuit_size)
155 {
156 FF evaluation_at_multivariate_challenge{ 1 };
157
158 for (size_t idx = 2; idx < log_circuit_size; idx++) {
159 evaluation_at_multivariate_challenge *= (FF{ 1 } - multivariate_challenge[idx]);
160 }
161
162 return FF{ 1 } - evaluation_at_multivariate_challenge;
163 }
164};
165
166} // namespace bb
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
Polynomial for Sumcheck with disabled Rows.
static FF evaluate_at_challenge(std::span< const FF > multivariate_challenge, const size_t log_circuit_size)
Compute the evaluation of at the sumcheck challenge.
void update_evaluations(FF round_challenge, size_t round_idx)
Compute the evaluations of L^{(i)} at 0 and 1.