go-bitswap icon indicating copy to clipboard operation
go-bitswap copied to clipboard

Remove inconsistent peers from Session

Open dirkmc opened this issue 5 years ago • 1 comments

In the case where

  • Bitswap sends want-have to a peer
  • Peer responds HAVE
  • Bitswap sends want-block to peer
  • Peer responds DONT_HAVE

Remove the peer from the Session

Depends on https://github.com/ipfs/go-bitswap/issues/259

dirkmc avatar Feb 14 '20 19:02 dirkmc

For context: this isn't necessarily malicious as the peer could have lost/removed the content. However, if that's the case, we probably don't want to ask them for anything in the session anyways. Regardless, if this was a mistake, we'll add them back later when we do a random broadcast.

Other thoughts: We might want to keep a badness score and permanently drop peers that keep doing this. But that's a future consideration.

Stebalien avatar Feb 14 '20 22:02 Stebalien