Skip to content

Conversation

@ValuedMammal
Copy link
Collaborator

@ValuedMammal ValuedMammal commented Apr 12, 2025

This PR updates bdk_chain dependency to the latest version 0.22.0

Notes to the reviewers

This PR doesn't make use of CanonicalizationParams for any advanced use cases - instead we rely on the default params for all tx-graph queries.

fixes #202
fixes #224

Changelog notice

  • deps: bump bdk_chain to 0.22.0
  • deps: bump bdk_file_store to 0.20.0

Added

  • Added start_sync_with_revealed_spks_at
  • Added start_full_scan_at
  • Added apply_evicted_txs

Changed

  • start_sync_with_revealed_spks is feature gated by "std", as it uses the system time to provide the time of the sync and also the tx last-seen.
  • apply_update no longer requires std, as the timestamp is provided in the sync / full scan request
  • start_full_scan is also gated behind "std"
  • start_sync_* now includes the expected SPK history (via list_expected_spk_txids)

Removed

  • Removed apply_update_at

BREAKING

Changes to persisted data

The tx_graph::ChangeSet gained a new default-able field last_evicted to persist the fact that a tx is no longer part of the canonical chain.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing
  • I've added docs for the new feature
  • This pull request breaks the existng API
  • I'm linking the issue being fixed by this PR

@coveralls
Copy link

coveralls commented Apr 12, 2025

Pull Request Test Coverage Report for Build 14905703496

Details

  • 36 of 80 (45.0%) changed or added relevant lines in 3 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.5%) to 86.07%

Changes Missing Coverage Covered Lines Changed/Added Lines %
wallet/src/wallet/mod.rs 18 62 29.03%
Files with Coverage Reduction New Missed Lines %
wallet/src/wallet/mod.rs 3 81.94%
Totals Coverage Status
Change from base Build 14766348168: -0.5%
Covered Lines: 7266
Relevant Lines: 8442

💛 - Coveralls

@ValuedMammal ValuedMammal self-assigned this Apr 12, 2025
@ValuedMammal ValuedMammal moved this to Needs Review in BDK Wallet Apr 12, 2025
@ValuedMammal ValuedMammal added the api A breaking API change label Apr 12, 2025
@ValuedMammal ValuedMammal moved this from Needs Review to In Progress in BDK Wallet Apr 14, 2025
@ValuedMammal ValuedMammal added this to the 1.3.0 milestone Apr 14, 2025
@evanlinjin
Copy link
Member

Why is this part of the 1.3 milestone and not 2.0?

@ValuedMammal ValuedMammal modified the milestones: 1.3.0, 2.0.0 Apr 15, 2025
@notmandatory
Copy link
Member

notmandatory commented Apr 24, 2025

I renamed the old milestones so had to put this one back on the new 2.0.

@evanlinjin evanlinjin mentioned this pull request Apr 25, 2025
8 tasks
@ValuedMammal ValuedMammal force-pushed the deps/update-bdk-chain branch from 2fceda8 to a60d70d Compare April 30, 2025 20:03
@ValuedMammal ValuedMammal changed the title deps!: update to bdk at revision b7075865 deps!: update to bdk at revision 4fe121e7 Apr 30, 2025
@ValuedMammal ValuedMammal changed the title deps!: update to bdk at revision 4fe121e7 deps!: update bdk_chain to 4fe121e7 Apr 30, 2025
@ValuedMammal ValuedMammal force-pushed the deps/update-bdk-chain branch from c83afda to c2d27c0 Compare May 1, 2025 18:34
@ValuedMammal ValuedMammal force-pushed the deps/update-bdk-chain branch from c2d27c0 to a247215 Compare May 1, 2025 18:41
@ValuedMammal ValuedMammal changed the title deps!: update bdk_chain to 4fe121e7 deps!: update bdk_chain to 0.22.0 May 1, 2025
@ValuedMammal ValuedMammal marked this pull request as ready for review May 1, 2025 19:05
@ValuedMammal ValuedMammal moved this from In Progress to Needs Review in BDK Wallet May 1, 2025
@ValuedMammal ValuedMammal added the dependencies Pull requests that update a dependency file label May 1, 2025
@ValuedMammal
Copy link
Collaborator Author

ValuedMammal commented May 7, 2025

I added a commit to expose the insert_evicted_at logic for the Wallet type 3c5fa0b.

  • Update example_wallet_rpc to use new expected_mempool_txids functionality.

I think this could be done in a follow up PR.

Copy link
Member

@evanlinjin evanlinjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a small nit.

Also, I think we could also include eviction logic in example_wallet_rpc. I've done so in 4a52074

@ValuedMammal ValuedMammal force-pushed the deps/update-bdk-chain branch from 3c5fa0b to e125014 Compare May 8, 2025 11:45
@ValuedMammal
Copy link
Collaborator Author

Thanks @evanlinjin

Copy link
Member

@notmandatory notmandatory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e125014

@notmandatory notmandatory merged commit 99dacf0 into bitcoindevkit:master May 8, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from Needs Review to Done in BDK Wallet May 8, 2025
@ValuedMammal ValuedMammal deleted the deps/update-bdk-chain branch May 9, 2025 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api A breaking API change dependencies Pull requests that update a dependency file

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[deps] Update bdk_chain to 0.22.0 TxBuilder continously tries to spend missing output, Wallet unable to spend any funds

4 participants