forked from PinkDiamond1/opgeth-tc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_opgeth.sh
79 lines (72 loc) · 2.05 KB
/
run_opgeth.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
#!/bin/bash
cd /app
if [ "$1" == "y" ]; then
rm -rf ./resources/datadir
fi
echo "SequencerAddress" $SequencerAddress
echo "ChainID" $ChainID
if [ ! -d "./resources/datadir" ]; then
mkdir -p ./resources/datadir
(
cd ./resources
echo "pwd" > datadir/password
if [ "$MASTER" == "1" ]; then
echo $SequencerPriv > datadir/block-signer-key
/app/bin/geth account import --datadir=datadir --password=datadir/password datadir/block-signer-key
fi
/app/bin/geth init --datadir=datadir genesis.json
)
fi
if [ "$MASTER" == "1" ]; then
./bin/geth \
--datadir ./resources/datadir \
--http \
--http.corsdomain="*" \
--http.vhosts="*" \
--http.addr=0.0.0.0 \
--ws \
--ws.addr=0.0.0.0 \
--ws.api=eth,net,web3,txpool \
--ws.port=8546 \
--ws.origins="*" \
--syncmode=full \
--gcmode=archive \
--nodiscover \
--maxpeers=0 \
--networkid=$ChainID \
--authrpc.vhosts="*" \
--authrpc.addr=0.0.0.0 \
--authrpc.port=8551 \
--authrpc.jwtsecret=./resources/jwt.txt \
--rollup.disabletxpoolgossip=false \
--password=./resources/datadir/password \
--allow-insecure-unlock \
--mine \
--miner.etherbase=$SequencerAddress \
--log.debug \
--unlock=$SequencerAddress 2>&1 | cronolog $PWD/resources/logs/%Y-%m-%d.log
else
./bin/geth \
--datadir ./resources/datadir \
--http \
--http.corsdomain="*" \
--http.vhosts="*" \
--http.addr=0.0.0.0 \
--ws \
--ws.addr=0.0.0.0 \
--ws.port=8546 \
--ws.origins="*" \
--syncmode=full \
--gcmode=archive \
--nodiscover \
--maxpeers=0 \
--networkid=$ChainID \
--authrpc.vhosts="*" \
--authrpc.addr=0.0.0.0 \
--authrpc.port=8551 \
--authrpc.jwtsecret=./resources/jwt.txt \
--rollup.disabletxpoolgossip=false \
--password=./resources/datadir/password \
--allow-insecure-unlock \
--log.debug 2>&1 | cronolog $PWD/resources/logs/%Y-%m-%d.log
fi