Repository navigation
Conversation
Update LDK Node's Cargo.toml to use recurrence-aware versions of rust-lightning and bitcoin-payment-instructions. This makes the recurrence APIs available for implementing recurrence support in subsequent commits. Co-authored-by: GLaDOS
Inbound recurrence tracking needs durable relationship state separate from individual payments. Persist terms, status, timing, and payment progress for each offer and payer signing public key pair. Co-Authored-By: GLaDOS
|
I've assigned @tnull as a reviewer! |
Verify that the builder restores pending ownership, ordered payment history, and inactive relationships through the public lookup APIs. Changing either the offer or payer must select a separate relationship. Seed snapshots directly so this coverage needs no claim event handling. Co-Authored-By: GLaDOS
Reserve each counter for one payment before claiming it. Move to the next counter only after LDK confirms success. Record rejected payments as failed where safe, leaving accepted payment records unchanged. This prevents two payments from claiming the same counter and keeps the saved payment status consistent with acceptance or rejection. Co-Authored-By: GLaDOS
Check context validation, counter ownership, confirmed progress, and historical replay without disturbing a newer pending payment. Exercise absolute period limits and overflow rather than only counter limits. Force competing reservations to overlap at persistence. Inject failures at each claim write boundary and rebuild from saved bytes before retrying, so partial writes cannot silently release ownership or advance twice. Co-Authored-By: GLaDOS
Mark the existing recurrence as cancelled under the same lock used to accept payments. Preserve any accepted payment so it can finish, and keep the cancelled status when recording its success. This blocks new payments after cancellation without interrupting a payment that was already accepted. Co-Authored-By: GLaDOS
Check that cancellation blocks a new reservation while allowing an already accepted payment to finish without reactivating the relationship. Repeated notifications must preserve ownership and successful history. Cover unknown relationships and failed cancellation writes so the event remains replayable until cancellation can be saved safely. Co-Authored-By: GLaDOS
shaavan
force-pushed
the
inbound-recurrence
branch
from
October 23, 2026 17:29
275f3d8 to
2a30d2b
Compare
shaavan
marked this pull request as ready for review
October 23, 2026 17:30
This was referenced Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds receiver-side tracking for recurring BOLT 12 payments to LDK Node, based on lightning/bolts#1240.
rust-lightning handles the recurrence protocol and provides the offer terms and invoice timing through payment events. LDK Node saves each offer-and-payer relationship, decides whether an incoming payment can be accepted, and records its outcome.
This prevents different payments from claiming the same counter and lets applications inspect recurrence state.
Scope
PaymentClaimed. Recognize repeated confirmations without advancing twice or changing newer progress and reservations. ReturnReplayEventwhen a write fails.Deferred work
The following work is deferred to follow-up PRs.