Skip to content

Assume option_channel_type #8389

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

rustyrussell
Copy link
Contributor

As referred to in lightning/bolts#1232 we make this a compulsory feature.

Cleans up a lot of code, including some workarounds for 23.05.

As per BOLT recommendation lightning/bolts#1232, this means
we will insist on this being available.

For CLN, we added this in 0.12.0 (2022-08-23), though there were fixes as late as 24.02. Either way that's well outside our support window.

Signed-off-by: Rusty Russell <[email protected]>
Closes: ElementsProject#8152
Changelog-Changed: Protocol: We now insist that peers support `option_channel_type` (in CLN since 0.12.0 in late 2022, similar for other implementations).
Simplifies our logic somewhat.

Signed-off-by: Rusty Russell <[email protected]>
This allows us to specify:

	l2.rpc.plugin_start(plugin_path, zeroconf_allow=l1.info['id'])

Signed-off-by: Rusty Russell <[email protected]>
Makes sure we don't break it!

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell added this to the v25.09 milestone Jul 3, 2025
Prior to it being compulsory, these daemons would need a default value.  Now it's
always required, it's clearer if it's always told.

There's no "default_channel_type" now everyone has to specify channel_type either,
so rename it to "desired_channel_type" and put it in lightningd specifically.

Note that the channel_type can have options added: either option_scid_alias or option_zeroconf.

This results in a slight behavior change: we will get type zeroconf even if we didn't ask for it, if they gave it to us.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Changed: JSON-RPC: fundchannel / fundchannel_start returned `channel_type` will include option_zeroconf if it was implied by a 0 minimum_depth, even if we didn't explicitly ask for a zero conf channel.
This was needed for v23.05 which would set opt_scid_alias even if we didn't.

Now everyone handles it properly, we can simply set it unconditionally.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Removed: Protocol: backwards compatibility allowances for CLN before 23.08 which didn't handle option_scid_alias properly.
@rustyrussell rustyrussell force-pushed the guilt/assume-option_channel_type branch from 39d0294 to 6712737 Compare July 4, 2025 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant