askrene: deprecate `auto.no_mpp_support` layer in favor of `maxparts=1`.
What changed, and why it matters
This commit is a routine deprecation of an old way to request single-path routing in the Core Lightning `getroutes` RPC. The `auto.no_mpp_support` layer still works for now, but it is marked deprecated and internally is converted to the newer `maxparts=1` option. There is no security vulnerability here.
No security action required. Developers using `getroutes` should migrate to `maxparts=1` before the deprecated layer is removed in v27.03.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deprecates the auto.no_mpp_support automatic layer in the askrene routing plugin. It updates JSON schemas and documentation, adds a deprecation entry, and changes askrene.c so that the layer is accepted only if deprecation is enabled, sets info->maxparts = 1 when present, and reuses the existing maxparts == 1 code paths instead of a separate special case. A temporary internal layer is also renamed from auto.no_mpp_support to auto.remove_small_channels to avoid confusion. No bug fix or security hardening is present.
Changed components
plugins/askrene/askrene.cdoc/schemas/getroutes.jsoncontrib/msggen/msggen/schema.jsondoc/developers-guide/deprecated-features.mdInspect captured patch +21 / −15
diff --git a/contrib/msggen/msggen/schema.json b/contrib/msggen/msggen/schema.json
index f424c408..acd1792c 100644
--- a/contrib/msggen/msggen/schema.json
+++ b/contrib/msggen/msggen/schema.json
@@ -16577,7 +16577,7 @@
"",
"Layers are generally maintained by plugins, either to contain persistent information about capacities which have been discovered, or to contain transient information for this particular payment (such as blinded paths or routehints).",
"",
- "There are four automatic layers: *auto.localchans* contains information on local channels from this node (including non-public ones), and their exact current spendable capacities. *auto.sourcefree* overrides all channels (including those from previous layers) leading out of the *source* to be zero fee and zero delay. These are both useful in the case where the source is the current node. *auto.no_mpp_support* forces getroutes to return a single path solution which is useful for payments for which MPP is not supported. And *auto.include_fees* that fixes the send amount and deducts fee from there, ie. the receiver pays for fees instead of the sender."
+ "There are some automatic layers: *auto.localchans* contains information on local channels from this node (including non-public ones), and their exact current spendable capacities. *auto.sourcefree* overrides all channels (including those from previous layers) leading out of the *source* to be zero fee and zero delay. These are both useful in the case where the source is the current node. *auto.include_fees* that fixes the send amount and deducts fee from there, ie. the receiver pays for fees instead of the sender. *auto.no_mpp_support* is deprecated in v26.06: use `maxparts=1` instead."
],
"categories": [
"readonly"
diff --git a/doc/developers-guide/deprecated-features.md b/doc/developers-guide/deprecated-features.md
index acbb3184..f66f8dfb 100644
--- a/doc/developers-guide/deprecated-features.md
+++ b/doc/developers-guide/deprecated-features.md
@@ -23,6 +23,8 @@ privacy:
| channel_state_changed.null_message | Notification Field | v25.12 | v26.12 | In channel_state_changed notification, `message` will be missing instead of `null` |
| hsmtool.getcodexsecret | Command | v25.12.1 | v26.12 | Doesn't work on nodes using mnemonic secrets (v25.12 or later). Use `getsecret` instead. |
| experimental_splicing | Config | v26.04 | v27.04 | Splicing is now enabled by default |
+| getroutes.layers.auto.no_mpp_support | Parameter | v26.06 | v27.03 | Use `maxparts=1` instead (since v25.09) |
+
Inevitably there are features which need to change: either to be generalized, or removed when they can no longer be supported.
Types of deprecation:
diff --git a/doc/schemas/getroutes.json b/doc/schemas/getroutes.json
index 7860aeb0..8ba2a7fa 100644
--- a/doc/schemas/getroutes.json
+++ b/doc/schemas/getroutes.json
@@ -11,7 +11,7 @@
"",
"Layers are generally maintained by plugins, either to contain persistent information about capacities which have been discovered, or to contain transient information for this particular payment (such as blinded paths or routehints).",
"",
- "There are four automatic layers: *auto.localchans* contains information on local channels from this node (including non-public ones), and their exact current spendable capacities. *auto.sourcefree* overrides all channels (including those from previous layers) leading out of the *source* to be zero fee and zero delay. These are both useful in the case where the source is the current node. *auto.no_mpp_support* forces getroutes to return a single path solution which is useful for payments for which MPP is not supported. And *auto.include_fees* that fixes the send amount and deducts fee from there, ie. the receiver pays for fees instead of the sender."
+ "There are some automatic layers: *auto.localchans* contains information on local channels from this node (including non-public ones), and their exact current spendable capacities. *auto.sourcefree* overrides all channels (including those from previous layers) leading out of the *source* to be zero fee and zero delay. These are both useful in the case where the source is the current node. *auto.include_fees* that fixes the send amount and deducts fee from there, ie. the receiver pays for fees instead of the sender. *auto.no_mpp_support* is deprecated in v26.06: use `maxparts=1` instead."
],
"categories": [
"readonly"
diff --git a/plugins/askrene/askrene.c b/plugins/askrene/askrene.c
index f31043fb..b51ecb79 100644
--- a/plugins/askrene/askrene.c
+++ b/plugins/askrene/askrene.c
@@ -114,10 +114,15 @@ static struct command_result *param_layer_names(struct command *cmd,
/* Must be a known layer name */
if (streq((*arr)[i], "auto.localchans")
- || streq((*arr)[i], "auto.no_mpp_support")
|| streq((*arr)[i], "auto.sourcefree")
|| streq((*arr)[i], "auto.include_fees"))
continue;
+
+ if (streq((*arr)[i], "auto.no_mpp_support")
+ && command_deprecated_in_ok(cmd, "layers.auto.no_mpp_support",
+ "v26.06", "v27.03"))
+ continue;
+
if (!find_layer(get_askrene(cmd->plugin), (*arr)[i])) {
return command_fail_badparam(cmd, name, buffer, t,
"unknown layer");
@@ -264,7 +269,8 @@ static struct layer *remove_small_channel_layer(const tal_t *ctx,
struct amount_msat min_amount,
struct gossmap_localmods *localmods)
{
- struct layer *layer = new_temp_layer(ctx, askrene, "auto.no_mpp_support");
+ /* We use the prefix auto. to avoid clashing */
+ struct layer *layer = new_temp_layer(ctx, askrene, "auto.remove_small_channels");
struct gossmap *gossmap = askrene->gossmap;
struct gossmap_chan *c;
@@ -389,8 +395,7 @@ static const struct layer **apply_layers(const tal_t *ctx,
cmd_log(tmpctx, cmd, LOG_DBG, "Adding auto.localchans");
l = local_layer;
} else if (streq(layernames[i], "auto.no_mpp_support")) {
- cmd_log(tmpctx, cmd, LOG_DBG, "Adding auto.no_mpp_support, sorry");
- /* We will add a layer later, in the caller. */
+ /* deprecated */
continue;
} else if (streq(layernames[i], "auto.include_fees")) {
cmd_log(tmpctx, cmd, LOG_DBG, "Adding auto.include_fees");
@@ -405,6 +410,7 @@ static const struct layer **apply_layers(const tal_t *ctx,
}
add_layer(&layers, l, askrene->gossmap, localmods, capacities);
}
+
return layers;
}
@@ -584,6 +590,12 @@ static struct command_result *do_getroutes(struct command *cmd,
}
}
+ /* auto.no_mpp_support layer forces maxparts == 1. */
+ if (have_layer(info->layers, "auto.no_mpp_support")) {
+ cmd_log(tmpctx, cmd, LOG_DBG, "Adding auto.no_mpp_support, sorry");
+ info->maxparts = 1;
+ }
+
/* apply selected layers to the localmods */
layers = apply_layers(cmd, askrene, cmd,
&info->source, localmods,
@@ -591,7 +603,7 @@ static struct command_result *do_getroutes(struct command *cmd,
/* no parallel payments means we can drop any smaller channels */
- if (have_layer(info->layers, "auto.no_mpp_support") || info->maxparts == 1) {
+ if (info->maxparts == 1) {
add_layer(&layers,
remove_small_channel_layer(layers, askrene, info->amount, localmods),
askrene->gossmap,
@@ -634,14 +646,6 @@ static struct command_result *do_getroutes(struct command *cmd,
goto fail;
}
- /* auto.no_mpp_support layer overrides any choice of algorithm. */
- if (have_layer(info->layers, "auto.no_mpp_support") &&
- info->dev_algo != ALGO_SINGLE_PATH) {
- info->dev_algo = ALGO_SINGLE_PATH;
- cmd_log(tmpctx, cmd, LOG_DBG,
- "Layer no_mpp_support is active we switch to a "
- "single path algorithm.");
- }
if (info->maxparts == 1 &&
info->dev_algo != ALGO_SINGLE_PATH) {
info->dev_algo = ALGO_SINGLE_PATH;
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.