electrum refuses to exchange gossip with CLN nodes, due to missing feature OPTION_CHANNEL_TYPE_OPT. moving OPTIONAL_CHANNEL_TYPE_OPT to BASE_FEATURES
What changed, and why it matters
This commit fixes a Lightning Network compatibility bug in Electrum. Electrum nodes were refusing to exchange network routing gossip with Core Lightning (CLN) nodes because Electrum was not advertising a specific feature flag called OPTION_CHANNEL_TYPE_OPT in its baseline feature set. The fix moves that feature flag from the wallet-only features to the base features shared by all Lightning operations, including gossip. There is no direct security vulnerability here; it is an interoperability/availability fix.
Treat as a normal interoperability/availability fix. No urgent security action required. Review whether other feature bits expected by major Lightning implementations should also be in BASE_FEATURES.
Security signals we found
No cryptographic, authentication, or authorization changes
No memory safety, input validation, or parsing changes
Change is a feature-bit interoperability fix for Lightning protocol gossip
No evidence of vulnerability exploitation or attacker benefit
Evidence from the diff
The patch moves LnFeatures.OPTION_CHANNEL_TYPE_OPT from LNWALLET_FEATURES to BASE_FEATURES in electrum/lnworker.py. BASE_FEATURES is used as the baseline feature bitset for both LNWallet and LNGossip. Previously, OPTION_CHANNEL_TYPE_OPT was only advertised by wallet nodes, so gossip-only nodes (LNGossip) did not advertise it. Some CLN nodes require this feature bit to be present before they will exchange gossip, causing Electrum gossip peers to be rejected. The change is purely a feature-bit advertisement adjustment and does not alter cryptographic or authorization logic.
Changed components
electrum/lnworker.pyLightning Network feature negotiationLNGossip peer connectionsInspect captured patch +2 / −2
diff --git a/electrum/lnworker.py b/electrum/lnworker.py
index d3074ab..c68e4bf 100644
--- a/electrum/lnworker.py
+++ b/electrum/lnworker.py
@@ -162,7 +162,7 @@ class ErrorAddingPeer(Exception): pass
# set some feature flags as baseline for both LNWallet and LNGossip
-# note that e.g. DATA_LOSS_PROTECT is needed for LNGossip as many peers require it
+# note that e.g. DATA_LOSS_PROTECT and OPTION_CHANNEL_TYPE_OPT are needed for LNGossip as many peers require it
BASE_FEATURES = (
LnFeatures(0)
| LnFeatures.OPTION_DATA_LOSS_PROTECT_OPT
@@ -170,6 +170,7 @@ BASE_FEATURES = (
| LnFeatures.VAR_ONION_OPT
| LnFeatures.PAYMENT_SECRET_OPT
| LnFeatures.OPTION_UPFRONT_SHUTDOWN_SCRIPT_OPT
+ | LnFeatures.OPTION_CHANNEL_TYPE_OPT
)
# we do not want to receive unrequested gossip (see lnpeer.maybe_save_remote_update)
@@ -182,7 +183,6 @@ LNWALLET_FEATURES = (
| LnFeatures.BASIC_MPP_OPT
| LnFeatures.OPTION_TRAMPOLINE_ROUTING_OPT_ELECTRUM
| LnFeatures.OPTION_SHUTDOWN_ANYSEGWIT_OPT
- | LnFeatures.OPTION_CHANNEL_TYPE_OPT
| LnFeatures.OPTION_SCID_ALIAS_OPT
| LnFeatures.OPTION_SUPPORT_LARGE_CHANNEL_OPT
)
Why this scored 25/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.