Barretenberg
The ZK-SNARK library at the core of Aztec
|
The templates defined herein facilitate sharing the relation arithmetic between the prover and the verifier. More...
#include <relation_types.hpp>
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.
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
Relation | The relation type |
AllEntities | The type containing UnivariateViews with witness and selector values |
Definition at line 127 of file relation_types.hpp.