-
Notifications
You must be signed in to change notification settings - Fork 110
/
Copy pathtest_cli.sh
executable file
·54 lines (46 loc) · 2.29 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
#!/bin/bash
CLI=./target/release/zkwasm-cli
set -e
set -x
CUDA="--features cuda"
SCHEME="--scheme shplonk"
test_default_cli() {
cargo build --release $CUDA
rm -rf params/*.data params/*.config output
$CLI --params ./params wasm_output setup --wasm ./crates/zkwasm/wasm/wasm_output.wasm $SCHEME
$CLI --params ./params wasm_output dry-run --wasm crates/zkwasm/wasm/wasm_output.wasm --public 133:i64 --public 2:i64 --output ./output
$CLI --params ./params wasm_output prove --wasm crates/zkwasm/wasm/wasm_output.wasm --public 133:i64 --public 2:i64 --output ./output
$CLI --params ./params wasm_output verify --output ./output
}
test_uniform_circuit_cli() {
cargo build --release --features uniform-circuit $CUDA
rm -rf params/*.data params/*.config output
$CLI --params ./params wasm_output setup $SCHEME
$CLI --params ./params wasm_output dry-run --wasm crates/zkwasm/wasm/wasm_output.wasm --public 133:i64 --public 2:i64 --output ./output
$CLI --params ./params wasm_output prove --wasm crates/zkwasm/wasm/wasm_output.wasm --public 133:i64 --public 2:i64 --output ./output
$CLI --params ./params wasm_output verify --output ./output
}
test_continuation_cli() {
cargo build --release --features continuation $CUDA
rm -rf params/*.data params/*.config output
$CLI --params ./params fibonacci setup $SCHEME
$CLI --params ./params fibonacci dry-run --wasm crates/zkwasm/wasm/fibonacci.wasm --public 25:i64 --output ./output
$CLI --params ./params fibonacci prove --wasm crates/zkwasm/wasm/fibonacci.wasm --public 25:i64 --output ./output
$CLI --params ./params fibonacci verify --output ./output
}
test_phantom_cli() {
cargo build --release $CUDA
rm -rf params/*.data params/*.config output
$CLI --params ./params wasm_output setup --wasm ./crates/playground/wasm/phantom.wasm --phantom search
$CLI --params ./params wasm_output dry-run --wasm crates/playground/wasm/phantom.wasm --public 2:i64 --output ./output
$CLI --params ./params wasm_output prove --wasm crates/playground/wasm/phantom.wasm --public 2:i64 --output ./output
$CLI --params ./params wasm_output verify --output ./output
}
#x=50
#while [ $x -gt 0 ]; do
# test_phantom_cli
test_default_cli
test_uniform_circuit_cli
test_continuation_cli
# x=$(($x-1))
#done