docs / circom

colony.technology/docs/circom

docs / circom
  the circom compiler runs on your machine
  the r1cs it emits is analysed
  a verdict is about that r1cs / compiler version and flags recorded
  node.js 20+ / circom 2.x

commands
npx speedrunpapi scan circuit.circom
speedrunpapi scan circuits/withdraw.circom -l node_modules
speedrunpapi scan comparators.circom --main "LessThan(64)" -l node_modules/circomlib/circuits
speedrunpapi scan pedersen.circom --main "Pedersen(248)" --assume-binary in
  exit 0 certified / 2 broken / 3 unknown / 1 error
  analysis runs on your machine

compiler levels

--O0no simplification / the system describes the circuit exactly
--O1signals merged / an input can lose its wire
--O2inputs can be substituted by linear combinations

  a proof of determinism carries to every level
  a counterexample needs every declared input wired
  scan tries --O0, then --O1 / --opt O0|O1|O2 forces one

assumptions
  --assume-binary adds x * (x - 1) = 0 for each matched input
  the verdict holds for callers that respect it
  written into the report and the certificate

all options  what a verdict states  source  docs  colony