Skip to content

Conversation

@ovitrif
Copy link
Collaborator

@ovitrif ovitrif commented Feb 10, 2026

Closes #765

This PR:

  1. Adds a new VssBackupClientLdk for direct LDK-specific VSS operations via FFI bindings
  2. Switches VSS graph deletion during stale-graph reset to use the new FFI client
  3. Improves graph validation logging with node IDs, graph stats, and RGS timestamp
  4. Extracts the network graph debug dump from LightningService

Description

Builds on #740. The stale graph auto-recovery added in #765 attempted to deleted the graph from VSS using the app-level backup client but due to different key obfuscation namespacing in ldk-node, the graph backup was never deleted.

This PR switches to a dedicated LDK-specific FFI client implementation that points operations to the correct obfuscated file names backed up by ldk-node on VSS. This new VSS client implementation adjusted for supporting OPs on ldk-node backups is found in PR:

In practice this translate to successful LN payments to nodes that would otherwise fail, one example being payments to Blink wallet if having a stale graph in your wallet's VSS backups.

LDK-node already has the required mechanism to trigger redownload of the network graph if attempts to retrieve it from its backup on VSS fails. The cleanup mechanism is triggered when the graph is found to miss any of the expected trusted peers, which in turn triggers ldk-node to kick-off its re-download of the graph from the latest RGS server snapshot.

Preview

Test 1️⃣ - Payment to Blink

pay2blink.mp4

Test 2️⃣ - VSS app data preserved across vss-rust-client update

Before (0.4.0) After (0.5.5)
before after

QA Notes

Tip

No need to go all the way to replicate a stale graph on your VSS. To validate, simply test on mainnet some random LN payments to a couple wallets you have on other apps like Blink, Phoenix, WoS. If payments succeed, PR is good to be merged.

1. Verify stale graph reset clears VSS via FFI client

  1. Launch app with a wallet that has a stale network graph
  2. Check logs for: Network graph is stale, resetting and restarting...
  3. Verify logs show: Cleared stale network graph from VSS (first delete)
  4. After restart, verify graph validates successfully
  5. After graph validation passes, send a Lightning payment to Blink wallet
  6. Payment should route successfully

2. Verify VSS app data preserved across versions

  1. Install a previous version of the app (e.g. latest release from master)
  2. Create or restore a wallet and let it fully sync
  3. Personalize the wallet, eg.
    • Change display currency
    • Set a custom denomination (e.g. sats)
    • Toggle biometric authentication
    • Update widgets on home screen
  4. Make note of all customized values
  5. Uninstall the app so wallet data lives only on VSS
  6. Install the build from this PR
  7. Restore the same wallet using the seed phrase
  8. After sync completes, verify all personalization is preserved

@ovitrif ovitrif changed the base branch from master to fix/node-stopping-bg-payments February 10, 2026 19:12
@ovitrif ovitrif changed the title fix: reset stale graph from both local and vss fix: delete vss network graph using new ffi client Feb 10, 2026
@ovitrif ovitrif requested a review from jvsena42 February 10, 2026 19:22
@ovitrif ovitrif marked this pull request as ready for review February 10, 2026 19:32
@ovitrif ovitrif force-pushed the fix/stale-graph-reset branch from 82a5527 to ba44df3 Compare February 10, 2026 19:43
@ovitrif ovitrif force-pushed the fix/stale-graph-reset branch from ba44df3 to f120581 Compare February 10, 2026 19:46
ovitrif and others added 2 commits February 10, 2026 20:47
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ovitrif ovitrif force-pushed the fix/stale-graph-reset branch from 3dfa34b to e556b04 Compare February 10, 2026 23:42
@claude
Copy link

claude bot commented Feb 10, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

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.

1 participant