Skip to content

Finish migration to tracking all payments by PaymentId#784

Draft
tnull wants to merge 2 commits intolightningdevkit:mainfrom
tnull:2026-02-finish-payment-id-migration
Draft

Finish migration to tracking all payments by PaymentId#784
tnull wants to merge 2 commits intolightningdevkit:mainfrom
tnull:2026-02-finish-payment-id-migration

Conversation

@tnull
Copy link
Collaborator

@tnull tnull commented Feb 4, 2026

Closes #298.

Since by now LDK added the capabilities for inbound payment ids, we can now lean on them and remove any legacy instances where we assumed payment_id to be derived from payment_hash.

This is currently still blocked on us adding a payment metadata store as for the JIT case we need a place to store the LSPFeeLimits upon invoice creation (and with this PR, we stop creating payment store entries in Bolt11Payment::receive*, but rather create new entries only when handling PaymentClaimable, as we do for BOLT12).

Draft until we can move forward here.

tnull added 2 commits February 4, 2026 10:55
The switch to tracking payments by ID happend with LDK Node v0.3.0,
which is >1.5 years old by now. We can be pretty certain that nobody is
upgrading from an older version to the upcoming v0.8.

Here we hence make the `payment_id` fields in `Event` required which is
a nice API simplification that will also be utilized in the next commit.
.. will require Payment metadata store
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Feb 4, 2026

👋 Hi! This PR is now in draft status.
I'll wait to assign reviewers until you mark it as ready for review.
Just convert it out of draft status when you're ready for review!

@tnull tnull marked this pull request as draft February 4, 2026 12:18
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.

Track inbound payments by also unique payment IDs

2 participants