iden3 / circom_old

Circuit compiler for zkSNARKs
GNU General Public License v3.0
471 stars 82 forks source link

NAND() circuit in README not getting complied #83

Open m0bi5 opened 3 years ago

m0bi5 commented 3 years ago

I am following the README and trying compile the NAND() circuit. However, when I run circom mycircuit.circom -o circom.json, the circom.json file does not get created. I can verify that circom is installed and commands like circom --help works. Please let me know what I am missing.

Platform: Mac OSX, M1 chip Installed npm using brew install node Followed by npm install -g circom to install circom

rqzrqh commented 2 years ago

It seems .json is not supported now, .r1cs is more popular. Snarkjs can recognize .r1cs and export json format.

PowersOfTau commented 2 years ago

for time being, you can use the following:

circom nand.circom -r nand.r1cs to generate r1cs format then snarkjs r1cs export json nand.r1cs nand.r1cs.json to generate a json