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

snarkjs.groth16.verify is not working if pubSignals is empty #447

Closed
TheBojda opened this issue Nov 8, 2023 · 1 comment
Closed

snarkjs.groth16.verify is not working if pubSignals is empty #447

TheBojda opened this issue Nov 8, 2023 · 1 comment

Comments

@TheBojda
Copy link

TheBojda commented Nov 8, 2023

This was my test circuit:

pragma circom 2.0.0;

include "../../node_modules/circomlib/circuits/eddsaposeidon.circom";

component main = EdDSAPoseidonVerifier();

it throws

 Error: Scalar size does not match
      at _multiExp (node_modules/ffjavascript/build/main.cjs:4972:19)
      at WasmCurve.multiExpAffine (node_modules/ffjavascript/build/main.cjs:5009:22)
      at Object.groth16Verify [as verify] (node_modules/snarkjs/build/main.cjs:1357:31)
      at async Context.<anonymous> (test/eddsa-test.ts:55:21)

If I make some signals public, it works fine:

pragma circom 2.0.0;

include "../../node_modules/circomlib/circuits/eddsaposeidon.circom";

component main {public [Ax,Ay]} = EdDSAPoseidonVerifier();
@OBrezhniev
Copy link
Member

Some private inputs and constraints could be removed by circom compiler:
https://docs.circom.io/circom-language/circom-insight/simplification/
Probably that's the case.

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

2 participants