Skip to content

feat(key-wallet): seed sync checkpoint from birth_height#693

Draft
xdustinface wants to merge 1 commit intov0.42-devfrom
feat/feed-wallet-synced-height
Draft

feat(key-wallet): seed sync checkpoint from birth_height#693
xdustinface wants to merge 1 commit intov0.42-devfrom
feat/feed-wallet-synced-height

Conversation

@xdustinface
Copy link
Copy Markdown
Collaborator

@xdustinface xdustinface commented Apr 25, 2026

WalletManager::import_wallet_from_extended_priv_key, import_wallet_from_xpub, and import_wallet_from_bytes (plus the matching FFI) gain a birth_height parameter so previously-used keys can rescan from a chosen height instead of being silently anchored at the chain tip.

Based on:

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 25, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 69a69c21-3e70-4c91-a421-9a362daa59a7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/feed-wallet-synced-height

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.60%. Comparing base (677a67c) to head (92aa0ba).
⚠️ Report is 1 commits behind head on v0.42-dev.

Files with missing lines Patch % Lines
key-wallet-manager/src/lib.rs 33.33% 4 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           v0.42-dev     #693      +/-   ##
=============================================
+ Coverage      70.47%   70.60%   +0.13%     
=============================================
  Files            206      320     +114     
  Lines          43946    68028   +24082     
=============================================
+ Hits           30971    48032   +17061     
- Misses         12975    19996    +7021     
Flag Coverage Δ
core 75.81% <ø> (ø)
ffi 43.33% <100.00%> (?)
rpc 20.00% <ø> (ø)
spv 87.42% <ø> (?)
wallet 69.54% <33.33%> (-0.01%) ⬇️
Files with missing lines Coverage Δ
key-wallet-ffi/src/wallet_manager.rs 67.50% <100.00%> (ø)
key-wallet-manager/src/lib.rs 62.63% <33.33%> (-0.20%) ⬇️

... and 113 files with indirect coverage changes

@xdustinface xdustinface force-pushed the refactor/birth-height-construction branch from 973115f to 5ee6537 Compare April 28, 2026 01:30
@github-actions github-actions Bot added the merge-conflict The PR conflicts with the target branch. label Apr 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.

@xdustinface xdustinface force-pushed the refactor/birth-height-construction branch from 5ee6537 to 0a49ef4 Compare April 28, 2026 13:14
Base automatically changed from refactor/birth-height-construction to v0.42-dev April 29, 2026 23:19
Move sync checkpoint seeding into `ManagedWalletInfo` construction so it can't be forgotten, and let callers control the scan range when importing.

- `WalletInfoInterface::from_wallet` now takes `birth_height` and seeds `synced_height` and `last_processed_height` to `birth_height.saturating_sub(1)`. Previously every wallet-add path had to remember to call `set_birth_height` separately, and forgetting it dragged `WalletManager::synced_height` (a min across wallets) back to genesis on every add.
- `WalletManager::import_wallet_from_extended_priv_key`, `import_wallet_from_xpub`, and `import_wallet_from_bytes` (plus the matching FFI) gain a `birth_height` parameter so previously-used keys can rescan from a chosen height instead of being silently anchored at the chain tip.
- Unused `ManagedWalletInfo::with_birth_height` removed.
@xdustinface xdustinface force-pushed the feat/feed-wallet-synced-height branch from 50c6a0d to 92aa0ba Compare April 29, 2026 23:22
@github-actions github-actions Bot removed the merge-conflict The PR conflicts with the target branch. label Apr 29, 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.

1 participant