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

bug: LinkError: WebAssembly.instantiate(): Import #4 module="runtime" function="printDebug" error: function import requires a callable #98

Closed
erhant opened this issue Oct 15, 2024 · 8 comments

Comments

@erhant
Copy link
Owner

erhant commented Oct 15, 2024

See fail here: https://github.com/semaphore-protocol/semaphore/actions/runs/11344147674/job/31548268406

@numtel
Copy link
Contributor

numtel commented Oct 15, 2024

This is actually what I see as a snarkjs bug that occurs with the new Circom 2.2.0

In that build, the "setup Circom" step uses the latest Circom version binary available.

I fixed this last night on circuitscan by copying (and changing commonjs to module export syntax) the witness_calculator.js from a circom 2.2.0 build output. It works for circom 2.2.0 as well as earlier versions

circuitscan/circuitscan@1e554e3

@numtel
Copy link
Contributor

numtel commented Oct 15, 2024

Regarding circom 2.2.0 and their decision to change the default optimization to 1... 🤣 so much for my recent PR...

I'm considering making another PR that just omits optimization argument if it's not specified in the circomkit.json so it goes with whatever is default on the compiler.

@erhant
Copy link
Owner Author

erhant commented Oct 15, 2024

This is actually what I see as a snarkjs bug that occurs with the new Circom 2.2.0

ohhh, thank you for this info! had no idea what was the bug so far... People using snarkjs should have failures all around on this then, right?

Regarding circom 2.2.0 and their decision to change the default optimization to 1... 🤣 so much for my recent PR...

I'm considering making another PR that just omits optimization argument if it's not specified in the circomkit.json so it goes with whatever is default on the compiler.

I think this is the correct approach for this as well.

@numtel
Copy link
Contributor

numtel commented Oct 15, 2024

ohhh, thank you for this info! had no idea what was the bug so far... People using snarkjs should have failures all around on this then, right?

I believe so, I'll check through it later and submit an issue/PR on snarkjs.

@erhant
Copy link
Owner Author

erhant commented Oct 15, 2024

Here is a related issue: iden3/circom#308

kudos to @cedoor

@numtel
Copy link
Contributor

numtel commented Oct 15, 2024

Here is a related issue: iden3/circom#308

kudos to @cedoor

Ah ok, replied there. It looks like the fix is already waiting to be merged: iden3/circom_runtime#117

Snarkjs was also already awaiting a PR for bumping that dependency to the latest version, it will have to be bumped further. iden3/snarkjs#526

@OBrezhniev
Copy link

Hi @erhant @numtel ! We've just released snarkjs v0.7.5 with the fix.

@erhant
Copy link
Owner Author

erhant commented Oct 18, 2024

Thank you for the notice!

@erhant erhant closed this as completed Oct 18, 2024
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

3 participants