-
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
Avoid force-close: ping peer before sending HTLC #6482
Comments
Closing as duplicate of #2992 |
Also FWIW, the remote peer being unresponsive isn't what caused the channel to force close in this case. This isn't an error we'll force close on. |
Are you 100% sure about this? I see more than one example where a force-close happened just after this message. The code also looks like this is the case, and I see plenty of good reasons to close a channel so that my peer can't settle the HTLC in the far future. |
Here's the code that determines if we need to go on chain: Invoked from here: |
I was referring to the fact that us sending that error won't trigger an auto shutdown. However if for some reason we aren't always cancelling back that HTLC (w/ mailbox auto expiry) then a force close may be resulting. We're tracking that in #6485 |
Background
My node often (21x since 08/Feb/2022) force-closes channels because my peer didn't settle/fail a HTLC in time, where this HTLC is only included in my peer's force close transaction (remote commitment).
I believe this happens if my node sends out a HTLC, but my peer simply doesn't respond. As such I believe it would help (in most, but not all cases) to ping my peer and request a pong response before sending out a signed commitment with the new HTLC (
update_add_HTLC
andcommitment_signed
?).The corresponding message:
Before:
Background:
https://bitcoin.stackexchange.com/q/113335/7214
Your environment
version of
lnd
: 0.14.3-beta-rc1which operating system (
uname -a
on *Nix): Linux server 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64 GNU/Linuxversion of
btcd
,bitcoind
, or other backend: bitcoind v23Steps to reproduce
Send HTLC to peer. Shutdown peer after receiving my signed transaction but before sending back the response (which is the force-close transaction including the HTLC, signed by my peer, that I could use to force-close the channel).
Expected behaviour
I'd expect lnd to not send the HTLC to a peer that is unresponsive.
Actual behaviour
lnd sends out the HTLC and, once it times out, force-closes the channel.
The text was updated successfully, but these errors were encountered: