-
Notifications
You must be signed in to change notification settings - Fork 4
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
Allow NodeManager
to start lazily without network entry procedure
#461
Comments
Would this be something we should do as part of 6th testnet deployment? |
Not strictly needed but is nice to have for testing and should be reasonably quick to implement. |
I think this is the case now. You can start the I'd also like to add a option |
I suggest we use the stealth mode #199 feature to side-step this problem. Essentially it would temporarily (togglable) disable all background network tasks (that includes social discovery, node discovery, mdns... etc) across the board, then we don't need to add special configuration just to disable certain things for testing. |
To do such a thing, you can make use of the pattern used in the TaskManager with substart commands. Like Any domain that has backgrounded network operations should have a substart/substop operations that can be called independently to switch its operating modes. |
Specification
When starting the
PolykeyAgent
theNodeManager
takes two steps to enter the network. WhenNodeManager
is started it callsthis.setupRefreshBucketTasks()
and shortly after starting thePolykeyAgent calls
this.nodeManager.syncNodeGraph. The fact that these two steps happen by default when starting a
PolykeyAgent` can interfere with testing and adds a bunch of processing that doesn't need to be done.We need to update this behaviour as specified in this comment #451 (comment).
Additional context
TaskManager
intoDiscovery
#451TaskManager
intoDiscovery
#451 (comment)Tasks
lazy
parameter toNodeManager.start
that when true, skips the creation ofrefreshBucket
tasks withsetupRefreshBucketTasks
and skips runningsyncNodeGraph
.NodeManager
calledstartSync
that combines thesetupRefreshBucketTasks
andsyncNodeGraph
operationssyncNodeGraph
tosyncSeedNodes
PolykeyAgent
creation and start optionally skip thestartSync
process based on a parameter.PolykeyAgent
usage in testing to skip the sync process where needed.refreshBucket
to stub it out and replace it with usage of 5.The text was updated successfully, but these errors were encountered: