Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into cnupy/add_charon_cl_e…
Browse files Browse the repository at this point in the history
…nv_var
  • Loading branch information
cnupy committed Oct 4, 2024
2 parents 43aaab9 + 4f6d1f2 commit e7a0e65
Show file tree
Hide file tree
Showing 17 changed files with 85 additions and 13 deletions.
1 change: 1 addition & 0 deletions besu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ services:
- EL_EXTRAS=${EL_EXTRAS:-}
- ARCHIVE_NODE=${ARCHIVE_NODE:-}
- NETWORK=${NETWORK}
- IPV6=${IPV6:-false}
volumes:
- besu-el-data:/var/lib/besu
- besu-eth1-data:/var/lib/besu-og
Expand Down
10 changes: 9 additions & 1 deletion besu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ else
__datadir="--data-path /var/lib/besu"
fi

# DiscV5 for IPV6
if [ "${IPV6:-false}" = "true" ]; then
echo "Configuring Besu for discv5 for IPv6 advertisements"
__ipv6="--Xv5-discovery-enabled"
else
__ipv6=""
fi

if [ -f /var/lib/besu/prune-marker ]; then
rm -f /var/lib/besu/prune-marker
if [ "${ARCHIVE_NODE}" = "true" ]; then
Expand All @@ -84,5 +92,5 @@ if [ -f /var/lib/besu/prune-marker ]; then
else
# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__datadir} ${__network} ${__prune} ${__spec} ${EL_EXTRAS}
exec "$@" ${__datadir} ${__network} ${__ipv6} ${__prune} ${__spec} ${EL_EXTRAS}
fi
4 changes: 3 additions & 1 deletion default.env
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ CL_P2P_PORT=9000
PRYSM_PORT=9000
PRYSM_UDP_PORT=9000
CL_QUIC_PORT=9001
# Some clients need a separate port for IPv6
CL_IPV6_P2P_PORT=9090
# Local grafana dashboard port. Do not expose to Internet, it is insecure http
GRAFANA_PORT=3000
# Local Siren UI port
Expand Down Expand Up @@ -334,4 +336,4 @@ DDNS_TAG=v2
NODE_EXPORTER_IGNORE_MOUNT_REGEX='^/(dev|proc|sys|run|var/lib/docker/.+)($|/)'

# Used by ethd update - please do not adjust
ENV_VERSION=16
ENV_VERSION=17
4 changes: 3 additions & 1 deletion ethd
Original file line number Diff line number Diff line change
Expand Up @@ -795,9 +795,11 @@ __delete_erigon() {
# Check Erigon version, only continue if v3
__var="ERIGON_DOCKER_TAG"
__value=$(sed -n -e "s/^${__var}=\(.*\)/\1/p" "${__env_file}" || true)
__var="ERIGON_DOCKER_REPO"
__repo=$(sed -n -e "s/^${__var}=\(.*\)/\1/p" "${__env_file}" || true)
# I do mean to match literally
# shellcheck disable=SC2076
if [[ ! ("${__value}" =~ "v3" || "${__value}" = "latest" || "${__value}" = "main-latest") ]]; then
if [[ ! ("${__value}" =~ "v3" || ( "${__value}" = "latest" && "${__repo}" =~ "thorax" ) || "${__value}" = "main-latest") ]]; then
return 0
fi

Expand Down
8 changes: 8 additions & 0 deletions grandine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ if [ "${IPV6}" = "true" ]; then
echo "Configuring Grandine to listen on IPv6 ports"
__ipv6="--listen-address-ipv6 :: --libp2p-port-ipv6 ${CL_P2P_PORT:-9000} --discovery-port-ipv6 ${CL_P2P_PORT:-9000} \
--quic-port-ipv6 ${CL_QUIC_PORT:-9001}"
# ENR discovery on v6 is not yet working, likely too few peers. Manual for now
__ipv6_pattern="^[0-9A-Fa-f]{1,4}:" # Sufficient to check the start
set +e
__public_v6=$(curl -s -6 ifconfig.me)
set -e
if [[ "$__public_v6" =~ $__ipv6_pattern ]]; then
__ipv6+=" --enr-address-ipv6 ${__public_v6} --enr-tcp-port-ipv6 ${CL_P2P_PORT:-9000} --enr-udp-port-ipv6 ${CL_P2P_PORT:-9000}"
fi
else
__ipv6=""
fi
Expand Down
3 changes: 3 additions & 0 deletions lighthouse-cl-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ services:
- 0.0.0.0
- --http-port
- ${CL_REST_PORT:-5052}
- --http-allow-origin=*
- --listen-address
- 0.0.0.0
- --port
- ${CL_P2P_PORT:-9000}
- --quic-port
Expand Down
10 changes: 9 additions & 1 deletion lighthouse/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ fi

if [ "${IPV6}" = "true" ]; then
echo "Configuring Lighthouse to listen on IPv6 ports"
__ipv6="--listen-address :: --port6 ${CL_P2P_PORT:-9000} --quic-port6 ${CL_QUIC_PORT:-9001}"
__ipv6="--listen-address :: --port6 ${CL_P2P_PORT:-9000} --enr-udp6-port ${CL_P2P_PORT:-9000} --quic-port6 ${CL_QUIC_PORT:-9001}"
# ENR discovery on v6 is not yet working, likely too few peers. Manual for now
__ipv6_pattern="^[0-9A-Fa-f]{1,4}:" # Sufficient to check the start
set +e
__public_v6=$(wget -6 -q -O- ifconfig.me)
set -e
if [[ "$__public_v6" =~ $__ipv6_pattern ]]; then
__ipv6+=" --enr-address ${__public_v6}"
fi
else
__ipv6=""
fi
Expand Down
4 changes: 3 additions & 1 deletion lodestar-cl-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ services:
- ARCHIVE_NODE=${ARCHIVE_NODE:-}
- NETWORK=${NETWORK}
- IPV6=${IPV6:-false}
- CL_P2P_PORT=${CL_P2P_PORT:-9000}
- CL_IPV6_P2P_PORT=${CL_IPV6_P2P_PORT:-9090}
- NODE_OPTIONS=${LODESTAR_HEAP:---max-old-space-size=8192}
ports:
- ${HOST_IP:-}:${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/tcp
- ${HOST_IP:-}:${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/udp
- ${HOST_IP:-}:${CL_IPV6_P2P_PORT:-9090}:${CL_IPV6_P2P_PORT:-9090}/tcp
- ${HOST_IP:-}:${CL_IPV6_P2P_PORT:-9090}:${CL_IPV6_P2P_PORT:-9090}/udp
networks:
default:
aliases:
Expand Down
4 changes: 3 additions & 1 deletion lodestar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ services:
- ARCHIVE_NODE=${ARCHIVE_NODE:-}
- NETWORK=${NETWORK}
- IPV6=${IPV6:-false}
- CL_P2P_PORT=${CL_P2P_PORT:-9000}
- CL_IPV6_P2P_PORT=${CL_IPV6_P2P_PORT:-9090}
- NODE_OPTIONS=${LODESTAR_HEAP:---max-old-space-size=8192}
ports:
- ${HOST_IP:-}:${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/tcp
- ${HOST_IP:-}:${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/udp
- ${HOST_IP:-}:${CL_IPV6_P2P_PORT:-9090}:${CL_IPV6_P2P_PORT:-9090}/tcp
- ${HOST_IP:-}:${CL_IPV6_P2P_PORT:-9090}:${CL_IPV6_P2P_PORT:-9090}/udp
networks:
default:
aliases:
Expand Down
3 changes: 2 additions & 1 deletion lodestar/Dockerfile.binary
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ FROM ${DOCKER_REPO}:${DOCKER_TAG}
ARG BUILD_TARGET
ARG SRC_REPO

RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates tzdata bash gosu git && apt-get clean && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates tzdata bash gosu git wget \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

ARG USER=lsconsensus
ARG UID=10002
Expand Down
3 changes: 2 additions & 1 deletion lodestar/Dockerfile.source
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ RUN bash -c "cd .. && rm -rf app && git clone ${SRC_REPO} app && cd app && git c

FROM node:22.4-slim

RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates tzdata bash gosu git && apt-get clean && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates tzdata bash gosu git wget \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

ARG USER=lsconsensus
ARG UID=10002
Expand Down
10 changes: 9 additions & 1 deletion lodestar/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,15 @@ fi

if [ "${IPV6}" = "true" ]; then
echo "Configuring Lodestar to listen on IPv6 ports"
__ipv6="--listenAddress6 :: --port6 ${CL_P2P_PORT:-9000}"
__ipv6="--listenAddress 0.0.0.0 --listenAddress6 :: --port6 ${CL_IPV6_P2P_PORT:-9090}"
# ENR discovery on v6 is not yet working, likely too few peers. Manual for now
__ipv6_pattern="^[0-9A-Fa-f]{1,4}:" # Sufficient to check the start
set +e
__public_v6=$(wget -6 -q -O- ifconfig.me)
set -e
if [[ "$__public_v6" =~ $__ipv6_pattern ]]; then
__ipv6+=" --enr.ip6 ${__public_v6}"
fi
else
__ipv6=""
fi
Expand Down
4 changes: 4 additions & 0 deletions teku-allin1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,13 @@ services:
- EMBEDDED_VC=true
- NETWORK=${NETWORK}
- ENABLE_DIST_ATTESTATION_AGGR=${ENABLE_DIST_ATTESTATION_AGGR:-false}
- IPV6=${IPV6:-false}
- CL_IPV6_P2P_PORT=${CL_IPV6_P2P_PORT:-9090}
ports:
- ${HOST_IP:-}:${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/tcp
- ${HOST_IP:-}:${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/udp
- ${HOST_IP:-}:${CL_IPV6_P2P_PORT:-9090}:${CL_IPV6_P2P_PORT:-9090}/tcp
- ${HOST_IP:-}:${CL_IPV6_P2P_PORT:-9090}:${CL_IPV6_P2P_PORT:-9090}/udp
networks:
default:
aliases:
Expand Down
4 changes: 3 additions & 1 deletion teku-cl-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ services:
- WEB3SIGNER=false
- NETWORK=${NETWORK}
- IPV6=${IPV6:-false}
- CL_P2P_PORT=${CL_P2P_PORT:-9000}
- CL_IPV6_P2P_PORT=${CL_IPV6_P2P_PORT:-9090}
ports:
- ${HOST_IP:-}:${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/tcp
- ${HOST_IP:-}:${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/udp
- ${HOST_IP:-}:${CL_IPV6_P2P_PORT:-9090}:${CL_IPV6_P2P_PORT:-9090}/tcp
- ${HOST_IP:-}:${CL_IPV6_P2P_PORT:-9090}:${CL_IPV6_P2P_PORT:-9090}/udp
networks:
default:
aliases:
Expand Down
4 changes: 3 additions & 1 deletion teku.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ services:
- EMBEDDED_VC=false
- NETWORK=${NETWORK}
- IPV6=${IPV6:-false}
- CL_P2P_PORT=${CL_P2P_PORT:-9000}
- CL_IPV6_P2P_PORT=${CL_IPV6_P2P_PORT:-9090}
ports:
- ${HOST_IP:-}:${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/tcp
- ${HOST_IP:-}:${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/udp
- ${HOST_IP:-}:${CL_IPV6_P2P_PORT:-9090}:${CL_IPV6_P2P_PORT:-9090}/tcp
- ${HOST_IP:-}:${CL_IPV6_P2P_PORT:-9090}:${CL_IPV6_P2P_PORT:-9090}/udp
networks:
default:
aliases:
Expand Down
20 changes: 19 additions & 1 deletion teku/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,25 @@ fi

if [ "${IPV6}" = "true" ]; then
echo "Configuring Teku to listen on IPv6 ports"
__ipv6="--p2p-interface 0.0.0.0,:: --p2p-port-ipv6 ${CL_P2P_PORT:-9000}"
__ipv6="--p2p-interface 0.0.0.0,:: --p2p-port-ipv6 ${CL_IPV6_P2P_PORT:-9090}"
# ENR discovery on v6 is not yet working, likely too few peers. Manual for now
__ipv4_pattern="^([0-9]{1,3}\.){3}[0-9]{1,3}$"
__ipv6_pattern="^[0-9A-Fa-f]{1,4}:" # Sufficient to check the start
set +e
__public_v4=$(curl -s -4 ifconfig.me)
__public_v6=$(curl -s -6 ifconfig.me)
set -e
__valid_v4=0
if [[ "$__public_v4" =~ $__ipv4_pattern ]]; then
__valid_v4=1
fi
if [[ "$__public_v6" =~ $__ipv6_pattern ]]; then
if [ "${__valid_v4}" -eq 1 ]; then
__ipv6+=" --p2p-advertised-ips ${__public_v4},${__public_v6}"
else
__ipv6+=" --p2p-advertised-ip ${__public_v6}"
fi
fi
else
__ipv6=""
fi
Expand Down
2 changes: 1 addition & 1 deletion traefik-cf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ services:
restart: "unless-stopped"
environment:
- LOG_LEVEL=${LOG_LEVEL:-info}
- 'CONFIG={"settings": [{"provider": "cloudflare", "zone_identifier": "${CF_ZONE_ID}", "domain": "${DOMAIN}", "host": "${DDNS_SUBDOMAIN}", "ttl": 1, "token": "${CF_DNS_API_TOKEN}", "proxied": ${DDNS_PROXY}, "ip_version": "ipv4"}]}'
- 'CONFIG={"settings": [{"provider": "cloudflare", "zone_identifier": "${CF_ZONE_ID}", "domain": "${DDNS_SUBDOMAIN}.${DOMAIN}", "ttl": 1, "token": "${CF_DNS_API_TOKEN}", "proxied": ${DDNS_PROXY}, "ip_version": "ipv4"}]}'
volumes:
- /etc/localtime:/etc/localtime:ro
<<: *logging
Expand Down

0 comments on commit e7a0e65

Please sign in to comment.