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

Three-hop blinded paths #2793

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Commits on Jun 5, 2024

  1. Move DefaultMessageRouter::create_blinded_paths

    An upcoming change to the MessageRouter trait will require reusing
    DefaultMessageRouter::create_blinded_paths. Move the code to a utility
    function so facilitate this.
    jkczyz committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    defc540 View commit details
    Browse the repository at this point in the history
  2. Refactor MessageRouter::create_blinded_paths

    Using compact blinded paths isn't always necessary or desirable. For
    instance, reply paths are communicated via onion messages where space
    isn't a premium unlike in QR codes. Additionally, long-lived paths could
    become invalid if the channel associated with the SCID is closed.
    Refactor MessageRouter::create_blinded_paths into two methods: one for
    compact blinded paths and one for normal blinded paths.
    jkczyz committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    5326171 View commit details
    Browse the repository at this point in the history
  3. Don't use compact blinded paths for reply paths

    There's no need to save space when creating reply paths since they are
    part of onion messages rather than in QR codes. Use normal blinded paths
    for these instead as they are less likely to become invalid in case of
    channel closure.
    jkczyz committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    411b9b4 View commit details
    Browse the repository at this point in the history
  4. Use compact blinded paths for short-lived offers

    When an offer is short-lived, the likelihood of a channel used in a
    compact blinded path going away is low. Require passing the absolute
    expiry of an offer to ChannelManager::create_offer_builder so that it
    can be used to determine whether or not compact blinded path should be
    used.
    
    Use the same criteria for creating blinded paths for refunds as well.
    jkczyz committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    8012c2b View commit details
    Browse the repository at this point in the history
  5. Fix functional_test_utils::reconnect_nodes

    When reconnecting nodes, make sure to notify OnionMessenger that the
    nodes are now connected.
    jkczyz committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    15fa0d8 View commit details
    Browse the repository at this point in the history
  6. Exclude disconnected peers from BlindedPath

    When calling MessageRouter::create_blinded_path, ChannelManager was
    including disconnected peers. Filter peers such that only connected ones
    are included. Otherwise, the resulting BlindedPath may not work.
    jkczyz committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    7db6616 View commit details
    Browse the repository at this point in the history
  7. Clarify docs regarding one-hop blinded paths

    The docs assumed ChannelManager is parameterized by DefaultRouter, which
    may not be the case. Clarify the behavior is specific to using
    DefaultRouter.
    jkczyz committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    c17a026 View commit details
    Browse the repository at this point in the history
  8. Fix doc comment example

    jkczyz committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    8e3a220 View commit details
    Browse the repository at this point in the history
  9. WIP: three-hop blinded paths

    jkczyz committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    744af6f View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    3e1a356 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    677b6a2 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    50ed6da View commit details
    Browse the repository at this point in the history
  13. Consider channel balance certainty in blinded path

    How certain a scorer is about a channel's liquidity balance is useful in
    determining if the channel should be included in a blinded payment path.
    Channels with uncertain balances should be avoided to facilitate
    successful payments.
    
    Expand ScoreLookUp with a channel_balance_certainty method and use it in
    DefaultRouter::create_blinded_payment_paths.
    jkczyz committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    1172a66 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    dd3b86d View commit details
    Browse the repository at this point in the history
  15. Consider success probability in blinded path

    How certain a scorer is about a channel's success probability is useful
    in determining if the channel should be included in a blinded payment
    path. Channels with low success probability for a given amount should be
    avoided to facilitate successful payments.
    
    Expand ScoreLookUp with a channel_success_probability method and use it
    in DefaultRouter::create_blinded_payment_paths.
    jkczyz committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    53c006a View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    ee88951 View commit details
    Browse the repository at this point in the history