Compile Circuit - Beginner
This option is for novice users.
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:
Compiles the specified Circom file (
<circuit_name>)Produces
.r1cs,.wasm, and.symfiles
Runs Trusted Setup (Powers of Tau + Phase 2)
Initializes a new ceremony if none exists
Contributes randomness
Prepares final
.zkeyproving key
Generates Keys:
proving_key.zkey– for generating zk-proofsverification_key.json– for verifying proofs
Ready for Proofs: After this, you're ready to run
--proveand--verify.
Expected Folder Layout
If everything went well your folder structure should look something similar to this,
poseidon/
│── circom
│── circomlib/ # Standard library for Circom components
│── circuit1_js
└── circuit1.wasm # WebAssembly file used to compute the witness
└── generate_witness.js
└── witness_calculator.js
│── circuits/ # Where your .circom files go
│ └── circuit1.circom # A starter circuit with boilerplate
│── circuit1_000.zkey # Final proving key used for generating zk-SNARK proofs
│── circuit1_final.zkey
│── circuit1.r1cs
│── circuit1.sym # Symbol file used for debugging constraint errors
│── pot10_0000.tau
│── pot10_0001.tau
│── pot10_final.tau # Finalized Powers of Tau file used in Phase 2
│── requirements.txt
│── poseidon.py Last updated