notifications/libp2p: Punish notification protocol misbehavior on outbound substreams (#7781)
This PR punishes behaviors that deviate from the notification spec. When a peer misbehaves by writing data on an unidirectional read stream, the peer is banned and disconnected immediately. In this PR: - The `NotificationOutError` is enriched with termination reason and made publically available for higher levels - The protocol misbehavior is propagated through the `CloseDesired` events - The network behavior of the protocol is responsible for banning the peer. - The peer is banned immediately and, as a result, the reputation system disconnects the malicious / misbehaving peer - Logs are enriched with protocol names Closes: https://github.com/paritytech/polkadot-sdk/issues/7722 cc @paritytech/networking --------- Signed-off-by:Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by:
Bastian Köcher <git@kchr.de>
parent
64dc0eff
Pipeline
#518963
waiting for manual action
with stages
in
20 minutes and 38 seconds
Stage:
Stage:
Stage:
Stage:
Stage: