-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Decrease the peer reputation on invalid block requests #8260
Conversation
This pr changes the block request handler to decrease the reputation of peers when they send the same request multiple times or they send us an invalid block request.
/// Reputation change when a peer sent us the same request multiple times. | ||
pub const SAME_REQUEST: Rep = Rep::new(i32::min_value(), "Same block request multiple times"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it so punitive to ask the same thing twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still waiting for some answer from the author of the linked issue to see if that fixes the problem. As reported, they assume that someone is spamming them with the same request over and over again.
It is also fine to send the same request twice (or even more times when you wait long enough between the requests), however the same request should not be send multiple times in a short time period. This probably just reveals some bug in the sync code, but I still don't see any problem why we should no restrict this.
moved the comment directly to the issue: #8257 |
* Decrease the peer reputation on invalid block requests This pr changes the block request handler to decrease the reputation of peers when they send the same request multiple times or they send us an invalid block request. * Review feedback * Change log target * Remove unused code
* Decrease the peer reputation on invalid block requests This pr changes the block request handler to decrease the reputation of peers when they send the same request multiple times or they send us an invalid block request. * Review feedback * Change log target * Remove unused code
This pr changes the block request handler to decrease the reputation of
peers when they send the same request multiple times or they send us an
invalid block request.
Fix: #8257