Expand description
Peer Misbehavior & Ban Score Tracking
Implements Bitcoin Core’s peer scoring system (see net_processing.cpp
Misbehaving()). Every protocol violation adds to a peer’s “ban score”.
Once the score reaches or exceeds the ban threshold (default 100), the peer
is disconnected and its address is banned for a configurable duration.
§Violation Categories
| Violation | Score |
|---|---|
| Invalid block header | 100 |
| Invalid block (consensus failure) | 100 |
| Invalid transaction | 10 |
| Unexpected message during handshake | 10 |
| Too many addr messages | 20 |
| Invalid network message | 20 |
| DoS (too many messages, etc.) | 50 |
| Unconnectable block | 10 |
Structs§
- BanEntry
- A banned address entry.
- Peer
Scoring - Manages per-peer ban scores and a ban list.
Enums§
- Misbehavior
- Categories of protocol violations with associated ban scores.
- Score
Action - Actions the caller should take after recording misbehavior.