From c92a84cc0e0214efe44932830cb40ff100b18bff Mon Sep 17 00:00:00 2001 From: pietjepuk2 <75548277+pietjepuk2@users.noreply.github.com> Date: Mon, 4 Nov 2024 11:30:00 +0100 Subject: [PATCH] Siren fixes (#1978) * Siren: Fix when CL_NODE is comma-separated list Siren would use the BEACON_URL as-is to connect to, which works for the Lighthouse VC but not for Siren. If it is a comma-separated list of BNs, we just pick the first one to connect to. * Siren: Fix connecting to BN/VC For some reason the BN and VC urls resolve to ipv6 addresses in the Siren container, which is not supported by those endpoints. We therefore force Siren to prefer ipv4 using an env variable for NodeJS applications. Note that this does not seem to be related to IPV6=true/false in .env . --------- Co-authored-by: Pietje Puk --- siren.yml | 1 + siren/docker-entrypoint.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/siren.yml b/siren.yml index 90724f37..0ff59a8b 100644 --- a/siren.yml +++ b/siren.yml @@ -22,6 +22,7 @@ services: - SSL_ENABLED=true - DEBUG=false - SIREN_PORT=${SIREN_PORT} + - NODE_OPTIONS="--dns-result-order=ipv4first" <<: *logging entrypoint: - docker-entrypoint.sh diff --git a/siren/docker-entrypoint.sh b/siren/docker-entrypoint.sh index cc775d8c..ad9f9297 100755 --- a/siren/docker-entrypoint.sh +++ b/siren/docker-entrypoint.sh @@ -10,5 +10,8 @@ fi API_TOKEN=$(cat /var/lib/lighthouse/validators/api-token.txt) export API_TOKEN +# In case there are multiple consensus nodes, use the first one +export BEACON_URL=${BEACON_URL%%,*} + echo "Log into Siren at https://my-node-ip/${SIREN_PORT} with password ${SESSION_PASSWORD}" exec /app/docker-assets/docker-entrypoint.sh