Skip to content

Commit

Permalink
Make validator alias configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed Nov 17, 2024
1 parent a5dec50 commit 913ebf2
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 28 deletions.
4 changes: 3 additions & 1 deletion default.env
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ EL_NODE=http://execution:8551
CL_NODE=http://consensus:5052
# MEV-boost address. This would only be changed for Vouch setups
MEV_NODE=http://mev-boost:18550
# Used by "ethd keys", adjust this if you have multiple Eth Docker stacks connected to the same Docker bridge network
VC_ALIAS=vc
# Consensus client addresses for Charon in Obol setup
OBOL_CHARON_CL_ENDPOINTS=http://consensus:5052
# Consensus client address for Lido DV Exit and Lido Validator Ejector services in Obol setup
Expand Down Expand Up @@ -340,4 +342,4 @@ DDNS_TAG=v2
NODE_EXPORTER_IGNORE_MOUNT_REGEX='^/(dev|proc|sys|run|var/lib/docker/.+)($|/)'

# Used by ethd update - please do not adjust
ENV_VERSION=19
ENV_VERSION=20
2 changes: 1 addition & 1 deletion ethd
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ __env_migrate() {
PRYSM_UDP_PORT CL_QUIC_PORT GRAFANA_PORT SIREN_PORT PROMETHEUS_PORT KEY_API_PORT TRAEFIK_WEB_PORT \
TRAEFIK_WEB_HTTP_PORT CL_REST_PORT EL_RPC_PORT EL_WS_PORT EE_PORT ERIGON_TORRENT_PORT LOG_LEVEL JWT_SECRET \
EL_EXTRAS CL_EXTRAS VC_EXTRAS ARCHIVE_NODE SSV_P2P_PORT SSV_P2P_PORT_UDP OBOL_P2P_PORT ERIGON_P2P_PORT_2 \
ERIGON_P2P_PORT_3 LODESTAR_HEAP SSV_DKG_PORT SIREN_PASSWORD LIDO_DV_EXIT_VERSION OBOL_CHARON_CL_ENDPOINTS )
ERIGON_P2P_PORT_3 LODESTAR_HEAP SSV_DKG_PORT SIREN_PASSWORD LIDO_DV_EXIT_VERSION OBOL_CHARON_CL_ENDPOINTS VC_ALIAS )
__target_vars=( ETH_DOCKER_TAG NIM_SRC_BUILD_TARGET NIM_SRC_REPO NIM_DOCKER_TAG NIM_DOCKER_VC_TAG NIM_DOCKER_REPO \
NIM_DOCKER_VC_REPO NIM_DOCKERFILE TEKU_SRC_BUILD_TARGET TEKU_SRC_REPO TEKU_DOCKER_TAG TEKU_DOCKER_REPO \
TEKU_DOCKERFILE LH_SRC_BUILD_TARGET LH_SRC_REPO LH_DOCKER_TAG LH_DOCKER_REPO LH_DOCKERFILE SSV_NODE_REPO \
Expand Down
4 changes: 2 additions & 2 deletions lighthouse-vc-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ services:
networks:
default:
aliases:
- vc
- ${VC_ALIAS}
<<: *logging
entrypoint:
- docker-entrypoint-vc.sh
Expand Down Expand Up @@ -130,7 +130,7 @@ services:
entrypoint:
- keymanager.sh
- /var/lib/lighthouse/validators/api-token.txt
- vc
- ${VC_ALIAS}

volumes:
lhvalidator-data:
Expand Down
4 changes: 2 additions & 2 deletions lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ services:
networks:
default:
aliases:
- vc
- ${VC_ALIAS}
<<: *logging
entrypoint:
- docker-entrypoint-vc.sh
Expand Down Expand Up @@ -217,7 +217,7 @@ services:
entrypoint:
- keymanager.sh
- /var/lib/lighthouse/validators/api-token.txt
- vc
- ${VC_ALIAS}

set-cl-prune-marker:
profiles: ["tools"]
Expand Down
4 changes: 2 additions & 2 deletions lodestar-vc-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ services:
networks:
default:
aliases:
- vc
- ${VC_ALIAS}
<<: *logging
entrypoint:
- docker-entrypoint-vc.sh
Expand Down Expand Up @@ -123,7 +123,7 @@ services:
entrypoint:
- keymanager.sh
- /var/lib/lodestar/validators/validator-db/api-token.txt
- vc
- ${VC_ALIAS}

volumes:
lsvalidator-data:
Expand Down
4 changes: 2 additions & 2 deletions lodestar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ services:
networks:
default:
aliases:
- vc
- ${VC_ALIAS}
<<: *logging
entrypoint:
- docker-entrypoint-vc.sh
Expand Down Expand Up @@ -200,7 +200,7 @@ services:
entrypoint:
- keymanager.sh
- /var/lib/lodestar/validators/validator-db/api-token.txt
- vc
- ${VC_ALIAS}

volumes:
lsconsensus-data:
Expand Down
4 changes: 2 additions & 2 deletions nimbus-vc-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
networks:
default:
aliases:
- vc
- ${VC_ALIAS}
<<: *logging
entrypoint:
- docker-entrypoint-vc.sh
Expand Down Expand Up @@ -98,7 +98,7 @@ services:
entrypoint:
- keymanager.sh
- /var/lib/nimbus/api-token.txt
- vc
- ${VC_ALIAS}

volumes:
nimbus-vc-data:
Expand Down
4 changes: 2 additions & 2 deletions nimbus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ services:
networks:
default:
aliases:
- vc
- ${VC_ALIAS}
<<: *logging
entrypoint:
- docker-entrypoint-vc.sh
Expand Down Expand Up @@ -162,7 +162,7 @@ services:
entrypoint:
- keymanager.sh
- /var/lib/nimbus/api-token.txt
- vc
- ${VC_ALIAS}

volumes:
nimbus-consensus-data:
Expand Down
4 changes: 2 additions & 2 deletions prysm-vc-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
networks:
default:
aliases:
- vc
- ${VC_ALIAS}
<<: *logging
entrypoint:
- docker-entrypoint-vc.sh
Expand Down Expand Up @@ -167,7 +167,7 @@ services:
entrypoint:
- keymanager.sh
- /var/lib/prysm/auth-token
- vc
- ${VC_ALIAS}

volumes:
prysmvalidator-data:
Expand Down
4 changes: 2 additions & 2 deletions prysm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ services:
networks:
default:
aliases:
- vc
- ${VC_ALIAS}
<<: *logging
entrypoint:
- docker-entrypoint-vc.sh
Expand Down Expand Up @@ -253,7 +253,7 @@ services:
entrypoint:
- keymanager.sh
- /var/lib/prysm/auth-token
- vc
- ${VC_ALIAS}

volumes:
prysmbeacon-data:
Expand Down
4 changes: 2 additions & 2 deletions teku-vc-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ services:
networks:
default:
aliases:
- vc
- ${VC_ALIAS}
<<: *logging
entrypoint:
- docker-entrypoint-vc.sh
Expand Down Expand Up @@ -111,7 +111,7 @@ services:
entrypoint:
- keymanager.sh
- /var/lib/teku/validator/key-manager/validator-api-bearer
- vc
- ${VC_ALIAS}

volumes:
teku-data:
Expand Down
4 changes: 2 additions & 2 deletions teku.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ services:
networks:
default:
aliases:
- vc
- ${VC_ALIAS}
<<: *logging
entrypoint:
- docker-entrypoint-vc.sh
Expand Down Expand Up @@ -184,7 +184,7 @@ services:
entrypoint:
- keymanager.sh
- /var/lib/teku/validator/key-manager/validator-api-bearer
- vc
- ${VC_ALIAS}

volumes:
tekuconsensus-data:
Expand Down
12 changes: 6 additions & 6 deletions vc-utils/keymanager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1167,9 +1167,9 @@ set -e
if [ "$(id -u)" = '0' ]; then
__token_file=$1
__api_container=$2
case "$__api_container" in
vc) __service=validator;;
*) __service="$__api_container";;
case "$__api_container" in # It's either consensus or some alias for the validator service
consensus) __service=consensus;;
*) __service=validator;;
esac
__api_port=${KEY_API_PORT:-7500}
if [ -z "${TLS:+x}" ]; then
Expand Down Expand Up @@ -1218,9 +1218,9 @@ else
__api_tls=true
fi

case "$__api_container" in
vc) __service=validator;;
*) __service="$__api_container";;
case "$__api_container" in # It's either consensus or some alias for the validator service
consensus) __service=consensus;;
*) __service=validator;;
esac

if echo "$@" | grep -q '.*--debug.*' 2>/dev/null ; then
Expand Down

0 comments on commit 913ebf2

Please sign in to comment.