diff --git a/chanacceptor/rpcacceptor.go b/chanacceptor/rpcacceptor.go index aff8c3dc701..1a06b659c55 100644 --- a/chanacceptor/rpcacceptor.go +++ b/chanacceptor/rpcacceptor.go @@ -356,6 +356,30 @@ func (r *RPCAcceptor) sendAcceptRequests(errChan chan error, ): commitmentType = lnrpc.CommitmentType_SIMPLE_TAPROOT + case channelFeatures.OnlyContains( + lnwire.SimpleTaprootChannelsRequiredFinal, + lnwire.ZeroConfRequired, + lnwire.ScidAliasRequired, + ): + commitmentType = lnrpc.CommitmentType_SIMPLE_TAPROOT_FINAL + + case channelFeatures.OnlyContains( + lnwire.SimpleTaprootChannelsRequiredFinal, + lnwire.ZeroConfRequired, + ): + commitmentType = lnrpc.CommitmentType_SIMPLE_TAPROOT_FINAL + + case channelFeatures.OnlyContains( + lnwire.SimpleTaprootChannelsRequiredFinal, + lnwire.ScidAliasRequired, + ): + commitmentType = lnrpc.CommitmentType_SIMPLE_TAPROOT_FINAL + + case channelFeatures.OnlyContains( + lnwire.SimpleTaprootChannelsRequiredFinal, + ): + commitmentType = lnrpc.CommitmentType_SIMPLE_TAPROOT_FINAL + case channelFeatures.OnlyContains( lnwire.SimpleTaprootOverlayChansRequired, lnwire.ZeroConfRequired, diff --git a/docs/release-notes/release-notes-0.21.0.md b/docs/release-notes/release-notes-0.21.0.md index ea6b0a3aaee..23b93a0fd0d 100644 --- a/docs/release-notes/release-notes-0.21.0.md +++ b/docs/release-notes/release-notes-0.21.0.md @@ -78,6 +78,16 @@ subscriptions and the hodl queue, preventing orphaned subscriptions from blocking invoice resolution. +* [Fixed two follow-ups to the production taproot channels + work](https://github.com/lightningnetwork/lnd/pull/10763). The RPC channel + acceptor switch now maps `SIMPLE_TAPROOT_FINAL` (with every combination of + the `scid-alias` / `zero-conf` modifiers) so final-taproot opens are + reported to external acceptor clients with the correct commitment type + instead of `UNKNOWN_COMMITMENT_TYPE`. The taproot RBF cooperative-close + auto-enable is also narrowed to skip taproot-overlay channels, since the + RBF close state machine does not yet thread through the `AuxCloser` hook + that overlay channels rely on to build aux-aware close transactions. + # New Features - [Basic Support](https://github.com/lightningnetwork/lnd/pull/9868) for onion diff --git a/server.go b/server.go index 9eddf92e691..09cb4858bdb 100644 --- a/server.go +++ b/server.go @@ -670,11 +670,18 @@ func newServer(ctx context.Context, cfg *Config, listenAddrs []net.Addr, "in a standalone lnd build") } - // If either taproot channel type is enabled, we also need to enable - // the RBF cooperative close protocol, as it is required for taproot - // channel interoperability. - if cfg.ProtocolOptions.TaprootChans || - cfg.ProtocolOptions.TaprootOverlayChans { + // If taproot channels are enabled, we also enable the RBF cooperative + // close protocol, as it is required for taproot channel + // interoperability. + // + // Exception: when taproot-overlay channels are enabled we do NOT + // auto-enable RBF, because the RBF coop close state machine does not + // yet thread through the AuxCloser hook that overlay channels rely on + // to build the aux-aware close transaction. Forcing RBF on for a + // node that holds overlay channels would silently break their coop + // closes. + if cfg.ProtocolOptions.TaprootChans && + !cfg.ProtocolOptions.TaprootOverlayChans { cfg.ProtocolOptions.RbfCoopClose = true }