-
Notifications
You must be signed in to change notification settings - Fork 407
Consider existing in-flight HTLCs when routing #1267
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
Comments
Is
(cc: @jurvis) |
Yes, that handles it in the first route fetch, but we don't do any kind of bookkeeping across path retries. I'll be honest I'm not 100% sure what I was referring to here, but I think it was on retry, or certainly that would make sense. |
@jurvis and I were chatting about this recently. IIUC, the problem can be more generally stated as accounting for known in-flight HTLCs across all our outstanding payments. Either way, the question may be how to keep track of this and what that means for the One idea would be to track these in-flight HTLCs either separately or as part of the |
Ah, but that would only be helpful for removing HTLCs which are no longer in flight. Adding them would require a mutable Edit: Hmmm... such a data structure would need to be mutated when actually sending the payment (i.e., in |
Yea it's really not clear to me what the right answer is here, I think naively the simplest approach is to store extra information in the InvoicePayer that can then be passed to find_route, some kind of in-flight tracking struct which can be efficiently queried for channel balance information. |
I think an issue I encountered in #1526 is somewhat related: when calculating the minimum per-path value contribution, it would be nice to do this dynamically, i.e., allow a lower contribution for subsequent paths, if we have collected paths that contribute a good amount already. However, this is currently hard to do with the current logic in |
Closing as addressed in #1643. |
lnd
has a very long-standing bug where if you go to send a payment and it decides to split the payment, it may try to send both over the same channel, even if the channel does not have sufficient capacity to handle both parts. Instead, one part will be sent, and the other part will fail, leaving the payment to wait until the MPP times out. This is worse when paying an LDK client because of #1050. However, even on the sending side I believe we actually have the same bug. We should check for this and figure out how to handle this.The text was updated successfully, but these errors were encountered: