From 35f6e50a77d9911e005ca18228837ee53519e504 Mon Sep 17 00:00:00 2001 From: strongkeep-debug Date: Wed, 13 May 2026 18:54:55 -0700 Subject: [PATCH] docs: update Circom optimization guidance --- docs/zk-email-verifier/usage-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zk-email-verifier/usage-guide.md b/docs/zk-email-verifier/usage-guide.md index b61eba1..6a15310 100644 --- a/docs/zk-email-verifier/usage-guide.md +++ b/docs/zk-email-verifier/usage-guide.md @@ -65,7 +65,7 @@ To compile the circuit locally, you need to have Rust and Circom installed first circom -l node_modules MyCircuit.circom -o --r1cs --wasm --sym --c --O0 ``` -Note: You can add -l to specify the directory where the directive `include` should look for the circuits indicated. For our repo use `circom -l node_modules` instead of circom. Additionally, we generally recommend using the `--O0` flag for optimization during compilation for beginners. However, if you're more experienced with Circom, feel free to use the `--O1` flag instead. It's important to avoid using the `--O2` flag as that is the default setting and it may lead to the deletion of additional constraints. +Note: You can add -l to specify the directory where the directive `include` should look for the circuits indicated. For our repo use `circom -l node_modules` instead of circom. Additionally, we generally recommend using the `--O0` flag during compilation for beginners because it keeps the generated constraints easier to inspect. Since Circom 2.2.0, `--O1` is the default simplification level, and experienced users can use it explicitly to match the current compiler default. Reserve `--O2` for final optimization passes after reviewing the generated constraints; it was the default before Circom 2.2.0, but it is no longer the default and is not compatible with every proof system. See Circom's [constraint simplification documentation](https://docs.circom.io/circom-language/circom-insight/simplification/) for the current defaults and tradeoffs. After running this command, the circuit will be compiled into a `.r1cs` file, a `.wasm` file, and a `.sym` file. These files are used in the next steps to generate the proving and verifying keys, and to compute the witness.