Skip to content

Update ldk-node dependency & expose bolt12 proofs - #258

Open
benthecarman wants to merge 6 commits into
lightningdevkit:mainfrom
benthecarman:update-ldk-node
Open

Update ldk-node dependency & expose bolt12 proofs#258
benthecarman wants to merge 6 commits into
lightningdevkit:mainfrom
benthecarman:update-ldk-node

Conversation

@benthecarman

@benthecarman benthecarman commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Update ldk-node and adapt payment events to its current API. Expose payment IDs in events and retain manual handling for unknown BOLT 11 payments.

Add BOLT 12 payer-proof creation to the gRPC, CLI, and MCP interfaces. Include the preimage and invoice in successful-payment events for stateless proof creation.

Use ldk-node pagination for payment history. Remove duplicate payment records from the ldk-server SQLite store, which now contains only forwarded-payment history.

@ldk-reviews-bot

ldk-reviews-bot commented Aug 18, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @tankyleo 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.

@benthecarman
benthecarman marked this pull request as ready for review August 18, 2026 05:28
Comment thread ldk-server/src/api/mod.rs Outdated
@wpaulino
wpaulino removed their request for review August 18, 2026 17:19
@benthecarman
benthecarman requested a review from tnull August 19, 2026 22:36
@benthecarman

Copy link
Copy Markdown
Collaborator Author

Rebased and updated ldk-node to new commit with the pagination changes. Now using the paginated payments instead of the ldk-server version

@tnull tnull left a comment

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.

Looks good, but we should probably also include the new channel type in list_channels now.

Comment thread ldk-server/src/api/error.rs
Adapt payment events to the updated ldk-node API and expose their
payment IDs. Continue to handle unknown BOLT 11 payments manually so
the receive-for-hash APIs work correctly.

AI assistance: OpenAI Codex was used for this change.
Comment thread ldk-server/src/api/error.rs Outdated
| NodeError::GossipUpdateTimeout
| NodeError::LiquiditySourceUnavailable
| NodeError::LiquidityRequestFailed
| NodeError::PayerProofCreationFailed

@tankyleo tankyleo Aug 26, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codex wants to classify this to an InvalidRequestError rather than an InternalServerError. It's not perfect, but seems InvalidRequestError is more likely if we hit PayerProofCreationFailed

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah not perfect mapping, but fixed

Add payer-proof creation to the gRPC, CLI, and MCP interfaces. Include
the preimage and invoice in successful-payment events because stateless
proof creation requires both values.

AI assistance: OpenAI Codex was used to rebase and verify this change.
Read payment pages directly from ldk-node so the server does not
store duplicate payment records. Keep the server database for
forwarded-payment history.

AI assistance: OpenAI Codex was used for this change.

@tankyleo tankyleo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I asked Codex to cast a broader net, here's what it found, feel free to dismiss aggressively, but all seemed worth taking a look to me.

Comment thread ldk-server/src/util/metrics.rs
Comment thread ldk-server/src/main.rs
Comment thread docs/api-guide.md
AI assistance: OpenAI Codex was used for this change.
AI assistance: OpenAI Codex was used for this change.
AI assistance: OpenAI Codex was used for this change.
@tankyleo

Copy link
Copy Markdown
Contributor

Also confirmed this patch now keeps my fans quiet on mainnet

@benthecarman
benthecarman requested a review from tankyleo August 27, 2026 02:24
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.

4 participants