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

any method to export/save artifacts/keypairs in zokrates-js? #1305

Open
mqhe opened this issue May 3, 2023 · 4 comments
Open

any method to export/save artifacts/keypairs in zokrates-js? #1305

mqhe opened this issue May 3, 2023 · 4 comments

Comments

@mqhe
Copy link

mqhe commented May 3, 2023

Is any method to export/save artifacts/keypairs efficiently in zokrates-js?
so that we do not need to run the setup every time ?

@dark64
Copy link
Member

dark64 commented May 3, 2023

You only compile and run the setup once. It is up to you to decide how to deal with the artifacts, as this usually might differ depending on the environment, etc. Have a look at this nextjs demo as an example. For backend applications, you could store with fs.writeFileSync() and so on.

@sourav-bz
Copy link

hey @dark64 @alvaro-alonso, I am not able to write/export the artifacts and keypair into a file as it's really huge.
have tried creating multiple chunks, but it's always failing to save into the file as it's running out heap memory.
can you please suggest a better way to go about this?

@alvaro-alonso
Copy link

hey @dark64 @alvaro-alonso, I am not able to write/export the artifacts and keypair into a file as it's really huge. have tried creating multiple chunks, but it's always failing to save into the file as it's running out heap memory. can you please suggest a better way to go about this?

@sourav-bz this seems to be more of a JS problem that of ZoKrates itself. For questions rather than bug reports, it is more appropriate the gitter channel rather than tickets.

As dark64 said, the setup is thought to be run once and prove/verify multiple times, so I would suggest you do this setup with the CLI. Moreover, the setup should be taken place in a very safe environment as if not performed correctly this can allow an attacker to generate false proofs. So except for experimental/teaching purpose this step should not be happening in a browser or in a server.

@sourav-bz
Copy link

@alvaro-alonso thank you so much these contexts, it really helped me.
I have tried having conversations or raising queries on gitter, but never got any active response back. will recommend to switch to telegram or discord (if possible).
sorry, about asking it here. but it was an open issue already. I think we can close this now.

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

4 participants