feat: disable discv4, run discv5 on port 30303 by default#1071
Draft
meyer9 wants to merge 1 commit into
Draft
Conversation
Collaborator
🟡 Heimdall Review Status
|
e02966a to
269d0c0
Compare
DISABLE_DISCV4=true appends --disable-discv4-discovery so callers can opt in without changing the entrypoint. V5_DISCOVERY_PORT now defaults to 30303 (same as devp2p TCP) instead of 9200, improving NAT traversal in environments where only standard p2p ports are allowed outbound. Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
269d0c0 to
64cefb3
Compare
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
DISABLE_DISCV4env var (defaultfalse): when set totrue, appends--disable-discv4-discoveryto reth args so callers can opt in without touching the entrypointV5_DISCOVERY_PORTdefault from9200→30303so discv5 runs on the same port as devp2p TCP by defaultMotivation
The Base Sepolia snapshot job (
admin-base-reth-cbnode-sepolia) runs reth in an environment where outbound UDP to non-standard ports is blocked by NAT/firewall. This results inconnected_peers=0throughout the run — reth can't peer, can't snap-sync, FCUs always returnSyncing, and the safe head never advances.discv4 uses a stateless ping/pong UDP handshake that fails through NAT without hole-punching. discv5 uses a session-based protocol with better NAT traversal characteristics. Running discv5 on port 30303 (the standard devp2p port, already allowed outbound) gives the node the best chance of finding peers in restricted network environments.
Existing deployments are unaffected:
DISABLE_DISCV4defaults tofalseandV5_DISCOVERY_PORTis still overridable per-deployment.