chore: update libp2p to 0.52.1#14429
chore: update libp2p to 0.52.1#14429paritytech-processbot[bot] merged 53 commits intoparitytech:masterfrom
Conversation
also LocalProtocolsChange and RemoteProtocolsChange
also fix pending_events
also use `Behaviour::with_codec`
rename ConnectionHandlerUpgrErr to StreamUpgradeError
client/network/src/service.rs
Outdated
| }; | ||
| let reason = match cause { | ||
| Some(ConnectionError::IO(_)) => "transport-error", | ||
| // Some(ConnectionError::Handler(Either::Left(Either::Left( |
There was a problem hiding this comment.
no such variant seems to exist
There was a problem hiding this comment.
PingFailure doesn't exist?
What does ConnectionError::Handler(Either::Left(Either::Left(Either::Left(Either::Right contain?
There was a problem hiding this comment.
let reason = match cause {
| ----- this expression has type `std::option::Option<ConnectionError<either::Either<either::Either<either::Either<either::Either<NotifsHandlerError, either::Either<void::Void, std::io::Error>>, std::io::Error>, void::Void>, void::Void>>>`
std::io::Error
There was a problem hiding this comment.
If we are sure that this io::Error is handling the case for ping failure, may be we should still report it as "ping-failure" and not as default "protocol-error"?
in attempt to compile polkadot
This comment was marked as resolved.
This comment was marked as resolved.
| // Set the Kademlia mode to server so that it can accept incoming requests. | ||
| // | ||
| // Note: the server mode is set automatically when the node learns its external | ||
| // address, but that does not happen in tests => hence we set it manually. |
There was a problem hiding this comment.
How about another test with one server and one client, just to verify that such a scenario also works?
| // }; | ||
|
|
||
| // handler.on_connection_event(handler::ConnectionEvent::FullyNegotiatedInbound( | ||
| // handler::FullyNegotiatedInbound { protocol: (notif_in, 0), info: () }, |
There was a problem hiding this comment.
IIUC the reason these were commented out was because something in libp2p was made private. What was the exact reason @melekes?
You will appreciate then that lots of engineering hours have already gone and will continue to go into making as few breaking changes as possible:
You can discover more things by following the links in the above issues. Esp. the 0.52 release hardened many many APIs in rust-libp2p that allow us to make improvements without making more breaking changes :) |
| self.kademlia.on_swarm_event(FromSwarm::NewListenAddr(e)); | ||
|
|
||
| if let Some(ref mut mdns) = self.mdns { | ||
| mdns.on_swarm_event(FromSwarm::NewListenAddr(e)); |
There was a problem hiding this comment.
We can use libp2p_swarm::behaviour::toggle::Toggle instead of Option<TokioMdns>. It will remove ifs because they are hidden inside Toggle::on_* methods.
There was a problem hiding this comment.
Good idea 👍 Will do in a separate PR
|
bot merge |
|
Error: Github API says paritytech/cumulus#2838 is not mergeable |
|
bot merge |
|
Error: "Check reviews" status is not passing for paritytech/cumulus#2838 |
|
bot merge |
changelog: https://github.com/libp2p/rust-libp2p/releases/tag/libp2p-v0.52.0
polkadot companion: paritytech/polkadot#7472
cumulus companion: paritytech/cumulus#2838