Skip to content

Commit

Permalink
Siren fixes (#1978)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
pietjepuk2 and Pietje Puk authored Nov 4, 2024
1 parent f494142 commit c92a84c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions siren.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions siren/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c92a84c

Please sign in to comment.