forked from inkonchain/node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart-op-geth.sh
executable file
·66 lines (60 loc) · 1.65 KB
/
start-op-geth.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
#!/bin/sh
set -e
# Wait for the Bedrock flag for this network to be set.
echo "Waiting for Bedrock node to initialize..."
while [ ! -f /shared/initialized.txt ]; do
sleep 1
done
# Set network ID if defined
if [ -n "${L2_NETWORK_ID}" ]; then
export EXTENDED_ARG="${EXTENDED_ARG:-} --networkid=${L2_NETWORK_ID}"
fi
# Init genesis if custom chain
if [ -n "${IS_CUSTOM_CHAIN}" ]; then
geth init --state.scheme=hash --datadir="$BEDROCK_DATADIR" /chainconfig/genesis.json
fi
# Determine syncmode based on NODE_TYPE
if [ -z "$OP_GETH__SYNCMODE" ]; then
if [ "$NODE_TYPE" = "full" ]; then
export OP_GETH__SYNCMODE="snap"
else
export OP_GETH__SYNCMODE="full"
fi
fi
# Start op-geth.
exec geth \
--datadir="$BEDROCK_DATADIR" \
--http \
--http.corsdomain="*" \
--http.vhosts="*" \
--http.addr=0.0.0.0 \
--http.port=8545 \
--http.api=eth,engine,web3,debug,net \
--metrics \
--metrics.influxdb \
--metrics.influxdb.endpoint=http://influxdb:8086 \
--metrics.influxdb.database=opgeth \
--authrpc.vhosts="*" \
--authrpc.addr=0.0.0.0 \
--authrpc.port=8551 \
--authrpc.jwtsecret=/shared/jwt.txt \
--rollup.sequencerhttp="$BEDROCK_SEQUENCER_HTTP" \
--rollup.disabletxpoolgossip=true \
--port="${PORT__OP_GETH_P2P:-39393}" \
--discovery.port="${PORT__OP_GETH_P2P:-39393}" \
--db.engine=pebble \
--state.scheme=hash \
--txlookuplimit=0 \
--history.state=0 \
--history.transactions=0 \
--txpool.pricebump=10 \
--txpool.lifetime=12h0m0s \
--rpc.txfeecap=4 \
--rpc.evmtimeout=0 \
--maxpeers=0 \
--nodiscover \
--gpo.percentile=60 \
--verbosity=3 \
--syncmode="$OP_GETH__SYNCMODE" \
--gcmode="$NODE_TYPE" \
$EXTENDED_ARG $@