Skip to content

MPP receive timeout not implemented? #1050

Closed

Description

@t-bast

I'm testing the latest version of the ldk-sample and I noticed that the receiver MPP timeout mechanism doesn't seem to work.

I sent a partial HTLC to the LDK sample node, it's correctly accepted, but even after 5 minutes without receiving the remaining HTLCs the LDK sample node doesn't fail the incoming HTLC.

I'm referring to the following requirement:

- otherwise, if the total amount_msat of this HTLC set is less than total_msat:
    - MUST fail all HTLCs in the HTLC set after some reasonable timeout.
        - SHOULD wait for at least 60 seconds after the initial HTLC.
        - SHOULD use mpp_timeout for the failure message.

Is that expected?

Activity

  1. TheBlueMatt commented on Aug 18, 2021

    @TheBlueMatt
    Collaborator

    Hmm, I believe we currently fail it some blocks before the CLTV timeout, not on a timer, though I admit maybe that's not exactly a "reasonable timeout"

  2. 1nF0rmed commented on Oct 8, 2021

    @1nF0rmed
    Contributor

    In this case, what would be considered a reasonable timeout? The spec mentions a minimum of 60 seconds after the initial HTLC.

    Should we consider implementing a timer of sorts?

  3. t-bast commented on Oct 8, 2021

    @t-bast
    Author

    I believe you really should indeed.

    Imagine the case where a sender splits a payment in two parts.
    The first part reaches your node, the second doesn't because of an error with an intermediate node.

    If the sender is unable to find other routes to send the second part and abandons the payment, it will still have the first part locked for many blocks: this consumes liquidity for a long time for no good reason for every node in the path.

  4. 1nF0rmed commented on Oct 8, 2021

    @1nF0rmed
    Contributor

    If we have to setup a timer (seconds/minutes based) we would have to make it event-based, am I correct in this?
    Then what event would we issue for this, and who would keep track of this time?

  5. TheBlueMatt commented on Oct 8, 2021

    @TheBlueMatt
    Collaborator

    While we don't assume access to the current time, we do have timer_tick_occurred which users should/will call ~every 30 seconds, so we can shove more logic in there. I really don't know what "reasonable" is here either, but a few minutes is probably fine.

  6. dunxen commented on Dec 13, 2021

    @dunxen
    Contributor

    Might make sense if I take a look at this after #1148.
    I think LND timeout is around 2 minutes. I was chatting with Carla about this.
    I was thinking something simple like 5 or so ticks.
    The comments there mention once every 1 minute which I assume would also be fine for 5 ticks.

  7. added this to the 0.1 milestone on Dec 23, 2021
  8. TheBlueMatt commented on Dec 23, 2021

    @TheBlueMatt
    Collaborator

    Marking 0.1 cause this can interact natively with some senders to make a really poor UX.

  9. dunxen commented on Feb 3, 2022

    @dunxen
    Contributor

    Busy working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issue

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions