Skip to content

Add docs to run ldk-server against pruned bitcoind - #261

Open
tankyleo wants to merge 1 commit into
lightningdevkit:mainfrom
tankyleo:2026-08-pruned-bitcoind-docs
Open

Add docs to run ldk-server against pruned bitcoind#261
tankyleo wants to merge 1 commit into
lightningdevkit:mainfrom
tankyleo:2026-08-pruned-bitcoind-docs

Conversation

@tankyleo

Copy link
Copy Markdown
Contributor

No description provided.

@ldk-reviews-bot

ldk-reviews-bot commented Aug 25, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @benthecarman as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@tankyleo
tankyleo requested a review from benthecarman August 25, 2026 05:08
Comment thread docs/pruned-bitcoind.md
Comment on lines +90 to +91
startup, for example during mnemonic recovery. Replace the value below with a mainnet height at or
before the earliest relevant wallet transaction:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to claude we start scanning at above the given height so need to update. Maybe this is worth fixing in ldk-node though?

https://github.com/lightningdevkit/ldk-node/blob/056447c28221be02c3d39f8c6ae430a67ebbd850/src/builder.rs#L1711-L1721

Suggested change
startup, for example during mnemonic recovery. Replace the value below with a mainnet height at or
before the earliest relevant wallet transaction:
startup, for example during mnemonic recovery. Replace the value below with a mainnet height
before the earliest relevant wallet transaction:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened this PR let me know if you think it feels like an improvement, seems so to me

lightningdevkit/ldk-node#1069

Comment thread docs/pruned-bitcoind.md
If the requested range is pruned, LDK Server may expose gRPC while chain synchronization logs
repeated transient errors. Stop it and recover against an archival backend (or re-download Core's
chain with pruning disabled). Retry from clean recovery state derived from verified backups; a
failed first scan may already have persisted its starting checkpoint.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/pruned-bitcoind.md:120 — Recovery advice after a failed first scan is wrong. The BDK wallet is persisted before the rescan checkpoint resolves (builder.rs:1652-1660 vs tip check at 1670). If the first build fails (height above tip, pruned block, process dies), the next start loads the existing wallet, silently ignores --rescan-from-height, and syncs from genesis against the pruned node forever. The doc must say: delete the fresh data directory before retrying.

Comment thread docs/pruned-bitcoind.md
Comment on lines +68 to +69
If LDK Server is offline while Core prunes past its persisted tip, catch-up will fail with
`Block not available (pruned data)`. A larger prune target reduces this risk but does not express a

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If LDK Server is offline while Core prunes past its persisted tip, catch-up will fail with
`Block not available (pruned data)`. A larger prune target reduces this risk but does not express a
If LDK Server is offline while Core prunes past its persisted tip, catch-up will stall with
`Block not available (pruned data)`. A larger prune target reduces this risk but does not express a

this doesn't crash it

Comment thread docs/getting-started.md
Everything else has sensible defaults. See [Configuration](configuration.md) for the full
reference.
reference. For a mainnet Bitcoin Core deployment that uses pruning, also review
[Running with Pruned Bitcoin Core](pruned-bitcoind.md) before choosing its retention target.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retention target

Can we say prune height or something. I don't think I've ever heard someone call it that

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.

3 participants