contribution verification scripts

This commit is contained in:
poma 2020-05-11 11:14:33 +03:00
parent c014a7ae83
commit 24a1b1fe10
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657
3 changed files with 26 additions and 3 deletions

9
phase2/batch.sh Normal file

@ -0,0 +1,9 @@
#!/bin/bash
cargo build --release --bin verify_contribution
echo "0" > current
for i in $(seq 0 $1); do
./verify.sh $2 &
sleep 1
done

10
phase2/download.sh Normal file

@ -0,0 +1,10 @@
#!/bin/bash
wget https://tornado-cash-ceremony.s3-us-west-2.amazonaws.com/circuit.json
wget https://tornado-cash-ceremony.s3-us-west-2.amazonaws.com/phase1radix2m15
wget https://tornado-cash-ceremony.s3-us-west-2.amazonaws.com/initial.params
mv initial.params response_0
for i in $(seq 0 $1); do
wget https://tornado-cash-ceremony.s3-us-west-2.amazonaws.com/response_$i >> download.log 2>&1 &
done

@ -1,6 +1,10 @@
#!/bin/bash -x #!/bin/bash -x
END=$(($1-1)) while true; do
for i in $(seq 0 $END); do CURRENT=`cat current`
cargo run --release --bin verify_contribution circuit.json response_$i response_$((i+1)) echo $((CURRENT+1)) > current
if [ $CURRENT -ge $1 ]; then
exit 0
fi
./target/release/verify_contribution circuit.json response_$CURRENT response_$((CURRENT+1)) >> verify.log 2>&1
done done