Skip to content

Track remaining funding-payment consistency issues after #962 #1044

Description

@tnull

PR #962 addresses the in-process races between wallet sync, funding classification, and payment graduation. Several persistence and identity questions remain deliberately unresolved.

Known remaining problems:

  • Funding classification writes the payment record and pending metadata separately. A failure or crash between them can leave a payment without its candidate history or txid mappings.
  • The failed classification package has already been dequeued. Repair may depend on a later LDK rebroadcast, which is not guaranteed for every persisted signing state or counterparty-broadcast transaction.
  • If the missing metadata belongs to an RBF funding payment, wallet sync may not map a non-first candidate back to the stable payment ID. It can consequently create a duplicate generic payment or retain incorrect candidate figures.
  • If wallet sync records an active RBF candidate before classification completes, its generic record may use the active candidate’s txid as its payment ID. Classification subsequently uses the first candidate’s txid and does not currently reconcile the two records.
  • It remains unclear how long mappings for earlier, conflicting, and graduated candidates must be retained.

Relevant discussions:

Follow-up questions/checklist:

  • Define the consistency guarantees required when only part of a funding classification can be persisted.
  • Determine how incomplete classifications are detected and recovered after both write failures and restarts.
  • Clarify whether and when LDK is guaranteed to redeliver a funding broadcast after classification fails.
  • Define how wallet sync resolves every funding candidate txid to the intended payment ID.
  • Define how sync-created generic records are reconciled with later funding classification.
  • Determine how long candidate and conflicting-txid mappings must remain available, including after graduation.
  • Define the expected behavior when the counterparty broadcasts during or after a partial local classification.
  • Account for Retry user-initiated splices across restarts and disconnects #930’s generated splice payment IDs and Stop keeping all DataStore entries in-memory, add pagination #1024’s payment-store caching changes.
  • Add regression coverage for partial writes, restart recovery, non-first candidate confirmation, and distinct first/active candidate IDs.

This issue intentionally does not prescribe a storage or recovery design.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions