This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Decrease the peer reputation on invalid block requests#8260
Merged
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.
tomaka
reviewed
Mar 4, 2021
Comment on lines
+51
to
+52
| /// 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"); |
Contributor
There was a problem hiding this comment.
Why is it so punitive to ask the same thing twice?
Member
Author
There was a problem hiding this comment.
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.
Contributor
|
moved the comment directly to the issue: #8257 |
tomaka
approved these changes
Mar 5, 2021
arkpar
approved these changes
Mar 5, 2021
bkchr
pushed a commit
that referenced
this pull request
Mar 10, 2021
KalitaAlexey
pushed a commit
to KalitaAlexey/substrate
that referenced
this pull request
Jul 9, 2021
* 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
jordy25519
pushed a commit
to cennznet/substrate
that referenced
this pull request
Sep 17, 2021
* 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 was referenced May 15, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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