litep2p
litep2p copied to clipboard
identify: Open inbound substream for unknown peer
There seems to be a state mismatch in the identify protocol implementation.
The following warning appeared 44 times on a warp sync node and 8 times on a full sync node, both nodes were running for almost 2 weeks.
2024-05-06 03:16:41.456 WARN tokio-runtime-worker litep2p::ipfs::identify: inbound identify substream opened for peer who doesn't exist peer=PeerId("12D3KooWA5taCbB5CEcz1VS126XjcbwBYqm9GmsASX5mBZU8611v") protocol=/ipfs/id/1.0.0
The warning is coming from:
https://github.com/paritytech/litep2p/blob/42ed1c1463a8b11eac5344af2871ba752335b06e/src/protocol/libp2p/identify.rs#L255-L266
This may happen when:
-
on_connection_established
fails to open a new substream, either because the peerID isn't connected or the connection is clogged -
on_connection_closed
is called beforeon_inbound_substream
-
on_inbound_substream
is called beforeon_connection_established
cc @paritytech/networking