Skip to content

Allow NodeManager to start lazily without network entry procedure #461

Description

@tegefaulkes

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

  1. Add a lazy parameter to NodeManager.start that when true, skips the creation of refreshBucket tasks with setupRefreshBucketTasks and skips running syncNodeGraph.
  2. Add a method to NodeManager called startSync that combines the setupRefreshBucketTasks and syncNodeGraph operations
  3. rename syncNodeGraph to syncSeedNodes
  4. Have the PolykeyAgent creation and start optionally skip the startSync process based on a parameter.
  5. Update any PolykeyAgent usage in testing to skip the sync process where needed.
  6. Remove any mocking of refreshBucket to stub it out and replace it with usage of 5.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions