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. The extra wallets' background pass neither lowers the shown block height nor flips the wallet sync flag, and a manual sync keeps the flag until it returns. Verified: xcodebuildmcp simulator test (OnchainSyncTrackerTests, RestoreSyncGateTests, RNMigrationSyncLifecycleTests, WalletSyncEventTests, WalletViewModelWipeTests)
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 defects were found. SummaryMoves extra on-chain wallets onto a separate, 60-second sync schedule with
No actionable issues found. Tests were not run during this review. Acknowledged scope: Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Primary wallet pass completes] --> C[Record completed height]
B[Extra-wallet pass completes] --> C
C --> D{Every required pass recorded?}
D -->|No| E[Keep restore and migration waiting]
D -->|Yes| F[Use lowest recorded height]
F --> G[Allow restore cleanup and post-migration work]
Reviews (1) · Last reviewed commit: "perf: sync extra wallets apart from the ..." · Reviewed by Greptile |
The journey funds a monitored Taproot address, restores from the phrase and checks the restore hold waits for the extra wallets' pass. It matches the Android journey of the same name. Verified: none (journey file only; driven in a later device run)
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Moves the extra wallets (Paykit Server accounts and other derived or monitored wallets) onto ldk-node rc.86's separate AdditionalOnchainWallets pass every 60 s. Restore pruning, the restore activity-seen sweep and the post-migration sync now wait until every on-chain wallet has synced. Reviewed ebfc5f6, full tier, static.
What I checked, and 5 candidates I ruled out
Read in full: OnchainSyncTracker.swift, the LightningService sync hooks (start, event loop, listOnchainWalletAccounts), AppViewModel syncCompleted handling and beginPostMigrationSync, WalletViewModel.applySync* / sync(), the new tests.
Cross-repo contract: read ldk-node at v0.7.0-rc.86 (9ec6e14). AdditionalOnchainWallets is only emitted for a pass that synced at least one wallet (emit_pass_events). Its height is the tip of the synced wallets (emit_onchain_sync_completed). Its interval comes from additional_wallet_sync_interval_secs. Swift's listOnchainWalletAccounts().count > 1 matches loaded_keys() (primary plus loaded extras).
Build: not built. iOS does not build on Linux, and a Bitkit auto review never runs the branch's code here.
CI: SwiftFormat and validate green; Run Tests, Run Integration Tests and build-local still pending when I read them.
Ruled out
- Restore gate never opens when an extra wallet is configured but its pass fails: the tracker keeps waiting, which is the intended gate. The pass retries every 60 s, and a node restart resets the tracker through
start(). - Extra wallet removed between passes leaves the gate shut:
recorddrops the stale extra height whenhasAdditionalWalletsis false and counts the primary alone (testExtraWalletsReAddedAfterRemovalWaitForANewPass). - Background extra-wallet pass clears the pull-to-refresh spinner:
applySyncCompletedignores.additionalOnchainWallets, andisManualSyncInFlightkeeps the primary pass from clearing it midsync(). currentBlockHeightpulled back by the extra wallets' lower tip: their completion no longer writes it.- Prune task outliving the test:
restorePruneTaskis now held and checks for cancellation after the sleep.
Merge confidence: 4/5, static review only (iOS not built here) and the unit and integration jobs had not finished.
Reviewer model: claude-opus-5-5
Reasoning effort: not exposed by this run
rc.87 fixes sync_wallets never returning on VSS-backed nodes, which stopped the background syncs this PR depends on. Verified: xcodebuild build of the Bitkit scheme for the iOS Simulator (arm64) resolves ldk-node 0.7.0-rc.87 and succeeds
|
Bumped ldk-node to v0.7.0-rc.87 in 9ecf3e3. rc.86 could stop all background syncing after a restore because a On rc.87 the
|
rc.88 fixes the additional wallets' sync pass hanging after a primary address type change. Verified: iOS Simulator build (arm64) succeeded
|
Bumped ldk-node to 0.7.0-rc.88 in 12707af. rc.88 fixes the additional wallets' sync pass hanging for up to a minute after a primary address type change, which failed |
|
Reran |
rc.89 has the same behaviour as rc.88; its additional wallets' sync loop gained tests. Verified: iOS Simulator build (arm64) succeeded
|
Bumped ldk-node to 0.7.0-rc.89 in dbec1e1. 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-android#2255
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.swift: setsadditionalWalletSyncIntervalSecsto 60 s, and records each on-chain pass since the node started in a newOnchainSyncTracker.AppViewModel.swift:.onchainWalletnow 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 and.additionalOnchainWalletshave 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.WalletViewModel.swift: the extra wallets' background pass no longer lowers the shown block height or flipsisSyncingWallet, and a manual sync keeps the flag until it returns.project.pbxproj,Package.resolved: rc.89.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, restore; no Received sheet for the old deposit, the balance is right, and old activity is marked seen only after the extra wallets' pass.Manual Tests
N/A
Automated Checks
OnchainSyncTrackerTests.swift— every on-chain wallet must sync, the lower height counts, and extra wallets added or re-added after a sync wait for their own passRestoreSyncGateTests.swift— the restore prune and hold wait for the extra wallets' pass and record their lower height; a Lightning sync does not end the holdWalletSyncEventTests.swift— the extra wallets' pass leaves the sync flag and chain tip alone; a manual sync keeps the flagRNMigrationSyncLifecycleTests.swift— post-migration sync waits for the extra wallets' passEvidence
restore-waits-for-extra-walletsjourney at 9ecf3e3 (rc.87), iPhone 17 Pro simulator, staging regtest, 300 000 sat on the monitored Taproot address: after the restore, no Received sheet opened in over 5 minutes on Home, the savings balance and activity showed the 300 000 sat, and both passes kept completing (the wallet's every ~10 s, the extra wallets' every ~60 s) with no stall. The in-app reset worked.SyncCompletedat the same height, the extra wallets' pass did not lower it, and the restore reached Home with no Received sheet (that wallet was unfunded).xcodebuildmcp simulator test(OnchainSyncTrackerTests,RestoreSyncGateTests,RNMigrationSyncLifecycleTests,WalletSyncEventTests,WalletViewModelWipeTests) pass at the PR head on the iPhone 17 simulator.Gaps
SyncCompletedorder, not a log line.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)