o1js icon indicating copy to clipboard operation
o1js copied to clipboard

Add 100 ms delay in tx.prove() and ZkProgram proof calculation to prevent o1js freezing due to the lack of memory

Open dfstio opened this issue 1 year ago • 0 comments

Memory becomes critically low when calculating many proofs, leading to o1js silently freezing during proof calculation after 100-200 proof calculations.

My tests show that adding await sleep(100) before every proof calculation significantly enhances memory management, and RSS memory size stays almost the same.

I would propose adding await sleep(100) in addMissingProofs and in ZkProgram proving code.

dfstio avatar Jan 26 '24 11:01 dfstio