Context
ldk-node supports a fourth chain-data-source option — set_chain_source_bitcoind_rest(),
backed by BitcoindRestClientConfig — alongside the RPC, Electrum, and Esplora sources
ldk-server already exposes via ChainSource (ldk-server/src/util/config.rs). ldk-server
currently has no REST variant.
Why this is worth adding
- Bitcoin Core's REST interface serves block/header/tx data unauthenticated by default
(no rpcuser/rpcpassword needed for reads), which simplifies self-hosted setups where
operators don't want to expose or manage full RPC credentials.
- It's a lighter-weight, cacheable path for block/header retrieval compared to JSON-RPC.
Maturity check
Two correctness bugs in ldk-node's REST chain source were found and fixed recently:
One known non-blocking edge case remains: a narrow startup race where sync_wallets could
run before initial sync registers the SPV client. It's mitigated by the RPC fallback and
was deliberately deferred by the ldk-node maintainer rather than blocking the reorg fix.
Happy to wait for an 0.8 release to depend on if maintainers would prefer that over pinning to a
main revision.
Proposed scope
- Add a
Rest { rest_host, rest_port } (or similar) variant to ChainSource in config.rs
- Wire it to
set_chain_source_bitcoind_rest() in main.rs
- Add
[bitcoind_rest]-style config parsing to ldk-server-config.toml
- Docs + a CI fixture (bitcoind with
-rest=1), following the existing bitcoind/Esplora
e2e test setup
Open to feedback on the config shape.
Context
ldk-node supports a fourth chain-data-source option —
set_chain_source_bitcoind_rest(),backed by
BitcoindRestClientConfig— alongside the RPC, Electrum, and Esplora sourcesldk-server already exposes via
ChainSource(ldk-server/src/util/config.rs). ldk-servercurrently has no REST variant.
Why this is worth adding
(no
rpcuser/rpcpasswordneeded for reads), which simplifies self-hosted setups whereoperators don't want to expose or manage full RPC credentials.
Maturity check
Two correctness bugs in ldk-node's REST chain source were found and fixed recently:
One known non-blocking edge case remains: a narrow startup race where
sync_walletscouldrun before initial sync registers the SPV client. It's mitigated by the RPC fallback and
was deliberately deferred by the ldk-node maintainer rather than blocking the reorg fix.
Happy to wait for an 0.8 release to depend on if maintainers would prefer that over pinning to a
mainrevision.Proposed scope
Rest { rest_host, rest_port }(or similar) variant toChainSourceinconfig.rsset_chain_source_bitcoind_rest()inmain.rs[bitcoind_rest]-style config parsing toldk-server-config.toml-rest=1), following the existing bitcoind/Esplorae2e test setup
Open to feedback on the config shape.