Skip to content
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

Decentralized Signalling #618

Merged
merged 19 commits into from
Dec 4, 2023
Merged

Commits on Dec 4, 2023

  1. feat: NodeGraph refactored with:

    1. `NodeGraph.getOldestNode` is replaced with `NodeGraph.getBucket` with additional optional`limit` parameter - update all tests
    2. `NodeGraph.setNode` now respects the `NodeGraph.nodeBucketLimit` and will throw `ErrorNodeGraphBucketLimit` if it goes over the limit when a new node is being set.
    3. The `NodeGraph.nodeBucketLimit` is no longer hardcoded, it can be set during creation/construction.
    4. Removed debug logs from `NodeGraph` as these shouldn't be needed after behaviour is verified.
    5. Added `lastUpdated` parameter to `NodeGraph.setNode`, allowing one to pass down last updated time from a higher context, and the ability to get rid of sleeps by manually setting the time. It defaults to `utils.getUnixtime()`.
    6. Removed `utils.sleep` usage in `NodeGraph.test.ts` and now all tests execute much faster.
    CMCDragonkai authored and tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    f6f45f5 View commit details
    Browse the repository at this point in the history
  2. wip: refactoring NodeManager

    [ci skip]
    CMCDragonkai authored and tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    6f9d7d8 View commit details
    Browse the repository at this point in the history
  3. feat: refactored NodeConnectionManager

    [ci skip]
    CMCDragonkai authored and tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    03cd4af View commit details
    Browse the repository at this point in the history
  4. wip: NodeGraph multi-address functionality

    [ci skip]
    CMCDragonkai authored and tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    df580c7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    274ba42 View commit details
    Browse the repository at this point in the history
  6. wip: expanding NodeManager and findNode logic

    [ci skip]
    tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    be196d6 View commit details
    Browse the repository at this point in the history
  7. feat: refactored NodeGraph

    [ci skip]
    CMCDragonkai authored and tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    f88e281 View commit details
    Browse the repository at this point in the history
  8. wip: small fixes and clean up

    small name and commentary updates to `NodeGraph`
    
    [ci skip]
    tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    62a123e View commit details
    Browse the repository at this point in the history
  9. wip: expanding NodeManager tests

    [ci skip]
    tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    82c058e View commit details
    Browse the repository at this point in the history
  10. feat: implementing findNode logic

    This includes creating a `connectionsQueue` utility class for coordinating rate limits and shared queues between the direct connection loop and the signalled connection loop. The two loops run concurrently while sharing found data between each other. When the connection is found, any pending connections are cancelled and awaited for clean up.
    
    [ci skip]
    tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    21df5d7 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ff41815 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    7c54aa1 View commit details
    Browse the repository at this point in the history
  13. fix: using a shorter local timeout for each connection in the `find…

    …Node` loop
    
    Previously it used the timeout provided for the whole `findNode` operations. This means that a failing connection would take up the whole timeout.
    
    [ci skip]
    tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    c55c39c View commit details
    Browse the repository at this point in the history
  14. wip: cleaning out old nodes tests

    [ci skip]
    tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    81cc0b8 View commit details
    Browse the repository at this point in the history
  15. feat: timeout time for idle connection scales with node closeness

    closest nodes timeout after 2 hours, furthest after 1 min.
    
    [ci skip]
    tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    2d058d7 View commit details
    Browse the repository at this point in the history
  16. feat: connections are now periodically re-established

    [ci skip]
    
    wip: fixing delay names
    
    [ci skip]
    tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    cf5741f View commit details
    Browse the repository at this point in the history
  17. feat: re-implemented MDNS into NodeManager

    Also added some basic multi-connection logic to `NodeConnectionManager`
    
    [ci skip]
    tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    ebe6377 View commit details
    Browse the repository at this point in the history
  18. tests: all nodes tests passing

    [ci skip]
    tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    b0772be View commit details
    Browse the repository at this point in the history
  19. tests: all tests passing

    [ci skip]
    tegefaulkes committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    37ef800 View commit details
    Browse the repository at this point in the history