Merge pull request #26 from primevprotocol/syncmode-env

feat: enable setting syncmode as env variable in entrypoint
This commit is contained in:
mrekucci 2024-02-21 03:24:17 +04:00 committed by GitHub
commit 500e90710d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,6 +4,7 @@ set -exu
GETH_BIN_PATH=${GETH_BIN_PATH:-geth}
GENESIS_L1_PATH=${GENESIS_L1_PATH:-/genesis.json}
VERBOSITY=${VERBOSITY:-3}
GETH_SYNC_MODE=${GETH_SYNC_MODE:-full}
GETH_DATA_DIR=${GETH_DATA_DIR:-/data}
GETH_CHAINDATA_DIR="$GETH_DATA_DIR/geth/chaindata"
GETH_KEYSTORE_DIR="$GETH_DATA_DIR/keystore"
@ -91,7 +92,7 @@ if [ "$GETH_NODE_TYPE" = "bootnode" ]; then
--ws.port="$WS_PORT" \
--ws.origins="*" \
--ws.api=debug,eth,txpool,net,engine \
--syncmode=full \
--syncmode="${GETH_SYNC_MODE}" \
--gcmode=full \
--state.scheme=path \
--db.engine=pebble \
@ -120,7 +121,7 @@ elif [ "$GETH_NODE_TYPE" = "signer" ]; then
--verbosity="$VERBOSITY" \
--datadir="$GETH_DATA_DIR" \
--port="$GETH_PORT" \
--syncmode=full \
--syncmode="${GETH_SYNC_MODE}" \
--gcmode=full \
--state.scheme=path \
--db.engine=pebble \
@ -168,7 +169,7 @@ elif [ "$GETH_NODE_TYPE" = "member" ]; then
--verbosity="$VERBOSITY" \
--datadir="$GETH_DATA_DIR" \
--port="$GETH_PORT" \
--syncmode=full \
--syncmode="${GETH_SYNC_MODE}" \
--gcmode=full \
--state.scheme=path \
--db.engine=pebble \