diff --git a/reth.yml b/reth.yml index c91d8e71..ac8f213b 100644 --- a/reth.yml +++ b/reth.yml @@ -30,6 +30,8 @@ services: - NETWORK=${NETWORK} - STATIC_DIR=${ANCIENT_DIR} - COMPOSE_FILE=${COMPOSE_FILE} + - IPV6=${IPV6:-false} + - EL_P2P_PORT_2=${EL_P2P_PORT_2:-30304} # Make this RUST_LOG=${LOG_LEVEL:-info},engine=trace when requiring deep debug # RPC debug can be done with jsonrpsee=trace or jsonrpsee::target=trace for a specific target # - RUST_LOG=${LOG_LEVEL:-info},engine=trace diff --git a/reth/docker-entrypoint.sh b/reth/docker-entrypoint.sh index e2f549be..8b792a74 100755 --- a/reth/docker-entrypoint.sh +++ b/reth/docker-entrypoint.sh @@ -177,6 +177,14 @@ else __trace="" fi +# IPV6 +if [[ "${IPV6:-false}" = "true" ]]; then + echo "Configuring Reth's discv5 for IPv6 advertisements" + __ipv6="--addr :: --discovery.v5.addr 0.0.0.0 --discovery.v5.port.ipv6 ${EL_P2P_PORT_2}" +else + __ipv6="" +fi + if [[ -f /var/lib/reth/prune-marker ]]; then rm -f /var/lib/reth/prune-marker if [[ "${NODE_TYPE}" = "archive" ]]; then @@ -189,5 +197,5 @@ if [[ -f /var/lib/reth/prune-marker ]]; then else # Word splitting is desired for the command line parameters # shellcheck disable=SC2086 - exec "$@" ${__network} ${__verbosity} ${__static} ${__prune} ${__trace} ${EL_EXTRAS} + exec "$@" ${__network} ${__verbosity} ${__static} ${__prune} ${__trace} ${__ipv6} ${EL_EXTRAS} fi