You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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"
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.
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?
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.
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.
Activity
TheBlueMatt commentedon Aug 18, 2021
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"
1nF0rmed commentedon Oct 8, 2021
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?
t-bast commentedon Oct 8, 2021
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.
1nF0rmed commentedon Oct 8, 2021
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?
TheBlueMatt commentedon Oct 8, 2021
While we don't assume access to the current time, we do have
timer_tick_occurredwhich 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.dunxen commentedon Dec 13, 2021
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.
TheBlueMatt commentedon Dec 23, 2021
Marking 0.1 cause this can interact natively with some senders to make a really poor UX.
dunxen commentedon Feb 3, 2022
Busy working on this