Skip to content

fix: let force-closed channels claim pending payments on-chain - #929

Closed
ovitrif wants to merge 3 commits into
masterfrom
fix/ldk-splice-rc74
Closed

ovitrif wants to merge 3 commits into
masterfrom
fix/ldk-splice-rc74

Conversation

@ovitrif

@ovitrif ovitrif commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Twin: synonymdev/bitkit-android#1479
Refs: synonymdev/ldk-node#125

Description

  • Updates LDK Node from 0.7.0-rc.72 to 0.7.0-rc.74, so force-closed channels can claim their pending payments (HTLCs) on-chain again.
  • The wallet's PSBT signing failed whenever an input it does not own stayed unsigned, which broke the HTLC claim transactions LDK builds after a force-close. 0.7.0-rc.73 and 0.7.0-rc.74 come from fix: let force-closed channels claim pending payments on-chain ldk-node#125 on top of 0.7.0-rc.72 (release).

Design

N/A — no UI changes.

Preview

N/A — no user-visible changes.

QA Notes

Journeys

  • updated local-paykit-fallback.md

Manual Tests

  • Upgrade from a build on 0.7.0-rc.72 with an existing wallet and open channels → the node starts, channels reconnect, balances match — needs a wallet written by the previous build.
  • Pay a hold invoice from Bitkit, force-close the channel while the HTLC is pending, then mine past its expiry → the payment fails and its amount comes back to Savings through an on-chain claim — the Capabilities table lists no way to keep an HTLC pending across a force-close.

Automated Checks

  • ran xcodebuild -resolvePackageDependencies: resolves ldk-node at 0.7.0-rc.74; Package.resolved pins the release tag's commit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T18:17:42.141110Z 0186e05 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ovitrif
ovitrif requested review from a team, ben-kaufman and coreyphillips and removed request for a team October 13, 2026 18:15

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0186e0500c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

`pubkyauth://signup_grant` URL naming that homeserver; invites and authorization URLs are secrets.
- Record the app commit, built app executable hash and installed bundle identifier. iOS uses
`Debug`, `to.bitkit`, Paykit `0.1.0-rc72` and native LDK `0.7.0-rc.72`. Use normal Debug with
`Debug`, `to.bitkit`, Paykit `0.1.0-rc72` and native LDK `0.7.0-rc.74`. Use normal Debug with

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add a journey that exercises the force-close recovery

This is the only journey-related edit, but it merely updates the LDK version in an unrelated Pubky marketplace setup and does not exercise a force-closed channel with a pending HTLC or verify its eventual on-chain claim. Because the journey environment already provides Lightning channels plus regtest funds and block mining, leaving this solely as a manual test does not satisfy the repository's QA contract for this user-visible recovery fix; add or update a journey that proves the behavior.

AGENTS.md reference: AGENTS.md:L387-L391

Useful? React with 👍 / 👎.

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.

The fix is a version pin; the behavior it restores is covered in synonymdev/ldk-node#125 by repro and integration tests that fail on 0.7.0-rc.72. A device journey would need an HTLC kept pending across a force-close and then mined past its expiry: the Capabilities table in journeys/README.md lists LSP force-close but no way to hold an HTLC (the LSP regtest API has no hold invoice), so per AGENTS.md this stays a manual test, now worded with the missing capability.

Comment thread Bitkit.xcodeproj/project.pbxproj
@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High impact] The changes since the previous review appear safe to merge.

Summary

Updates ldk-node from 0.7.0-rc.72 to 0.7.0-rc.74 to restore on-chain claims for pending payments after a force close.

  • Force-closed channels can claim pending payments on-chain.

Reviews (2) · Last reviewed commit: "docs: limit the changelog entry to the f..." · Reviewed by Greptile

@ovitrif

ovitrif commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed abf9f44: the changelog fragment now names only the force-close claim fix, since Bitkit does not start splices; the description and manual tests match. Answers the Codex threads on the fragment and the journey.

@talosmachina talosmachina left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No findings. Bumps the ldk-node Swift package from 0.7.0-rc.72 to 0.7.0-rc.74 (exact version in the project, pin in Package.resolved) for the PSBT signing fix in synonymdev/ldk-node#125, plus the changelog fragment and the journey's version line. Reviewed abf9f44, full tier (dependency manifest).

What I checked, and 2 candidates I ruled out

Pin: tag v0.7.0-rc.74 in synonymdev/ldk-node resolves to 190a7d98b24aa0f4b337b21d9cee6fb8b2986679, the revision Package.resolved pins; Package.swift at that commit points at the release's LDKNodeFFI.xcframework.zip with checksum ef0b7c49..., matching the asset's sha256 digest on the release.
Upstream delta rc.72 to rc.74: 6 commits, d1bd9fc...190a7d9, touching crates/bdk-wallet-aggregate (signing), src/wallet/mod.rs, src/event.rs, version files and tests. No .udl or binding change, so the Kotlin and Swift API the app calls is unchanged.
Other references to rc.72: none left in the tree (grepped the branch head).

Ruled out

  • API break in the bump: no UniFFI interface file changed between the two tags.
  • sign_owned_inputs signature change: it is pub(crate) inside ldk-node and gains a known_prevouts argument there only; nothing in the bindings exposes it.

CI: validate green; Run Tests, Run Integration Tests and build-local still pending when reviewed.
Not built here: iOS does not build on Linux; this review is reasoned from the diff, the upstream compare and the release artifacts.

Merge confidence: 4/5, a dependency bump whose fixed path (on-chain HTLC claim after a force-close) has no test in this repo and the test jobs were still running; the rc.74 tag also sits on the head of synonymdev/ldk-node#125, which is still open.

@ovitrif ovitrif closed this Oct 13, 2026
@ovitrif
ovitrif deleted the fix/ldk-splice-rc74 branch October 13, 2026 20:45
@ovitrif
ovitrif restored the fix/ldk-splice-rc74 branch October 13, 2026 20:46
@ovitrif ovitrif reopened this Oct 13, 2026
@ovitrif

ovitrif commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Replaced by #930: same change, on a branch named after the force-close claim fix.

@ovitrif ovitrif closed this Oct 13, 2026
@ovitrif
ovitrif deleted the fix/ldk-splice-rc74 branch October 13, 2026 20:49
@ovitrif ovitrif removed this from the 3.0.0 milestone Oct 15, 2026
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.

2 participants