You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
1001 B

7 years ago
7 years ago
7 years ago
  1. The trust metric tracks the quality of the peers.
  2. When a peer exceeds a certain quality for a certain amount of time,
  3. it is marked as vetted in the addrbook.
  4. If a vetted peer's quality degrades sufficiently, it is booted, and must prove itself from scratch.
  5. If we need to make room for a new vetted peer, we move the lowest scoring vetted peer back to unvetted.
  6. If we need to make room for a new unvetted peer, we remove the lowest scoring unvetted peer -
  7. possibly only if its below some absolute minimum ?
  8. Peer quality is tracked in the connection and across the reactors.
  9. Behaviours are defined as one of:
  10. - fatal - something outright malicious. we should disconnect and remember them.
  11. - bad - any kind of timeout, msgs that dont unmarshal, or fail other validity checks, or msgs we didn't ask for or arent expecting
  12. - neutral - normal correct behaviour. unknown channels/msg types (version upgrades).
  13. - good - some random majority of peers per reactor sending us useful messages