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

Limitations to run on a browser #46

Open
0xjjpa opened this issue Dec 5, 2023 · 0 comments
Open

Limitations to run on a browser #46

0xjjpa opened this issue Dec 5, 2023 · 0 comments

Comments

@0xjjpa
Copy link

0xjjpa commented Dec 5, 2023

Right now it's not quite possible to load poseidon, the prover and verifier within a browser.

  • msgHash requires a Buffer type despite uInt8Array being the native buffer-like for browsers (can be worked around using Buffer.from, but might not provide the same results).
  • To properly load their respective .wasm libraries, we need fs, which is exposed only to nodejs runtimes.
  • Poseidon (and maybe MembershipProver and MembershipVerifier) are not serializable, so even if we are able to load their .wasm libraries through our server, they can't be shared through a client, forcing computing (i.e., the evaluation of the verifier and the generation of the proofs) can only be done in a server.

FWIW the limitation is documented in the README but for anyone looking to support this library client side, these challenges would need to be tackled. Also, these are only the ones I've faced, there might be even some more one these first ones had been cleared out.

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