-
Notifications
You must be signed in to change notification settings - Fork 433
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
Can't run fullProve function #107
Comments
I switch to Circom old version(0.5.46) implemented in javascript and it works well. Thanks. |
I've just encountered this issue using circom compiler 2.0.1. This issue should perhaps not be closed. I've had no trouble using the However when using |
I've found a reasonable workaround based on the For const snarkjs = require('snarkjs')
const fs = require('fs')
const wc = require('/path/to/Circuit_js/witness_calculator.js')
const wasm = '/path/to/Circuit_js/Circuit.wasm'
const zkey = '/path/to/Circuit_final.zkey'
const INPUTS_FILE = '/tmp/inputs'
const WITNESS_FILE = '/tmp/witness'
const generateWitness = async (inputs) => {
const buffer = fs.readFileSync(wasm);
const witnessCalculator = await wc(buffer)
const buff = await witnessCalculator.calculateWTNSBin(inputs, 0);
fs.writeFileSync(WITNESS_FILE, buff)
}
const main = async () => {
const inputSignals = { enabled: 1, in: [1, 1] } // replace with your signals
await generateWitness(inputSignals)
const { proof, publicSignals } = await snarkjs.plonk.prove(zkey, WITNESS_FILE);
} |
thnaks @connorbode |
@michal-wrzosek if you used any of that code, please check the updated |
This is definitely happening during the witness creation in A cleaner workaround that I found (that does not require writing to file) is that you can call My best guess is that the generated WASM is not compatible with this version of the circom runtime resulting in more function definitions being required here: https://github.com/iden3/circom_runtime/blob/master/js/witness_calculator.js#L52-L88 |
This is the version that |
I try running the [email protected] fullProve function on node and browser but it returns the error. I tried to run only prove and it work well, not returning any error.
More info about env:
Error:
Thank you for your help!
The text was updated successfully, but these errors were encountered: