Add 0FC to the set of supported features in non-test builds
What changed, and why it matters
This commit removes a test-only restriction so that production builds of rust-lightning now advertise support for 'anchor zero-fee commitments' (0FC), a Lightning channel feature. The change itself is a feature enablement, not a bug fix for an active vulnerability. It could affect protocol compatibility and fee-bumping behavior, but there is no direct evidence in the commit or supplied references that this resolves a security flaw.
Review whether enabling 0FC in production has been fully validated against the current implementation of package construction, fee-bumping, and counterparty compatibility. Monitor for follow-up commits, release notes, or security advisories from Lightning Dev Kit that explain the security relevance of this change.
Security signals we found
Feature gate removal for a protocol feature in production code
Change affects advertised Lightning channel type feature bits
No accompanying test changes, documentation, or advisory references in commit
No direct evidence of vulnerability fix in diff or commit message
Evidence from the diff
The patch removes #[cfg(test)] gating around supported_feature_set.set_anchor_zero_fee_commitments_required() in verify_channel_type_features(). This causes non-test builds to treat anchor zero-fee commitments (feature bit 0FC/option_anchors/zero fee commitments) as a supported channel type, alongside anchors_zero_htlc_fee, scid_privacy, and zero_conf. The change is a two-line deletion that flips a compile-time feature gate.
Changed components
lightning/src/chain/package.rsChannel type feature verification logicAnchor zero-fee commitments (0FC) supportInspect captured patch +0 / −2
diff --git a/lightning/src/chain/package.rs b/lightning/src/chain/package.rs
index 7b5d047..db46f3b 100644
--- a/lightning/src/chain/package.rs
+++ b/lightning/src/chain/package.rs
@@ -98,8 +98,6 @@ pub(crate) fn verify_channel_type_features(channel_type_features: &Option<Channe
let mut supported_feature_set = ChannelTypeFeatures::anchors_zero_htlc_fee_and_dependencies();
supported_feature_set.set_scid_privacy_required();
supported_feature_set.set_zero_conf_required();
-
- #[cfg(test)]
supported_feature_set.set_anchor_zero_fee_commitments_required();
// allow the passing of an additional necessary permitted flag
Why this scored 44/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.