-
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
·90 lines (78 loc) · 3.12 KB
/
send_proof_with_random_address.sh
File metadata and controls
executable file
·90 lines (78 loc) · 3.12 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
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
# Params:
# PROOF_TYPE = sp1|gnark_groth16|gnark_plonk|risc0|circom_groth16 (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|gnark_groth16|gnark_plonk|risc0|circom_groth16
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_5_0_0.proof \
--vm_program ../../scripts/test_files/sp1/sp1_fibonacci_5_0_0.elf \
--public_input ../../scripts/test_files/sp1/sp1_fibonacci_5_0_0.pub \
--random_address \
--repetitions $REPETITIONS \
--rpc_url $RPC_URL \
--network $NETWORK
elif [[ $PROOF_TYPE == "gnark_groth16" ]]; then
aligned submit \
--proving_system GnarkGroth16Bn254 \
--proof ../../scripts/test_files/gnark_groth16_bn254_script/gnark_groth16_0_12_0.proof \
--public_input ../../scripts/test_files/gnark_groth16_bn254_script/gnark_groth16_0_12_0.pub \
--vk ../../scripts/test_files/gnark_groth16_bn254_script/gnark_groth16_0_12_0.vk \
--random_address \
--repetitions $REPETITIONS \
--rpc_url $RPC_URL \
--network $NETWORK
elif [[ $PROOF_TYPE == "gnark_plonk" ]]; then
aligned submit \
--proving_system GnarkPlonkBn254 \
--proof ../../scripts/test_files/gnark_plonk_bn254_script/gnark_plonk_0_12_0.proof \
--public_input ../../scripts/test_files/gnark_plonk_bn254_script/gnark_plonk_pub_input_0_12_0.pub \
--vk ../../scripts/test_files/gnark_plonk_bn254_script/gnark_plonk_0_12_0.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_2_0.proof \
--vm_program ../../scripts/test_files/risc_zero/fibonacci_proof_generator/fibonacci_id_2_2_0.bin \
--public_input ../../scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci_2_2_0.pub \
--random_address \
--repetitions $REPETITIONS \
--rpc_url $RPC_URL \
--network $NETWORK
elif [[ $PROOF_TYPE == "circom_groth16" ]]; then
aligned submit \
--proving_system CircomGroth16Bn256 \
--proof ../../scripts/test_files/circom_groth16_bn256_script/proof.json \
--public_input ../../scripts/test_files/circom_groth16_bn256_script/public.json \
--vk ../../scripts/test_files/circom_groth16_bn256_script/verification_key.json \
--random_address \
--repetitions $REPETITIONS \
--rpc_url $RPC_URL \
--network $NETWORK
else
echo "Incorrect proof type provided $1"
exit 1
fi