Skip to content

feat(net): accept discv5 ENR bootnodes via CLI#26448

Open
MysticRyuujin wants to merge 1 commit into
paradigmxyz:mainfrom
MysticRyuujin:feat/enr-bootnodes-cli
Open

feat(net): accept discv5 ENR bootnodes via CLI#26448
MysticRyuujin wants to merge 1 commit into
paradigmxyz:mainfrom
MysticRyuujin:feat/enr-bootnodes-cli

Conversation

@MysticRyuujin

@MysticRyuujin MysticRyuujin commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

--bootnodes and --trusted-peers reject enr: records:

error: invalid value 'enr:-KO4QO5...' for '--bootnodes <BOOTNODES>': Failed to parse url: no host specified

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_str to decode enr: records via the existing TryFrom<&Enr> for NodeRecord; the parsed record flows through the existing bootnode wiring into both discv4 and discv5.

  • A discovery-only ENR (no tcp key) falls back to the udp port for the RLPx dial guess, same as Discv5::try_into_reachable — otherwise a tcp-less ENR in --trusted-peers would be redialed at port 0 forever.
  • Without the secp256k1 feature 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).
  • CLI help text and generated docs updated.

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 signed BootNode::Enr/add_enr seeding path remains unreachable from the CLI.

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant