Skip to content

Commit

Permalink
Fetch keys from web3signer on startup for Prysm, Teku, Lodestar
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed Aug 13, 2023
1 parent d3b5ec7 commit a2417d6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions lodestar-vc-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ services:
- VC_EXTRAS=${VC_EXTRAS:-}
- GRAFFITI=${GRAFFITI:-}
- DEFAULT_GRAFFITI=${DEFAULT_GRAFFITI:-false}
- WEB3SIGNER=${WEB3SIGNER}
volumes:
- lsvalidator-data:/var/lib/lodestar/validators
- /etc/localtime:/etc/localtime:ro
Expand Down
1 change: 1 addition & 0 deletions lodestar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ services:
- VC_EXTRAS=${VC_EXTRAS:-}
- GRAFFITI=${GRAFFITI:-}
- DEFAULT_GRAFFITI=${DEFAULT_GRAFFITI:-false}
- WEB3SIGNER=${WEB3SIGNER}
volumes:
- lsvalidator-data:/var/lib/lodestar/validators
- /etc/localtime:/etc/localtime:ro
Expand Down
11 changes: 9 additions & 2 deletions lodestar/docker-entrypoint-vc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,19 @@ else
__doppel=""
fi

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

if [ "${DEFAULT_GRAFFITI}" = "true" ]; then
# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__mev_boost} ${__beacon_stats} ${__doppel} ${VC_EXTRAS}
exec "$@" ${__mev_boost} ${__beacon_stats} ${__doppel} ${__w3s_url} ${VC_EXTRAS}
else
# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" "--graffiti" "${GRAFFITI}" ${__mev_boost} ${__beacon_stats} ${__doppel} ${VC_EXTRAS}
exec "$@" "--graffiti" "${GRAFFITI}" ${__mev_boost} ${__beacon_stats} ${__doppel} ${__w3s_url} ${VC_EXTRAS}
fi
2 changes: 1 addition & 1 deletion prysm/docker-entrypoint-vc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fi

# Web3signer URL
if [ "${WEB3SIGNER}" = "true" ]; then
__w3s_url="--validators-external-signer-url http://web3signer:9000"
__w3s_url="--validators-external-signer-url http://web3signer:9000 --validators-external-signer-public-keys http://web3signer:9000/api/v1/eth2/publicKeys"
else
__w3s_url=""
fi
Expand Down
2 changes: 1 addition & 1 deletion teku/docker-entrypoint-vc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fi

# Web3signer URL
if [ "${WEB3SIGNER}" = "true" ]; then
__w3s_url="--validators-external-signer-url http://web3signer:9000"
__w3s_url="--validators-external-signer-url http://web3signer:9000 --validators-external-signer-public-keys external-signer"
else
__w3s_url=""
fi
Expand Down
2 changes: 1 addition & 1 deletion teku/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fi

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

0 comments on commit a2417d6

Please sign in to comment.