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 · 3 comments · May be fixed by #9238
Open

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

Roasbeef opened this issue Jul 17, 2024 · 3 comments · May be fixed by #9238
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 .

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
Development

Successfully merging a pull request may close this issue.

3 participants