Skip to content
Open
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
6 changes: 3 additions & 3 deletions op-node-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ get_public_ip() {
# Iterate through the providers until an IP is found or the list is exhausted
for provider in "${PROVIDERS[@]}"; do
local IP
IP=$(curl -s "$provider")
IP=$(curl -s --max-time 10 --connect-timeout 5 "$provider")
# Check if IP contains a valid format (simple regex for an IPv4 address)
if [[ $IP =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "$IP"
Expand All @@ -28,7 +28,7 @@ if [[ -z "$OP_NODE_NETWORK" && -z "$OP_NODE_ROLLUP_CONFIG" ]]; then
fi

# wait until local execution client comes up (authed so will return 401 without token)
until [ "$(curl -s -w '%{http_code}' -o /dev/null "${OP_NODE_L2_ENGINE_RPC/ws/http}")" -eq 401 ]; do
until [ "$(curl -s --max-time 10 --connect-timeout 5 -w '%{http_code}' -o /dev/null "${OP_NODE_L2_ENGINE_RPC/ws/http}")" -eq 401 ]; do
echo "waiting for execution client to be ready"
sleep 5
done
Expand All @@ -44,4 +44,4 @@ export OP_NODE_P2P_ADVERTISE_IP=$PUBLIC_IP

echo "$OP_NODE_L2_ENGINE_AUTH_RAW" > "$OP_NODE_L2_ENGINE_AUTH"

exec ./op-node
exec ./op-node