From d85cec148907dd3a9d0e18eed4ad068e32fefe1d Mon Sep 17 00:00:00 2001 From: Luka Gulin Date: Mon, 7 Jul 2025 10:48:41 +0200 Subject: [PATCH] add support for backup beacon nodes --- docker-compose.yml | 1 + validator/entrypoint.sh | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5446196..4184e63 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,6 +36,7 @@ services: FEE_RECIPIENT_ADDRESS: "" ENABLE_DOPPELGANGER: "true" EXTRA_OPTS: "" + BACKUP_BEACON_NODES: "" volumes: - nimbus-validators-data:/home/user/nimbus-eth2/build/data restart: unless-stopped diff --git a/validator/entrypoint.sh b/validator/entrypoint.sh index ba380c3..6d87327 100644 --- a/validator/entrypoint.sh +++ b/validator/entrypoint.sh @@ -14,6 +14,14 @@ SIGNER_API_URL=$(get_signer_api_url "${NETWORK}" "${SUPPORTED_NETWORKS}") BEACON_API_URL=$(get_beacon_api_url "${NETWORK}" "${SUPPORTED_NETWORKS}" "${CLIENT}") MEVBOOST_FLAG=$(get_mevboost_flag "${NETWORK}" "${MEVBOOST_FLAG_KEY}" "${SKIP_MEVBOOST_URL}") + +BACKUP_BEACON_FLAGS="" +if [ -n "${BACKUP_BEACON_NODES}" ]; then + for node in $(echo "${BACKUP_BEACON_NODES}" | tr ',' ' '); do + BACKUP_BEACON_FLAGS="${BACKUP_BEACON_FLAGS}--beacon-node=${node} " + done +fi + echo "[INFO - entrypoint] Running validator service" FLAGS="--log-level=$LOG_TYPE \ @@ -31,7 +39,9 @@ FLAGS="--log-level=$LOG_TYPE \ --metrics-address=0.0.0.0 \ --metrics-port=8008 \ --graffiti=$VALID_GRAFFITI \ - --beacon-node=$BEACON_API_URL $MEVBOOST_FLAG $EXTRA_OPTS" + --beacon-node=$BEACON_API_URL \ + $BACKUP_BEACON_FLAGS \ + $MEVBOOST_FLAG $EXTRA_OPTS" # shellcheck disable=SC2086 exec ${NIMBUS_BIN} $FLAGS