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

fix!: refactor connection manager to use a prioritised queue #1678

Merged
merged 9 commits into from
Apr 13, 2023

Commits on Apr 11, 2023

  1. fix!: refactor connection manager to use a queue and add priority dia…

    …ling
    
    Refactors the connection manager.
    
    1. Internally it uses a queue to control concurrency instead of dial tokens
    2. A second queue is used for each peer to prevent inividual peers from swamping the dial queue
    3. The auto dialler now checks the minimum connection limit when peers disconnect instead of using a timer
    4. Auto dialled peers are sorted based on tag value so valuable peers should be re-dialled first
    5. Auto dialled peers are dialled in parallel to prevent a slow peer locking up the auto-dial queue
    6. allow/deny lists are now `MultiaddrFilter`s
    7. A `getDialQueue` method has been added to libp2p to allow inspection of the dial queue though it needs exposing in the interface
    8. The connection gater `denyDialMultiaddr` method now only takes a multiaddr
    
    BREAKING CHANGE: some connection manager options have changed - please see the upgrade guide for full details
    achingbrain committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    125878e View commit details
    Browse the repository at this point in the history
  2. chore: consistency

    achingbrain committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    3b66103 View commit details
    Browse the repository at this point in the history
  3. chore: apply suggestions from code review

    Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
    achingbrain and SgtPooki committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    e2f406b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ee7cd99 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6ff8ed5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3d92f93 View commit details
    Browse the repository at this point in the history
  7. chore: update docs

    achingbrain committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    1e802d9 View commit details
    Browse the repository at this point in the history
  8. chore: update docs

    achingbrain committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    dec86ff View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2023

  1. Configuration menu
    Copy the full SHA
    4c4ab3b View commit details
    Browse the repository at this point in the history