Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions lighthouse/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ else
__network="--network=${NETWORK}"
fi


# Assume we're not zk-enabled
__engine="--execution-endpoint ${EL_NODE} --execution-jwt /var/lib/lighthouse/beacon/ee-secret/jwtsecret"

case "${NODE_TYPE}" in
archive)
echo "Lighthouse archive node without history pruning"
Expand All @@ -79,6 +75,9 @@ case "${NODE_TYPE}" in
;;
esac

# Assume we're not zk-enabled
__engine="--execution-endpoint ${EL_NODE} --execution-jwt /var/lib/lighthouse/beacon/ee-secret/jwtsecret"

if [[ "${EL_NODE_TYPE}" = "use-cl-zkproofs" ]]; then
if [[ ! "${NETWORK}" = "mainnet" ]]; then
echo "Lighthouse with zkProof verification only works on mainnet, as far as Eth Docker is aware."
Expand Down Expand Up @@ -150,22 +149,24 @@ else
__trace=""
fi

i=0
while true; do
if [ -f /var/lib/lighthouse/beacon/ee-secret/jwtsecret ]; then
break
else
if [[ "$i" -eq 5 ]]; then
echo "Did not see the JWT secret file six times in a row. This is either a bug or a very slow execution layer client startup."
echo "Starting consensus layer client anyway: It may fail."
if [[ "${EL_NODE_TYPE}" != "use-cl-zkproofs" ]]; then
i=0
while true; do
if [ -f /var/lib/lighthouse/beacon/ee-secret/jwtsecret ]; then
break
else
echo "Waiting for JWT secret file to be created by execution layer client"
sleep 5
((++i))
if [[ "$i" -eq 5 ]]; then
echo "Did not see the JWT secret file six times in a row. This is either a bug or a very slow execution layer client startup."
echo "Starting consensus layer client anyway: It may fail."
break
else
echo "Waiting for JWT secret file to be created by execution layer client"
sleep 5
((++i))
fi
fi
fi
done
done
fi

if [[ -f /var/lib/lighthouse/beacon/prune-marker ]]; then
rm -f /var/lib/lighthouse/beacon/prune-marker
Expand Down
Loading