Repository navigation
fix: speed up node start on slow networks - #2224
Conversation
Bumps ldk-node to 0.7.0-rc.85 on master, matching release-3.2.0: VSS writes reuse the connection the store's reads opened (synonymdev/ldk-node#147), so the first ChannelMonitor write at node start doesn't wait on a new connect and its retries (#2219). Verified: none (same pins and checksums as the release-3.2.0 bump, which resolved rc.85 from GitHub Packages and a clean SwiftPM cache)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryUpdates
Reviews (1) · Last reviewed commit: "fix: speed up node start on slow network..." · Reviewed by Greptile |
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Bumps ldk-node-android from 0.7.0-rc.84 to 0.7.0-rc.85 on master and adds the rc.85 verification checksums. Reviewed 0c6797e, full tier (dependency manifest), static: the PR branch is not built here.
What I checked
Pin: libs.versions.toml and the new verification-metadata.xml component name the same version, 0.7.0-rc.85
Checksums: the native-debug-symbols.zip sha256 matches the digest GitHub reports for that asset on the ldk-node v0.7.0-rc.85 release; the aar and module checksums are enforced by Gradle verification, and build-and-test resolved and passed with them
Upstream delta: git diff --stat v0.7.0-rc.84 v0.7.0-rc.85 in ldk-node touches only src/io/vss_store.rs plus version strings (Cargo, Package.swift, gradle.properties, pyproject), so the bindings surface the app compiles against is unchanged, as the body says
CI: build-and-test green; build-local, lint and compose-ui still running at review time
Merge confidence: 4/5, a dependency bump whose changed path (VSS write at node start) no test here exercises; the body names the device run on a mobile network as the open gap.
Reviewer model: claude-opus-5-5
Reasoning effort: Not exposed (the runtime does not report it to the reviewer)
coreyphillips
left a comment
There was a problem hiding this comment.
Two independent reviews.
worth doing, does not block
Fixes #2219closes the issue that still tracks the closed-channel force-close. Merging this into master will auto-close #2219, but only half of that issue's Expected section is fixed here.gh issue view 2219 --json closedByPullRequestsReferencesreturns[2224], so GitHub has already linked this PR as the closer. The issue's second expected item is: "A closed channel's monitor is not force-closed and re-persisted on every start." A later maintainer comment says ldk-node#147 does not touch that, "so this issue stays open for it after the bumps". Where comments disagree, the later one wins, and this PR's description is later than nothing that overrides it. I searched for a separate issue (gh issue list --state all --search "force close closed channel monitor start") and found none. #2215 is a different bug. The slow keychain restore from the same thread also has no issue of its own, even though the comment says it "needs its own issue". Closing #2219 would leave both untracked. UsePart of #2219orRefs #2219instead. Or file the force-close (and the keychain restore) as their own issues before merging.- No changelog fragment, and the stated reason for skipping it is wrong. The Out of Scope note says
release-3.2.0merges back into master, so a fragment here would list the fix twice. Release branches are not merged back.git merge-base --is-ancestorshows none oforigin/release-2.3.2throughorigin/release-3.2.0is an ancestor of master. Instead, a master-side record PR copies the release section intoCHANGELOG.mdand deletes the consumed fragments. The last ldk-node bump that shipped on both branches did it the other way. Master commit cce0cfe (rc.80) and release PR #1872 both addedchangelog.d/next/1870.security.md. The record PR 0443ae5 (chore: record Android 3.1.1 release) deleted master's copy and listed the entry once. CLAUDE.md asks for exactly one fragment on every user-facingfix:PR. Adding the samechangelog.d/next/2219.fixed.mdthat #2222 carries would follow that rule and the precedent, and would not duplicate the entry.
the reviewers disagree, your call
- Merging would close #2219 before its remaining bug is fixed (general). Objection: Real, but non-blocking rather than blocking: Confirmed: the PR targets
master, which is the default branch. GitHub lists #2219 in itsclosingIssuesReferences. The maintainer's 13:11 comment on #2219 says the issue "stays open for it after the bumps" because ldk-node#147 doesn't touch the closed-channel force-close on start, and no other issue tracks that bug. Still, this is a one-line fix to the PR body, and a closed issue can simply be reopened, so it shouldn't block the change itself. When switching toRefs #2219, also add aSource:line as #2222 does, since a PR that closes no issue needs one.
3.2.0 does merge back: #2160 ( |
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: full PR diff against its merge base, at 0c6797e.
No new actionable code findings.
The diff bumps com.synonym:ldk-node-android from 0.7.0-rc.84 to 0.7.0-rc.85 and records the new checksums. Published tag v0.7.0-rc.85 is 3f45b8ec, the release commit after ldk-node#147 (e36d347). On that tag, startup channel-monitor persistence uses the synchronous store, and the write client shares the HTTP pool with the reads from store setup and monitor load, so the first monitor write keeps the connection those reads opened. The bindings surface is unchanged. build-and-test passed at this revision, so Gradle accepted the AAR and module checksums. The native-debug-symbols sha256 matches the asset on that release. GitHub Packages refused a direct AAR download with this credential.
bitkit-ios#1569 at 3c41d8f selects the same 0.7.0-rc.85 package (3f45b8ec). For ldk-node#147, only the VSS write-connection contract and binding compatibility were checked, not a full review. #2219 also expects a closed channel's monitor not to be force-closed again on start; this bump does not change that path, which is tracked in #2226. The slow keychain restore from the same report is #2227.
Device testing: not performed in this review. Manual case 1 remains the check for this change: on a mobile network, start a mainnet or staging wallet that has a channel and compare Got new ChannelMonitor to Persistence … completed with 3.1.1.
Ready for device testing.
Reviewer model: grok-4.7
Reasoning effort: xhigh
coreyphillips
left a comment
There was a problem hiding this comment.
Rechecked after replies, with no new commit since 0c6797e. Nothing blocking remains.
addressed
Fixes #2219closes the issue that still tracks the closed-channel force-close. Rebutted: The 16:17 reply holds: the force-close is now tracked in #2226 and the slow restore in #2227.gh issue viewshows both are open, and #2226's body says it was split from #2219. The maintainer's latest comment on #2219 says this PR closes it, and that comment replaces the earlier "stays open" one, soFixes #2219no longer leaves anything untracked.- No changelog fragment, and the stated reason for skipping it is wrong. Rebutted: The 16:17 reply holds against the repo. Minor releases do merge back: #1755 (release-3.1.0) and #1512 (release-3.0.0) were merged into master, and #2160 (release-3.2.0 → master) is open. Only patch branches like 3.1.1 were not merged back. #2222 adds
changelog.d/next/2219.fixed.mdon release-3.2.0, and release prep consumes fragments there, as the 3.2.0 section already in its CHANGELOG.md shows. In a three-way merge, a fragment added only on master is kept, so a master copy would list the fix again in the next release. Leaving it out is right here. - Merging would close #2219 before its remaining bug is fixed. Rebutted: Same as point 1: the closed-channel rebroadcast is now tracked by open issue #2226, which says it was split from #2219, and the maintainer's latest comment on #2219 names this PR as its closer. Closing #2219 no longer drops a tracked bug. Since
Fixes #2219stays, the PR closes an issue and needs noSource:line.
|
Open-channel startup smoke passed on The real weak-mobile timing case remains open. This measurement is from the lab connection. |
Fixes #2219
Twin: synonymdev/bitkit-ios#1569
Dependency: synonymdev/ldk-node#147 (released as v0.7.0-rc.85)
Bumps ldk-node to 0.7.0-rc.85 on master, the same bump as #2222 on
release-3.2.0, so master doesn't fall behind the release. Since rc.82, the first ChannelMonitor write at node start opened a new VSS connection, so a network that drops new connects sent it through the write retry backoff: 0.8–62 s on 3.2.0 against 0.3 s on 3.1.1. In rc.85, writes reuse the connection the store's reads opened. Cause and timings: #2219 (comment)Description
src/io/vss_store.rsand the version numbers; the bindings API is the same as rc.84.verification-metadata.xmlgets the rc.85 aar, module and debug-symbol checksums.Out of Scope
release-3.2.0merges back into master; a second one here would list the fix twice.Design
N/A — no UI changes.
Preview
N/A
QA Notes
Setup
Mainnet or staging wallet with a channel, on a mobile network.
Journeys
N/A — not drivable; see Manual Tests.
Manual Tests
Got new ChannelMonitor→Persistence … completedin the log takes about as long as on 3.1.1 (0.3–0.4 s), with no multi-second stalls on a weak network — real mobile network conditions not in CapabilitiesAutomated Checks
N/A
Evidence
Gaps
Models used
Claude Opus 5.5(reasoning:medium)opus(reasoning:Not exposed),gemini-4-neon-high(reasoning:Not exposed)