|
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 33 of file translator_flavor.hpp.
Definition at line 44 of file translator_flavor.hpp.
Definition at line 36 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::Codec = FrCodec |
Definition at line 46 of file translator_flavor.hpp.
Definition at line 40 of file translator_flavor.hpp.
Definition at line 41 of file translator_flavor.hpp.
Definition at line 37 of file translator_flavor.hpp.
A container for univariates produced during the hot loop in sumcheck.
Definition at line 1165 of file translator_flavor.hpp.
Definition at line 43 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::GrandProductRelations = std::tuple<TranslatorPermutationRelation<FF> > |
Definition at line 126 of file translator_flavor.hpp.
Definition at line 39 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::HashFunction = crypto::Poseidon2<crypto::Poseidon2Bn254ScalarFieldParams> |
Definition at line 47 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 1154 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::PCS = KZG<Curve> |
Definition at line 38 of file translator_flavor.hpp.
Definition at line 45 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::ProverUnivariates = AllEntities<bb::Univariate<FF, LENGTH> > |
A container for univariates used during sumcheck.
Definition at line 1160 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::Relations = Relations_<FF> |
Definition at line 136 of file translator_flavor.hpp.
Definition at line 129 of file translator_flavor.hpp.
| using bb::TranslatorFlavor::SubrelationSeparators = std::array<FF, NUM_SUBRELATIONS - 1> |
Definition at line 139 of file translator_flavor.hpp.
Definition at line 48 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 1149 of file translator_flavor.hpp.
Definition at line 42 of file translator_flavor.hpp.
Definition at line 1234 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 869 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 896 of file translator_flavor.hpp.
|
inlinestatic |
Compute the computable precomputed selector evaluations and write them into AllEntities.
Definition at line 818 of file translator_flavor.hpp.
|
inlinestatic |
Prover: extract the full-circuit evaluations via get_full_circuit_entities().
Definition at line 970 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 829 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 785 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 925 of file translator_flavor.hpp.
|
inlinestatic |
Verifier: write the full-circuit evaluations back via get_full_circuit_entities().
Definition at line 984 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 848 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 1215 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 148 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 69 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 75 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 54 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 72 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 141 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 103 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 109 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 80 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 123 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 696 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 738 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 700 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 83 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 716 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 153 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 155 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 154 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 713 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 120 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 98 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 61 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 708 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 703 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 66 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 682 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 731 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 728 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 680 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 151 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 711 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 692 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 138 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 725 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 722 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 89 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 681 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 685 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 755 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 106 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 747 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 94 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 735 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 86 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 113 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 734 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 56 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 51 of file translator_flavor.hpp.
|
staticconstexpr |
Definition at line 78 of file translator_flavor.hpp.