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

“Invalid Proof” attempting to build hash-check-bits #3

Open
dysbulic opened this issue Nov 13, 2021 · 1 comment
Open

“Invalid Proof” attempting to build hash-check-bits #3

dysbulic opened this issue Nov 13, 2021 · 1 comment

Comments

@dysbulic
Copy link

I have reworked the build script and updated Circom to v2. Now the verification of hash-check-bits returns “Invalid Proof”.

The commands being run are:

  • circom "circuits/hash-check-bits/circuit.circom" --r1cs --wasm --sym
  • npx snarkjs r1cs info "build/circuits/hash-check-bits/circuit.r1cs"
  • npx snarkjs groth16 setup "build/circuits/hash-check-bits/circuit.r1cs" "build/ptaus/pot20_final.ptau" "build/keys/hash-check-bits/circuit_0000.zkey"
  • npx snarkjs zkey contribute "build/keys/hash-check-bits/circuit_0000.zkey" "build/keys/hash-check-bits/circuit.zkey" --name="First Contribution" -e="1636810974283"
  • npx snarkjs zkey export verificationkey "build/keys/hash-check-bits/circuit.zkey" "build/keys/hash-check-bits/verification_key.json"
  • node "build/circuits/hash-check-bits/circuit_js/generate_witness.js" "build/circuits/hash-check-bits/circuit_js/circuit.wasm" "circuits/hash-check-bits/input.json" "build/circuits/hash-check-bits/witness.wtns"
  • npx snarkjs groth16 prove "build/keys/hash-check-bits/circuit.zkey" "build/circuits/hash-check-bits/witness.wtns" "build/circuits/hash-check-bits/proof.json" "build/circuits/hash-check-bits/public.json"
  • npx snarkjs groth16 verify "build/keys/hash-check-bits/verification_key.json" "build/circuits/hash-check-bits/public.json" "build/circuits/hash-check-bits/proof.json"
@Divide-By-0
Copy link
Collaborator

I'm not 100% sure, but I know there are a number of differences between v1 and v2 so the circuits will not work off the bat -- for instance, public and private variables need different keywords now, and public variables must be passed in through a constructor. Did you make those changes when you updated the circuits to v2?

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