Skip to content

Harmonize the recursive and non-recursive SNARK implementations in STM #3421

Description

@jpraynaud

Why

The recursive (IVC) and non-recursive SNARK stacks were built incrementally and drifted apart. Naming, module layout and preimage types differ for concepts that are the same, which makes the library harder to read, to review and to extend.

What

Align the two stacks on a single set of names, a single module structure and a single preimage representation, without changing the proving or verifying behavior.

How

  • Harmonize IvcTransitionType and the IVC state transitions (proof_system/ivc_halo2_snark/prover_input_helpers.rs, rolling_state.rs)
  • Harmonize the circuit namings IvcCircuitData (circuits/halo2_ivc/circuit.rs) and StmCertificateCircuit (circuits/halo2/circuit.rs)
  • Align the module structure and the naming of the two proof systems (circuits/halo2 vs circuits/halo2_ivc, proof_system/halo2_snark vs proof_system/ivc_halo2_snark: prefix vs suffix, mod vs pub(crate) mod)
  • Refactor ProtocolMessagePreimage (circuits/halo2_ivc/types.rs) and GenesisMessagePreimage (protocol/aggregate_signature/preimage.rs) into a consistent representation
  • Remove the #[allow(dead_code)] markers left on IvcCircuitData once the recursive keys are wired

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions