You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It shows that after snarkjs calls getCurveFromQ(zkey.q); to create the curve, there is a ThreadManager started and holds internal web-workers running, until curve.terminate() is called.
As neither groth16Vk(zkey, fd, sections) nor plonkVk(zkey) explicitly calls curve.terminate(), those web_works never ends.
A quick fix could be adding the following code in groth16Vk(zkey, fd, sections) and plonkVk(zkey) to terminate the curve right before return vKey, though I am not sure if this is the best way to fix this bug.
console.log("===DEBUG=== There is curve still running, terminating it...")
await curve.terminate();
I am interested in submitting the pull request to fix this issue, but surely I don't want to introduce new bugs...
The text was updated successfully, but these errors were encountered:
This happens as I was calling
snarkjs.zKey.exportVerificationKey(zkeyName)
in my own code.Below is the message printed by package "why-is-node-running".
It shows that after snarkjs calls
getCurveFromQ(zkey.q);
to create the curve, there is aThreadManager
started and holds internal web-workers running, untilcurve.terminate()
is called.As neither
groth16Vk(zkey, fd, sections)
norplonkVk(zkey)
explicitly callscurve.terminate()
, those web_works never ends.A quick fix could be adding the following code in
groth16Vk(zkey, fd, sections)
andplonkVk(zkey)
to terminate the curve right beforereturn vKey
, though I am not sure if this is the best way to fix this bug.I am interested in submitting the pull request to fix this issue, but surely I don't want to introduce new bugs...
The text was updated successfully, but these errors were encountered: