Chapter 8

Proving Systems and Circuits

Under the hood, ZK proofs convert programs into mathematical constraints that a prover satisfies or violates. You do not need to implement this yourself — but knowing the pipeline helps debug "proof failed" errors and evaluate tooling.

Code becomes arithmetic over a finite field — addition and multiplication gates wired into a circuit. R1CS, PLONK, and AIR are different ways to express constraints. PLONK-family systems dominate new projects; Starknet uses AIR tailored for STARK provers.

Write circuit logic in a ZK language like Circom, Noir, or Cairo. Generate a witness with private inputs and intermediate values, run the prover to produce proof bytes, then submit proof and public inputs to a verifier contract or off-chain checker.