Closed hellwolf closed 5 years ago
1 #!/usr/bin/env node --max_old_space_size=4000
from ./node_modules/.bin/circom seems the culprit, why the max_old_space_size flag anyways?
Removing the --max_old_space_size=4000 flag made it work for me.
max_old_space_size
was added earlier today because I reported that circom
would not compile the sha256_2
circuit without it. Otherwise, there would be an out-of-memory error.
However, I see that you're using Node 8. I believe that the compilation can be much faster if you use Node 10, as it has native bigint support.
I started to use nodejs 10, but I had to remove that flag still otherwise simple examples wouldn't run.
Sorry to hear that. One way to get around this quickly is to not use the circom
CLI, but write a separate JS script that imports circom
, compiles the circuit, and saves the json output. That'll let you compile it without having to modify cli.js
. Hope that helps as a quick workaround.
Ok, this depends probably too much in the memory you have in your device. I just updated to remove the --max_old_space_size=4000 flag from cli.js.
I'll take a look if I can optimize a little the memory usage....
Thanks!
Following your example at: https://iden3.io/blog/circom-and-snarkjs-tutorial.html
Version: circom@0.0.17 Nodejs: v8.12.0 Machine: ubuntu 18.04
The compilation didn't finish in 5 minutes...