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

Error when attempting to use buildPoseidon #2

Open
connorbode opened this issue Dec 24, 2021 · 1 comment
Open

Error when attempting to use buildPoseidon #2

connorbode opened this issue Dec 24, 2021 · 1 comment

Comments

@connorbode
Copy link

I'm currently encountering an error when building for the browser. The issue is present in 0.1.0 and 0.1.1, but downgrading to version 0.0.8 resolves the issue. Since I only need to generate a poseidon hash for the moment, I won't debug further but will log the issue in case others encounter something similar.

I am building circomlibjs for web using create-react-app. Unfortunately I do not know what underlying system bundles the JS for web.

I am using circomlibjs as follows:

const circomlibjs = require('circomlibjs')
circomlibjs.buildPoseidon()

The result is the following error:

image

@connorbode
Copy link
Author

Ok I managed to track down this issue to being related to an older version of ffjavascript. Looks like in the currently used version, ffjavascript expects wasm to be delivered as base64. It then tries to convert that base64 to a buffer. Unfortunately, circomlibjs is already delivering a buffer & so it crashes.

In the latest version of ffjavascript, buildThreadManager expects the wasm to be delivered as a buffer so there is no crash.

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