From 9ff7ec2ee429a1724aac400d56186a9783d313dd Mon Sep 17 00:00:00 2001 From: mrekucci <4932785+mrekucci@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:05:28 -0300 Subject: [PATCH] feat: enable setting syncmode as env variable in entrypoint --- geth-poa/entrypoint.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/geth-poa/entrypoint.sh b/geth-poa/entrypoint.sh index 9bbc046c9815..99274fd1a923 100644 --- a/geth-poa/entrypoint.sh +++ b/geth-poa/entrypoint.sh @@ -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 \