lightning
lightning copied to clipboard
close: Do not attempt a unilateral close when we see another close on-chain
In Greenlight we have an issue with channels that close, and the
signer got desynced from the Node due to a non-atomic update which
bumped the VLS signer commitment number, but the corresponding bump
got lost on CLN due to preemption. The problem here is that the signer
will not sign off on any future states, so the channel is unusable and
needs to be closed. If the peer closes the channel however, the last-
ditch attempt of publishing the last state, i.e., signing the n-1
th
commitment TX, when VLS believes we are at the n
th, won't work.
To get past this situation we selectively skip the unilateral close
attempt on our end, by setting passive=true
when calling
drop_to_chain
. This is safe because the way we got to this place is
by seeing our counterparty's unilateral close confirmed in a block we
are processing, therefore it is already too late to publish the
unilateral close anyway (it conflicts with the counterparty's close).
Changelog-Changed: close: We no longer attempt to publish a unilateral close that'd fail anyway when we witness a close onchain.