Skip to content

Conversation

@ValuedMammal
Copy link
Collaborator

@ValuedMammal ValuedMammal commented Dec 28, 2025

Description

Currently in draft, the purpose of this PR is to test the wallet crate using the latest version of bdk. This branch can be updated to depend on version 0.24.0 of bdk_chain when that is released. Opening this now in response to a related comment bitcoindevkit/bdk#2083 (comment) regarding testing the new canonicalization APIs.

Notes to the reviewers

Changelog notice

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

Update dependencies:

chain
core
bitcoind_rpc -> 0.22.0
electrum
esplora
file_store -> 0.22.0

Changes:

Update usage of `LocalChain` and `CheckPoint` which are now generic.

Change structure of `WalletTx` (alias for `CanonicalTx`).

Introduce `Wallet::canonical_view`.

Update `balance` with re-defined trust predicate.

Fixup tests and documentation examples.
`build_fee_bump` and `finalize_psbt` now
rely on the most recent view of canonical txs
instead of re-canonicalizing on the fly.
This ensures that the wallet's canonical view is updated after
inserting a txout.

Currently *not all* `Wallet` methods that modify the transaction graph
will update the `canonical_view`, though they arguably should, e.g.
`apply_unconfirmed_txs`.

Docs for `apply_update` are updated to include an Errors section
and a note about the canonical view.
@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

❌ Patch coverage is 74.72527% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.06%. Comparing base (bec219a) to head (7f3b6e2).

Files with missing lines Patch % Lines
src/wallet/mod.rs 73.86% 23 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #360      +/-   ##
==========================================
- Coverage   85.24%   85.06%   -0.19%     
==========================================
  Files          23       23              
  Lines        8230     8229       -1     
==========================================
- Hits         7016     7000      -16     
- Misses       1214     1229      +15     
Flag Coverage Δ
rust 85.06% <74.72%> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ValuedMammal ValuedMammal added the api A breaking API change label Dec 28, 2025
@ValuedMammal ValuedMammal self-assigned this Dec 28, 2025
@ValuedMammal ValuedMammal moved this to In Progress in BDK Wallet Dec 28, 2025
@ValuedMammal ValuedMammal added this to the Wallet 3.0.0 milestone Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api A breaking API change

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants