fix: add HOST_IP support to reth entrypoint#1048
Open
mehmetkr-31 wants to merge 1 commit into
Open
Conversation
The geth entrypoint already supports HOST_IP via --nat=extip, and the nethermind entrypoint was recently updated to use --Network.ExternalIp. However, the reth entrypoint ignores HOST_IP entirely, leaving reth operators with poor peer discovery when running behind NAT. Add the same conditional logic to pass --nat=extip when HOST_IP is set, completing parity across all three supported execution clients.
Collaborator
🟡 Heimdall Review Status
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
HOST_IPsupport to the reth execution client entrypoint, completing parity with geth and nethermind.Problem
The
geth-entrypointhas long supportedHOST_IPvia--nat=extip, andnethermind-entrypointnow supports it via--Network.ExternalIp. Thereth-entrypointis the only execution client that ignoresHOST_IP, causing reth operators running behind NAT to have degraded peer discovery and lower peer counts.Solution
Add the same conditional check (
if [ "${HOST_IP:+x}" = x ]) to the reth entrypoint and append--nat=extip:$HOST_IPtoADDITIONAL_ARGS.Verification
The
--nat=extip:<IP>flag is a valid reth CLI argument. Verified against the upstream reth source code:crates/node/core/src/args/network.rsdefines the--natargument as aNatResolverwith supported values:any|none|upnp|publicip|extip:<IP>.crates/net/nat/src/lib.rsimplementsNatResolver::ExternalIp(IpAddr), which is the enum variant triggered by--nat=extip:<IP>.References:
Impact
HOST_IPis configured.Checklist
geth-entrypoint.