-
Notifications
You must be signed in to change notification settings - Fork 247
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
Change DSN bootstrapping. #1690
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3c9fc2c
Introduce Kademlia bootstrap operation.
shamil-gadelshin e26c6d3
Remove bootstrap-nodes from redialing.
shamil-gadelshin 8f53b21
networking: Refactor bootstrapping.
shamil-gadelshin 5b29807
networking: Refactor networking parameters manager.
shamil-gadelshin 64fecdf
networking: Change bootstrapping algorithm.
shamil-gadelshin b7de051
networking: Ensure a single bootstrapping for node_runner.run().
shamil-gadelshin 76e464a
Simplify bootstrapping process
nazar-pc e52d6fd
Merge pull request #1699 from subspace/change_bootstrapping-simplific…
shamil-gadelshin 589017c
networking: Refactor node_runner.
shamil-gadelshin 876aaf9
Merge branch 'main' into change_bootstrapping
shamil-gadelshin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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.
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.
This will work as expected most of the time, but not all the time.
NodeRunner::run()
can be called, driven for some time and then dropped. When it it called again, it could be that you're triggering second, third and so on bootstrapping process.Command::Bootstrap
should be sent once in constructor with receiver stored inNodeRunner
. Then here you need to check if it is still present and only run this function if it is.Just remember that any async function can be interrupted at any time.
Also I noticed
handle_command
is async, which is not desired and not necessary if you changeremove_all_known_peer_addresses
to not be async anymore. Otherwise you have even more edge cases to potentially deal with.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 not sure whether we have this case in practice but this feature could be achieved using just a bool.
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.
No, it is not. There is absolutely no guarantee that bootstrapping has finished last time you called it. There is a guarantee that it has started bootstrapping process, but not more than that. It will not prevent other commands from being processed in the meantime.