You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
With phase 2 from LIP0004, we have to introduce a robust mechanism in lisk-p2p. There is a ban score for every peer that is initially 0 and at most 100. It is increased every time a peer sends invalid information or too many messages. Once the ban score reaches 100, a peer is banned for a period of banTime seconds and the ban score is reset to 0. The default value of banTime is 86400, which corresponds to 24 h, and it can be changed by the user in the configuration.
Ban scores are stored in memory and not broadcast.
Banned peers are further removed from the collections triedPeers and newPeers and stored in a separate data structure to be able to prevent reconnection of the banned peer for banTime seconds.
The peers that are declared whitelisted or fixed and the seed nodes are never banned.
Blacklisted peers stay permanently banned.
For keeping track of the number of Events/RPCs in a 10-second window for a message type, it is sufficient to use a counter that is reset to 0 every 10 seconds instead of counting the number of calls in a sliding 10 s window.
Banned peers need to be maintained and checked during peer selection and discovery.
The text was updated successfully, but these errors were encountered:
Description
With phase 2 from LIP0004, we have to introduce a robust mechanism in lisk-p2p. There is a ban score for every peer that is initially 0 and at most 100. It is increased every time a peer sends invalid information or too many messages. Once the ban score reaches 100, a peer is banned for a period of
banTime
seconds and the ban score is reset to 0. The default value ofbanTime
is 86400, which corresponds to 24 h, and it can be changed by the user in the configuration.Ban scores are stored in memory and not broadcast.
Banned peers are further removed from the collections
triedPeers
andnewPeers
and stored in a separate data structure to be able to prevent reconnection of the banned peer forbanTime
seconds.The peers that are declared whitelisted or fixed and the seed nodes are never banned.
Blacklisted peers stay permanently banned.
For keeping track of the number of Events/RPCs in a 10-second window for a message type, it is sufficient to use a counter that is reset to 0 every 10 seconds instead of counting the number of calls in a sliding 10 s window.
Banned peers need to be maintained and checked during peer selection and discovery.
The text was updated successfully, but these errors were encountered: