|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <translator_flavor.hpp>
Classes | |
| class | AllEntities |
| A base class labelling all entities (for instance, all of the polynomials used by the prover during sumcheck) in this Honk variant along with particular subsets of interest. More... | |
| class | AllValues |
| A field element for each entity of the flavor. These entities represent the prover polynomials evaluated at one point. More... | |
| class | CommitmentLabels |
| A container for commitment labels. More... | |
| class | ConcatenatedPolynomials |
| class | DerivedShiftedEntities |
| Ordered range constraint + z_perm shifted entities. More... | |
| class | DerivedWitnessEntities |
| class | MaskingEntities |
| Container for ZK entities (gemini masking polynomial for ZK-PCS) More... | |
| class | NonOpQueueShiftedEntities |
| Non-op-queue minicircuit wire shifted entities (mirrors NonOpQueueWiresToBeShiftedEntities) More... | |
| class | NonOpQueueWiresToBeShiftedEntities |
| All non-op-queue wires that need to be shifted (composed of non-range main + range constraint) More... | |
| class | NonRangeMainWires |
| Non-range main wires (13 wires that go into concatenated group 4) More... | |
| class | OpQueueShiftedEntities |
| Op queue shifted entities (mirrors OpQueueWiresToBeShiftedEntities) More... | |
| class | OpQueueWireNonshiftedEntities |
| Op queue wires (non-shifted): these represent the op queue and are provided by the merge protocol. More... | |
| class | OpQueueWiresToBeShiftedEntities |
| Op queue wires (to be shifted): first 3 wires of the to-be-shifted group. More... | |
| class | OrderedRangeConstraints |
| class | PrecomputedEntities |
| A base class labelling precomputed entities and (ordered) subsets of interest. More... | |
| class | ProverPolynomials |
| A container for the prover polynomials handles. More... | |
| class | ProvingKey |
| The proving key is responsible for storing the polynomials used by the prover. More... | |
| class | RangeConstraintWires |
| Range constraint wires (64 wires that go into concatenated groups 0-3) More... | |
| class | ShiftedEntities |
| Represents polynomials shifted by 1 or their evaluations, defined relative to WireToBeShiftedEntities. More... | |
| class | VerifierCommitments_ |
| class | VKEntities |
| The only precomputed commitment the verifier needs for PCS. More... | |
| class | WireNonshiftedEntities |
| All wire entities that are not shifted (currently just the op queue wire) More... | |
| class | WireToBeShiftedEntities |
| All wires to be shifted (op queue + non-op-queue) More... | |
| class | WitnessEntities |
| Container for all witness polynomials used/constructed by the prover. More... | |
Static Public Member Functions | |
| template<typename DataType , typename WireRefs > | |
| static std::vector< RefVector< DataType > > | partition_minicircuit_wires_into_groups (WireRefs wire_refs, DataType &zero_value) |
| Partition minicircuit wire references into concatenation groups. | |
| template<typename FFType > | |
| static void | compute_computable_precomputed (AllEntities< FFType > &evals, std::span< const FFType > challenge) |
| Compute the computable precomputed selector evaluations and write them into AllEntities. | |
| template<typename PolyContainer > | |
| static std::array< FF, NUM_MINICIRCUIT_EVALUATIONS > | get_minicircuit_evaluations (PolyContainer &polys) |
| Prover: read the 154 minicircuit wire evaluations from partially-evaluated polynomials. | |
| template<typename FFType > | |
| static void | set_minicircuit_evaluations (AllEntities< FFType > &evals, const std::array< FFType, NUM_MINICIRCUIT_EVALUATIONS > &mid) |
| Verifier: place the 154 raw mid-sumcheck minicircuit wire evaluations into AllEntities. | |
| template<typename FFType > | |
| static void | complete_claimed_evaluations (AllEntities< FFType > &evals, std::span< const FFType > challenge) |
| Verifier: complete the claimed evaluations for the sumcheck relation check. | |
| template<typename FFType > | |
| static void | complete_full_circuit_evaluations (AllEntities< FFType > &evals, const std::array< FFType, NUM_FULL_CIRCUIT_EVALUATIONS > &full_circuit, std::span< const FFType > challenge) |
| Verifier: complete full-circuit evaluations from received array and challenge. | |
| template<typename FFType > | |
| static std::array< FFType, NUM_CONCATENATED_POLYS > | reconstruct_concatenated_evaluations (const std::vector< RefVector< FFType > > &groups, std::span< const FFType > challenge) |
| Reconstruct concatenated polynomial evaluations from individual wire evaluations using the Lagrange basis over the top log2(CONCATENATION_GROUP_SIZE) challenges. | |
| template<typename FFType > | |
| static std::array< FFType, NUM_FULL_CIRCUIT_EVALUATIONS > | get_full_circuit_evaluations (AllEntities< FFType > &evals) |
| Prover: extract the full-circuit evaluations via get_full_circuit_entities(). | |
| template<typename FFType > | |
| static void | set_full_circuit_evaluations (AllEntities< FFType > &evals, const std::array< FFType, NUM_FULL_CIRCUIT_EVALUATIONS > &full_circuit) |
| Verifier: write the full-circuit evaluations back via get_full_circuit_entities(). | |
| template<typename ProverPolynomialsOrPartiallyEvaluatedMultivariates , typename EdgeType > | |
| static bool | skip_entire_row (const ProverPolynomialsOrPartiallyEvaluatedMultivariates &polynomials, const EdgeType edge_idx) |
| When evaluating the sumcheck protocol - can we skip evaluation of all relations for a given row? | |
Definition at line 40 of file translator_flavor.hpp.
Definition at line 51 of file translator_flavor.hpp.
Definition at line 43 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::Codec = FrCodec |
Definition at line 53 of file translator_flavor.hpp.
Definition at line 47 of file translator_flavor.hpp.
Definition at line 48 of file translator_flavor.hpp.
Definition at line 44 of file translator_flavor.hpp.
A container for univariates produced during the hot loop in sumcheck.
Definition at line 1198 of file translator_flavor.hpp.
Definition at line 50 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::GrandProductRelations = std::tuple<TranslatorPermutationRelation<FF> > |
Definition at line 125 of file translator_flavor.hpp.
Definition at line 46 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::HashFunction = crypto::Poseidon2<crypto::Poseidon2Bn254ScalarFieldParams> |
Definition at line 54 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::PartiallyEvaluatedMultivariates = PartiallyEvaluatedMultivariatesBase<AllEntities<Polynomial>, ProverPolynomials, Polynomial> |
A container for storing the partially evaluated multivariates produced by sumcheck.
Definition at line 1187 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::PCS = KZG<Curve> |
Definition at line 45 of file translator_flavor.hpp.
Definition at line 52 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::ProverUnivariates = AllEntities<bb::Univariate<FF, LENGTH> > |
A container for univariates used during sumcheck.
Definition at line 1193 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::Relations = Relations_<FF> |
Definition at line 135 of file translator_flavor.hpp.
Definition at line 128 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::SubrelationSeparators = std::array<FF, NUM_SUBRELATIONS - 1> |
Definition at line 138 of file translator_flavor.hpp.
Definition at line 55 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::VerificationKey = FixedVKAndHash_<VKEntities<Commitment>, FF, TranslatorHardcodedVKAndHash> |
The verification key stores commitments to the precomputed polynomials used by the verifier.
Translator has a fixed circuit size, so the VK is hardcoded in recursive verifiers. Only ordered_extra_range_constraints_numerator needs a commitment — all other precomputed selectors are structured multilinear polynomials whose evaluations the verifier computes analytically.
Definition at line 1182 of file translator_flavor.hpp.
Definition at line 49 of file translator_flavor.hpp.
Definition at line 1267 of file translator_flavor.hpp.
|
inlinestatic |
Verifier: complete the claimed evaluations for the sumcheck relation check.
After set_full_circuit_evaluations and set_minicircuit_evaluations have placed raw values, this method:
Definition at line 902 of file translator_flavor.hpp.
|
inlinestatic |
Verifier: complete full-circuit evaluations from received array and challenge.
Assumes minicircuit wire evaluations have already been placed into evals via set_minicircuit_evaluations. This method:
Definition at line 929 of file translator_flavor.hpp.
|
inlinestatic |
Compute the computable precomputed selector evaluations and write them into AllEntities.
Definition at line 851 of file translator_flavor.hpp.
|
inlinestatic |
Prover: extract the full-circuit evaluations via get_full_circuit_entities().
Definition at line 1003 of file translator_flavor.hpp.
|
inlinestatic |
Prover: read the 154 minicircuit wire evaluations from partially-evaluated polynomials.
After LOG_MINI_CIRCUIT_SIZE rounds, each polynomial has been folded to a single value at index [0]. We extract the 77 unshifted + 77 shifted minicircuit wire evaluations.
Definition at line 862 of file translator_flavor.hpp.
|
inlinestatic |
Partition minicircuit wire references into concatenation groups.
Takes a flat list of minicircuit wire refs (NonRangeMain followed by RangeConstraint) and partitions them: groups 0..3 are sequential chunks of CONCATENATION_GROUP_SIZE range constraint wires, group 4 is the non-range main wires with zero-padding. Used by both get_groups_to_be_concatenated() and get_groups_to_be_concatenated_shifted().
Definition at line 818 of file translator_flavor.hpp.
|
inlinestatic |
Reconstruct concatenated polynomial evaluations from individual wire evaluations using the Lagrange basis over the top log2(CONCATENATION_GROUP_SIZE) challenges.
The concatenated polynomial F(X) is laid out in CONCATENATION_GROUP_SIZE sequential blocks. Given evaluations of the individual wires f_j(u) at the sumcheck challenge u, the evaluation of F(u) is reconstructed as: F(u) = [1/L_0(u_top)] * Σ_j L_j(u_top) * f_j(u), where L_j are the Lagrange basis polynomials over the top challenges and L_0 is the "padding" factor.
| groups | The 5 groups of 16 wire evaluations to reconstruct from. |
| challenge | The full sumcheck challenge vector. |
Definition at line 958 of file translator_flavor.hpp.
|
inlinestatic |
Verifier: write the full-circuit evaluations back via get_full_circuit_entities().
Definition at line 1017 of file translator_flavor.hpp.
|
inlinestatic |
Verifier: place the 154 raw mid-sumcheck minicircuit wire evaluations into AllEntities.
These are evaluations after LOG_MINI_CIRCUIT_SIZE rounds of partial evaluation (before the top-4 rounds). They must be scaled by L_0(u_top) before the relation check — see complete_claimed_evaluations.
Definition at line 881 of file translator_flavor.hpp.
|
inlinestatic |
When evaluating the sumcheck protocol - can we skip evaluation of all relations for a given row?
When used in Chonk, the Translator has a large fixed size, which is often not fully utilized. If a row is completely empty, the values of z_perm and z_perm_shift will match, we can use this as a proxy to determine if we can skip Sumcheck::compute_univariate
Definition at line 1248 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 147 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 789 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 78 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 84 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 61 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 81 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 800 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 140 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 112 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 119 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 89 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 701 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 745 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 705 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 92 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 721 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 152 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 154 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 153 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 718 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 123 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 107 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 70 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 713 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 708 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 756 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 75 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 687 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 738 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 735 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 685 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 150 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 716 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 697 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 137 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 732 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 729 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 98 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 686 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 690 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 765 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 116 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 757 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 103 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 742 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 95 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 797 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 741 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 63 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 65 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 58 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 87 of file translator_flavor.hpp.