Skip to content

askrene: deprecate auto.no_mpp_support layer, use maxparts=1 instead#8998

Open
ThomsenDrake wants to merge 1 commit intoElementsProject:masterfrom
ThomsenDrake:deprecate-auto-no-mpp
Open

askrene: deprecate auto.no_mpp_support layer, use maxparts=1 instead#8998
ThomsenDrake wants to merge 1 commit intoElementsProject:masterfrom
ThomsenDrake:deprecate-auto-no-mpp

Conversation

@ThomsenDrake
Copy link
Copy Markdown

The auto.no_mpp_support layer was used to force single-path payments for destinations that don't support MPP. Since maxparts=1 already switches to the single-path algorithm (line ~616 in askrene.c), the layer is redundant.

Changes

plugins/askrene/askrene.c (net -44 lines):

  • Remove remove_small_channel_layer() function entirely
  • Remove auto.no_mpp_support from layer name validation
  • Remove the auto.no_mpp_support branch from layer creation/handling
  • Remove the separate algorithm override block (maxparts=1 already handles this)

plugins/xpay/xpay.c (+3/-2):

  • When disable_mpp is set (invoice doesn't offer OPT_BASIC_MPP), send maxparts=1 to getroutes instead of adding the auto.no_mpp_support layer

tests/test_askrene.py (6 test calls updated):

  • Replace layers=["auto.no_mpp_support"] with maxparts=1 in test_getroutes_single_path, test_excessive_fee_cost, and test_impossible_payment
  • Add maxparts parameter support to check_getroute_paths() helper

doc/schemas/getroutes.json:

  • Update description from "four automatic layers" to "three automatic layers"
  • Document that maxparts=1 should be used for single-path payments instead of a layer

Fixes #8871

The auto.no_mpp_support layer was used to force single-path payments
for destinations that don't support MPP. Since maxparts=1 already
switches to the single-path algorithm, the layer is redundant.

Changes:
- askrene: remove remove_small_channel_layer() and auto.no_mpp_support
  handling from layer validation, creation, and algorithm override
- xpay: when disable_mpp is set, send maxparts=1 to getroutes instead
  of adding the auto.no_mpp_support layer
- tests: update test_getroutes_single_path, test_excessive_fee_cost,
  and test_impossible_payment to use maxparts=1 instead of the layer
- docs: update getroutes.json to describe three automatic layers and
  point to maxparts=1 for single-path payments

Fixes ElementsProject#8871
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate auto.no_mpp layer in askrene

1 participant