Apply MPP receive timeout to keysend payments#4558
Apply MPP receive timeout to keysend payments#4558tnull merged 1 commit intolightningdevkit:mainfrom
Conversation
|
👋 Thanks for assigning @carlaKC as a reviewer! |
|
I've thoroughly re-reviewed the entire diff, including:
No issues found. |
carlaKC
left a comment
There was a problem hiding this comment.
lgtm - just one comment on the test
TheBlueMatt
left a comment
There was a problem hiding this comment.
thanks. @carlaKC should land when she likes the test.
a3457de to
c2f774d
Compare
Incomplete keysend MPPs skipped the receive timeout path, allowing partial payments to hold HTLC slots until CLTV expiry instead of failing after `MPP_TIMEOUT_TICKS`. Apply the existing `total_mpp_amount_msat` completeness check to all MPP receives and add a regression test covering the keysend case. The timeout logic was originally added only for invoice-backed MPPs in 2022, and that invoice-only guard remained when receive-side MPP keysend support landed in 2023, leaving this gap latent until now. Co-Authored-By: HAL 9000
c2f774d to
fd8846b
Compare
|
LGTM. The fix is minimal and correct — applying the total_mpp_amount_msat completeness check to all MPP receive paths closes the gap where partial keysend payments could leak HTLC slots. The regression test in payment_tests.rs is a good coverage anchor. One question: does parse_recv_partial_keysend_payment have any similar paths that bypass the timeout check? |
Could you expand on what your're referring to? This method doesn't seem to exist in the codebase? |
Fixes #4553.
Incomplete keysend MPPs skipped the receive timeout path, allowing partial payments to hold HTLC slots until CLTV expiry instead of failing after
MPP_TIMEOUT_TICKS. Apply the existingtotal_mpp_amount_msatcompleteness check to all MPP receives and add a regression test covering the keysend case.The timeout logic was originally added only for
invoice-backed MPPs in 2022, and that invoice-only guard remained when receive-side MPP keysend support landed in 2023, leaving this gap latent until now.
Co-Authored-By: HAL 9000