Skip to content

Add support of ldk-node#307

Open
randomlogin wants to merge 3 commits intobitcoin-dev-project:mainfrom
randomlogin:add-ldk-support
Open

Add support of ldk-node#307
randomlogin wants to merge 3 commits intobitcoin-dev-project:mainfrom
randomlogin:add-ldk-support

Conversation

@randomlogin
Copy link
Copy Markdown

This PR adds support of ldk-node to sim-ln.

Closes: #26

As ldk-node is not a daemon, before we start we parse the simulation config file and extract all ldk-nodes, build them and start. For that an additional chain source (bitcoind/esplora/electrum) is needed to start.

Before this PR can be merged, an update of used lighting libraries should be merged, as the current ldk-node has newer versions.

@carlaKC
Copy link
Copy Markdown
Contributor

carlaKC commented Apr 8, 2026

Before this PR can be merged, an update of used lighting libraries should be merged, as the current ldk-node has newer versions.

Feel free to bump this in a preparatory commit in this PR!

Add `LdkNode` as a new `LightningNode` implementation backed by
ldk-server-client over gRPC-over-HTTPS. Supports keysend via
`spontaneous_send`, payment tracking via polling `get_payment_details`,
graph queries, and channel capacity reporting.

Wire up `NodeConnection::Ldk` in sim-cli parsing so ldk-server nodes
can be specified in sim.json alongside LND, CLN, and Eclair nodes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@randomlogin
Copy link
Copy Markdown
Author

Initially I was trying to wire up ldk-node, which is not a daemon and I thought sim-ln could orchestrate ldk-node building, initialization. However it turned out that we want already running and funded nodes with opened channels, so this wasn't an option.

Added support of https://github.com/lightningdevkit/ldk-server, which is a reference daemon implementation with external API, it uses ldk-node internally.

Please note, that ldk-server has not yet been released, therefore a git reference and a revision is used in Cargo.toml

The configuration for ldk-server looks in the following way:

{
  "address": <ip:port or domain:port>,
  "api_key": <hex_encoded_api_key>,
  "cert": <path_to_tls_cert>,
  "network": <bitcoin|testnet|signet|regtest>
}

Please note that currently it's not possible to guess the network via RPC calls, that's why we need to provide it in the config. This might change in future.

@randomlogin randomlogin marked this pull request as ready for review April 22, 2026 13:44
@carlaKC
Copy link
Copy Markdown
Contributor

carlaKC commented Apr 22, 2026

Added support of https://github.com/lightningdevkit/ldk-server, which is a reference daemon implementation with external API, it uses ldk-node internally.
Please note, that ldk-server has not yet been released, therefore a git reference and a revision is used in Cargo.toml

Happy to go with server, I believe a release is coming soon ™️ !

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.

Feature: Multi-Implementation Support

2 participants