-
Notifications
You must be signed in to change notification settings - Fork 55
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
Customizable gossipsub backoff on unsubscribe #665
Merged
Merged
Conversation
This file contains 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
arnetheduck
reviewed
Dec 2, 2021
arnetheduck
previously approved these changes
Dec 2, 2021
arnetheduck
approved these changes
Dec 2, 2021
Please don't merge yet until we ship 1.5.5 |
Unstable will not be merged into master, and thus get bumped in nimbus, for the next few days/weeks, so 1.5.5 won't be affected anyway Or you have reservation about this PR in general? |
We haven't yet decided on the branching point from |
4 tasks
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 is an alternative to status-im/nimbus-eth2#3025
It allows applications to choose a different backoff when we unsubcribe from a gossipsub topic.
Currently, if you unsubscribe - resubscribe from a topic in less than
backoff
seconds, all of your peers that were previously in your mesh are in your backoff, and won't allow you to graft them back. Setting theunsubcribeBackoff
to a lower value allows you to alleviate this issue.Note that it should still be >0 seconds, or some implementations (including ours) will ignore it. However, if it's less than
BackoffSlackTime
(2 seconds), it will effectively be a 0 seconds backoff.It should not be an issue to have a 0 seconds backoff, since you're unsubscribed and peers should not attempt to graft you until you resub anyway. But maybe to avoid "race conditions", it's a good idea to keep a few seconds as backoff, just in case. Worst case scenario, a peer may attempt to graft you before receiving your unsub, and since this is not allowed, we'll prune him again with a bigger backoff.