-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_cli.sh
executable file
·83 lines (70 loc) · 2.06 KB
/
test_cli.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
set -e
cargo run --release -- help
ZERO_G="target/release/zero_g"
mkdir -p test_data
echo ""
echo "==== Running predict"
$ZERO_G predict \
-m models/model_28input_256entry_1hash_1bpi.hdf5 \
-i benches/example_image_7.png
if [ -d "data/MNIST/png" ]; then
echo ""
echo "==== Running compute-accuracy"
$ZERO_G compute-accuracy \
-m models/model_28input_256entry_1hash_1bpi.hdf5 \
-t data/MNIST/png/
fi
echo ""
echo "==== Running mock-proof"
$ZERO_G mock-proof \
-m models/model_28input_256entry_1hash_1bpi.hdf5 \
-i benches/example_image_7.png \
-k 14
echo ""
echo "==== Running generate-srs"
$ZERO_G generate-srs \
-k 14 \
--srs-path test_data/srs_14
echo ""
echo "==== Running generate-keys"
$ZERO_G generate-keys \
-m models/model_28input_256entry_1hash_1bpi.hdf5 \
--srs-path test_data/srs_14 \
--vk-path test_data/vk \
--pk-path test_data/pk \
--circuit-params-path test_data/circuit_params.json
echo ""
echo "==== Running dry-run-evm-verifier"
$ZERO_G dry-run-evm-verifier \
-m models/model_28input_256entry_1hash_1bpi.hdf5 \
-i benches/example_image_7.png \
--srs-path test_data/srs_14 \
--pk-path test_data/pk
echo ""
echo "==== Running deploy-evm-verifier"
$ZERO_G deploy-evm-verifier \
--srs-path test_data/srs_14 \
--vk-path test_data/vk \
--circuit-params-path test_data/circuit_params.json
echo ""
echo "==== Running proof"
$ZERO_G proof \
-m models/model_28input_256entry_1hash_1bpi.hdf5 \
-i benches/example_image_7.png \
--srs-path test_data/srs_14 \
--pk-path test_data/pk \
--proof-path test_data/proof.json
echo ""
echo "==== Running verify"
$ZERO_G verify \
--srs-path test_data/srs_14 \
--vk-path test_data/vk \
--circuit-params-path test_data/circuit_params.json \
--proof-path test_data/proof.json
echo ""
echo "==== Running submit-proof"
# Using Anvil, the contract address is always the same
$ZERO_G submit-proof \
--proof-path test_data/proof.json \
--contract-address 0x5fbdb2315678afecb367f032d93f642f64180aa3