Skip to content

LNWallet: make anchor channels required#10620

Open
f321x wants to merge 1 commit intospesmilo:masterfrom
f321x:anchor_channels_req
Open

LNWallet: make anchor channels required#10620
f321x wants to merge 1 commit intospesmilo:masterfrom
f321x:anchor_channels_req

Conversation

@f321x
Copy link
Copy Markdown
Member

@f321x f321x commented Apr 30, 2026

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.

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 SomberNight self-requested a review April 30, 2026 16:13
Comment thread electrum/lnworker.py
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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #10622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants