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

Allow nodes to overshoot the MPP total_msat when paying #1031

Merged
merged 1 commit into from
Nov 8, 2022

Commits on Nov 7, 2022

  1. Allow nodes to overshoot the MPP total_msat when paying

    When a node retires a failed path as part of a larger MPP payment,
    the node may wish to use a path which is constrained by an
    `htlc_minimum_msat` value. In this case, the node is forced to
    overpay, likely overshooting the `total_msat` it set in the earlier
    onions for the same MPP payment.
    
    There are two possible solutions to this - either allow the
    `total_msat` value to change in later HTLCs or allow the node to
    (slightly) overshoot the `total_msat` value.
    
    Allowing `total_msat` to change across HTLCs is nontrivial to
    implement - HTLCs may arrive out-of-order, causing the receiving
    node to have to track all seen `total_msat` values and accept a
    set of HTLCs which meet any of the seen `total_msat` values.
    
    Instead, this commit changes the MPP logic to simply allow a sender
    to overshoot the stated `total_msat`.
    
    Sadly the backwards-compatibility story for this is not great.
    There doesn't seem to be a good way to resolve this issue in a
    backwards-compatible way. Instead we just bite the bullet and make
    the incompatible change, hoping the overshooting is rare enough
    that it's not a major issue.
    TheBlueMatt committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    8030261 View commit details
    Browse the repository at this point in the history