You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
setchannel: allow upgrading private channels to public
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
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: doc/schemas/setchannel.json
+22-5Lines changed: 22 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
"$schema": "../rpc-schema-draft.json",
3
3
"type": "object",
4
4
"rpc": "setchannel",
5
-
"title": "Command for configuring fees / htlc range advertized for a channel",
5
+
"title": "Command for configuring fees / htlc range advertized for a channel, and upgrading private channels to public",
6
6
"description": [
7
-
"The **setchannel** RPC command sets channel specific routing fees, and `htlc_minimum_msat` or `htlc_maximum_msat` as defined in BOLT #7. The channel has to be in normal or awaiting state. This can be checked by **listpeers** reporting a *state* of CHANNELD_NORMAL or CHANNELD_AWAITING_LOCKIN for the channel.",
7
+
"The **setchannel** RPC command sets channel specific routing fees, and `htlc_minimum_msat` or `htlc_maximum_msat` as defined in BOLT #7. It can also upgrade a private (unannounced) channel to a public (announced) channel using the *announce* parameter. The channel has to be in normal or awaiting state. This can be checked by **listpeers** reporting a *state* of CHANNELD_NORMAL or CHANNELD_AWAITING_LOCKIN for the channel.",
8
8
"",
9
9
"These changes (for a public channel) will be broadcast to the rest of the network (though many nodes limit the rate of such changes they will accept: we allow 2 a day, with a few extra occasionally)."
10
10
],
@@ -59,6 +59,13 @@
59
59
"description": [
60
60
"If set to True means to allow the peer to set the commitment transaction fees (or closing transaction fees) to any value they want. This is dangerous: they could set an exorbitant fee (so HTLCs are unenforcable), or a tiny fee (so that commitment transactions cannot be relayed), but avoids channel breakage in case of feerate disagreements. (Note: the global `ignore_fee_limits` setting overrides this)."
61
61
]
62
+
},
63
+
"announce": {
64
+
"added": "v25.05",
65
+
"type": "boolean",
66
+
"description": [
67
+
"If set to True, upgrades a private channel to a public channel. The channel will be announced to the network once both sides have exchanged announcement signatures and the funding transaction has at least 6 confirmations. Note: the peer must also independently set their side to public (e.g. via the same command) for the announcement to succeed. Cannot be set to false (public channels cannot be made private again)."
68
+
]
62
69
}
63
70
}
64
71
},
@@ -83,7 +90,8 @@
83
90
"fee_proportional_millionths",
84
91
"minimum_htlc_out_msat",
85
92
"maximum_htlc_out_msat",
86
-
"ignore_fee_limits"
93
+
"ignore_fee_limits",
94
+
"announce"
87
95
],
88
96
"properties": {
89
97
"peer_id": {
@@ -146,6 +154,13 @@
146
154
"description": [
147
155
"The requested htlcmax was greater than the channel capacity, so we set it to the channel capacity."
148
156
]
157
+
},
158
+
"announce": {
159
+
"type": "boolean",
160
+
"added": "v25.05",
161
+
"description": [
162
+
"Whether the channel is set to be announced to the network."
0 commit comments