Specification
When starting the PolykeyAgent the NodeManager takes two steps to enter the network. When NodeManager is started it calls this.setupRefreshBucketTasks() and shortly after starting the PolykeyAgent 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
Tasks
- Add a
lazy parameter to NodeManager.start that when true, skips the creation of refreshBucket tasks with setupRefreshBucketTasks and skips running syncNodeGraph.
- Add a method to
NodeManager called startSync that combines the setupRefreshBucketTasks and syncNodeGraph operations
- rename
syncNodeGraph to syncSeedNodes
- Have the
PolykeyAgent creation and start optionally skip the startSync process based on a parameter.
- Update any
PolykeyAgent usage in testing to skip the sync process where needed.
- Remove any mocking of
refreshBucket to stub it out and replace it with usage of 5.
Specification
When starting the
PolykeyAgenttheNodeManagertakes two steps to enter the network. WhenNodeManageris started it callsthis.setupRefreshBucketTasks()and shortly after starting thePolykeyAgent callsthis.nodeManager.syncNodeGraph. The fact that these two steps happen by default when starting aPolykeyAgent` 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
TaskManagerintoDiscovery#451TaskManagerintoDiscovery#451 (comment)Tasks
lazyparameter toNodeManager.startthat when true, skips the creation ofrefreshBuckettasks withsetupRefreshBucketTasksand skips runningsyncNodeGraph.NodeManagercalledstartSyncthat combines thesetupRefreshBucketTasksandsyncNodeGraphoperationssyncNodeGraphtosyncSeedNodesPolykeyAgentcreation and start optionally skip thestartSyncprocess based on a parameter.PolykeyAgentusage in testing to skip the sync process where needed.refreshBucketto stub it out and replace it with usage of 5.