-
Notifications
You must be signed in to change notification settings - Fork 396
Expand file tree
/
Copy pathsend_proof_with_random_address.sh
More file actions
executable file
·78 lines (67 loc) · 2.48 KB
/
send_proof_with_random_address.sh
File metadata and controls
executable file
·78 lines (67 loc) · 2.48 KB
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
#!/bin/bash
# Params:
# PROOF_TYPE = sp1|groth16|plonk|risc0 (default sp1)
# RPC_URL (default localhost:8545)
# NETWORK devnet|holesky-stage|holesky
# REPETITIONS (default 1)
if [ -z "$NETWORK" ]; then
echo "NETWORK is not set. Setting it to devnet"
NETWORK="devnet"
fi
if [ -z "$RPC_URL" ]; then
echo "RPC_URL is not set. Setting it to localhost:8545"
RPC_URL="http://localhost:8545"
fi
if [ -z $PROOF_TYPE ]; then
echo "Proof type not provided, using SP1 default"
PROOF_TYPE="sp1" #sp1|groth16|plonk|risc0
fi
if [ -z $REPETITIONS ]; then
echo "REPETITIONS not provided, using 1 as default"
REPETITIONS=1
fi
echo "Sending $REPETITIONS $PROOF_TYPE proof/s to the batcher"
echo "Batcher in $NETWORK and endpoint at $RPC_URL"
if [[ $PROOF_TYPE == "sp1" ]]; then
aligned submit \
--proving_system SP1 \
--proof ../../scripts/test_files/sp1/sp1_fibonacci_4_1_3.proof \
--vm_program ../../scripts/test_files/sp1/sp1_fibonacci_4_1_3.elf \
--random_address \
--repetitions $REPETITIONS \
--rpc_url $RPC_URL \
--network $NETWORK
elif [[ $PROOF_TYPE == "groth16" ]]; then
aligned submit \
--proving_system Groth16Bn254 \
--proof ../../scripts/test_files/gnark_groth16_bn254_script/groth16.proof \
--public_input ../../scripts/test_files/gnark_groth16_bn254_script/groth16.pub \
--vk ../../scripts/test_files/gnark_groth16_bn254_script/groth16.vk \
--random_address \
--repetitions $REPETITIONS \
--rpc_url $RPC_URL \
--network $NETWORK
elif [[ $PROOF_TYPE == "plonk" ]]; then
aligned submit \
--proving_system GnarkPlonkBn254 \
--proof ../../scripts/test_files/gnark_plonk_bn254_script/plonk.proof \
--public_input ../../scripts/test_files/gnark_plonk_bn254_script/plonk_pub_input.pub \
--vk ../../scripts/test_files/gnark_plonk_bn254_script/plonk.vk \
--random_address \
--repetitions $REPETITIONS \
--rpc_url $RPC_URL \
--network $NETWORK
elif [[ $PROOF_TYPE == "risc0" ]]; then
aligned submit \
--proving_system Risc0 \
--proof ../../scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci_2_0.proof \
--vm_program ../../scripts/test_files/risc_zero/fibonacci_proof_generator/fibonacci_id_2_0.bin \
--public_input ../../scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci_2_0.pub \
--random_address \
--repetitions $REPETITIONS \
--rpc_url $RPC_URL \
--network $NETWORK
else
echo "Incorrect proof type provided $1"
exit 1
fi