AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 43 Bitcoin

Add total-MPP-value storage in pending payments

Public commit record

What the developer wrote

Authored by Matt Corallo

68/100 · Adequate
Add total-MPP-value storage in pending payments

In some uses of LDK we need the ability to send HTLCs for only a
portion of some larger MPP payment. This allows payers to make
single payments which spend funds from multiple wallets, which may
be important for ecash wallets holding funds in multiple mints or
graduated wallets which hold funds across a trusted wallet and a
self-custodial wallet.

In the previous commits we moved the total-MPP-value we set in
onions from being manually passed through onion-building to passing
it via `RecipientOnionFields`. This introduced a subtle bug, though
- payments which are retried will get a fresh
`RecipientOnionFields` built from the data in
`PendingOutboundPayment::Retryable`, losing any custom
total-MPP-value settings and causing retries to fail.

Here we fix this by storing the total-MPP-value directly in
`PendingOutboundPayment::Retryable`.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug where retrying a multi-part Lightning payment could fail because the original 'total payment amount' setting stored in the onion was lost and replaced with a default value. The fix stores that onion total directly in the pending payment record so retries preserve it. There is no direct evidence this is exploitable by an attacker; it appears to be a reliability/functional bug for legitimate users, especially those splitting payments across multiple wallets.

Recommended action

Treat as a normal bugfix. Reviewers should verify that `onion_total_msat` is correctly propagated in all retry paths and that the serialization fallback behaves as intended. No immediate security response appears warranted based on the commit alone.

Security signals we found

01

Functional bug in payment retry path could cause payment failure/DoS for legitimate senders

02

No direct diff evidence of attacker-controlled input leading to loss of funds or memory corruption

03

Serialization change includes fallback default, reducing downgrade risk

04

Change relates to MPP total amount consistency, which can affect payment success and fee/routing behavior

Risk score

Why this scored 43/100

Our methodology →
Potential impact 12/30
Exploitability 5/25
Stealth signal 8/15
Affected reach 7/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.