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 · 1 comment
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

Picking this up

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

No branches or pull requests

2 participants