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
  1. Sirius Folding
  2. Sirius Folding APIs

`StepCircuit` trait

PreviousSirius Folding APIsNext`PublicParams` Struct

Last updated 8 months ago

Check first.

Also, due to the support of the halo2 ecosystem, you can learn more development from the .

Trait

pub trait StepCircuit<const ARITY: usize, F: PrimeField> {
    type Config: Clone;

    fn configure(cs: &mut ConstraintSystem<F>) -> Self::Config;

    fn synthesize_step(
        &self,
        config: Self::Config,
        layouter: &mut impl Layouter<F>,
        z_i: &[AssignedCell<F, F>; ARITY],
    ) -> Result<[AssignedCell<F, F>; ARITY], SynthesisError>;

    fn process_step(
        &self,
        z_i: &[F; ARITY],
        k_table_size: u32,
    ) -> Result<[F; ARITY], SynthesisError>;
}
  • const ARITY: usize - Each step of `IVC` structhas an input and an output (z_in, z_out), this parameter determines the size of this input.

  • type Config- This type stores information about which columns and challenges we need for the circuit.

  • fn configure- The function should create Config, as well as create all gates. Gadgets and chips from halo2 can be reused in this method.

  • fn synthesize_step - Directly synthesize the witness, at this stage the PLONKish table must be filled in using Layouter. Gadgets and chips from halo2 can be reused in this method.

  • fn process_step (optional for implementation) - This function must do the same F(z_in) -> z_out as synthesize_step. Due to some restrictions, we must supply as one of the public inputs (instance column) inside the folding scheme a hash that depends on z_out. By default, this method is done through the synthesize_step call, however, if the synthesis is long, it is possible to optimize it through a manual implementation in the off-circuit mode.

🐺
halo2 book
Step Circuit
Circuit