Barretenberg
The ZK-SNARK library at the core of Aztec
|
A DeciderProvingKey is normally constructed from a finalized circuit and it contains all the information required by an Mega Honk prover to create a proof. A DeciderProvingKey is also the result of running the Protogalaxy prover, in which case it becomes a relaxed counterpart with the folding parameters (target sum and gate challenges set to non-zero values). More...
#include <decider_proving_key.hpp>
Public Types | |
using | Trace = TraceToPolynomials< Flavor > |
Public Member Functions | |
void | set_dyadic_size (size_t size) |
void | set_overflow_size (size_t size) |
void | set_final_active_wire_idx (size_t idx) |
size_t | dyadic_size () const |
size_t | log_dyadic_size () const |
size_t | pub_inputs_offset () const |
size_t | num_public_inputs () const |
MetaData | get_metadata () const |
size_t | get_overflow_size () const |
size_t | get_final_active_wire_idx () const |
Flavor::PrecomputedData | get_precomputed () |
DeciderProvingKey_ (Circuit &circuit, TraceSettings trace_settings={}, const CommitmentKey &commitment_key=CommitmentKey()) | |
DeciderProvingKey_ ()=default | |
~DeciderProvingKey_ ()=default | |
bool | get_is_structured () |
Public Attributes | |
std::vector< FF > | public_inputs |
ProverPolynomials | polynomials |
SubrelationSeparators | alphas |
bb::RelationParameters< FF > | relation_parameters |
std::vector< FF > | gate_challenges |
FF | target_sum { 0 } |
HonkProof | ipa_proof |
bool | from_first_instance = false |
bool | is_complete = false |
std::vector< uint32_t > | memory_read_records |
std::vector< uint32_t > | memory_write_records |
CommitmentKey | commitment_key |
ActiveRegionData | active_region_data |
Private Types | |
using | Circuit = typename Flavor::CircuitBuilder |
using | CommitmentKey = typename Flavor::CommitmentKey |
using | FF = typename Flavor::FF |
using | ProverPolynomials = typename Flavor::ProverPolynomials |
using | Polynomial = typename Flavor::Polynomial |
using | SubrelationSeparators = typename Flavor::SubrelationSeparators |
Private Member Functions | |
size_t | compute_dyadic_size (Circuit &) |
Helper method to compute quantities like total number of gates and dyadic circuit size. | |
void | allocate_wires () |
void | allocate_permutation_argument_polynomials () |
void | allocate_lagrange_polynomials () |
void | allocate_selectors (const Circuit &) |
void | allocate_table_lookup_polynomials (const Circuit &) |
void | allocate_ecc_op_polynomials (const Circuit &) |
void | allocate_databus_polynomials (const Circuit &) |
size_t | compute_structured_dyadic_size (Circuit &circuit) |
Compute dyadic size based on a structured trace with fixed block size. | |
void | construct_databus_polynomials (Circuit &) |
void | populate_memory_records (const Circuit &circuit) |
Copy RAM/ROM record of reads and writes from the circuit to the proving key. | |
Static Private Member Functions | |
static void | move_structured_trace_overflow_to_overflow_block (Circuit &circuit) |
Check that the number of gates in each block does not exceed its fixed capacity. Move any overflow to the overflow block. | |
Private Attributes | |
bool | is_structured |
MetaData | metadata |
size_t | overflow_size { 0 } |
size_t | final_active_wire_idx { 0 } |
Static Private Attributes | |
static constexpr size_t | num_zero_rows = Flavor::has_zero_row ? 1 : 0 |
static constexpr size_t | NUM_WIRES = Circuit::NUM_WIRES |
A DeciderProvingKey is normally constructed from a finalized circuit and it contains all the information required by an Mega Honk prover to create a proof. A DeciderProvingKey is also the result of running the Protogalaxy prover, in which case it becomes a relaxed counterpart with the folding parameters (target sum and gate challenges set to non-zero values).
This is the equivalent of ω in the paper.
Definition at line 36 of file decider_proving_key.hpp.
|
private |
Definition at line 37 of file decider_proving_key.hpp.
|
private |
Definition at line 38 of file decider_proving_key.hpp.
|
private |
Definition at line 39 of file decider_proving_key.hpp.
|
private |
Definition at line 41 of file decider_proving_key.hpp.
|
private |
Definition at line 40 of file decider_proving_key.hpp.
|
private |
Definition at line 42 of file decider_proving_key.hpp.
using bb::DeciderProvingKey_< Flavor >::Trace = TraceToPolynomials<Flavor> |
Definition at line 52 of file decider_proving_key.hpp.
|
inline |
Definition at line 92 of file decider_proving_key.hpp.
|
default |
|
default |
|
private |
Definition at line 149 of file decider_proving_key.cpp.
|
private |
Definition at line 135 of file decider_proving_key.cpp.
|
private |
Definition at line 61 of file decider_proving_key.cpp.
|
private |
Definition at line 48 of file decider_proving_key.cpp.
|
private |
Definition at line 76 of file decider_proving_key.cpp.
|
private |
Definition at line 101 of file decider_proving_key.cpp.
|
private |
Definition at line 39 of file decider_proving_key.cpp.
|
private |
Helper method to compute quantities like total number of gates and dyadic circuit size.
Flavor |
circuit |
Definition at line 22 of file decider_proving_key.cpp.
|
inlineprivate |
Compute dyadic size based on a structured trace with fixed block size.
Definition at line 247 of file decider_proving_key.hpp.
|
private |
Flavor |
circuit |
Definition at line 187 of file decider_proving_key.cpp.
|
inline |
Definition at line 75 of file decider_proving_key.hpp.
|
inline |
Definition at line 85 of file decider_proving_key.hpp.
|
inline |
Definition at line 219 of file decider_proving_key.hpp.
|
inline |
Definition at line 83 of file decider_proving_key.hpp.
|
inline |
Definition at line 84 of file decider_proving_key.hpp.
|
inline |
Definition at line 87 of file decider_proving_key.hpp.
|
inline |
Definition at line 76 of file decider_proving_key.hpp.
|
staticprivate |
Check that the number of gates in each block does not exceed its fixed capacity. Move any overflow to the overflow block.
Using a structured trace (fixed capcity for each gate type) optimizes the efficiency of folding. However, to accommodate circuits which cannot fit into a prescribed trace, gates which overflow their corresponding block are placed into an overflow block which can contain arbitrary gate types.
Flavor |
circuit |
Definition at line 247 of file decider_proving_key.cpp.
|
inline |
Definition at line 78 of file decider_proving_key.hpp.
|
private |
Copy RAM/ROM record of reads and writes from the circuit to the proving key.
The memory records in the circuit store indices within the memory block where a read/write is performed. They are stored in the DPK as indices into the full trace by accounting for the offset of the memory block.
Definition at line 347 of file decider_proving_key.cpp.
|
inline |
Definition at line 77 of file decider_proving_key.hpp.
|
inline |
Definition at line 72 of file decider_proving_key.hpp.
|
inline |
Definition at line 74 of file decider_proving_key.hpp.
|
inline |
Definition at line 73 of file decider_proving_key.hpp.
ActiveRegionData bb::DeciderProvingKey_< Flavor >::active_region_data |
Definition at line 70 of file decider_proving_key.hpp.
SubrelationSeparators bb::DeciderProvingKey_< Flavor >::alphas |
Definition at line 56 of file decider_proving_key.hpp.
CommitmentKey bb::DeciderProvingKey_< Flavor >::commitment_key |
Definition at line 68 of file decider_proving_key.hpp.
|
private |
Definition at line 49 of file decider_proving_key.hpp.
bool bb::DeciderProvingKey_< Flavor >::from_first_instance = false |
Definition at line 63 of file decider_proving_key.hpp.
std::vector<FF> bb::DeciderProvingKey_< Flavor >::gate_challenges |
Definition at line 58 of file decider_proving_key.hpp.
HonkProof bb::DeciderProvingKey_< Flavor >::ipa_proof |
Definition at line 61 of file decider_proving_key.hpp.
bool bb::DeciderProvingKey_< Flavor >::is_complete = false |
Definition at line 64 of file decider_proving_key.hpp.
|
private |
Definition at line 45 of file decider_proving_key.hpp.
std::vector<uint32_t> bb::DeciderProvingKey_< Flavor >::memory_read_records |
Definition at line 65 of file decider_proving_key.hpp.
std::vector<uint32_t> bb::DeciderProvingKey_< Flavor >::memory_write_records |
Definition at line 66 of file decider_proving_key.hpp.
|
private |
Definition at line 47 of file decider_proving_key.hpp.
|
staticconstexprprivate |
Definition at line 223 of file decider_proving_key.hpp.
|
staticconstexprprivate |
Definition at line 222 of file decider_proving_key.hpp.
|
private |
Definition at line 48 of file decider_proving_key.hpp.
ProverPolynomials bb::DeciderProvingKey_< Flavor >::polynomials |
Definition at line 55 of file decider_proving_key.hpp.
std::vector<FF> bb::DeciderProvingKey_< Flavor >::public_inputs |
Definition at line 54 of file decider_proving_key.hpp.
bb::RelationParameters<FF> bb::DeciderProvingKey_< Flavor >::relation_parameters |
Definition at line 57 of file decider_proving_key.hpp.
FF bb::DeciderProvingKey_< Flavor >::target_sum { 0 } |
Definition at line 59 of file decider_proving_key.hpp.