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.
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.