barretenberg
Loading...
Searching...
No Matches
Namespaces | Classes | Concepts | Typedefs | Functions
proof_system::honk Namespace Reference

Defines particular circuit builder types expected to be used for circuit construction in stdlib and contains macros for explicit instantiation. More...

Namespaces

namespace  pcs
 Provides interfaces for different 'CommitmentKey' classes.
 

Classes

class  AvmMiniComposer
 
class  AvmMiniProver
 
class  AvmMiniVerifier
 
class  BaseTranscript
 Common transcript class for both parties. Stores the data for the current round, as well as the manifest. More...
 
class  ECCVMComposer_
 
class  ECCVMProver_
 
class  ECCVMVerifier_
 
struct  FoldingResult
 The result of running the Protogalaxy prover containing a new accumulator (relaxed instance) as well as the proof data to instantiate the verifier transcript. More...
 
class  GoblinTranslatorComposer
 
class  GoblinTranslatorProver
 
class  GoblinTranslatorVerifier
 
class  MergeProver_
 Prover class for the Goblin ECC op queue transcript merge protocol. More...
 
class  MergeVerifier_
 Verifier class for the Goblin ECC op queue transcript merge protocol. More...
 
struct  OpeningProof
 
class  ProtoGalaxyProver_
 
class  ProtoGalaxyVerifier_
 
class  ProverInstance_
 An Instance is normally constructed from a finalized circuit and it's role is to compute all the polynomials involved in creating a proof and, if requested, the verification key. In case of folded Instance, this will be created from the FoldingResult, the aggregated work from the folding prover and verifier. More specifically, a folded instance will be constructed from the complete set of folded polynomials and folded public inputs and its FoldingParams are expected to be non-zero. More...
 
struct  ProverInstances_
 
class  TranscriptManifest
 
class  UltraComposer_
 
class  UltraProver_
 
class  UltraVerifier_
 
class  VerifierInstance_
 
struct  VerifierInstances_
 

Concepts

concept  Loggable
 

Typedefs

using ECCVMComposer = ECCVMComposer_< honk::flavor::ECCVM >
 
using ECCVMVerifierGrumpkin = ECCVMVerifier_< honk::flavor::ECCVM >
 
using Flavor = honk::flavor::GoblinTranslator
 
using Curve = typename Flavor::Curve
 
using FF = typename Flavor::FF
 
using CircuitBuilder = typename Flavor::CircuitBuilder
 
using ProvingKey = typename Flavor::ProvingKey
 
using VerificationKey = typename Flavor::VerificationKey
 
using PCS = typename Flavor::PCS
 
using CommitmentKey = typename Flavor::CommitmentKey
 
using VerifierCommitmentKey = typename Flavor::VerifierCommitmentKey
 
using Polynomial = typename Flavor::Polynomial
 
using Transcript = typename Flavor::Transcript
 
using UltraComposer = UltraComposer_< honk::flavor::Ultra >
 
using GoblinUltraComposer = UltraComposer_< honk::flavor::GoblinUltra >
 
using UltraProver = UltraProver_< honk::flavor::Ultra >
 
using GoblinUltraProver = UltraProver_< honk::flavor::GoblinUltra >
 
using UltraVerifier = UltraVerifier_< honk::flavor::Ultra >
 
using GoblinUltraVerifier = UltraVerifier_< honk::flavor::GoblinUltra >
 

Functions

template<typename Flavor >
Flavor::ProverPolynomials get_sequential_prover_polynomials (const size_t log_circuit_size, const size_t starting_value)
 Get a ProverPolynomials instance initialized to sequential values starting at 0.
 
template<typename Flavor >
Flavor::ProverPolynomials get_zero_prover_polynomials (const size_t log_circuit_size)
 
template<typename Flavor >
Flavor::FF compute_public_input_delta (std::span< const typename Flavor::FF > public_inputs, const typename Flavor::FF &beta, const typename Flavor::FF &gamma, const auto domain_size, size_t offset=0)
 Compute the correction term for the permutation argument.
 
template<typename Field >
Field compute_lookup_grand_product_delta (const Field &beta, const Field &gamma, const auto domain_size)
 Compute lookup grand product delta.
 
template<typename FF , typename T , size_t N>
std::array< FF, N > challenges_to_field_elements (std::array< T, N > &&arr)
 Convert an array of uint256_t's to an array of field elements.
 
std::vector< Polynomial > construct_wire_polynomials_base_goblin_translator (const CircuitBuilder &circuit_builder, const size_t dyadic_circuit_size)
 Construct the witness polynomials from the witness vectors in the circuit constructor.
 

Detailed Description

Defines particular circuit builder types expected to be used for circuit construction in stdlib and contains macros for explicit instantiation.

This file is designed to be included in header files to instruct the compiler that these classes exist and their instantiation will eventually take place. Given it has no dependencies, it causes no additional compilation or propagation.

Function Documentation

◆ challenges_to_field_elements()

template<typename FF , typename T , size_t N>
std::array< FF, N > proof_system::honk::challenges_to_field_elements ( std::array< T, N > &&  arr)

Convert an array of uint256_t's to an array of field elements.

The syntax std::array<FF, 2> [a, b] = transcript.get_challenges("a", "b") is unfortunately not allowed (structured bindings must be defined with auto return type), so we need a workaround.

◆ compute_lookup_grand_product_delta()

template<typename Field >
Field proof_system::honk::compute_lookup_grand_product_delta ( const Field &  beta,
const Field &  gamma,
const auto  domain_size 
)

Compute lookup grand product delta.

Similar to how incorporation of public inputs into the permutation grand product results in z_permutation(X_n) = \Delta_{PI}, the structure of the lookup grand product polynomial results in z_lookup(X_n) = (γ(1 + β))^n = \Delta_{lookup}. This is a side effect of the way in which we incorporate the original plookup construction (for which z_lookup(X_n) = 1) into plonk/honk. See https://hackmd.io/@aztec-network/ByjS5GplK? for a more detailed explanation.

Template Parameters
Field
Parameters
beta
gamma
domain_sizedyadic circuit size
Returns
Field

◆ compute_public_input_delta()

template<typename Flavor >
Flavor::FF proof_system::honk::compute_public_input_delta ( std::span< const typename Flavor::FF public_inputs,
const typename Flavor::FF beta,
const typename Flavor::FF gamma,
const auto  domain_size,
size_t  offset = 0 
)

Compute the correction term for the permutation argument.

Template Parameters
Field
Parameters
public_inputsx₀, ..., xₘ₋₁ public inputs to the circuit
betarandom linear-combination term to combine both (wʲ, IDʲ) and (wʲ, σʲ)
gammaSchwartz-Zippel random evaluation to ensure ∏ᵢ (γ + Sᵢ) = ∏ᵢ (γ + Tᵢ)
domain_sizeTotal number of rows required for the circuit (power of 2)
offsetExtent to which PI are offset from the 0th index in the wire polynomials, for example, due to inclusion of a leading zero row or Goblin style ECC op gates at the top of the execution trace.
Returns
Field Public input Δ

◆ construct_wire_polynomials_base_goblin_translator()

std::vector< Polynomial > proof_system::honk::construct_wire_polynomials_base_goblin_translator ( const CircuitBuilder &  circuit_builder,
const size_t  dyadic_circuit_size 
)

Construct the witness polynomials from the witness vectors in the circuit constructor.

In goblin translator wires come as is, since they have to reflect the structure of polynomials in the first 4 wires, which we've commited to

Template Parameters
Flavorprovides the circuit constructor type and the number of wires.
Parameters
circuit_builder
dyadic_circuit_sizePower of 2 circuit size
Todo:
TODO(https://github.com/AztecProtocol/barretenberg/issues/783) Optimize memory operations.
Returns
std::vector<Polynomial>

◆ get_sequential_prover_polynomials()

template<typename Flavor >
Flavor::ProverPolynomials proof_system::honk::get_sequential_prover_polynomials ( const size_t  log_circuit_size,
const size_t  starting_value 
)

Get a ProverPolynomials instance initialized to sequential values starting at 0.

Values are assigned according to the order specified in the underlying array of the flavor class. The function returns an array of data pointed to by the ProverPolynomials.