lnd/peer
Jared Tobin ceff3ceb4b
peer: never use RBF coop close for aux channels
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.
2026-07-14 13:24:33 -02:30
..
brontide.go peer: never use RBF coop close for aux channels 2026-07-14 13:24:33 -02:30
brontide_test.go peer: never use RBF coop close for aux channels 2026-07-14 13:24:33 -02:30
chan_observer.go multi: upgrade to btcd v2 modules 2026-06-24 10:58:36 -07:00
daemon_adapters.go multi: upgrade to btcd v2 modules 2026-06-24 10:58:36 -07:00
interfaces.go peer+lnwire: move LinkUpdater to lnwire 2024-03-06 11:59:19 -08:00
log.go multi: start updating various loggers to use the new v2 type 2024-10-22 17:03:55 +02:00
musig_chan_closer.go multi: add custom nonce rand support to MuSig2 sessions 2026-04-13 12:21:42 -07:00
musig_nonce_order_test.go multi: upgrade to btcd v2 modules 2026-06-24 10:58:36 -07:00
onion_ratelimit.go lncfg+peer+server: add protocol.onion-msg-relay-all to bypass channel gate 2026-04-15 13:23:50 -07:00
onion_ratelimit_log_test.go peer: gate onion message ingress on having an open channel 2026-04-15 13:23:50 -07:00
onion_ratelimit_test.go lncfg+peer+server: add protocol.onion-msg-relay-all to bypass channel gate 2026-04-15 13:23:50 -07:00
ping_manager.go peer+lnd: add new CLI option to control if we D/C on slow pongs 2025-05-15 16:36:38 +02:00
ping_manager_test.go peer+lnd: add new CLI option to control if we D/C on slow pongs 2025-05-15 16:36:38 +02:00
rbf_close_wrapper_actor.go peer: never use RBF coop close for aux channels 2026-07-14 13:24:33 -02:30
rbf_close_wrapper_actor_test.go multi: upgrade to btcd v2 modules 2026-06-24 10:58:36 -07:00
setup_test.go multi: use MakeTestGraph everywhere for test graph creation 2025-05-22 14:14:42 +02:00
test_utils.go peer: use channel state open channel 2026-07-07 07:18:59 -03:00