Move experimental `HtlcHold` bit from 1053 to 153
What changed, and why it matters
This commit moves an experimental Lightning network feature flag called HtlcHold from bit number 1053 to bit number 153. Feature bits are like numbered flags that tell other nodes what capabilities a node supports. The change is being made because bits 0-255 are reserved for official BOLT specifications, while higher numbers can be used by informal bLIPs. This is a cleanup to keep the experimental feature in the right numbering space and avoid future conflicts. It is not a security patch and does not fix a vulnerability.
No security action required. Treat as a normal protocol housekeeping change. Reviewers may want to verify that the new bit 153 does not conflict with any other defined feature bit in the same crate and that the comment accurately reflects the BOLTs PR numbering.
Security signals we found
No vulnerability fix present
No memory safety, cryptographic, or authorization change
Protocol feature bit renumbering only
Experimental feature flag relocation
Evidence from the diff
The patch in lightning-types/src/features.rs redefines the experimental HtlcHold feature bit from 1053 to 153. The macro define_feature! is updated so that the feature is now declared at bit 153 with the comment noting that the BOLTs PR uses bit 52/53 and +100 is added for the experimental bit. The feature placement arrays for InitContext and NodeContext are adjusted accordingly: HtlcHold now appears at byte 19 (bit 153) instead of byte 131 (bit 1053). This is a protocol-feature numbering change to keep experimental bits within the 0-255 BOLT-reserved range and avoid collision with bLIP-allocated bits above 255.
Changed components
lightning-types/src/features.rsHtlcHold feature bit definitionInitContext feature arrayNodeContext feature arrayInspect captured patch +20 / −20
diff --git a/lightning-types/src/features.rs b/lightning-types/src/features.rs
index b35cba4..835c8d2 100644
--- a/lightning-types/src/features.rs
+++ b/lightning-types/src/features.rs
@@ -171,9 +171,9 @@ mod sealed {
,,,,,,,,,
// Byte 17
AnchorZeroFeeCommitmentsStaging,
- // Byte 18 - 130
- ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
- // Byte 131
+ // Byte 18
+ ,
+ // Byte 19
HtlcHold,
]
);
@@ -200,14 +200,14 @@ mod sealed {
,,,,,,,,,
// Byte 17
AnchorZeroFeeCommitmentsStaging,
- // Byte 18 - 31
- ,,,,,,,,,,,,,,
+ // Byte 18
+ ,
+ // Byte 19
+ HtlcHold,
+ // Byte 20 - 31
+ ,,,,,,,,,,,,
// Byte 32
DnsResolver,
- // Byte 33 - 130
- ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
- // Byte 131
- HtlcHold,
]
);
define_context!(ChannelContext, []);
@@ -710,6 +710,17 @@ mod sealed {
supports_anchor_zero_fee_commitments,
requires_anchor_zero_fee_commitments
);
+ define_feature!(
+ 153, // The BOLTs PR uses feature bit 52/53, so add +100 for the experimental bit
+ HtlcHold,
+ [InitContext, NodeContext],
+ "Feature flags for holding HTLCs and forwarding on receipt of an onion message",
+ set_htlc_hold_optional,
+ set_htlc_hold_required,
+ clear_htlc_hold,
+ supports_htlc_hold,
+ requires_htlc_hold
+ );
define_feature!(
259,
DnsResolver,
@@ -721,17 +732,6 @@ mod sealed {
supports_dns_resolution,
requires_dns_resolution
);
- define_feature!(
- 1053, // The BOLTs PR uses feature bit 52/53, so add +1000 for the experimental bit
- HtlcHold,
- [InitContext, NodeContext],
- "Feature flags for holding HTLCs and forwarding on receipt of an onion message",
- set_htlc_hold_optional,
- set_htlc_hold_required,
- clear_htlc_hold,
- supports_htlc_hold,
- requires_htlc_hold
- );
// Note: update the module-level docs when a new feature bit is added!
Why this scored 19/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.