o1-labs / o1js

TypeScript framework for zk-SNARKs and zkApps
https://docs.minaprotocol.com/en/zkapps/how-to-write-a-zkapp
Apache License 2.0
525 stars 119 forks source link

zkProgram stalling on proving #1890

Open kadirchan opened 1 week ago

kadirchan commented 1 week ago

I made a sequencer that collects and recursively bundles them, also this sequencer runs in a docker container. But when I first build and up this container it compiles contracts and zkprograms but when it comes to proving a method of zkprogram in like this, whole app stuck in this line without throwing any error and utilizing 0% cpu and 6 GB ram (total 32 GB available). Only way to solve this I need to restart container, it takes much lesser time to compiling again probably due to caching and this time it does not stuck in proving. Also ram usage of app reduces almost 20-30% after restarting.

kadirchan commented 1 week ago

I'am not sure if it is related or not to starting of snarkjs backend, as I said I didn't receive any errors it just acts like #1857

mitschabaude commented 1 week ago

I'am not sure if it is related or not to starting of snarkjs backend

It's not! "Starting" that backend just means doing a dynamic import() of a big file. This is not an error-prone process, and it already must have happened before compiling. Similarly, starting the worker thread pool is also done when compiling

kadirchan commented 5 days ago

Also found that compiling of offchainState on browser stuck too, when I was using "o1js": "https://pkg.pr.new/o1-labs/o1js@fc16ce3" I was able to compile and use them but in 1.9.1 this problems occur. Degraded my version to commit fc16ce3 for now