dfinity-side-projects/js-libp2p-gossip-discovery

Extend PeerBook with Reputation

Opened this issue · 1 comments

It would be nice to have an instance of PeerBook that also tracked the reputation of peers. It could methods such as updateReputation(id, int) and getReputation(id) and setReputationThreshold(int) which would set a minimal reputation, if a peer drops below this rep, then it would get evected from the peerBook

Thanks @wanderer - will see about grabbing this after #3.

Notes to self:

  • for now, makes most sense to subtract reputation in _peerDiscovery: L87
  • May want to use some sort of log scale for reputation.