Zokrates / ZoKrates

A toolbox for zkSNARKs on Ethereum

Home Page:https://zokrates.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

mqhe opened this issue · comments

commented

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

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.

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?

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.

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