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

WIP - Reduce the Load Induced by the Polling Service #211

Closed
wants to merge 7 commits into from

Commits on Jul 20, 2023

  1. poll: Add concurrency safe queue for peers to be polled

    Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
    nepet committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    c41b95a View commit details
    Browse the repository at this point in the history
  2. poll: Add poll queue to poll service

    We use the queue to determine which peer is the next to be sent the
    poll message.
    
    Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
    nepet committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    229ded6 View commit details
    Browse the repository at this point in the history
  3. cmd: Set new tick duration

    tickDuration is now used to cycle through the poll queue.
    
    Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
    nepet committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    c222d7a View commit details
    Browse the repository at this point in the history
  4. poll: Remove heavy-load functions

    We remove the potentially heavy-load functions that ask to send
    out messages in parallel.
    
    Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
    nepet committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    0b25c95 View commit details
    Browse the repository at this point in the history
  5. cmd: Add peer listeners that call poll service

    We listen for peers to connect or disconnect to the node running
    peerswap and Add or Remove them from the poll service accordingly
    
    Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
    nepet committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    56d737e View commit details
    Browse the repository at this point in the history
  6. swap: Add check for current blockheight before pay

    This is mainly to make the tests more stable as we don't have
    blocktime lag in regtest scenarios. But it does not hurt to have
    the extra check in real life also.
    
    Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
    nepet committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    8f0f2ba View commit details
    Browse the repository at this point in the history
  7. poll: Move enqueueing into conditional

    We only want to add the peer to the queue if we do not know about
    it already.
    
    Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
    nepet committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    d9d7d39 View commit details
    Browse the repository at this point in the history