|
barretenberg
|
Core class implementing the arithmetic gate in Ultra plonk. More...
#include <plookup_arithmetic_widget.hpp>
Static Public Member Functions | |
| static std::set< PolynomialIndex > const & | get_required_polynomial_ids () |
| static void | accumulate_contribution (PolyContainer &polynomials, const challenge_array &challenges, Field "ient, const size_t i=0) |
| Computes the full identity for the arithmetic gate in plookup to be added to the quotient. All the logic is explained in class description. | |
Core class implementing the arithmetic gate in Ultra plonk.
ArithmethicKernel provides the logic that can implement one of several transitions. The whole formula without alpha scaling is:
q_arith * ( ( (-1/2) * (q_arith - 3) * q_m * w_1 * w_2 + q_1 * w_1 + q_2 * w_2 + q_3 * w_3 + q_4 * w_4 + q_c ) + (q_arith - 1)*( α * (q_arith - 2) * (w_1 + w_4 - w_1_omega + q_m) + w_4_omega) ) = 0
This formula results in several cases depending on q_arith:
q_1 * w_1 + q_2 * w_2 + q_3 * w_3 + q_4 * w_4 + q_c + 2 * w_4_omega = 0
w_1 + w_4 - w_1_omega + q_m = 0 (we are reusing q_m here)
(q_arith - 3)* q_m * w_1 * w_ 2 + q_1 * w_1 + q_2 * w_2 + q_3 * w_3 + q_4 * w_4 + q_c + (q_arith - 1) * w_4_omega = 0
w_1 + w_4 - w_1_omega + q_m = 0
The problem that q_m is used both in both equations can be dealt with by appropriately changing selector values at the next gate. Then we can treat (q_arith - 1) as a simulated q_6 selector and scale q_m to handle (q_arith - 3) at product.
Uses only the alpha challenge
| Field | The basic field in which the elements operates |
| Getters | The class providing functions that access evaluations of polynomials at indices |
| PolyContainer | Container for the polynomials or their simulation |
|
inlinestatic |
Computes the full identity for the arithmetic gate in plookup to be added to the quotient. All the logic is explained in class description.
| polynomials | Container for polynomials or their simpulation |
| challenges | Challenge array (we only need powers of alpha here) |
| quotient | Quotient reference to add the result to |
| i | Gate index |