LNWallet: make anchor channels required#10620
Open
f321x wants to merge 1 commit intospesmilo:masterfrom
Open
Conversation
If config.ENABLE_ANCHOR_CHANNELS is set, signal OPTION_ANCHORS_ZERO_FEE_HTLC_REQ instead of OPT. This will prevent opening new outgoing and incoming SRK channels. It will also prevent connecting to peers that don't signal anchor support at all, so existing channels to them would need to get force closed or the peer needs to be bullied into updating their node software. Existing SRK channels with peers that signal anchor support (e.g. SRK channel opened to Electrum Trampoline) remain usable.
SomberNight
reviewed
Apr 30, 2026
| features = LNWALLET_FEATURES | ||
| if self.config.ENABLE_ANCHOR_CHANNELS: | ||
| features |= LnFeatures.OPTION_ANCHORS_ZERO_FEE_HTLC_OPT | ||
| features |= LnFeatures.OPTION_ANCHORS_ZERO_FEE_HTLC_REQ |
Member
There was a problem hiding this comment.
This will prevent opening new [...] incoming SRK channels.
My reading of BOLT-02 suggests that just because option_anchors is negotiated on the peer session, it is still allowed to open an SRK channel by setting channel_type in open_channel accordingly.
Reviewing this and looking at the related code led me down a small rabbit hole, so I will open an alternative PR instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If config.ENABLE_ANCHOR_CHANNELS is set, signal
OPTION_ANCHORS_ZERO_FEE_HTLC_REQ instead of OPT.
This will prevent opening new outgoing and incoming SRK channels.
It will also prevent connecting to peers that don't signal anchor support at all (INIT features), so existing channels to them would need to get force closed or the peer needs to be bullied into updating their node software.
Existing SRK channels with peers that signal anchor support (e.g. SRK channel opened to Electrum Trampoline) remain usable.