Uh oh!
There was an error while loading. Please reload this page.
setchannel: allow upgrading private channels to public - #8982
setchannel: allow upgrading private channels to public#8982vincenzopalazzo wants to merge 1 commit into
Conversation
78c96c9 to
bdbb292Comparemadelinevibes
commented
May 4, 2026
@vincenzopalazzo can you rebase and clear CI for Rusty to review, please? Thanks! |
Add an `announce` parameter to the `setchannel` RPC command that allows upgrading an existing private (unannounced) channel to a public (announced) channel. When set to true, the channel_flags are updated to set the CHANNEL_FLAGS_ANNOUNCE_CHANNEL bit, and the gossip state machine transitions from the private states into the public announcement flow. Both peers must independently set announce=true for the channel announcement to complete, as the protocol requires announcement signatures from both sides. To facilitate this, announcement_signatures received while a channel is still private are now stashed rather than rejected, so they are available immediately if/when the local side upgrades. State transitions added: - CGOSSIP_PRIVATE -> CGOSSIP_WAITING_FOR_MATCHING_PEER_SIGS - CGOSSIP_PRIVATE -> CGOSSIP_WAITING_FOR_ANNOUNCE_DEPTH - CGOSSIP_PRIVATE -> CGOSSIP_ANNOUNCED Setting announce=false (public to private) is rejected as this is not possible once a channel has been announced. Changelog-Added: `setchannel` now accepts an `announce` parameter to upgrade private channels to public. Fixes #7438
bdbb292 to
5ae3369Comparerustyrussell
commented
May 7, 2026
|
mawroayb-ui
commented
May 22, 2026
I opened a small helper PR against this branch with the review-feedback pieces Rusty called out: test coverage for \setchannel announce=true, experimental docs/schema wording, \�26.06\ metadata, generated Rust RPC fields, and a clearer \�nnounce=false\ error.\n\nHelper PR: https://github.com/vincenzopalazzo/lightning/pull/9\n\nValidation I could run locally: JSON schema parsing via PowerShell \ConvertFrom-Json\ and \git diff --check. I could not run the full CLN test suite from this Windows workspace. |
madelinevibes
commented
Aug 3, 2026
hi @vincenzopalazzo are you planning to visit this work soon? We're working towards a release date of Aug 17 for RC1 for 26.09 so we'd need your amendments and a review before then. If not, please LMK so we can move to 26.12. |
madelinevibes
commented
Aug 12, 2026
@mawroayb-ui if you'd like to continue this work, please open a new PR and link to the original issue #7438 so your work can be reviewed and hopefully eventually merged for the bounty! |
Summary
announceparameter tosetchannelRPC to upgrade private channels to publicannounce=true, the channel enters the public announcement flow (exchange announcement_signatures, wait for 6 confirmations, broadcast channel_announcement)Details
The channel gossip state machine gains three new transitions from
CGOSSIP_PRIVATE:CGOSSIP_PRIVATE->CGOSSIP_WAITING_FOR_MATCHING_PEER_SIGS(normal case)CGOSSIP_PRIVATE->CGOSSIP_WAITING_FOR_ANNOUNCE_DEPTH(peer sigs already received)CGOSSIP_PRIVATE->CGOSSIP_ANNOUNCED(peer sigs received + 6 confirms already reached)Setting
announce=falseis rejected since public-to-private conversion is not possible.Fixes#7438
Test plan
setchannel <id> announce=trueon both sides, verify channel gets announcedsetchannelwithannounce=falsereturns error