Circom in Remix - Remix Tutorial 17

EatTheBlocksAbout 4 min readMay 27, 2025Watch original
THE SUMMARYAI-generated

Key Concepts:

Circom, Remix IDE, proving scheme, Powers of Tau (PoT), witness generation, proof generation, verifier contract, Solidity, verifier calldata, Circom plugin, compilation target, auto-compile, manual compile.

1. Setting up Circom in Remix IDE

  • The video demonstrates using Circom within the Remix IDE using a template project.
  • The template project used is found by searching for "circom" when creating a new project from a template. This template contains a simple circuit that verifies if a variable is the product of two other variables.
  • Downloading the Circom template automatically activates the Circom plugin in Remix. Alternatively, the plugin can be activated manually via the Plugin Manager.

2. Circom Plugin Interface

  • The Circom plugin allows users to select the compilation target.
  • It offers options for "auto-compile" and manual compilation.
  • The "Compile" button initiates the compilation process.

3. Running the Setup (Powers of Tau)

  • The setup process requires choosing a proving scheme.
  • It also requires choosing the Powers of Tau (PoT) size.
  • The PoT size must be appropriate for the circuit's constraint count. Too small or too large of a PoT size will cause the setup to fail.
  • Selecting "export the verifier solidity contract and the verification key" will generate these files after the setup is complete. A pop-up toaster will show the location of these files.
  • Clicking "Run the setup" initiates the PoT ceremony. A green checkmark indicates success.

4. Witness Computation

  • The witness is computed by providing inputs to the circuit.
  • The inputs are entered in the plugin interface.
  • Clicking "Compute" generates the witness. A green checkmark indicates success.

5. Proof Generation

  • Clicking "Generate proof" creates the cryptographic proof.
  • If the "export the verifier C data" option was selected, the proof data is saved to a JSON file. A pop-up toaster will show its location.
  • The terminal displays confirmation of successful proof generation.

6. Verifying the Proof

  • The generated proof can be verified on-chain using a Solidity verifier contract.
  • The verifier contract needs to be compiled and deployed.
  • The verifyProof function of the contract is called with the contents of the verifier_calldata.json file as an argument.

7. Advanced Configuration (Prime Numbers)

  • The Circom plugin offers an advanced configuration section.
  • This allows users to choose the prime numbers used in the Circom circuit.

8. Circom Operations with Scripts

  • Circom operations can be performed using scripts instead of the GUI.
  • The scripts folder in the Circom template provides examples of such scripts.

9. Notable Quotes/Statements

  • (Implied) "If you choose a PW that is too small for your circuit the setup will fail similarly if you choose a P that is too large for your circuit the setup will also fail." - This highlights the importance of selecting the correct Powers of Tau size.

10. Technical Terms and Concepts

  • Circom: A programming language for creating zero-knowledge circuits.
  • Remix IDE: An online integrated development environment for developing smart contracts.
  • Proving Scheme: A cryptographic protocol used to generate and verify proofs.
  • Powers of Tau (PoT): A pre-computed set of values used in some proving schemes to accelerate proof generation.
  • Witness: The private inputs to the circuit that satisfy the constraints.
  • Proof: A cryptographic artifact that demonstrates the correctness of a computation without revealing the inputs.
  • Verifier Contract: A Solidity smart contract that verifies the generated proof.
  • Verifier Calldata: The data required to call the verifyProof function on the verifier contract.

11. Logical Connections

  • The video progresses logically from setting up the environment (Remix, Circom plugin) to compiling the circuit, generating the necessary setup parameters (PoT), computing the witness, generating the proof, and finally, verifying the proof on-chain.
  • The side notes about advanced configuration and scripting provide additional options for more experienced users.

12. Synthesis/Conclusion

The video provides a practical guide to using Circom within the Remix IDE. It covers the essential steps from setting up the environment to verifying the generated proof on-chain. The video emphasizes the importance of selecting the correct Powers of Tau size and highlights the availability of scripting options for advanced users. The demonstration allows developers to quickly start building and testing zero-knowledge circuits using Circom.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.