Repository navigation
Conversation
Bumps ldk-node to 0.7.0-rc.86, which syncs additional wallets in their own pass. They sync every 60 s, and the restore hold, empty address type prune and post-migration sync wait for both passes when the node tracks extra wallets. Verified: ./gradlew :app:testDevDebugUnitTest (AppViewModelSendFlowTest; LightningRepoTest before the last AppViewModel edit), ./gradlew detekt
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. |
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryMoves extra wallets onto a separate sync schedule and waits for their sync before finishing restore work.
No actionable issues found. Review was based on source inspection; tests were not run.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[SyncCompleted] --> B[Record on-chain pass height]
B --> C{Restore or migration work pending?}
C -->|Yes| D{Primary pass recorded?}
D -->|Yes| E{Extra wallets tracked?}
E -->|No| F[Use primary height]
E -->|Yes| G{Extra pass recorded?}
G -->|Yes| H[Use lower height]
F --> I[Finish eligible restore or migration work]
H --> I
D -->|No| J[Wait]
G -->|No| J
K[Node leaves Running] --> L[Clear recorded heights]
Reviews (1) · Last reviewed commit: "perf: sync extra wallets apart from the ..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d843f94e05
ℹ️ 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".
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
The journey funds a monitored Taproot address, restores from the phrase and checks the restore hold waits for the extra wallets' pass. Also drops the KDoc on a private helper, per AGENTS.md. Verified: ./gradlew detekt
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Bumps ldk-node to 0.7.0-rc.86, which syncs extra on-chain wallets in their own ADDITIONAL_ONCHAIN_WALLETS pass every 60 s. The restore hold, the empty address type prune and post-migration completion now wait until both passes have run since the node started, and use the lower of the two heights. Reviewed d843f94, full tier, static: per the Bitkit track policy an auto review does not build bitkit-android branches, so this rests on the code, the ldk-node v0.7.0-rc.86 source and CI.
What I checked, and 4 candidates I ruled out
Read in full: handleSyncCompleted, allOnchainWalletsSyncedHeight, completePendingRestoreActivitySeen, completeMigration, completeRNRemoteBackupRestore, applyPendingChannelMigration, LightningService.reconcileWatchOnlyAccounts and sync, and the new tests in AppViewModelSendFlowTest.kt and LightningRepoTest.kt.
ldk-node rc.86 checked: run_additional_wallet_sync_loop runs next to the primary loop, and its first interval.tick() fires straight away, so the first additional pass starts with the node and not 60 s later. emit_pass_events sends AdditionalOnchainWallets only when synced_accounts is not empty and stamps it with tip_height_of(synced_accounts). list_onchain_wallet_accounts returns every loaded wallet, primary included, so size > 1 matches what the additional pass syncs: monitored account-0 types plus derived accounts.
CI at review time: build-and-test, build-local, compose-ui, detekt, Greptile and e2e send green. e2e multi_address_local still pending.
Ruled out
- A hold that never lifts when one extra wallet keeps failing to sync: the additional pass returns
Errbefore emitting, so neither the restore hold nor post-migration completion would clear. rc.85 had the same problem: its combined pass foldedadditional_outcome.errorinto the result and skipped theOnchainWalletevent too. Not new in this PR. - Extra wallets removed mid-restore, leaving the hold waiting for a pass that never reports:
hasAdditionalWallets()is read again on every on-chain sync, so once the list is down to the primary wallet, its own pass releases the hold. - A height left over from the stopped node lifting the hold after a restart: the lifecycle collector clears the map on every state that is not
Running, and the height is read again after thehasAdditionalWallets()suspension.restore does not count syncs from before a node restart...covers it. - The channel-migration restart in
applyPendingChannelMigrationclearing the heights whilecompleteMigrationruns: that path is already past the gate and holdsisCompletingMigration, so clearing the map does not interrupt it.
Merge confidence: 4/5. Nothing was found, but multi_address_local was still pending at review time and the restore-with-extra-wallets run on a device is still an open Gap in the PR body.
Reviewer model: Claude Opus 5.5
Reasoning effort: Not exposed (the session metadata available to this run does not report a reasoning setting)
rc.87 fixes sync_wallets never returning on VSS-backed nodes, which stopped the background syncs this PR depends on. Verified: ./gradlew --write-verification-metadata sha256 resolves 0.7.0-rc.87; testDevDebugUnitTest for AppViewModelSendFlowTest and LightningRepoTest pass
After the reset, Restore is reached through the terms and intro, and shows the multiple-devices warning before the word inputs. The README lists the tags. Verified: the journey ran end to end on the emulator at a1049fa with these steps taken by hand; XML parses
rc.88 fixes the additional wallets' sync pass hanging after a primary address type change, which failed multi_address_local E2E. Verified: assembleDevDebug and syncNativeDebugSymbolArtifacts pass with strict dependency verification
|
Bumped ldk-node to 0.7.0-rc.88 in 69530f1 to fix the Also pushed fa33730, which walks the extra wallets restore journey through onboarding (terms, intro, multiple-devices warning). |
rc.89 has the same behaviour as rc.88; its additional wallets' sync loop gained tests. Verified: assembleDevDebug and syncNativeDebugSymbolArtifacts pass with strict dependency verification
|
Bumped ldk-node to 0.7.0-rc.89 in eb5cc89. It behaves the same as rc.88; the only change is tests for its additional wallets' sync loop, which the library's release rules require to ship as a new rc. |
Twin: synonymdev/bitkit-ios#1588
Dependency: synonymdev/ldk-node#154
Bumps ldk-node to v0.7.0-rc.89, which syncs additional on-chain wallets (Paykit Server accounts, monitored address types) in their own background pass, so they no longer slow down the wallet's own sync. It also fixes that pass hanging for up to a minute after a primary address type change.
Description
LightningService.kt: setsadditionalWalletSyncIntervalSecsto 60 s in both Esplora and ElectrumBackgroundSyncConfig.AppViewModel.kt:SyncType.ONCHAIN_WALLETnow covers only the wallet's own pass, so the restore hold, the empty address type prune and the post-migration sync wait until the wallet's pass andSyncType.ADDITIONAL_ONCHAIN_WALLETShave both completed since the node started, and use the lower of the two heights. Without extra wallets the wallet's pass is enough, as before.LightningRepo.kt:hasAdditionalWallets()tells whether the node tracks wallets besides the primary.gradle/libs.versions.toml,gradle/verification-metadata.xml: rc.89 and its artifact checksums.Out of Scope
Design
N/A — no UI changes.
Preview
N/A
QA Notes
Setup
Build from this branch (dev, regtest or mainnet). For the restore cases, use a wallet with more than one monitored address type or a Paykit Server account, so the node tracks extra wallets.
Journeys
journeys/backup-restore/restore-waits-for-extra-wallets.xml: back up a funded wallet whose Taproot address type stays monitored after switching to Native Segwit, reset, then restore through the terms, intro and the multiple-devices warning. Expect no Received sheet for the old deposit, the right balance, and old activity marked seen only after the extra wallets' pass.Manual Tests
N/A
Automated Checks
AppViewModelSendFlowTest.kt— restore marks activities seen only after the extra wallets synced, at their lower heightAppViewModelSendFlowTest.kt— restore waits for the wallet's pass when the extra wallets sync firstAppViewModelSendFlowTest.kt— syncs from before a node restart and unknown wallets do not countAppViewModelSendFlowTest.kt— empty address type prune and post-migration sync wait for the extra walletsLightningRepoTest.kt—hasAdditionalWalletscounts wallets besides the primary and reports a failed readEvidence
restore-waits-for-extra-walletsjourney at a1049fa (rc.87), Android emulator: ran end to end through onboarding; the restore reached Home with no stall.assembleDevDebugandsyncNativeDebugSymbolArtifactspass at eb5cc89 (rc.89) with strict dependency verification.multi_address_localincluded; it runs again on this head in CI../gradlew :app:testDevDebugUnitTest(LightningRepoTest,AppViewModelSendFlowTest) and./gradlew detektpass at a1049fa (rc.87).Models used
Claude Opus 5.5(reasoning:medium)Claude Opus 5.5(reasoning:medium),Claude Sonnet 5.5(reasoning:high),Claude Haiku 5.5(reasoning:high)Gemini 4 Neon(reasoning:high)