Delete PoC specification v1.2.pdf #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Circuit Test | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
check-test-circuit: | |
name: Check the Schnorr prove, verify algorithm circuit | |
runs-on: ubuntu-latest | |
env: | |
TEST_MODE: false | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: install dependencies | |
run : npm install | |
- name: install circom | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: onthertech/amd64-circom:2.0.5 | |
shell: bash | |
options: -v ${{ github.workspace }}:/var/workspace | |
run: | | |
source "$HOME/.cargo/env" | |
/var/workspace/resource/subcircuits/compile.sh | |
# - name: build | |
# run : npm run buildcli | |
- name: build QAP | |
run : node cli.js qap-all bn128 12 18 -v | |
- name: setup | |
run : node cli.js setup resource/subcircuits/param_12_18.dat rs_18 resource/subcircuits/QAP_12_18 -v | |
- name: derive | |
run : | | |
node cli.js derive resource/universal_rs/rs_18.urs crsSchnorr_prove resource/circuits/schnorr_prove resource/subcircuits/QAP_12_18 -v | |
node cli.js derive resource/universal_rs/rs_18.urs crsSchnorr_verify resource/circuits/schnorr_verify resource/subcircuits/QAP_12_18 -v | |
- name: decode | |
run : | | |
node cli.js decode resource/circuits/schnorr_prove 1 -v | |
node cli.js decode resource/circuits/schnorr_prove 2 -v | |
node cli.js decode resource/circuits/schnorr_verify 1 -v | |
- name: prove | |
run : | | |
node cli.js prove resource/subcircuits/QAP_12_18 resource/circuits/schnorr_prove/crsSchnorr_prove.crs proof1 resource/circuits/schnorr_prove 1 -v | |
node cli.js prove resource/subcircuits/QAP_12_18 resource/circuits/schnorr_prove/crsSchnorr_prove.crs proof2 resource/circuits/schnorr_prove 2 -v | |
node cli.js prove resource/subcircuits/QAP_12_18 resource/circuits/schnorr_verify/crsSchnorr_verify.crs proof resource/circuits/schnorr_verify 1 -v | |
- name: verify | |
run : | | |
node cli.js verify resource/circuits/schnorr_prove/proof1.proof resource/circuits/schnorr_prove/crsSchnorr_prove.crs resource/circuits/schnorr_prove 1 -v | tee output1 | |
node cli.js verify resource/circuits/schnorr_prove/proof2.proof resource/circuits/schnorr_prove/crsSchnorr_prove.crs resource/circuits/schnorr_prove 2 -v | tee output2 | |
node cli.js verify resource/circuits/schnorr_verify/proof.proof resource/circuits/schnorr_verify/crsSchnorr_verify.crs resource/circuits/schnorr_verify 1 -v | tee output3 | |
echo "VALID" > expect | |
- name: check the final results | |
run : | | |
for f in output*; do | |
if grep -q INVALID "$f"; then | |
echo "The proofs are not valid" | |
exit 1 | |
fi | |
done |