Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::isSkippable Concept Reference

The templates defined herein facilitate sharing the relation arithmetic between the prover and the verifier. More...

#include <relation_types.hpp>

Concept definition

template<typename Relation, typename AllEntities>
concept bb::isSkippable = requires(const AllEntities& input) {
{ Relation::skip(input) } -> std::same_as<bool>;
}
The templates defined herein facilitate sharing the relation arithmetic between the prover and the ve...
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13

Detailed Description

The templates defined herein facilitate sharing the relation arithmetic between the prover and the verifier.

The sumcheck prover and verifier accumulate the contributions from each relation (really, each sub-relation) into, respectively, Univariates and individual field elements. When performing relation arithmetic on Univariates, we introduce UnivariateViews to reduce full length Univariates to the minimum required length and to avoid unnecessary copies.

To share the relation arithmetic, we introduce simple structs that specify two types: Accumulators and AccumulatorViews. For the prover, who accumulates Univariates, these are respectively std::tuple<Univariate> and std::tuple<UnivariateView>. For the verifier, who accumulates FFs, both types are simply aliases for std::array<FF> (since no "view" type is necessary). The containers std::tuple and std::array are needed to accommodate multiple sub-relations within each relation, where, for efficiency, each sub-relation has its own specified degree.

Note
We use some funny terminology: we use the term "length" for 1 + the degree of a relation. When the relation is regarded as a polynomial in all of its arguments, we refer to this length as the "total length", and when we hold the relation parameters constant we refer to it as a "partial length."

Check if the relation has a static skip method to determine if accumulation of its result can be optimized away based on a single check

The skip function should return true if relation can be skipped and false if it can't

Template Parameters
RelationThe relation type
AllEntitiesThe type containing UnivariateViews with witness and selector values

Definition at line 127 of file relation_types.hpp.