Skip to content

Commit

Permalink
Support new web3-signer-url in Nimbus (eth-educators#1510)
Browse files Browse the repository at this point in the history
* Fix Prysm genesis

* Still default to Goerli

* Support new web3-signer-url in Nimbus
  • Loading branch information
yorickdowne authored Sep 12, 2023
1 parent 2cc5655 commit f91add8
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions lodestar-vc-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ services:
- ${LOG_LEVEL}
- --network
- ${NETWORK}
- --force

validator-keys:
profiles: ["tools"]
Expand Down
1 change: 1 addition & 0 deletions lodestar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ services:
- ${LOG_LEVEL}
- --network
- ${NETWORK}
- --force

validator-keys:
profiles: ["tools"]
Expand Down
2 changes: 2 additions & 0 deletions nimbus-cl-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ services:
- ARCHIVE_NODE=${ARCHIVE_NODE:-}
- GRAFFITI=${GRAFFITI:-}
- DEFAULT_GRAFFITI=true
- WEB3SIGNER=false
- EMBEDDED_VC=false
ports:
- ${HOST_IP:-}${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/tcp
- ${HOST_IP:-}${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/udp
Expand Down
1 change: 1 addition & 0 deletions nimbus-vc-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ services:
- VC_EXTRAS=${VC_EXTRAS:-}
- GRAFFITI=${GRAFFITI:-}
- DEFAULT_GRAFFITI=${DEFAULT_GRAFFITI:-false}
- WEB3SIGNER=${WEB3SIGNER:-false}
networks:
default:
aliases:
Expand Down
2 changes: 2 additions & 0 deletions nimbus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ services:
- ARCHIVE_NODE=${ARCHIVE_NODE:-}
- GRAFFITI=${GRAFFITI:-}
- DEFAULT_GRAFFITI=${DEFAULT_GRAFFITI:-false}
- WEB3SIGNER=${WEB3SIGNER:-false}
- EMBEDDED_VC=true
ports:
- ${HOST_IP:-}${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/tcp
- ${HOST_IP:-}${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/udp
Expand Down
11 changes: 9 additions & 2 deletions nimbus/docker-entrypoint-vc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,19 @@ fi

__log_level="--log-level=${LOG_LEVEL^^}"

# Web3signer URL
if [ "${WEB3SIGNER}" = "true" ]; then
__w3s_url="--web3-signer-url=http://web3signer:9000"
else
__w3s_url=""
fi

if [ "${DEFAULT_GRAFFITI}" = "true" ]; then
# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__log_level} ${__doppel} ${__mev_boost} ${VC_EXTRAS}
exec "$@" ${__w3s_url} ${__log_level} ${__doppel} ${__mev_boost} ${VC_EXTRAS}
else
# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" "--graffiti=${GRAFFITI}" ${__log_level} ${__doppel} ${__mev_boost} ${VC_EXTRAS}
exec "$@" ${__w3s_url} "--graffiti=${GRAFFITI}" ${__log_level} ${__doppel} ${__mev_boost} ${VC_EXTRAS}
fi
11 changes: 9 additions & 2 deletions nimbus/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,19 @@ else
__prune="--history=prune"
fi

# Web3signer URL
if [[ "${EMBEDDED_VC}" = "true" && "${WEB3SIGNER}" = "true" ]]; then
__w3s_url="--web3-signer-url=http://web3signer:9000"
else
__w3s_url=""
fi

if [ "${DEFAULT_GRAFFITI}" = "true" ]; then
# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__network} ${__mev_boost} ${__log_level} ${__doppel} ${__prune} ${CL_EXTRAS} ${VC_EXTRAS}
exec "$@" ${__network} ${__w3s_url} ${__mev_boost} ${__log_level} ${__doppel} ${__prune} ${CL_EXTRAS} ${VC_EXTRAS}
else
# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__network} "--graffiti=${GRAFFITI}" ${__mev_boost} ${__log_level} ${__doppel} ${__prune} ${CL_EXTRAS} ${VC_EXTRAS}
exec "$@" ${__network} ${__w3s_url} "--graffiti=${GRAFFITI}" ${__mev_boost} ${__log_level} ${__doppel} ${__prune} ${CL_EXTRAS} ${VC_EXTRAS}
fi

0 comments on commit f91add8

Please sign in to comment.