BOLT: update to include `channel_type` feature in BOLT 9.
What changed, and why it matters
This commit updates Core Lightning to recognize a new Lightning protocol feature bit called 'channel_type' as defined in the latest BOLT specification. It does not change any active behavior or fix a bug; it simply adds support for advertising this feature in the right places so future channel negotiations can use it. There is no security issue here.
No security action required. This is a routine protocol compatibility update.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch bumps the referenced BOLT version and adds CHANNEL_TYPE_FEATURE as a new feature place. It wires existing feature bits (anchors, dual_fund, scid_alias, zeroconf) to be represented in channel_type contexts where the BOLT now requires it, and updates comments in features.h to reflect the new BOLT 9 feature table. The commit message explicitly states the feature is added even though it is not yet used.
Changed components
common/features.ccommon/features.hMakefile (BOLT version pin)Inspect captured patch +13 / −8
diff --git a/Makefile b/Makefile
index eaea6c6f..dd31c360 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ CCANDIR := ccan
# Where we keep the BOLT RFCs
BOLTDIR := ../bolts/
-DEFAULT_BOLTVERSION := a678f8452eab8f93e6de802ba4e7e2a4c2be20dc
+DEFAULT_BOLTVERSION := 89dfc59529a9ce845b06e7d6a62851a4ea096158
# Can be overridden on cmdline.
BOLTVERSION := $(DEFAULT_BOLTVERSION)
diff --git a/common/features.c b/common/features.c
index 0de221da..7b6ed6cb 100644
--- a/common/features.c
+++ b/common/features.c
@@ -29,6 +29,7 @@ const char *feature_place_names[] = {
"bolt12_offer",
"bolt12_invreq",
"bolt12_invoice",
+ "channel_type",
};
static const struct feature_style feature_styles[] = {
@@ -81,7 +82,8 @@ static const struct feature_style feature_styles[] = {
{ OPT_ANCHORS_ZERO_FEE_HTLC_TX,
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT,
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
- [CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT } },
+ [CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT,
+ [CHANNEL_TYPE_FEATURE] = FEATURE_REPRESENT } },
{ OPT_DUAL_FUND,
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT,
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
@@ -93,7 +95,8 @@ static const struct feature_style feature_styles[] = {
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT,
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
[BOLT11_FEATURE] = FEATURE_DONT_REPRESENT,
- [CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT} },
+ [CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT,
+ [CHANNEL_TYPE_FEATURE] = FEATURE_REPRESENT} },
/* Zeroconf is always signalled in `init`, but we still
* negotiate on a per-channel basis when calling `fundchannel`
@@ -106,7 +109,8 @@ static const struct feature_style feature_styles[] = {
[INIT_FEATURE] = FEATURE_REPRESENT,
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
[BOLT11_FEATURE] = FEATURE_DONT_REPRESENT,
- [CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT} },
+ [CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT,
+ [CHANNEL_TYPE_FEATURE] = FEATURE_REPRESENT} },
{ OPT_ROUTE_BLINDING,
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT,
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
diff --git a/common/features.h b/common/features.h
index 9a9783d9..5866b105 100644
--- a/common/features.h
+++ b/common/features.h
@@ -13,8 +13,9 @@ enum feature_place {
BOLT12_OFFER_FEATURE,
BOLT12_INVREQ_FEATURE,
BOLT12_INVOICE_FEATURE,
+ CHANNEL_TYPE_FEATURE,
};
-#define NUM_FEATURE_PLACE (BOLT12_INVOICE_FEATURE+1)
+#define NUM_FEATURE_PLACE (CHANNEL_TYPE_FEATURE+1)
extern const char *feature_place_names[NUM_FEATURE_PLACE];
/* The complete set of features for all contexts */
@@ -111,7 +112,7 @@ struct feature_set *feature_set_dup(const tal_t *ctx,
* | 14/15 | `payment_secret` |... IN9 ...
* | 16/17 | `basic_mpp` |... IN9 ...
* | 18/19 | `option_support_large_channel` |... IN ...
- * | 22/23 | `option_anchors` |... IN ...
+ * | 22/23 | `option_anchors` |... INT ...
* | 24/25 | `option_route_blinding` |...IN9 ...
* | 26/27 | `option_shutdown_anysegwit` |... IN ...
* | 28/29 | `option_dual_fund` |... IN ...
@@ -119,9 +120,9 @@ struct feature_set *feature_set_dup(const tal_t *ctx,
* | 38/39 | `option_onion_messages` |... IN ...
* | 42/43 | `option_provide_storage` |... IN ...
* | 44/45 | `option_channel_type` |... IN ...
- * | 46/47 | `option_scid_alias` | ... IN ...
+ * | 46/47 | `option_scid_alias` | ... INT ...
* | 48/49 | `option_payment_metadata` |... 9 ...
- * | 50/51 | `option_zeroconf` | ... IN ...
+ * | 50/51 | `option_zeroconf` | ... INT ...
* | 60/61 | `option_simple_close` |... IN ...
*/
/* BOLT-splice #9:
Why this scored 15/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.