mirror of
https://github.com/trezor/blockbook.git
synced 2026-02-19 16:31:19 +01:00
47 lines
1.3 KiB
Bash
47 lines
1.3 KiB
Bash
#!/bin/sh
|
|
|
|
{{define "main" -}}
|
|
|
|
set -e
|
|
|
|
GETH_BIN={{.Env.BackendInstallPath}}/{{.Coin.Alias}}/geth
|
|
DATA_DIR={{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend
|
|
|
|
CHAINDATA_DIR=$DATA_DIR/geth/chaindata
|
|
SNAPSHOT=https://mainnet-full-snapshots.base.org/$(curl https://mainnet-full-snapshots.base.org/latest)
|
|
|
|
if [ ! -d "$CHAINDATA_DIR" ]; then
|
|
wget -c $SNAPSHOT -O - | zstd -cd | tar xf - --strip-components=1 -C $DATA_DIR
|
|
fi
|
|
|
|
# Bind RPC endpoints based on BB_RPC_BIND_HOST_* so defaults remain local unless explicitly overridden.
|
|
$GETH_BIN \
|
|
--op-network base-mainnet \
|
|
--datadir $DATA_DIR \
|
|
--authrpc.jwtsecret $DATA_DIR/jwtsecret \
|
|
--authrpc.addr 127.0.0.1 \
|
|
--authrpc.port {{.Ports.BackendAuthRpc}} \
|
|
--authrpc.vhosts "*" \
|
|
--port {{.Ports.BackendP2P}} \
|
|
--http \
|
|
--http.port {{.Ports.BackendHttp}} \
|
|
--http.addr {{.Env.RPCBindHost}} \
|
|
--http.api eth,net,web3,debug,txpool,engine \
|
|
--http.vhosts "*" \
|
|
--http.corsdomain "*" \
|
|
--ws \
|
|
--ws.port {{.Ports.BackendRPC}} \
|
|
--ws.addr {{.Env.RPCBindHost}} \
|
|
--ws.api eth,net,web3,debug,txpool,engine \
|
|
--ws.origins "*" \
|
|
--rollup.disabletxpoolgossip=true \
|
|
--rollup.sequencerhttp https://mainnet-sequencer.base.io \
|
|
--state.scheme hash \
|
|
--history.transactions 0 \
|
|
--cache 4096 \
|
|
--syncmode full \
|
|
--maxpeers 0 \
|
|
--nodiscover
|
|
|
|
{{end}}
|