You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ERROR] snarkJS:Error:Scalar size does not match
at _multiExp(/opt/homebrew/lib/node_modules/snarkjs/node_modules/ffjavascript/build/main.cjs:4978:19)
at WasmCurve.multiExpAffine(/opt/homebrew/lib/node_modules/snarkjs/node_modules/ffjavascript/build/main.cjs:5015:22)
at groth16Prove$1(/opt/homebrew/lib/node_modules/snarkjs/build/cli.cjs:5768:33)
at asyncObject.groth16Prove[as action](/opt/homebrew/lib/node_modules/snarkjs/build/cli.cjs:12975:36)
at asyncclProcessor(/opt/homebrew/lib/node_modules/snarkjs/build/cli.cjs:481:27)
for circuit:
pragma circom 2.0.0;
template Multiplier2(){//Declaration of signals
signal input in1;
signal input in2;
signal output out;
out <== in1 * in2;}
component main {public [in1,in2]} = Multiplier2();
with inputs:
{"in1": "3", "in2": "11"}
Is this a known issue? I followed the tutorial exactly yet it does not generate a proof. If I make either of the inputs private it works e.g. component main {public [in1]} = Multiplier2(); is ok.
Sad to see this mistake in the official circom docs. This is a common issue though. When a circuit has 0 constraints, snarkjs throws this exact error.
In the example, all the signals (both outputs and inputs) are public and ZK proof results into hiding nothing, becoming meaningless. Sometimes this error may also occur due to weird circom optimizations that "remove" constraints.
for circuit:
with inputs:
Is this a known issue? I followed the tutorial exactly yet it does not generate a proof. If I make either of the inputs private it works e.g. component main {public [in1]} = Multiplier2(); is ok.
See example for reference:
https://docs.circom.io/circom-language/signals/
I suspect this might be due to the two inputs forming a quadratic constraint. When I introduce a third input and make it public it works again.
The text was updated successfully, but these errors were encountered: