Snarkify
  • 🏗️GPU Prover Network
    • Introduction
    • Deploy a Elastic Prover
      • Integrate Elastic Prover SDK
    • Snakrify CLI
      • Installation
      • Authentication
      • Service Initialization
      • Build & Deployment
      • Proof Generation
      • Team Management
      • GPU Shell Management
    • Advanced Topics
      • Webhook
  • 🏚️High-Performance ZKP
    • zkEVM Halo2 GPU Prover
      • MSM
      • NTT
      • Quotient Polynomial Evaluation
      • KZG Multiopen
      • Polynomial Inversion
      • Permutation Generation
    • ZPrize
  • 🐺Sirius Folding
    • Introduction
    • Quickstart
    • Examples
      • Fold a Summation Circuit
      • Fold a Fibonacci Circuit
      • Fold a Halo2 Circuit
      • Fold the zkevm-circuits
    • Terminologies
    • Sirius Folding APIs
      • `StepCircuit` trait
      • `PublicParams` Struct
      • `IVC` struct
  • LInks
    • Github
    • Telegram Group
    • snarkify.io
Powered by GitBook
On this page
  • New Default Public Params
  • Constructor
  1. Sirius Folding
  2. Sirius Folding APIs

`PublicParams` Struct

New Default Public Params

Let us consider the simple case presented in Quickstart

use sirius::prelude::bn256::new_default_pp;
let public_params = new_default_pp::<ARITY1, _, ARITY2, _>(
    secondary_circuit_k_table_size,
    &primary_commitment_key,
    &primary,
    primary_circuit_k_table_size,
    &secondary_commitment_key,
    &secondary,
);

This is where the public parameters for bn256\grumpkin pairwise curves are created. All constants are taken by default, except for the main ones

  • ARITY- Input and output size (z_in, z_out) for the corresponding step-circuit

  • k_circuit_table_size - the size of the table the circuit should use. It must start with 17, otherwise there is not enough table size for IVC needs. Otherwise determined by the logic of your `StepCircuit` trait.

  • &commitment_key - the key that will be used by the scheme to commit metadata. Its size strongly depends on the step-circuit, its calculation is not trivial. It is recommended to choose the minimum key by selection method or for testing purposes generate a large key once and reuse it every time.

  • &step_circuit It will be synthesized internally, to collect data about the PLONKish struct and reuse it later. The calling party retains possession of it, as further modification of the circuit is implied.

Constructor

If you need other curves or want to pick other parameters for IVC, you can create public params directly

PublicParams::<
        '_,
        PRIMARY_ARITY,
        SECONDARY_ARITY,
        MAIN_GATE_SIZE,
        PrimaryCurveAffine,
        SecondaryCurveAffine,
        PrimaryStepCircuit,
        SecondaryStepCircuit,
        PrimaryRandomOracle,
        SecondaryRandomOracle,
    >::new(
        CircuitPublicParamsInput::new(
            primary_k_table_size,
            primary_commitment_key,
            primary_random_oracle_constant,
            primary_step_circuit,
        ),
        CircuitPublicParamsInput::new(
            secondary_k_table_size,
            secondary_commitment_key,
            secondary_random_oracle_constant,
            secondary_step_circuit,
        ),
        limb_width,
        limbs_count_limit,
)

You can learn about the parameters ARITY & k_table_size & commitment_key & step_circuit- in the New Default Public Params

  • RandomOracle- you can specify the on-circuit\off-circuit random oracle to be used for the IVC circuit. Currently, only the poseidon variant is available from the box at the path sirius::poseidon::PoseidonRO.

  • random_oracle_constant - according to the RandomOracle type, you must provide constants that will be used to initialize the random oracle. For poseidon it will be sirius::poseidon::Spec.

  • limbs_count_limit & limb_width - during the execution of the IVC scheme in each of the two circuits, pairwise curve calculations will be performed on-circuit. These parameters determine the efficiency of these calculations.

Previous`StepCircuit` traitNext`IVC` struct

Last updated 9 months ago

🐺