-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[bug]: Pending HTLC in force closed channel although it's has been already resolved by the network #8277
Comments
It seems like the spend notification of that output was missed, but then it tried to resolve it again upon restart (but the htlc was already canceled back). Did you have other force closes during that time? |
Nope, only this one force close |
I already rescaned wallet via —reset-wallet-transactions, no change. Also my btc mempool size is 2048 so that shouldn’t be issue as well. |
Looks like all the outputs from that transaction have been spent, along with that HTLC you reference above: https://mempool.space/tx/85363840a2ff19e3e7d806cd84d56e2434136b46284c703f4cf61f79f5bb25d4#vin=0 The broadcast fails as the output has already been spent. The HTLC expired which is why a force close was triggered, so there was indeed a force close (as evidenced by the node state in the first place). Do you have start up logs that include the |
@Roasbeef zip included |
The problem with the FC is that I had no pending HTLCs with less than 14 blocks left, I have this monitored and it is alerting me. So in fact, no HTLC expired according to my node before this FC happened. |
The HTLC is still not resolved (Second Stage sweep still waiting to be resolved). The negative timelock is normal when your HTLC is not positive yielding to sweep back into your wallet: From your logs:
So you will need to wait until this HTLC is positive yielding or your can bump the fee down with:
But this behavior is expected. |
@ziggie1984 ok I get it. On the other hand, I am glad it doesn't take my sats from wallet! Previous HTLC from this FC did and took additional 50k sats from my wallet :(. Very bad because I wasn't able to stop it and couldn't do anything to prevent using extra wallet funds. |
yes we are aware of this, lnd 18 you will be able to limit the max-fee-rate for a sweep, and we are planning to make sweeps more configurable so that you have more control handling those expensive sweeps. I think the issue is resolved, feel free to open a discussion when you still have questions around the sweeping. |
The channel is stil not closed, but the weird thing is:
Any idea on the "anchor": "LOST" ? |
Lost in this case means that someone else swept the anchor (330 sats), since after 16 confirmations it becomes an anyone-can-spend output. |
Is there any way to close the channel itself? Let me try restarting ... |
Ok, restart didn't help, the anchor is back in limbo:
|
|
ok bumped fee: lncli wallet bumpfee --sat_per_vbyte 50 85363840a2ff19e3e7d806cd84d56e2434136b46284c703f4cf61f79f5bb25d4:0 and have TX in, lets see if it ever gets confirmed https://mempool.space/tx/62f88143dcab7ccf8f346b4babcfa020faa5f709e1da0ac6b2a137a53a4602a3 |
In case of a restart, lnd will try to sweep the anchor to its wallet, because the anchor is still not confirmed (although in a mempool swept by a thrid party) your lnd node will try to sweep it as well. This will go away as soon as all other outputs of the channel are resolved. The channel will remain in pending until all its outputs (excluding the anchor) are confirmed (which is a good thing and how it should be) |
Background
This is similar issue as: #8269
Channel on my node got force-closed and bunch of HTLCs were pending so besides paying huge amounts of sats on fees (huge issue), after 5+ days the channel is still pending close with negative blocks_til_maturity on pending HTLC which was in fact already resolved (10002 sats), check https://mempool.space/tx/43d5ab635d2281d876f07118a9a31454783f1a78a6bbaec8ddae69f6d120ad48#vout=2 :
This is how output of lncli pendingchannels:
When I restart node, I receive following error is logs:
Your environment
lnd
: v0.17.2uname -a
on *Nix): Linux 5.15.0-91-generic # 101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linuxbtcd
,bitcoind
, or other backend: v25.0Steps to reproduce
Can't reproduce, force-close came out of nowhere, didn't have any expiring HTLCs (having it monitored)
Expected behaviour
No Force Close in the first place and if that happens, it should not stay in Limbo after maturity
Actual behaviour
Above
The text was updated successfully, but these errors were encountered: