substrate
substrate copied to clipboard
Upgrade libp2p primitives to use tokio implementations
Is there an existing issue?
- [X] I have searched the existing issues
Experiencing problems? Have you tried our Stack Exchange first?
- [X] This is not a support question.
Description of bug
Transports and protocols in libp2p currently have different implementations for tokio and async-std runtimes (see https://github.com/libp2p/rust-libp2p/pull/2962). Due to historical reasons, transports and protocols used in substrate rely on async-std primitives, which can cause issues under tokio runtime like this one: https://github.com/libp2p/rust-libp2p/pull/2748. They should be upgraded to use tokio implementations.
This requires changing primitives used (i.e., replacing TcpTransport with TokioTcpTransport) and upgrading tokio version to the one compatible with libp2p.
This is a follow-up issue to https://github.com/paritytech/substrate/pull/12256.
Steps to reproduce
No response