Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[RFC] Ban scoring #1543
I've been working with the rule that a peer gets banned if its trust score is ≤ -1. It makes the math slightly cleaner, but is arguably less human-readable. The difference is purely cosmetic since we can scale the punishment values to match.
One way of thinking about how much to punish peers is to decide the maximum rate they can do whatever we're talking about without being banned. From the code I'm working on:
(** Trust increment that sets a maximum rate of doing a bad thing (presuming the peer does no good things) in seconds/action. *) (* The amount of trust that decays in the specified time period, when we're at the ban threshold (-1) *) let max_rate secs = ((Record.decay_rate ** secs) *. -1.) +. 1.
That seems to be a consideration for DoS behavior as opposed to giving-bad-information behavior, which may be Bitcoin considers those separately.
So the higher the rate, the less the punishment?
How does this rate idea combine with the potential harm of the bad action? I'm wondering if this is more complexity than needed. I was thinking that the potential harm alone would determine the severity of punishment.