contribution verification scripts
This commit is contained in:
parent
24a1b1fe10
commit
732f09b908
5
phase2/verify_tornado_ceremony/.gitignore
vendored
Normal file
5
phase2/verify_tornado_ceremony/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
node_modules
|
||||
phase1radix2m15
|
||||
*.json
|
||||
Verifier.sol
|
||||
response_*
|
14
phase2/verify_tornado_ceremony/README.md
Normal file
14
phase2/verify_tornado_ceremony/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Tornado.Cash ceremony verification
|
||||
|
||||
This dir contains scripts that allow to verify tornado.cash trusted setup ceremony
|
||||
|
||||
```sh
|
||||
# Download all tornado.cash contributions
|
||||
./download.sh
|
||||
|
||||
# Verify each contribution
|
||||
./verify.sh
|
||||
|
||||
# Generate keys and Verifier.sol contract
|
||||
./generate.sh
|
||||
```
|
11
phase2/verify_tornado_ceremony/download.sh
Executable file
11
phase2/verify_tornado_ceremony/download.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
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 1 1114); do
|
||||
wget https://tornado-cash-ceremony.s3-us-west-2.amazonaws.com/response_$i
|
||||
done
|
18
phase2/verify_tornado_ceremony/generate.sh
Executable file
18
phase2/verify_tornado_ceremony/generate.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
npm ci
|
||||
# Generating dummy key files to extract circuit data from
|
||||
npx snarkjs setup --protocol groth
|
||||
# generate actual keys from the last contribution
|
||||
cargo run --release --bin export_keys response_1114 vk.json pk.json
|
||||
# patch dummy keys with actual keys params
|
||||
cargo run --release --bin copy_json proving_key.json pk.json transformed_pk.json
|
||||
# generate solidity verifier
|
||||
cargo run --release --bin generate_verifier response_1114 Verifier.sol
|
||||
|
||||
# rename key files
|
||||
rm proving_key.json verification_key.json pk.json
|
||||
mv circuit.json withdraw.json
|
||||
mv transformed_pk.json withdraw_proving_key.json
|
||||
mv vk.json withdraw_verification_key.json
|
1204
phase2/verify_tornado_ceremony/package-lock.json
generated
Normal file
1204
phase2/verify_tornado_ceremony/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
14
phase2/verify_tornado_ceremony/package.json
Normal file
14
phase2/verify_tornado_ceremony/package.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "phase2",
|
||||
"version": "1.0.0",
|
||||
"description": "This library is still under development.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"snarkjs": "git+https://github.com/kobigurk/snarkjs.git"
|
||||
}
|
||||
}
|
7
phase2/verify_tornado_ceremony/verify.sh
Executable file
7
phase2/verify_tornado_ceremony/verify.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cargo build --release --bin verify_contribution
|
||||
for i in $(seq 1 1114); do
|
||||
../target/release/verify_contribution circuit.json response_$((i - 1)) response_$i
|
||||
done
|
Loading…
Reference in New Issue
Block a user