Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest hanging when running snarkjs.groth16.fullProve #363

Closed
biscuitdey opened this issue May 9, 2023 · 1 comment
Closed

Jest hanging when running snarkjs.groth16.fullProve #363

biscuitdey opened this issue May 9, 2023 · 1 comment

Comments

@biscuitdey
Copy link

biscuitdey commented May 9, 2023

Inside jest test suite, await snarkjs.groth16.fullProve( input, wasm, key) is causing the test run to hang. This problem is still persisting.

kyc_app_be/node_modules/ffjavascript/build/main.cjs:1291               - crypto__default["default"].randomFillSync(array);
kyc_app_be/node_modules/ffjavascript/build/main.cjs:1297               - const arr = getRandomBytes(32);
kyc_app_be/node_modules/ffjavascript/build/main.cjs:1310               - threadRng = new ChaCha(getRandomSeed());
kyc_app_be/node_modules/ffjavascript/build/main.cjs:3383               - return this.fromRng(getThreadRng());
kyc_app_be/node_modules/snarkjs/build/main.cjs:930                     - const r = curve.Fr.random();
kyc_app_be/node_modules/snarkjs/build/main.cjs:1275                    - return await groth16Prove(zkeyFileName, wtns, logger);
@biscuitdey
Copy link
Author

Solved it using globalThis.curve_bn128.terminate(); after calling snarkjs.groth16.verify()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant