add verifier generation to test.sh

This commit is contained in:
poma 2020-01-17 14:00:49 +07:00
parent d9dcd41c96
commit 2703431b77
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657

@ -25,7 +25,6 @@ cargo run --release --bin verify_contribution circuit.json circom3.params circom
# generate resulting keys # generate resulting keys
cargo run --release --bin export_keys circom4.params vk.json pk.json cargo run --release --bin export_keys circom4.params vk.json pk.json
# create dummy keys in circom format # create dummy keys in circom format
npx snarkjs setup --protocol groth npx snarkjs setup --protocol groth
# patch dummy keys with actual keys params # patch dummy keys with actual keys params
@ -33,6 +32,9 @@ cargo run --release --bin copy_json proving_key.json pk.json transformed_pk.json
cargo run --release --bin copy_json verification_key.json vk.json transformed_vk.json cargo run --release --bin copy_json verification_key.json vk.json transformed_vk.json
node ./tools/patch_vk/patch_vk.js node ./tools/patch_vk/patch_vk.js
# generate solidity verifier
cargo run --release --bin generate_verifier circom4.params verifier.sol
# try to generate and verify proof # try to generate and verify proof
snarkjs calculatewitness snarkjs calculatewitness
cargo run --release --bin prove circuit.json witness.json circom4.params proof.json cargo run --release --bin prove circuit.json witness.json circom4.params proof.json