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

pay: Annotate both local alias and real scid with channel hints #6428

Merged

Commits on Jul 23, 2023

  1. pay: Annotate both local alias and real scid with channel hints

    Debugging a number of payments showed that we sometimes waste a number
    of attempts routing through a channel via its alias, rather than its
    scid. This is because while we annotate the scid when it has been set,
    we do not do so for the alias. The alias then is picked for routing
    despite not having enough capacity, failing the attempt locally.
    
    It can also happen that we alternate between scid and alias, doubling
    the number of failed attempts before we can make progress.
    
    This patch sets the hint for the alias to a capacity of 0 and disables
    it as if the peer were offline. This means when available we'll always
    use the scid, which is also far easier to read in the logs.
    
    Changelog-Fixed: pay: We now track spendable amounts when routing on both the local alias as well as the short channel ID
    cdecker committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    77fb9ab View commit details
    Browse the repository at this point in the history
  2. pay: Consider amounts when selecting a channel to send over

    The channel selection did not consider the amounts that we are trying
    to transfer, which in a multiplexed channel world could end up always
    selecting a channel that is too small for the payment. We also log
    which channel was selected based on the selector that is passed in,
    allowing us to better follow the decisions.
    
    Changelog-Fixed: pay: `sendonion` and `sendpay` will now consider amounts involved when using picking one channel for a peer
    cdecker committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    b2dd282 View commit details
    Browse the repository at this point in the history