What changed, and why it matters
This is a small bookkeeping update in Electrum's Lightning Network code. It adds two already-supported Lightning features to a master list of 'implemented features' and adds a comment reminding future developers to keep that list in sync. There is no direct security fix, but keeping the feature lists consistent helps prevent future protocol confusion or misadvertised capabilities.
No immediate action required. Treat as routine maintenance. Reviewers may want to verify that the newly added feature bits are indeed fully implemented and that no other LNWALLET_FEATURES are still missing from LN_FEATURES_IMPLEMENTED.
Security signals we found
Feature-bit consistency fix for Lightning protocol advertisement
No memory-safety, cryptographic, or authorization change
No input validation or parsing logic modified
Comment-only addition in lnworker.py
Evidence from the diff
The commit updates LN_FEATURES_IMPLEMENTED in electrum/lnutil.py to include OPTION_UPFRONT_SHUTDOWN_SCRIPT and OPTION_SUPPORT_LARGE_CHANNEL (both optional and required bits). These features were already declared in LNWALLET_FEATURES in electrum/lnworker.py but were missing from the global implemented-features bitmask. A comment is also added in lnworker.py reminding developers to update LN_FEATURES_IMPLEMENTED when adding new features. This is a consistency/correctness patch, not a vulnerability remediation.
Changed components
electrum/lnutil.pyelectrum/lnworker.pyInspect captured patch +3 / −0
diff --git a/electrum/lnutil.py b/electrum/lnutil.py
index e725092..56b620a 100644
--- a/electrum/lnutil.py
+++ b/electrum/lnutil.py
@@ -1709,6 +1709,8 @@ LN_FEATURES_IMPLEMENTED = (
| LnFeatures.OPTION_CHANNEL_TYPE_OPT | LnFeatures.OPTION_CHANNEL_TYPE_REQ
| LnFeatures.OPTION_SCID_ALIAS_OPT | LnFeatures.OPTION_SCID_ALIAS_REQ
| LnFeatures.OPTION_ANCHORS_OPT | LnFeatures.OPTION_ANCHORS_REQ
+ | LnFeatures.OPTION_UPFRONT_SHUTDOWN_SCRIPT_OPT | LnFeatures.OPTION_UPFRONT_SHUTDOWN_SCRIPT_REQ
+ | LnFeatures.OPTION_SUPPORT_LARGE_CHANNEL_OPT | LnFeatures.OPTION_SUPPORT_LARGE_CHANNEL_REQ
)
diff --git a/electrum/lnworker.py b/electrum/lnworker.py
index 3ed9e37..8481a52 100644
--- a/electrum/lnworker.py
+++ b/electrum/lnworker.py
@@ -195,6 +195,7 @@ BASE_FEATURES = (
)
# we do not want to receive unrequested gossip (see lnpeer.maybe_save_remote_update)
+# NOTE: Also update lnutil.LN_FEATURES_IMPLEMENTED when adding a new feature
LNWALLET_FEATURES = (
BASE_FEATURES
| LnFeatures.OPTION_DATA_LOSS_PROTECT_REQ
Why this scored 18/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.