Peer Scoring System
The main objective of the Peer Scoring System is to protect the Rootstock node's resources from abusive or malicious peers. For this, the Rootstock's node keeps track of a reputation for each peer that connects to it and disconnects those whose current reputation falls below acceptable levels.
Actions
There are three possible actions that the Peer Scoring system can perform:
- Record an event
- Automatic penalisation of peer nodes
- Manually ban and unban peer nodes
Recording an event
All event-firing scenarios will start by the node receiving a message from a peer.
All messages are automatically recorded as events. However, for the current version, only some of them have a negative impact on the peer’s reputation. These events are:
INVALID_NETWORK: This occurs when the received network ID is different from the network ID of the node.INVALID_BLOCK: This happens when the received block is not valid as per RSK block validation requirements.INVALID_MESSAGE: This happens when the message received is not valid as per RSK message validation requirements.
If one of these events is recorded, the peer’s reputation will be marked accordingly, and the penalisation process will start automatically. This occurs only in nodes where the peer scoring feature is enabled.