From f552c82c2fa6b5044d0dca23d4f859243d2effe5 Mon Sep 17 00:00:00 2001 From: dappnodedev <144998261+dappnodedev@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:20:29 +0200 Subject: [PATCH] Improve validator flags (#9) --- beacon-chain/entrypoint.sh | 15 +++++++-------- validator/entrypoint.sh | 31 ++++++++++++++++--------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/beacon-chain/entrypoint.sh b/beacon-chain/entrypoint.sh index 97c9bac..e8327fa 100755 --- a/beacon-chain/entrypoint.sh +++ b/beacon-chain/entrypoint.sh @@ -17,22 +17,21 @@ EXTRA_OPTS=$(add_flag_to_extra_opts_safely "${EXTRA_OPTS}" "--suggested-fee-reci JWT_SECRET=$(get_jwt_secret_by_network "${NETWORK}") echo "${JWT_SECRET}" >"${JWT_FILE_PATH}" -FLAGS=" ---debug-level=${LOG_LEVEL} \ - --network=${NETWORK} \ +FLAGS="--debug-level=$LOG_LEVEL \ + --network=$NETWORK \ beacon_node \ - --datadir=${DATA_DIR} \ + --datadir=$DATA_DIR \ --http \ --http-allow-origin=* \ --http-address=0.0.0.0 \ - --http-port=${BEACON_API_PORT} \ - --port=${P2P_PORT} \ + --http-port=$BEACON_API_PORT \ + --port=$P2P_PORT \ --metrics \ --metrics-address=0.0.0.0 \ --metrics-port=8008 \ --metrics-allow-origin=* \ - --execution-endpoint=${ENGINE_URL} \ - --execution-jwt=${JWT_FILE_PATH} $CHECKPOINT_SYNC_FLAG $MEVBOOST_FLAG $EXTRA_OPTS" + --execution-endpoint=$ENGINE_URL \ + --execution-jwt=$JWT_FILE_PATH $CHECKPOINT_SYNC_FLAG $MEVBOOST_FLAG $EXTRA_OPTS" echo "[INFO - entrypoint] Starting lighthouse beacon with flags: $FLAGS" diff --git a/validator/entrypoint.sh b/validator/entrypoint.sh index cd8a72a..c8d111f 100755 --- a/validator/entrypoint.sh +++ b/validator/entrypoint.sh @@ -20,24 +20,25 @@ else echo "[WARN - entrypoint] Doppelganger protection is disabled" fi -echo "[INFO - entrypoint] Starting validator service" - -# shellcheck disable=SC2086 -exec lighthouse \ - --debug-level="${LOG_LEVEL}" \ - --network="${NETWORK}" \ +FLAGS="--debug-level=$LOG_LEVEL \ + --network=$NETWORK \ validator \ --init-slashing-protection \ - --datadir "${DATA_DIR}" \ - --beacon-nodes "${BEACON_API_URL}" \ - --graffiti="${VALID_GRAFFITI}" \ + --datadir=$DATA_DIR \ + --beacon-nodes=$BEACON_API_URL \ + --graffiti=$VALID_GRAFFITI \ --http \ --http-address 0.0.0.0 \ - --http-port "${VALIDATOR_PORT}" \ - --http-allow-origin "*" \ + --http-port=$VALIDATOR_PORT \ + --http-allow-origin=* \ --unencrypted-http-transport \ --metrics \ - --metrics-address 0.0.0.0 \ - --metrics-port 8008 \ - --metrics-allow-origin "*" \ - --suggested-fee-recipient="${VALID_FEE_RECIPIENT}" ${MEVBOOST_FLAG} ${EXTRA_OPTS} + --metrics-address=0.0.0.0 \ + --metrics-port=8008 \ + --metrics-allow-origin=* \ + --suggested-fee-recipient=$VALID_FEE_RECIPIENT ${MEVBOOST_FLAG} ${EXTRA_OPTS}" + +echo "[INFO - entrypoint] Starting lighthouse validator with flags: $FLAGS" + +# shellcheck disable=SC2086 +exec lighthouse $FLAGS