feat(net): accept discv5 ENR bootnodes via CLI#26448
Open
MysticRyuujin wants to merge 1 commit into
Open
Conversation
MysticRyuujin
requested review from
Rjected,
gakonst,
klkvr and
mattsse
as code owners
July 20, 2026 14:41
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.
Description
--bootnodesand--trusted-peersrejectenr:records:This makes it impossible to bootstrap from a discovery bootnode that publishes an ENR (e.g. ethpandaops/bootnodoor on kurtosis devnets), even though the discv5 stack supports ENR boot nodes internally.
This teaches
TrustedPeer::from_strto decodeenr:records via the existingTryFrom<&Enr> for NodeRecord; the parsed record flows through the existing bootnode wiring into both discv4 and discv5.tcpkey) falls back to the udp port for the RLPx dial guess, same asDiscv5::try_into_reachable— otherwise a tcp-less ENR in--trusted-peerswould be redialed at port 0 forever.secp256k1feature the parser now returns a clear error instead of the misleading URL error (library builds only; the feature is always on in the reth binary).Verified on a kurtosis devnet: reth bootstraps and meshes with nethermind and besu through a bootnodoor discv5 ENR (together with #26449).
Possible follow-up: the ENR is down-converted to an unsigned
NodeRecord(same treatment as enode URLs), so the signedBootNode::Enr/add_enrseeding path remains unreachable from the CLI.