This PR replaces the /dot/kad p2p network protocol used for discovery with the genesis-based equivalent /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/kad.
The genesis-based protocol was used for quite a while to discover substrate-based chains and the spec was not updated to reflect that.
The /dot/kad is no longer included as a fallback protocol (like other protocols do), to facilitate the deprecation of the legacy protocols. This has a few advantages:
Untangle the networks -- the current DHT of polkadot may contain nodes not responding to substrate protocols. They can be network scrapers (like Polkawatch which uses https://github.com/lexnv/subp2p-explorer), or they can be nodes part of an entirely different network.
Reduce the complexity of substrate networking code and improve maintenance -- the code to facilitate fallbacks is not entirely trivial. For example, litep2p has a complete graph architecture to enable any protocols to interact with each other in case of fallbacks.
Deprecation plan:
Include in DHT only nodes that contain genesis-based KAD protocols
Remove /dot/kad support for substrate nodes
Create a followup PR to remove other /dot/.. legacy protocols
Remove /dot/.. legacy protocols support for substrate nodes
This PR replaces the
/dot/kad
p2p network protocol used for discovery with the genesis-based equivalent/91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/kad
.The genesis-based protocol was used for quite a while to discover substrate-based chains and the spec was not updated to reflect that.
The
/dot/kad
is no longer included as a fallback protocol (like other protocols do), to facilitate the deprecation of the legacy protocols. This has a few advantages:Deprecation plan:
/dot/kad
support for substrate nodes/dot/..
legacy protocols/dot/..
legacy protocols support for substrate nodesIn response to: https://github.com/paritytech/polkadot-sdk/pull/3833
cc @dmitry-markin @bkchr @skunert