w3f / polkadot-spec

The Polkadot Protocol Specification
https://spec.polkadot.network
Creative Commons Attribution Share Alike 4.0 International
180 stars 70 forks source link

net: Use genesis-based kad protocol for discovery and deprecate /sup/kad #721

Closed lexnv closed 3 months ago

lexnv commented 4 months ago

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:

  1. Include in DHT only nodes that contain genesis-based KAD protocols
  2. Remove /dot/kad support for substrate nodes
  3. Create a followup PR to remove other /dot/.. legacy protocols
  4. Remove /dot/.. legacy protocols support for substrate nodes
  5. Clean-up fallback support in substrate

In response to: https://github.com/paritytech/polkadot-sdk/pull/3833

cc @dmitry-markin @bkchr @skunert

bkchr commented 3 months ago

@Noc2 can you merge this?

Noc2 commented 3 months ago

Done. Thanks for pinging me.