feat: Add standalone discv5 'bootnode' service - #1460
Conversation
|
Wouldn't the proper way to do this be to run an instance of https://github.com/ethereum/go-ethereum/tree/master/cmd/devp2p Edit: Nevermind, I see it's configurable via |
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.
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. |
af13953 to
e767f2e
Compare
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: