{
  "slug": "halva",
  "name": "Halva",
  "tagline": "Nethermind's Lean 4 verification of Halo2 circuits",
  "maintainer": "Nethermind",
  "url": "https://github.com/NethermindEth/Halva",
  "repo": "https://github.com/NethermindEth/Halva",
  "category": "zk-circuits",
  "targets": [
    "Halo2",
    "PLONKish"
  ],
  "approach": "Extract gates, copy, permutation and lookup constraints at synthesis time; soundness proofs in Lean 4",
  "license": "Open source",
  "status": "Active, Ethereum Foundation grant",
  "summary": "Halva extracts the gate, copy, permutation and lookup constraints of a Halo2 circuit at synthesis time and lets engineers prove soundness in Lean 4. In July 2025 Nethermind used it to find a critical soundness bug in Scroll's deprecated Keccak-256 circuit.",
  "details": [
    "Halo2 circuits are notoriously hard to review because constraints are spread across configure and synthesize code. Halva instruments synthesis so the exact constraint system reaches Lean, where the specification is stated and the soundness theorem proved. The Scroll Keccak result is the clearest public example of a proof-assistant framework finding a real, critical circuit bug."
  ],
  "strengths": [
    "Works on real Halo2 code without rewriting it.",
    "Public critical finding in a production-grade circuit.",
    "Same team maintains CertiPlonk (Plonky3) and Lean EVM work, so zkEVM stacks can be covered end to end."
  ],
  "limits": [
    "Halo2 only.",
    "Soundness-focused; completeness is a separate exercise.",
    "Extraction is a trusted step; review it."
  ],
  "fit": [
    "Choose Halva for any Halo2 or PLONKish circuit you cannot rewrite, particularly zkEVM components."
  ],
  "references": [
    [
      "Formal verification of Halo2 circuits in Lean (Nethermind, 2025-07-02)",
      "https://www.nethermind.io/blog/formal-verification-of-halo2-circuits-in-lean"
    ],
    [
      "Halva repository",
      "https://github.com/NethermindEth/Halva"
    ]
  ],
  "category_name": "ZK circuit verification",
  "page": "https://sorryfree.com/frameworks/halva/",
  "updated": "2026-09-13"
}