Compile Circuit - Beginner

This option is for novice users.

Ideal for beginners who want a working zk-SNARK pipeline without diving into each step manually.

This command sets up everything required to generate zk-SNARK proofs for a given circuit, automating the multi-step trusted setup process. Just type the below command, press enter and let the magic unfold!

py poseidon.py --init-setup circuit_name

πŸ”§ What it does:

  1. Compiles the specified Circom file (<circuit_name>)

    • Produces .r1cs, .wasm, and .sym files

  2. Runs Trusted Setup (Powers of Tau + Phase 2)

    • Initializes a new ceremony if none exists

    • Contributes randomness

    • Prepares final .zkey proving key

  3. Generates Keys:

    • proving_key.zkey – for generating zk-proofs

    • verification_key.json – for verifying proofs

  4. Ready for Proofs: After this, you're ready to run --prove and --verify.


Expected Folder Layout

If everything went well your folder structure should look something similar to this,

circuit1.circom is the default example. If you used a different name, that name will appear instead wherever circuit1.circom is shown.

Last updated