paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.63k stars 574 forks source link

Get rid of `libp2p` dependency in `sc-authority-discovery` #4859

Open dmitry-markin opened 2 weeks ago

dmitry-markin commented 2 weeks ago

libp2p types in authority-discovery should be replaced with network backend agnostic types from sc-network-types.

gotnoshoeson commented 2 weeks ago

I'll have a go at this one

gotnoshoeson commented 1 week ago

So I can remove the libp2p dependency but I'm not quite sure how/where to replace with sc-network-types. I don't see libp2p being used anywhere in the sc-authority-discovery directory.

bkchr commented 1 week ago

If it is not being used, then the pr would just be about removing the crate and that's it ;)

alexggh commented 1 week ago

So I can remove the libp2p dependency but I'm not quite sure how/where to replace with sc-network-types. I don't see libp2p being used anywhere in the sc-authority-discovery directory.

You have to look for re-exported types as well for example the KademliaKey from here: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/client/authority-discovery/src/worker.rs#L45C30-L45C41.