Skip to content

Commit

Permalink
Revert "Remove Teku web3signer wait loop (eth-educators#1504)"
Browse files Browse the repository at this point in the history
This reverts commit 5535b96.
  • Loading branch information
yorickdowne committed Sep 14, 2023
1 parent 1d20d0e commit be3674b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
3 changes: 1 addition & 2 deletions ethd
Original file line number Diff line number Diff line change
Expand Up @@ -2310,8 +2310,7 @@ set_value_in_env() {
if ! grep -qF "${var}" "${ENV_FILE}" 2>/dev/null ; then
echo "${var}=${!var}" >> "${ENV_FILE}"
else
# Handle & in GRAFFITI gracefully
sed -i'.original' -e "s~^\(${var}\s*=\s*\).*\$~\1${!var//&/\\&}~" "${ENV_FILE}"
sed -i'.original' -e "s~^\(${var}\s*=\s*\).*$~\1${!var}~" "${ENV_FILE}"
fi
fi
}
Expand Down
9 changes: 9 additions & 0 deletions teku/docker-entrypoint-vc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ fi
# Web3signer URL
if [ "${WEB3SIGNER}" = "true" ]; then
__w3s_url="--validators-external-signer-url http://web3signer:9000 --validators-external-signer-public-keys external-signer"
while true; do
if curl -s -m 5 http://web3signer:9000 &> /dev/null; then
echo "web3signer is up, starting Teku"
break
else
echo "Waiting for web3signer to be reachable..."
sleep 5
fi
done
else
__w3s_url=""
fi
Expand Down
9 changes: 9 additions & 0 deletions teku/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ fi
# Web3signer URL
if [[ "${EMBEDDED_VC}" = "true" && "${WEB3SIGNER}" = "true" ]]; then
__w3s_url="--validators-external-signer-url http://web3signer:9000 --validators-external-signer-public-keys external-signer"
while true; do
if curl -s -m 5 http://web3signer:9000 &> /dev/null; then
echo "web3signer is up, starting Teku"
break
else
echo "Waiting for web3signer to be reachable..."
sleep 5
fi
done
else
__w3s_url=""
fi
Expand Down

0 comments on commit be3674b

Please sign in to comment.