lnworker: LNGossip to signal OPTION_ANCHORS_OPT
What changed, and why it matters
This commit adds a single Lightning Network feature flag to Electrum's gossip subsystem so it can talk to peers that require 'anchor' channel commitments. It is a compatibility/interoperability fix, not a patch for an active attack. The change signals support but does not implement anchor logic, so any security relevance is indirect (avoiding connection failures or protocol confusion with stricter peers).
Treat as a routine protocol-compatibility update. Reviewers may want to confirm that LNGossip does not actually need anchor logic beyond feature-bit advertisement, and that this change does not accidentally commit to behavior it cannot fulfill.
Security signals we found
Feature-bit compatibility change only
No input validation, memory, or cryptographic code touched
Indirect security relevance: prevents protocol-level interoperability failures with anchor-required peers
Commit message frames change as proactive compatibility, not as a vulnerability fix
Evidence from the diff
In electrum/lnworker.py the BASE_FEATURES bitmask used by LNGossip is extended with LnFeatures.OPTION_ANCHORS_OPT. LNGossip previously did not advertise anchor support, which could cause it to reject or be rejected by peers that set OPTION_ANCHORS_REQ. The commit follows a prior change where LNWallet began setting OPTION_ANCHORS_REQ. No cryptographic, validation, or parsing code is modified.
Changed components
electrum/lnworker.pyLNGossip feature advertisement (BASE_FEATURES)Inspect captured patch +1 / −0
diff --git a/electrum/lnworker.py b/electrum/lnworker.py
index 80eb8f4..c93a644 100644
--- a/electrum/lnworker.py
+++ b/electrum/lnworker.py
@@ -189,6 +189,7 @@ BASE_FEATURES = (
| LnFeatures.OPTION_STATIC_REMOTEKEY_OPT
| LnFeatures.VAR_ONION_OPT
| LnFeatures.PAYMENT_SECRET_OPT
+ | LnFeatures.OPTION_ANCHORS_OPT
| LnFeatures.OPTION_UPFRONT_SHUTDOWN_SCRIPT_OPT
| LnFeatures.OPTION_CHANNEL_TYPE_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.