feat(wallet): complete derived-account lifecycle parity#92
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 58260d37e5
ℹ️ 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".
|
The following cropped up upon AI review: 1 (incremental sync misses later external addresses) - confirmed. 2 (large full scan under fixed timeout) - confirmed. 3 (error inconsistency) - confirmed. |
Summary
Config::onchain_wallet_accountsafter validating each account index and xpub against the node seed.100and1000.0.7.0-rc.55and regenerate Swift, Android Kotlin, JVM Kotlin, Python, and native binding artifacts.Behavior
Runtime add/remove changes are not persisted as registration state. Applications can persist
{ address_type, account_index, xpub }in their own configuration and supply it throughConfig::onchain_wallet_accountson every build. Removing an account only unloads it from the aggregate wallet; re-adding it recovers the existing account-specific BDK namespace.Account
0remains reserved for the configured primary and monitored address-type wallets. Derived accounts cannot become the receive/change wallet.ElectrumSyncConfig::additional_wallet_full_scan_batch_sizeandadditional_wallet_full_scan_stop_gapapply only to monitored/derived wallets during full scans. Defaults remain5and20; primary-wallet full scans and all incremental syncs retain their existing behavior.Esplora and Electrum can recover confirmed history for newly loaded accounts through full scans. Bitcoind still starts brand-new accounts at the known tip and cannot recover confirmed pre-registration history.
Verification
cargo fmt --checkgit diff --check origin/main...HEADcargo test --lib(72 passed)cargo test --lib --features uniffi(82 passed)cargo check --all-targets --all-featurescargo test --doc(12 passed)100and stop gap1000, in native and UniFFI modes./bindgen.shgeneration and platform buildsPackage.swift:098d48d602fe000f1a9dbc7e758a0fe7bd8720c12b0036c38edf38283edd55f3Strict
cargo clippy --lib -- -D warningsremains blocked by pre-existing lint failures onorigin/main; this PR does not add unrelated lint cleanup.Release