-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ban peers when a request fails #1482
Conversation
@@ -1223,12 +1274,24 @@ impl<TPlat: PlatformRef> Task<TPlat> { | |||
HashDisplay(&verified_hash), | |||
error | |||
); | |||
|
|||
// TODO: ban peers that have announced the block |
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.
Last thing to do before merging
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've changed my mind about the fact that this is needed before merging.
We obviously need the help of the sync state machine here, but its guarantees in corner cases (such as knowing which sources know about a bad block) are not very well defined. The sync state machine needs a general clean-up, which is currently blocked on #1409.
I don't think that banning peers that advertise bad blocks is critical, and so it's fine to leave it as a todo.
cc #1442
Work in progress. While I wouldn't mind merging as is (except for the CHANGELOG), the unused function warning makes the compilation fail.