Skip to content

feat: Add standalone discv5 'bootnode' service - #1460

Open
cskiraly wants to merge 2 commits into
ethpandaops:mainfrom
cskiraly:discv5-bootnode
Open

feat: Add standalone discv5 'bootnode' service#1460
cskiraly wants to merge 2 commits into
ethpandaops:mainfrom
cskiraly:discv5-bootnode

Conversation

@cskiraly

Copy link
Copy Markdown
Contributor

Adds a dedicated discv5 bootnode enabled via additional_services: [bootnode]. It launches one EL node (geth by default, selectable via bootnode_params.el_type) whose sole job is discv5 discovery; with --maxpeers=0 it holds no RLPx peers and is a pure rendezvous. Its enode/ENR are fed into the existing bootnodoor override plumbing, so a single node seeds BOTH the EL and CL discovery overlays (discv5 is application-agnostic). A global bootnode_params.record switch selects the form (enr|enode) handed to EL clients.

Files:

  • src/bootnode/bootnode_launcher.star (new): launches the bootnode, reuses geth.get_config
  • src/participant_network.star: launch when enabled, feed EL+CL overrides
  • src/package_io/input_parser.star: bootnode_params (el_type, el_image, el_extra_params, record)
  • src/package_io/sanity_check.star: allow 'bootnode' service + bootnode_params
  • src/el/el_launcher.star: global bootnode_record (enr|enode) selection

@MysticRyuujin

MysticRyuujin commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Wouldn't the proper way to do this be to run an instance of devp2p discv5 listen instead of a full geth node?

https://github.com/ethereum/go-ethereum/tree/master/cmd/devp2p

Edit: Nevermind, I see it's configurable via bootnode_params.el_type so the scope is totally different

cskiraly and others added 2 commits July 28, 2026 18:31
Adds a dedicated discv5 bootnode enabled via additional_services: [bootnode].
It launches one EL node (geth by default, selectable via bootnode_params.el_type)
whose sole job is discv5 discovery; with --maxpeers=0 it holds no RLPx peers and is
a pure rendezvous. Its enode/ENR are fed into the existing bootnodoor override
plumbing, so a single node seeds BOTH the EL and CL discovery overlays (discv5 is
application-agnostic). A global bootnode_params.record switch selects the form
(enr|enode) handed to EL clients.

Files:
- src/bootnode/bootnode_launcher.star (new): launches the bootnode, reuses geth.get_config
- src/participant_network.star: launch when enabled, feed EL+CL overrides
- src/package_io/input_parser.star: bootnode_params (el_type, el_image, el_extra_params, record)
- src/package_io/sanity_check.star: allow 'bootnode' service + bootnode_params
- src/el/el_launcher.star: global bootnode_record (enr|enode) selection
A pure discv5 bootnode using go-ethereum's devp2p tool (no chain/RLPx/RPC — lighter
than geth --maxpeers=0). Needs an alltools image (ethereum/client-go:alltools-*). Its
ENR has no RPC to query, so it's computed in-container via 'devp2p key to-enr' from a
fixed nodekey + the container IP.

CRITICAL: launched with '--bootnodes ""' to suppress devp2p's DEFAULT public-mainnet
bootnodes — without it, the node joins the public discv5 network, its table fills with
mainnet nodes, and it drowns out the local peers (mesh never forms).

Verified: devp2p bootnode + geth/nethermind/ethrex/erigon = full EL mesh + full CL mesh
+ chain progressing, all seeded by the one bare-ENR devp2p node.
@cskiraly

Copy link
Copy Markdown
Contributor Author

Wouldn't the proper way to do this be to run an instance of devp2p discv5 listen instead of a full geth node?

https://github.com/ethereum/go-ethereum/tree/master/cmd/devp2p

Edit: Nevermind, I see it's configurable via bootnode_params.el_type so the scope is totally different

Indeed, I'm adding the devp2p option now, after having been reminded by you and also by @MariusVanDerWijden that that should work as well. We could also make that the default, but I think keeping the other implementations there as options is a good way to check issues.

@cskiraly cskiraly changed the title Add standalone discv5 'bootnode' service feat: Add standalone discv5 'bootnode' service Jul 28, 2026
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