chanacceptor: map SIMPLE_TAPROOT_FINAL in rpc acceptor
What changed, and why it matters
This commit fixes a bug in LND's channel-acceptor RPC where a newly added taproot channel type was not being translated into the external protocol enum. External channel-acceptor clients would receive an 'UNKNOWN' commitment type instead of the real one, which could cause them to reject or mislabel taproot channel opens. It is a correctness/availability fix for a protocol-mapping gap, not a cryptographic vulnerability or direct funds-loss bug.
Treat as a routine bugfix worth including in release notes for RPC/taproot channel operators, but not as a critical security patch. Operators using external channel acceptors should upgrade to avoid spurious channel rejections or misclassification of Simple Taproot Final channels.
Security signals we found
Missing enum mapping causes external RPC consumers to misclassify commitment type
Could lead to denial of channel opens by external acceptor clients
No direct funds loss or cryptographic weakness in the diff
Fix is additive and conservative, only adding the omitted cases
Evidence from the diff
In chanacceptor/rpcacceptor.go, sendAcceptRequests maps local feature-bit combinations to lnrpc.CommitmentType values before sending them to external channel-acceptor plugins. The switch was missing the SimpleTaprootChannelsRequiredFinal variants (plain, with zero-conf, with scid-alias, and with both modifiers), so those channel opens fell through to the default branch and were reported as UNKNOWN_COMMITMENT_TYPE. The patch adds the four missing case branches mapping them to SIMPLE_TAPROOT_FINAL. This is a straightforward enum coverage fix; it does not change consensus, signature validation, or channel-state logic.
Changed components
chanacceptor/rpcacceptor.goRPC channel acceptorlnrpc.CommitmentType enum mappingInspect captured patch +24 / −0
diff --git a/chanacceptor/rpcacceptor.go b/chanacceptor/rpcacceptor.go
index aff8c3d..1a06b65 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,
Why this scored 47/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.