Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Prepayment failing with Failed prepayment: UnknownPaymentHash causes problems #54
I tried to do a Loop Out:
Here's what appeared in the Loop logs:
The prepayment failed quickly with
Today I restarted my Loop server, and it updated to 'FAILED'.
The payments sent out were for: 485,707 sats and 27,914 sats, for a total of: 513,621 sats
So far it looks like:
My main question is: what has happened to the 485,707 sats payment that went out? Will it time out or come back? Or is it gone forever? If it times out, how will it come back to a channel that's forced-closing or forced-closed?
My second question is: did Loop cause the force-closing of the channel?
My third question: can we get Loop to handle the initial 'Failed prepayment: UnknownPaymentHash' better?
This has happened several times (including the force-close) but I've just used the logs for one instance. I can provide others if it'll help.
I wish I was better at tracing what has happened. I have tried. If you've any tips or advice that can show me how to trace what has happened, please do let me know.
The UnknownPaymentHash error is a known issue that can happen if blocks are mined too quickly during the period where a payment is making its way to the service. As a workaround you can try initiating another swap.
If you consider payments off-chain, they are regular off-chain payments and can have a timeout length depending on the route your node chose. Since they are regular off-chain payments, there is nothing different about them with regard to force closes, other than the fact that they may be pending longer than usual.
Potentially we should allow directing a maximum value for this in the swap command. In a future Loop release we can also reduce the pending time of the swap.
Thanks. Is this after the UnknownPaymentHash error but before the Loop server recognises it as 'FAILED'? Or is it possible to use this to fix up the current situation with the force-closed channels?
I don't think I follow this. If a payment went out but is still unsettled, it will time out. I get that. But I'm lost when it comes to how that would time out when the channel is force-closing. In a regular situation the funds are locked from the channel while the payment is in-flight (I think), and if the payment times out those funds are unlocked. But where do the funds come back to in the force-closed situation? Should I expect the channel closure to return the full balance to my wallet (including the timed-out payment)?
Also - how can I inspect these in-flight payments? They don't appear in
Some further information on the force close now that it has completed. Here are the close details from RTL:
Here's a link to the closing transaction
It looks like the 'swap payment' is still in-flight - how can I check when it will time out, since it doesn't appear in