Skip to content

chore: upgrade ldk-node to latest main (056447c2) and migrate deprecated liquidity APIs #59

Description

@f3r10

Summary

Bump the pinned ldk-node git rev from 53268f2e (May 27, 2026) to
056447c2 (Jul 17, 2026) and migrate the three call sites that use
deprecated or now-broken APIs introduced by the 42 PRs merged in that window.

Breaking changes that require code edits

#792 — Multi-LSP liquidity refactor (Jun 12)

The single-LSP builder methods are deprecated and replaced by a unified
vector-based API with runtime protocol discovery via LSPS0.

node-service/src/node.rs (×2 call sites):

// before (deprecated)
builder.set_liquidity_source_lsps2(node_id, address, token);

// after
node.liquidity().add_liquidity_source(node_id, token, trust_0conf);

lsp-service/src/main.rs:
// before (deprecated)
builder.set_liquidity_provider_lsps2(lsps2_config);

// after
builder.enable_liquidity_provider(lsps2_config);

Config::anchor_channels_config no longer optional (Pending changelog)

node-service/src/node.rs:
// before
if let Some(ref mut anchor_cfg) = node_config.anchor_channels_config {
    anchor_cfg.trusted_peers_no_reserve.push(lsp_node_id);
}

// after — field is always present, no Option unwrap needed
node_config.anchor_channels_config.trusted_peers_no_reserve.push(lsp_node_id);

#873 — FileSystemStoreV2 migration (May 30)

Storage format changed. Existing data/ldk/ and data/lsp/ directories
must be wiped (or migrated) on first boot with the new rev. On testnet this
means deleting ldk_node_data.sqlite in both dirs — same procedure as
resetting stale channel state.

#973 — ChannelClosed::counterparty_node_id now required (Jul 9)

Persisted ChannelClosed events from the old rev won't deserialize. Covered
by the data wipe above. Our event-loop patterns use .. wildcards so no
source changes needed.

What we gain from the upgrade

PR Benefit
#792 Multi-LSP with automatic LSPS2 fee comparison — ldk-node queries all configured LSPs simultaneously and picks the cheapest; sets LSPS5 groundwork
#983 Fix: force-close peers removed after reconnect — directly addresses our stale channel / reconnect issues
#660 Zero-fee commitment channel support
#815 Probing service for route health checking
#791 Onchain transaction classification
#888 Splice RBF support
#937 BDK bump — improved on-chain wallet behaviour

Scope

  • Bump rev in node-service/Cargo.toml and lsp-service/Cargo.toml
    (or root Cargo.toml) to 056447c2
  • Fix anchor_channels_config Option unwrap in node-service/src/node.rs
  • Migrate set_liquidity_source_lsps2 (×2) in node-service/src/node.rs
  • Migrate set_liquidity_provider_lsps2 in lsp-service/src/main.rs
  • Verify cargo build is clean
  • Wipe data/ldk/ldk_node_data.sqlite and data/lsp/ldk_node_data.sqlite,
    restart services, and run an end-to-end payment with payer-cli

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions