Skip to content

fix: add HOST_IP support to reth entrypoint#1048

Open
mehmetkr-31 wants to merge 1 commit into
base:mainfrom
mehmetkr-31:fix/reth-host-ip-support
Open

fix: add HOST_IP support to reth entrypoint#1048
mehmetkr-31 wants to merge 1 commit into
base:mainfrom
mehmetkr-31:fix/reth-host-ip-support

Conversation

@mehmetkr-31
Copy link
Copy Markdown

@mehmetkr-31 mehmetkr-31 commented May 10, 2026

Summary

Adds HOST_IP support to the reth execution client entrypoint, completing parity with geth and nethermind.

Problem

The geth-entrypoint has long supported HOST_IP via --nat=extip, and nethermind-entrypoint now supports it via --Network.ExternalIp. The reth-entrypoint is the only execution client that ignores HOST_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_IP to ADDITIONAL_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.rs defines the --nat argument as a NatResolver with supported values: any|none|upnp|publicip|extip:<IP>.
  • crates/net/nat/src/lib.rs implements NatResolver::ExternalIp(IpAddr), which is the enum variant triggered by --nat=extip:<IP>.

References:

Impact

  • Reth operators can now advertise their public IP for better P2P peer discovery.
  • All three supported execution clients (geth, nethermind, reth) behave consistently when HOST_IP is configured.

Checklist

  • Change is minimal and focused.
  • Follows the same pattern used in geth-entrypoint.
  • Flag verified against upstream reth source code.
  • No breaking changes.

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.
@cb-heimdall
Copy link
Copy Markdown
Collaborator

cb-heimdall commented May 10, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants