-
Notifications
You must be signed in to change notification settings - Fork 33
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
[P2P] chore: concurrent bootstrapping #694
base: main
Are you sure you want to change the base?
Conversation
The check succeeded, dismissing the review comment.
97f4223
to
af6189a
Compare
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
|
|||
## [Unreleased] | |||
|
|||
## [0.0.0.44] - 2023-04-19 | |||
|
|||
- Refactored P2P bootstrapping to its own go routine |
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.
🚀
@deblasis I'm seeing RPC health check failures during bootstrapping which were previously hidden (not being attempted). I'm not sure if it's related to the DNS updates but wanted to call it out here: |
@bryanchriswhite 👋 Let me know if this helps otherwise I'll pull the updated codebase and answer with more details. Edit: these warnings might be normal and simply indicating that one of the two bootstrap nodes that I hardcoded is not reachable but it's by design and it was meant to make sure that the fallback to the next bootstrap node worked. The comment I mentioned above should explain this. |
Slightly unrelated. @bryanchriswhite I know you're looking into kademlia and such, and just wanted to make sure you were aware they have some of their own native configs: https://docs.libp2p.io/concepts/discovery-routing/kaddht/#bootstrap-process. Found an example here. |
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.
@bryanchriswhite Thank you for catching this!
- To properly diagnose where the health check error comes from, I think we should add a status code and possibly response body (maybe in debug output?) to figure out what and how responds to the health check. Just want to double-check — this doesn't seem to be used currently? Not until we have peer discovery and possibly state sync?
- For concurrency limiter, we already have that package, but I actually like yours more because it allows to pass a context! :)
} | ||
healthCheck, err := client.GetV1Health(context.TODO()) | ||
if err != nil || healthCheck == nil || healthCheck.StatusCode != http.StatusOK { | ||
m.logger.Warn().Str("serviceURL", serviceURL).Msg("Error getting a green health check from bootstrap node") |
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.
m.logger.Warn().Str("serviceURL", serviceURL).Msg("Error getting a green health check from bootstrap node") | |
m.logger.Warn().Str("serviceURL", serviceURL).Int("code", healthCheck.StatusCode).Msg("Error getting a green health check from bootstrap node") |
Description
Allows P2P bootsrapping to happen concurrently across known bootstrap nodes.
Issue
No issue
Type of change
Please mark the relevant option(s):
List of changes
Testing
make develop_test
; if any code changes were madeRequired Checklist
godoc
format comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)