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)

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

Official Manifest Digests

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

Version
Manifest Digest

1.0.0

f8181f89d502cd5bebc4445c4305c6c692f92deb202a18ce5d7c41694b10a7a4

1.1.0

f22882b901ac1585f665f3aa7c812dc688a0cc08d91f84c2af3c390448a85373

Installation

# Clone the repository
git clone https://github.com/InternetMaximalism/zerc20.git
cd zerc20

# Install the CLI
cargo install --path circuit-setup

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.

More Information

See the READMEarrow-up-right for full usage instructions.

Last updated