o1js
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
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.