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

#include <trace_to_polynomials.hpp>

Static Public Member Functions

static void populate (Builder &builder, ProverPolynomials &, ActiveRegionData &)
 Given a circuit, populate a proving key with wire polys, selector polys, and sigma/id polys.
 

Static Public Attributes

static constexpr size_t NUM_WIRES = Builder::NUM_WIRES
 

Private Types

using Builder = typename Flavor::CircuitBuilder
 
using Polynomial = typename Flavor::Polynomial
 
using FF = typename Flavor::FF
 
using ExecutionTrace = typename Builder::ExecutionTrace
 
using Wires = std::array< SlabVector< uint32_t >, Builder::NUM_WIRES >
 
using ProverPolynomials = typename Flavor::ProverPolynomials
 

Static Private Member Functions

static std::vector< CyclicPermutationpopulate_wires_and_selectors_and_compute_copy_cycles (Builder &builder, ProverPolynomials &, ActiveRegionData &)
 Populate wire polynomials, selector polynomials and copy cycles from raw circuit data.
 
static void add_ecc_op_wires_to_proving_key (Builder &builder, ProverPolynomials &)
 Construct and add the goblin ecc op wires to the proving key.
 

Detailed Description

template<class Flavor>
class bb::TraceToPolynomials< Flavor >

Definition at line 15 of file trace_to_polynomials.hpp.

Member Typedef Documentation

◆ Builder

template<class Flavor >
using bb::TraceToPolynomials< Flavor >::Builder = typename Flavor::CircuitBuilder
private

Definition at line 16 of file trace_to_polynomials.hpp.

◆ ExecutionTrace

template<class Flavor >
using bb::TraceToPolynomials< Flavor >::ExecutionTrace = typename Builder::ExecutionTrace
private

Definition at line 19 of file trace_to_polynomials.hpp.

◆ FF

template<class Flavor >
using bb::TraceToPolynomials< Flavor >::FF = typename Flavor::FF
private

Definition at line 18 of file trace_to_polynomials.hpp.

◆ Polynomial

template<class Flavor >
using bb::TraceToPolynomials< Flavor >::Polynomial = typename Flavor::Polynomial
private

Definition at line 17 of file trace_to_polynomials.hpp.

◆ ProverPolynomials

Definition at line 21 of file trace_to_polynomials.hpp.

◆ Wires

template<class Flavor >
using bb::TraceToPolynomials< Flavor >::Wires = std::array<SlabVector<uint32_t>, Builder::NUM_WIRES>
private

Definition at line 20 of file trace_to_polynomials.hpp.

Member Function Documentation

◆ add_ecc_op_wires_to_proving_key()

template<class Flavor >
requires IsMegaFlavor<Flavor>
void bb::TraceToPolynomials< Flavor >::add_ecc_op_wires_to_proving_key ( Builder builder,
ProverPolynomials polynomials 
)
staticprivate

Construct and add the goblin ecc op wires to the proving key.

The ecc op wires vanish everywhere except on the ecc op block, where they contain a copy of the ecc op data assumed already to be present in the corrresponding block of the conventional wires in the proving key.

Parameters
builder
proving_key

Definition at line 99 of file trace_to_polynomials.cpp.

◆ populate()

template<class Flavor >
void bb::TraceToPolynomials< Flavor >::populate ( Builder builder,
typename Flavor::ProverPolynomials polynomials,
ActiveRegionData active_region_data 
)
static

Given a circuit, populate a proving key with wire polys, selector polys, and sigma/id polys.

Note
By default, this method constructs an exectution trace that is sorted by gate type. Optionally, it constructs a trace that is both sorted and "structured" in the sense that each block/gate-type has a fixed amount of space within the wire polynomials, regardless of how many actual constraints of each type exist. This is useful primarily for folding since it guarantees that the set of relations that must be executed at each row is consistent across all folding steps.
Parameters
builder
is_structuredwhether or not the trace is to be structured with a fixed block size

Definition at line 19 of file trace_to_polynomials.cpp.

◆ populate_wires_and_selectors_and_compute_copy_cycles()

template<class Flavor >
std::vector< CyclicPermutation > bb::TraceToPolynomials< Flavor >::populate_wires_and_selectors_and_compute_copy_cycles ( Builder builder,
ProverPolynomials polynomials,
ActiveRegionData active_region_data 
)
staticprivate

Populate wire polynomials, selector polynomials and copy cycles from raw circuit data.

Parameters
builder
proving_key
Returns
std::vector<CyclicPermutation> copy cycles describing the copy constraints in the circuit

Definition at line 43 of file trace_to_polynomials.cpp.

Member Data Documentation

◆ NUM_WIRES

template<class Flavor >
constexpr size_t bb::TraceToPolynomials< Flavor >::NUM_WIRES = Builder::NUM_WIRES
staticconstexpr

Definition at line 24 of file trace_to_polynomials.hpp.


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