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

Use onion amount in MPP set calculation #1040

Merged
merged 2 commits into from
Nov 22, 2022

Conversation

t-bast
Copy link
Collaborator

@t-bast t-bast commented Nov 9, 2022

The sender chooses the amounts that are set in the onion payload (amt_to_forward) but cannot predict what amounts will be set in the HTLCs (amount_msat) since intermediate nodes are allowed to overpay.

This was pointed out by @joostjager here.

The sender chooses the amounts that are set in the onion payload
(`amt_to_forward`) but cannot predict what amounts will be set in the
HTLCs (`amount_msat`) since intermediate nodes are allowed to overpay.
These requirements were missed when integrating lightning#1032
Copy link
Collaborator

@joostjager joostjager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cdecker
Copy link
Collaborator

cdecker commented Nov 21, 2022

ACK

Copy link
Contributor

@halseth halseth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned during the call, this was discussed earlier: #1032 (comment). The conclusion then was that the change was not strictly needed (sender should always be able to handle a premature preimage release).

But I'm for it, this makes it simpler to reason about, and gives routing nodes less room to play around with the settlement.

ACK

@t-bast
Copy link
Collaborator Author

t-bast commented Nov 22, 2022

Right, thanks for the link! I only focused on the required_incoming_htlc_amt proposal when answering that comment, which was separate from the update to the HTLC set calculation.

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.

6 participants