Skip to content

Commit 8e42695

Browse files
committed
Dual-advertise splice prototype and production feature bits
LDK 0.2.2 will rename the splice feature from prototype bit 155 to production bit 63. Setting both bits during the migration window keeps splice working with three peer cohorts on the same LSP binary: - un-upgraded clients on bit 155 only, - upgraded clients and ACINQ on bit 63, - upgraded clients that still see bit 155 (no harm). ACINQ is the exception: their eclair stack chokes when both bits are set, so the previous commit strips bit 155 from outbound Inits to ACINQ specifically. Sunset path: when all clients have upgraded, drop the set_splicing_optional() call and re-bump. Refs MDK-799
1 parent 56321de commit 8e42695

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lightning/src/ln/channelmanager.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15669,6 +15669,11 @@ where
1566915669

1567015670
/// Fetches the set of [`NodeFeatures`] flags that are provided by or required by
1567115671
/// [`ChannelManager`].
15672+
///
15673+
/// Note: the ACINQ splice-prototype carve-out applied in
15674+
/// [`BaseMessageHandler::provided_init_features`] is intentionally *not*
15675+
/// applied here. The issue with dual-advertise is in `Init`, not in
15676+
/// gossip `node_announcement`s, and gossip is broadcast not per-peer.
1567215677
pub(crate) fn provided_node_features(config: &UserConfig) -> NodeFeatures {
1567315678
let mut node_features = provided_init_features(config).to_context();
1567415679
node_features.set_keysend_optional();
@@ -15746,6 +15751,9 @@ pub fn provided_init_features(config: &UserConfig) -> InitFeatures {
1574615751
features.set_simple_close_optional();
1574715752
features.set_quiescence_optional();
1574815753
features.set_splicing_optional();
15754+
// Dual-advertise alongside the prototype bit during the LDK 0.2.2 migration.
15755+
// Stripped per-peer for ACINQ in the BaseMessageHandler impl above. See MDK-799.
15756+
features.set_splicing_production_optional();
1574915757

1575015758
if config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx {
1575115759
features.set_anchors_zero_fee_htlc_tx_optional();

0 commit comments

Comments
 (0)