koinos / koinos-p2p

The p2p microservice orchestrates the distribution of blocks and transactions between peers.
MIT License
6 stars 4 forks source link

Naughty Points #163

Closed mvandeberg closed 2 years ago

mvandeberg commented 2 years ago

For each peer, there should be an error channel that reports all peer errors. The channel should be consumed by an error handler that for each error assigns a weighted score (naughty points) to the peer. Points should decay over time exponentially and be added linearly (leaky bucket). Once a peer's error score surpasses a specific threshold, they are disconnected. The scores need to be preserved after diconnection and decay continue in case the peers attempts to reconnect. (e.g reconnect should not be a reset) These points accrue for both sync and gossip services.

sgerbino commented 2 years ago

Usurps #5.