Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] - routing: add additional validation to MPP related send payment params #8916

Open
Roasbeef opened this issue Jul 17, 2024 · 5 comments · May be fixed by #9238 or #9603
Open

[feature] - routing: add additional validation to MPP related send payment params #8916

Roasbeef opened this issue Jul 17, 2024 · 5 comments · May be fixed by #9238 or #9603
Assignees
Labels
beginner Issues suitable for new developers enhancement Improvements to existing features / behaviour rpc Related to the RPC interface validation

Comments

@Roasbeef
Copy link
Member

Is your feature request related to a problem? Please describe.

Today, for the SendPaymentV2 call we have a series of mpp parameters users can define:

  • max_parts
  • max_shard_size_msat

If users aren't careful, then it's possible that the combination of: max parts, max shard size, and the payment amount are incompatible.

Here's an example of incompatible params:

  • max_parts = 2
  • max_shard_size_msat = 10_000
  • amt_msat = 100_000

In this case, we can't satisfy the payment as with only two max parts, we can only send 20_000 msat.

Describe the solution you'd like

Add validation, reject if params don't allow the full value to be sent.

Describe alternatives you've considered
Silently modify the params to make them compatible.
Additional context

Right now incorrect values just result in a path finding loop that'll go until the timeout, as the payment flow can't actually be satisfied.

@Roasbeef Roasbeef added enhancement Improvements to existing features / behaviour rpc Related to the RPC interface beginner Issues suitable for new developers validation labels Jul 17, 2024
@anibilthare
Copy link
Contributor

Picking this up

@Abdulkbk
Copy link
Contributor

Picking this up

Are you still on it?

@anibilthare anibilthare linked a pull request Oct 31, 2024 that will close this issue
@anibilthare
Copy link
Contributor

Thanks for the reminder @Abdulkbk .

@NishantBansal2003
Copy link
Contributor

NishantBansal2003 commented Mar 10, 2025

Is the issue available to work on? Can I be assigned to it? Thanks.
@saubyk I noticed that the existing PR has become a bit stale and some review comments haven't been addressed yet. Would it be okay if I opened a new PR that tackles these points?

@saubyk
Copy link
Collaborator

saubyk commented Mar 13, 2025

Would it be okay if I opened a new PR that tackles these points?

go ahead @NishantBansal2003

@NishantBansal2003 NishantBansal2003 linked a pull request Mar 13, 2025 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner Issues suitable for new developers enhancement Improvements to existing features / behaviour rpc Related to the RPC interface validation
Projects
None yet
5 participants