Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::ECCVMSetRelationImpl< FF_ > Class Template Reference

#include <ecc_set_relation.hpp>

Public Types

using FF = FF_
 

Static Public Member Functions

template<typename AllEntities >
static bool skip (const AllEntities &in)
 
template<typename Accumulator >
static Accumulator convert_to_wnaf (const auto &s0, const auto &s1)
 
static auto & get_grand_product_polynomial (auto &input)
 
static auto & get_shifted_grand_product_polynomial (auto &input)
 
template<typename Accumulator , typename AllEntities , typename Parameters >
static Accumulator compute_grand_product_numerator (const AllEntities &in, const Parameters &params)
 Performs list-equivalence checks for the ECCVM.
 
template<typename Accumulator , typename AllEntities , typename Parameters >
static Accumulator compute_grand_product_denominator (const AllEntities &in, const Parameters &params)
 
template<typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
static void accumulate (ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters &params, const FF &scaling_factor)
 Expression for the standard arithmetic gate. @dbetails The relation is defined as C(in(X)...) = (q_m * w_r * w_l) + (q_l * w_l) + (q_r * w_r) + (q_o * w_o) + q_c.
 

Static Public Attributes

static constexpr std::array< size_t, 2 > SUBRELATION_PARTIAL_LENGTHS
 

Detailed Description

template<typename FF_>
class bb::ECCVMSetRelationImpl< FF_ >

Definition at line 17 of file ecc_set_relation.hpp.

Member Typedef Documentation

◆ FF

template<typename FF_ >
using bb::ECCVMSetRelationImpl< FF_ >::FF = FF_

Definition at line 19 of file ecc_set_relation.hpp.

Member Function Documentation

◆ accumulate()

template<typename FF >
template<typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
void bb::ECCVMSetRelationImpl< FF >::accumulate ( ContainerOverSubrelations &  accumulator,
const AllEntities &  in,
const Parameters &  params,
const FF scaling_factor 
)
static

Expression for the standard arithmetic gate. @dbetails The relation is defined as C(in(X)...) = (q_m * w_r * w_l) + (q_l * w_l) + (q_r * w_r) + (q_o * w_o) + q_c.

Parameters
evalstransformed to evals + C(in(X)...)*scaling_factor
inan std::array containing the fully extended Accumulator edges.
parameterscontains beta, gamma, and public_input_delta, ....
scaling_factoroptional term to scale the evaluation before adding to evals.

Definition at line 389 of file ecc_set_relation_impl.hpp.

◆ compute_grand_product_denominator()

template<typename FF >
template<typename Accumulator , typename AllEntities , typename Parameters >
Accumulator bb::ECCVMSetRelationImpl< FF >::compute_grand_product_denominator ( const AllEntities &  in,
const Parameters &  params 
)
static

First term: tuple of (pc, round, wnaf_slice), used to determine which points we extract from lookup tables when evaluaing MSMs in ECCVMMsmRelation. These values must be equivalent to the values computed in the 1st term of compute_grand_product_numerator

Second term: tuple of (transcript_pc, transcript_Px, transcript_Py, z1) OR (transcript_pc, \lambda * transcript_Px, -transcript_Py, z2) for each scalar multiplication in ECCVMTranscriptRelation columns. (the latter term uses the curve endomorphism: \lambda = cube root of unity). These values must be equivalent to the second term values in compute_grand_product_numerator

Third term: tuple of (point-counter, P.x, P.y, msm-size) from ECCVMTranscriptRelation. (P.x, P.y) is the claimed output of a multi-scalar-multiplication evaluated in ECCVMMSMRelation. We need to validate that the msm output produced in ECCVMMSMRelation is equivalent to the output present in transcript_msm_output_x, transcript_msm_output_y, for a given multi-scalar multiplication starting at transcript_pc and has size transcript_msm_count

Definition at line 247 of file ecc_set_relation_impl.hpp.

◆ compute_grand_product_numerator()

template<typename FF >
template<typename Accumulator , typename AllEntities , typename Parameters >
Accumulator bb::ECCVMSetRelationImpl< FF >::compute_grand_product_numerator ( const AllEntities &  in,
const Parameters &  params 
)
static

Performs list-equivalence checks for the ECCVM.

ECCVMSetRelationImpl validates the correctness of the inputs/outputs of the three main algorithms evaluated by the ECCVM.

First term: tuple of (pc, round, wnaf_slice), computed when slicing scalar multipliers into slices, as part of ECCVMWnafRelation Input source: ECCVMWnafRelation Output source: ECCVMMSMRelation

Second term: tuple of (point-counter, P.x, P.y, scalar-multiplier), used in ECCVMWnafRelation and ECCVMPointTableRelation Input source: ECCVMPointTableRelation Output source: ECCVMMSMRelation

Third term: tuple of (point-counter, P.x, P.y, msm-size) from ECCVMMSMRelation Input source: ECCVMMSMRelation Output source: ECCVMTranscriptRelation

Template Parameters
FF
AccumulatorTypes
Parameters
in
relation_params
index
Returns
ECCVMSetRelationImpl<FF>::template Accumulator<AccumulatorTypes>

First term: tuple of (pc, round, wnaf_slice), computed when slicing scalar multipliers into slices, as part of ECCVMWnafRelation. If precompute_select = 1, tuple entry = (wnaf-slice + point-counter * beta + msm-round * beta_sqr). There are 4 tuple entries per row.

Second term: tuple of (point-counter, P.x, P.y, scalar-multiplier), used in ECCVMWnafRelation and ECCVMPointTableRelation. ECCVMWnafRelation validates the sum of the wnaf slices associated with point-counter equals scalar-multiplier. ECCVMPointTableRelation computes a table of muliples of [P]: { -15[P], -13[P], ..., 15[P] }. We need to validate that scalar-multiplier and [P] = (P.x, P.y) come from MUL opcodes in the transcript columns.

Third term: tuple of (point-counter, P.x, P.y, msm-size) from ECCVMMSMRelation. (P.x, P.y) is the output of a multi-scalar-multiplication evaluated in ECCVMMSMRelation. We need to validate that the same values (P.x, P.y) are present in the Transcript columns and describe a multi-scalar multiplication of size msm-size, starting at point-counter.

If msm_transition_shift = 1, this indicates the current row is the last row of a multiscalar multiplication evaluation. The output of the MSM will be present on (msm_accumulator_x_shift, msm_accumulator_y_shift). The values of msm_accumulator_x_shift, msm_accumulator_y_shift, msm_pc, msm_size_of_msm must match up with equivalent values transcript_msm_output_x, transcript_msm_output_y, transcript_pc, transcript_msm_count present in the Transcript columns

Definition at line 44 of file ecc_set_relation_impl.hpp.

◆ convert_to_wnaf()

template<typename FF_ >
template<typename Accumulator >
static Accumulator bb::ECCVMSetRelationImpl< FF_ >::convert_to_wnaf ( const auto &  s0,
const auto &  s1 
)
inlinestatic

Definition at line 35 of file ecc_set_relation.hpp.

◆ get_grand_product_polynomial()

template<typename FF_ >
static auto & bb::ECCVMSetRelationImpl< FF_ >::get_grand_product_polynomial ( auto &  input)
inlinestatic

Definition at line 45 of file ecc_set_relation.hpp.

◆ get_shifted_grand_product_polynomial()

template<typename FF_ >
static auto & bb::ECCVMSetRelationImpl< FF_ >::get_shifted_grand_product_polynomial ( auto &  input)
inlinestatic

Definition at line 46 of file ecc_set_relation.hpp.

◆ skip()

template<typename FF_ >
template<typename AllEntities >
static bool bb::ECCVMSetRelationImpl< FF_ >::skip ( const AllEntities &  in)
inlinestatic

Definition at line 26 of file ecc_set_relation.hpp.

Member Data Documentation

◆ SUBRELATION_PARTIAL_LENGTHS

template<typename FF_ >
constexpr std::array<size_t, 2> bb::ECCVMSetRelationImpl< FF_ >::SUBRELATION_PARTIAL_LENGTHS
staticconstexpr
Initial value:
{
22,
3
}

Definition at line 21 of file ecc_set_relation.hpp.


The documentation for this class was generated from the following files: