diff --git a/default.env b/default.env index 7bff33df..b476f727 100644 --- a/default.env +++ b/default.env @@ -165,9 +165,8 @@ JWT_SECRET= DISTRIBUTED= # Authenticated execution client endpoint. This default uses the execution node container. EL_NODE=http://execution:8551 -# Consensus client address. This could be comma-separated for Lighthouse or Teku VC clients, with failover, +# Consensus client address. This could be comma-separated for Lighthouse, Nimbus or Teku VC clients, with failover, # or could just be a remote consensus client URL for "validator only" setups. -# For Nimbus VC client, put the first beacon node here, and use VC_EXTRAS for additional. CL_NODE=http://consensus:5052 # MEV-boost address. This would only be changed for Vouch setups MEV_NODE=http://mev-boost:18550 diff --git a/nimbus-vc-only.yml b/nimbus-vc-only.yml index 89440d5e..5b7f950a 100644 --- a/nimbus-vc-only.yml +++ b/nimbus-vc-only.yml @@ -32,6 +32,7 @@ services: - jwtsecret:/var/lib/nimbus/ee-secret environment: - MEV_BOOST=${MEV_BOOST} + - CL_NODE=${CL_NODE} - DOPPELGANGER=${DOPPELGANGER} - LOG_LEVEL=${LOG_LEVEL} - VC_EXTRAS=${VC_EXTRAS:-} @@ -49,7 +50,6 @@ services: - /usr/local/bin/nimbus_validator_client - --data-dir=/var/lib/nimbus - --non-interactive - - --beacon-node=${CL_NODE} - --metrics - --metrics-port=8009 - --metrics-address=0.0.0.0 diff --git a/nimbus/docker-entrypoint-vc.sh b/nimbus/docker-entrypoint-vc.sh index 5be960b4..dcc06e89 100755 --- a/nimbus/docker-entrypoint-vc.sh +++ b/nimbus/docker-entrypoint-vc.sh @@ -32,6 +32,13 @@ else __mev_boost="" fi +# accomodate comma separated list of consensus nodes +__nodes=$(echo "$CL_NODE" | tr ',' ' ') +__beacon_nodes=() +for __node in $__nodes; do + __beacon_nodes+=("--beacon-node=$__node") +done + __log_level="--log-level=${LOG_LEVEL^^}" # Web3signer URL @@ -60,9 +67,9 @@ fi if [ "${DEFAULT_GRAFFITI}" = "true" ]; then # Word splitting is desired for the command line parameters # shellcheck disable=SC2086 - exec "$@" ${__w3s_url} ${__log_level} ${__doppel} ${__mev_boost} ${__att_aggr} ${VC_EXTRAS} + exec "$@" "${__beacon_nodes[@]}" ${__w3s_url} ${__log_level} ${__doppel} ${__mev_boost} ${__att_aggr} ${VC_EXTRAS} else # Word splitting is desired for the command line parameters # shellcheck disable=SC2086 - exec "$@" ${__w3s_url} "--graffiti=${GRAFFITI}" ${__log_level} ${__doppel} ${__mev_boost} ${__att_aggr} ${VC_EXTRAS} + exec "$@" "${__beacon_nodes[@]}" ${__w3s_url} "--graffiti=${GRAFFITI}" ${__log_level} ${__doppel} ${__mev_boost} ${__att_aggr} ${VC_EXTRAS} fi