mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-19 13:17:32 +02:00
The RBF coop close flow was selected purely from the peer-level
feature bits (rbfCoopCloseAllowed), with no per-channel exclusion.
The RBF close state machine does not invoke any of the aux closer
hooks: the Shutdown message it sends carries no aux custom records,
and the close transaction it negotiates contains no aux outputs. For
a taproot asset (overlay) channel this means the funding output --
which anchors the asset commitment -- is spent by a transaction that
does not re-commit the assets, irrevocably destroying them on-chain.
The aux closer then fails to finalize the confirmed close (it was
never asked to produce vPackets), which blocks the chain watcher's
coop close handler and leaves the channel stuck in waiting-close.
See lightninglabs/taproot-assets#2196 for an instance of this
happening in the wild.
Extend rbfCoopCloseAllowed to take the channel type: it now requires
the RBF feature bits AND that the channel type carries no tapscript
root, and is used at every site that chooses between the RBF closer
and the legacy negotiate closer. The RBF close actor's own eligibility
check is dropped entirely: an actor is only ever registered after
initRbfChanCloser has vetted the channel, so the check was redundant.
Aux channels now always fall back to the legacy closer, which is
aux-aware, regardless of the negotiated feature bits. Since no RBF
msg-router endpoint is registered for aux channels, an incoming Shutdown
from the peer likewise falls through to the legacy close handling. As a
backstop, initRbfChanCloser now refuses to construct an RBF closer for
aux channels outright.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| brontide.go | ||
| brontide_test.go | ||
| chan_observer.go | ||
| daemon_adapters.go | ||
| interfaces.go | ||
| log.go | ||
| musig_chan_closer.go | ||
| musig_nonce_order_test.go | ||
| onion_ratelimit.go | ||
| onion_ratelimit_log_test.go | ||
| onion_ratelimit_test.go | ||
| ping_manager.go | ||
| ping_manager_test.go | ||
| rbf_close_wrapper_actor.go | ||
| rbf_close_wrapper_actor_test.go | ||
| setup_test.go | ||
| test_utils.go | ||