Halo2 audit: the tools that prove your circuits are deterministic

In Halo2, every advice cell you assign needs a gate, a lookup or a copy constraint behind it. AI agents review your chips, ZK Vanguard catches the cells nothing constrains, and Picus backs the result with formal verification.

For Halo2 circuits written in Rust. At RISC Zero, Picus in CI surfaced 35 issues during development.

A Halo2 division chip with an unconstrained remainder cell: Scout finding, ZK Vanguard findings and the Picus Unsafe result.

What AI agents review in your Halo2 code

Scout reads your chips, gates and layouter code in Rust, builds a threat model for the circuit, and reports what it finds. It works even before your crate compiles.

Threat model

What your circuit must guarantee: which values reach the instance column, and what a valid proof should attest.

Chip and region logic

Selectors, rotations and the values passed between regions, read the way a reviewer would.

Tool-backed findings

Scout sends each finding to ZK Vanguard or Picus, so your Halo2 findings arrive with tool output attached.

Security tools for Halo2 circuits

Two tools, one sequence: ZK Vanguard catches likely underconstrained signals; Picus proves their absence.

Static analysis for ZK circuits

Detects underconstrained signals, witness leakage, non-deterministic dataflow and unused components in your PLONKish constraint system. Results in seconds to minutes.

Formal verification for ZK circuits

Proves your gates, lookups and copy constraints fix every output for given inputs, or returns two distinct witnesses that satisfy them all.

Common Halo2 vulnerabilities, and the tool that covers each

In Halo2, witness assignment and constraints live in different parts of your Rust code, and most bugs sit in the gap between them.

Common Halo2 vulnerabilities, and the tool that covers each
VulnerabilityWhat happensCovered by
Assigned, never constrainedAn advice cell filled in a region that no enabled gate, lookup or copy constraint touches.ZK Vanguard + Picus
Missing copy constraintA value reassigned in a new region instead of copied, so the two cells can diverge.Picus
Unbound public outputA result never tied to the instance column, so the verifier never checks it.ZK Vanguard
Selector on the wrong rowsA gate never enabled where its region assigns values, or one that queries the wrong rotation.Scout + Picus
Missing range checkA value used in arithmetic or a lookup without a range check wraps around the field.ZK Vanguard
Witness and gate disagreeYour assignment code computes one value while the gate only enforces a weaker relation.ZK Vanguard

Some Halo2 bugs are fully constrained and still wrong: Scout reviews that logic against your threat model.

From Halo2 finding to formal proof

Scout flags a cell your chip assigns in one region and reuses in another without a copy constraint. Picus verifies the circuit and returns the evidence: two distinct witnesses that satisfy every gate.

Picus results: unsafe, verified, unknown.
Finding (Scout) → Evidence (Picus): two witnesses

Fits your Halo2 toolchain

Your chips, gates and layouter stay in Rust, as they are. Determinism is a property of your constraint system, not of the commitment scheme, so the result holds whether you build on KZG or IPA.

// 001

Connect your repository

Your Halo2 crate on GitHub.

// 002

Prepare the circuit

Halo2 circuits are translated into LLZK, the intermediate representation ZK Vanguard analyzes.

// 003

Run on every commit

ZK Vanguard and Picus run in GitHub Actions, so every change to your chips is checked during development.

Writing Halo2 with a coding agent? AuditHub MCP brings the same tools into your session.

Alongside your Halo2 audit

Halo2 circuits keep changing after the audit: a new chip, a tighter gate, a cheaper layout. AuditHub rechecks each change in CI, and the audit still gives you a signed expert review.

Before audit

During audit

After audit

ZK Vanguard // EVERY CHANGE
ZK Vanguard task summary: steps, findings and artifacts.
AuditHub ZK Vanguard check on a pull request.
ZK Vanguard recent tasks across versions v1 to v3.
Picus // EVERY CHANGE
Picus task summary: steps, findings and artifacts.
AuditHub Picus check on a pull request.
Picus recent tasks across versions v1 to v3.

35 issues found during development at RISC Zero

RISC Zero integrated Picus into its CI to verify the determinism of its zkVM circuits. Each issue was mitigated during development, and new changes are checked as the codebase evolves.

Other languages AuditHub checks

Halo2 security FAQ

What does an underconstrained Halo2 circuit look like?

An advice cell that no gate, lookup or copy constraint fully determines. A prover can fill it with another value and still produce a valid proof.

Can Picus prove a Halo2 circuit is deterministic?

Yes. Picus returns verified when every output is uniquely determined by the inputs, unsafe with two distinct witnesses when it is not, or unknown when it can give neither.

How do ZK Vanguard and Picus work together?

ZK Vanguard runs first and catches likely underconstrained signals in seconds to minutes. Picus follows and proves their absence, or returns a concrete counterexample.

Do these tools replace a Halo2 audit?

No. They check your circuits continuously between audits, and the audit gives you a signed expert review.

Still have questions? Contact us

Learn more about Halo2

Check every Halo2 chip before it ships

Run ZK Vanguard and Picus on your Halo2 circuits today.