Skip to content

Use onion amount in MPP set calculation#1040

Merged
t-bast merged 2 commits intolightning:masterfrom
t-bast:mpp-set-amount-calculation
Nov 22, 2022
Merged

Use onion amount in MPP set calculation#1040
t-bast merged 2 commits intolightning:masterfrom
t-bast:mpp-set-amount-calculation

Conversation

@t-bast
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

cdecker commented Nov 21, 2022

ACK

Copy link
Copy Markdown
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
Copy Markdown
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