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.
P2P layer should limit the number of incoming calls from peers for specified message types (e.g. getTransactions, getBlocks) within a 10 second window to avoid spamming a node as per LIP 0004 .
Actual behavior
P2P layer should not have knowledge of module specific event types.
However it should be responsible for keep track of the 10-second interval for each peer and count the number of calls in order to limit and apply penalty as necessary.
Proposed options
Set a generalized limit for all incoming messages regardless of message type, with a higher threshold within the P2P layer, and apply a 10 point penalty in case of breach.
For modules which require penalties for specific message types, they can implement their own rate-limiting functionality from outside the P2P layer. For example this can be handled between the chain and network module.
Pass a map of event types and relevant penalty scores to P2P constructor. However this may not work depending on the order in which the modules are loaded.
Which version(s) does this affect? (Environment, OS, etc...)
2.0
The text was updated successfully, but these errors were encountered:
Expected behavior
P2P layer should limit the number of incoming calls from peers for specified message types (e.g.
getTransactions
,getBlocks
) within a 10 second window to avoid spamming a node as per LIP 0004 .Actual behavior
P2P layer should not have knowledge of module specific event types.
However it should be responsible for keep track of the 10-second interval for each peer and count the number of calls in order to limit and apply penalty as necessary.
Proposed options
Set a generalized limit for all incoming messages regardless of message type, with a higher threshold within the P2P layer, and apply a 10 point penalty in case of breach.
For modules which require penalties for specific message types, they can implement their own rate-limiting functionality from outside the P2P layer. For example this can be handled between the
chain
andnetwork
module.Pass a map of
event
types and relevant penalty scores to P2P constructor. However this may not work depending on the order in which the modules are loaded.Which version(s) does this affect? (Environment, OS, etc...)
2.0
The text was updated successfully, but these errors were encountered: