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: Scalar size does not match" Building sig-check #4

Open
dysbulic opened this issue Nov 8, 2021 · 0 comments
Open

"Error: Scalar size does not match" Building sig-check #4

dysbulic opened this issue Nov 8, 2021 · 0 comments

Comments

@dysbulic
Copy link

dysbulic commented Nov 8, 2021

I have been reworking the build system a bit. I was unable to build initially b/c the 20th powers of tau aren't included in the distribution. I'm pretty sure the build process is unchanged. The commands that are running are:

  • circom circuits/sig-check/circuit.circom --r1cs --wasm --sym
  • npx snarkjs r1cs info "build/circuits/sig-check/circuit.r1cs"
  • npx snarkjs zkey new "build/circuits/sig-check/circuit.r1cs" "build/ptaus/pot20_final.ptau" "build/keys/sig-check/circuit.zkey"
  • npx snarkjs zkey contribute "build/keys/sig-check/circuit.zkey" "build/keys/sig-check/new_circuit.zkey" -e="1636395152546"
  • npx snarkjs zkey export verificationkey "build/keys/sig-check/new_circuit.zkey" "build/keys/sig-check/verification_key.json"
  • node "build/circuits/sig-check/circuit_js/generate_witness.js" "build/circuits/sig-check/circuit_js/circuit.wasm" "circuits/sig-check/input.json" "build/circuits/sig-check/witness.wtns"
  • npx snarkjs groth16 prove "build/keys/sig-check/new_circuit.zkey" "build/circuits/sig-check/witness.wtns" "build/circuits/sig-check/proof.json" "build/circuits/sig-check/public.json"
  • npx snarkjs groth16 verify "build/keys/sig-check/verification_key.json" "build/circuits/sig-check/public.json" "build/circuits/sig-check/proof.json"

The proof verification fails with Scalar size does not match. The same build steps work for the other two circuits.

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