Skip to content
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

Merged
merged 16 commits into from
Dec 20, 2023
Merged

Ban peers when a request fails #1482

merged 16 commits into from
Dec 20, 2023

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Dec 17, 2023

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.

@@ -1223,12 +1274,24 @@ impl<TPlat: PlatformRef> Task<TPlat> {
HashDisplay(&verified_hash),
error
);

// TODO: ban peers that have announced the block
Copy link
Contributor Author

@tomaka tomaka Dec 19, 2023

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

Copy link
Contributor Author

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.

@tomaka tomaka marked this pull request as ready for review December 20, 2023 09:48
@tomaka tomaka added this pull request to the merge queue Dec 20, 2023
Merged via the queue into smol-dot:main with commit 721ed2d Dec 20, 2023
22 checks passed
@tomaka tomaka deleted the ban-peers branch December 20, 2023 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant