For the complete documentation index, see llms.txt. This page is also available as Markdown.

Circuit Setup

This guide covers downloading and testing zERC20 circuit artifacts using the zerc20-circuit-setup CLI tool.

Why You Need Circuit Artifacts

Circuit artifacts are required for:

  • Running the Indexer: The indexer uses these artifacts to generate Nova proofs for transfer root transitions

  • Running the Decider Prover: The decider-prover uses these artifacts to finalize Nova proofs into Decider proofs for on-chain verification

  • CLI Proof Generation: The CLI uses these artifacts to generate withdrawal proofs (both Nova and Groth16) and Proof of Innocence IVC proofs

Without these artifacts, you cannot run the indexer, decider-prover, or generate proofs using the CLI.

The full artifact set can include:

  • root_* for transfer-root proving

  • withdraw_local_* and withdraw_global_* for teleport proofs

  • proof_of_innocence_nova_pp.bin and proof_of_innocence_nova_vp.bin for CLI Proof of Innocence generation and verification

  • proof_of_innocence_decider_pp.bin and proof_of_innocence_decider_vp.bin for decider-prover deployments that explicitly enable this circuit

The currently published official versions listed below do not include the proof_of_innocence_* files. They are sufficient for withdrawal, indexer, and decider-prover flows that use the published root and withdrawal circuits, but they cannot be used for zerc20-cli proof-of-innocence generate.

Official Manifest Digests

Always verify that the manifest digest displayed during download matches the official value.

Proof of Innocence requires an artifact version whose manifest includes proof_of_innocence_nova_pp.bin and proof_of_innocence_nova_vp.bin. No official published version in the table below includes those files yet. Until a POI-enabled artifact version and manifest digest are published here, generate the circuit artifacts locally before using the Proof of Innocence CLI commands.

Version
Manifest Digest
Proof of Innocence

1.0.0

f8181f89d502cd5bebc4445c4305c6c692f92deb202a18ce5d7c41694b10a7a4

Not included

1.1.0

f22882b901ac1585f665f3aa7c812dc688a0cc08d91f84c2af3c390448a85373

Not included

Installation

Configuration

Set environment variables or use a .env file.

Contents of .env.example:

Commands

Download

Download circuit artifacts from a public URL and automatically verify SHA256 hashes.

Or specify the URL explicitly:

Option
Environment Variable
Description

--version

ARTIFACTS_VERSION

Version to download

--base-url

ARTIFACTS_BASE_URL

Public URL for artifacts

--artifacts-dir

NOVA_ARTIFACTS_DIR

Local output directory

Test

Test downloaded artifacts by generating and verifying dummy proofs.

Proof of Innocence

The download command only enables Proof of Innocence when the selected manifest includes proof_of_innocence_nova_pp.bin and proof_of_innocence_nova_vp.bin. The currently published 1.0.0 and 1.1.0 manifests do not include them, so Proof of Innocence currently requires locally generated artifacts:

Then point the CLI at the directory that contains the generated proof_of_innocence_nova_pp.bin and proof_of_innocence_nova_vp.bin files:

More Information

See the README for full usage instructions.

Last updated

Was this helpful?