版本发布 8
## Summary This release of `bdk_chain` v0.23.2 introduces important improvements to transaction conflict handling, where `IndexedTxGraph` now considers transactions that conflict with relevant transactions as also relevant. The `bdk_bitcoind_rpc` `FilterIter` API has been redesigned with breaking changes for enhanced BIP-158 filtering capabilities. It also adds a new `populate_anchor_cache` method for anchor management, fixes a stale anchor hash issue on reorganizations in `bdk_electrum`, and includes a breaking change that boxes the changeset of `StoreErrorWithDump` for improved memory efficiency. ## What's Changed * refactor!: `Box` the changeset of `StoreErrorWithDump` by @110CodingP in https://github.com/bitcoindevkit/bdk/pull/1998 * `IndexedTxGraph`: Transactions that conflict with relevant txs are also relevant. by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/2008 * ci: pin `rayon` dependencies for msrv by @LagginTimes in https://github.com/bitcoindevkit/bdk/pull/2013 * chore: add metadata fields to issue templates for triage by @LagginTimes in https://github.com/bitcoindevkit/bdk/pull/1992 * ci: pin `socket2` for msrv by @LagginTimes in https://github.com/bitcoindevkit/bdk/pull/2018 * Add populate_anchor_cache method to bdk by @Her-Code in https://github.com/bitcoindevkit/bdk/pull/2005 * fix(electrum): fix stale anchor hash on reorg by @LagginTimes in https://github.com/bitcoindevkit/bdk/pull/2011 * ci: pin `time` for msrv by @LagginTimes in https://github.com/bitcoindevkit/bdk/pull/2019 * docs(chain): add doctest for min confirmation balance filtering by @LagginTimes in https://github.com/bitcoindevkit/bdk/pull/2007 * `FilterIter` API redesign by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/2000 * chore(release): bump `bdk-chain` to `0.23.2` by @oleonardolima in https://github.com/bitcoindevkit/bdk/pull/2023 ## New Contributors * @110CodingP made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1998 * @Her-Code made their first contribution in https://github.com/bitcoindevkit/bdk/pull/2005 **Full Changelog**: https://github.com/bitcoindevkit/bdk/compare/chain-0.23.1...chain-0.23.2
## Summary This release of bdk_chain v.0.23.0 introduces a new option to cache and persist derived script pubkeys, improving performance on `KeychainTxOutIndex` startup, the `tx_graph` module now tracks and persists the `first_seen` timestamp for transactions which is useful for transaction ordering. The `bdk_core` crate added convenient `is_empty` methods to types `TxUpdate`, `{Sync,Scan}Response`, making it easier to check for no-op updates. ## What's Changed * feat!(chain): implement `first_seen` tracking by @uvuvuwu in https://github.com/bitcoindevkit/bdk/pull/1950 * fix(docs): `merge_chains` outdated documentation by @oleonardolima in https://github.com/bitcoindevkit/bdk/pull/1806 * chore: Update rust-version to 1.86.0 by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1955 * Add zizmor github actions security analysis workflow by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1813 * chore: create and apply rustfmt.toml by @luisschwab in https://github.com/bitcoindevkit/bdk/pull/1946 * Add `is_empty` methods to `TxUpdate` and `{}_Response` types by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1961 * fix(chain): persist `first_seen` by @LagginTimes in https://github.com/bitcoindevkit/bdk/pull/1966 * Persist spks derived from `KeychainTxOutIndex` by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1963 ## Persistence This release includes two SQLite migrations: - A new `first_seen` column added to the `TxGraph` change set. If you rely on transaction ordering or unconfirmed tx handling, be aware of the new `first_seen` logic. - A new `bdk_descriptor_derived_spks` table for persisting previously derived script pubkeys. **Full Changelog**: https://github.com/bitcoindevkit/bdk/compare/chain-0.22.0...chain-0.23.0
## Summary This release of `bdk_chain` v0.22.0 includes a better syncing experience for electrum and esplora, relevant transactions that are missing can now be evicted with the help of `SyncRequestBuilder`. `CanonicalizationParams` can be used to modify the behavior of `CanonicalIter` for a given query. Updated dependency on `miniscript` to 12.3.1 along with various fixes and improvements. ## What's Changed * test(core): add unit tests for `merge` trait by @pluveto in https://github.com/bitcoindevkit/bdk/pull/1738 * `bdk_electrum`: Handle negative heights properly by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1837 * Make full-scan/sync flow easier to reason about. by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1838 * docs: update CONTRIBUTING.md with section for new contributors by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1871 * doc: remove 1.0 roadmap stuff and fix broken links from README by @luisschwab in https://github.com/bitcoindevkit/bdk/pull/1882 * doc: remove persist crate from README by @luisschwab in https://github.com/bitcoindevkit/bdk/pull/1884 * Introduce `evicted-at`/`last-evicted` timestamps by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1839 * example_cli: add feerate option to psbt new cmd by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1840 * deps: bump `miniscript` to `12.3.1` by @LagginTimes in https://github.com/bitcoindevkit/bdk/pull/1924 * chore: remove bdk_wallet and update readme and ci workflow by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1928 * feat(chain): Add method for constructing TxGraph from a ChangeSet by @uvuvuwu in https://github.com/bitcoindevkit/bdk/pull/1930 * fix: Canonicalization should handle transactions that spend from two conflicting transactions by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1917 * Introduce canonicalization parameters by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1808 * feat(rpc)!: Update Emitter::mempool to support evicted_at by @LagginTimes in https://github.com/bitcoindevkit/bdk/pull/1857 ## New Contributors * @pluveto made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1738 * @Musab1258 made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1895 * @uvuvuwu made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1930 **Full Changelog**: https://github.com/bitcoindevkit/bdk/compare/chain-0.21.1...chain-0.22.0
## Summary In this release of bdk_wallet 1.2.0 The TxBuilder `add_recipient` function now accepts anything that implements `Into<ScriptBuf>`. The wallet considers a coinbase output eligible for selection if it will mature in the next block. Wallets persisted with a `rusqlite::Connection` are checked to be thread-safe. The `bdk_chain` dependency is updated to version 0.21.1, plus a number of internal cleanups. ## What's Changed * Fix off-by-one error checking coinbase maturity in optional UTxOs by @nymius in https://github.com/bitcoindevkit/bdk/pull/1830 * `bdk_electrum`: Handle negative heights properly by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1837 * wallet: Bump bitcoin dependency to v0.32.4 by @stevenroose in https://github.com/bitcoindevkit/bdk/pull/1853 * `bdk_wallet`: Pin `bdk_chain` version to latest release by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1860 * Make full-scan/sync flow easier to reason about. by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1838 * Refactor/use iterators to preselect utxos by @nymius in https://github.com/bitcoindevkit/bdk/pull/1798 * Refactor file store by @nymius in https://github.com/bitcoindevkit/bdk/pull/1684 * docs: update CONTRIBUTING.md with section for new contributors by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1871 * fix(examples): make regtest default on wallet_example_rpc by @luisschwab in https://github.com/bitcoindevkit/bdk/pull/1872 * chore(examples): make change descriptor optional on example_wallet_rpc by @luisschwab in https://github.com/bitcoindevkit/bdk/pull/1865 * Generalize `add_recipient` to accept `Address` by @rustaceanrob in https://github.com/bitcoindevkit/bdk/pull/1841 * doc: remove 1.0 roadmap stuff and fix broken links from README by @luisschwab in https://github.com/bitcoindevkit/bdk/pull/1882 * doc: remove persist crate from README by @luisschwab in https://github.com/bitcoindevkit/bdk/pull/1884 * fix(wallet): allow PersistedWallet to be Send + Sync by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1874 * Introduce `evicted-at`/`last-evicted` timestamps by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1839 * example_cli: add feerate option to psbt new cmd by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1840 * chore: bump `miniscript` to `12.3.1` by @LagginTimes in https://github.com/bitcoindevkit/bdk/pull/1924 * chore: bump bdk_wallet to 1.2.0 by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1925 ## New Contributors * @Musab1258 made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1895 **Full Changelog**: https://github.com/bitcoindevkit/bdk/compare/wallet-1.1.0...wallet-1.2.0
This is a patch release to fix a crash that can occur when syncing wallets that have many (10k+) UTXOs. ## !! DEPRECATED !! The [bdk](https://crates.io/crates/bdk) library is now deprecated and replaced by [bdk_wallet](https://crates.io/crates/bdk_wallet). All projects should migrate to [bdk_wallet 1.0.0](https://crates.io/crates/bdk_wallet/1.0.0) or newer as soon as possible. For migration instructions see the ["Book of BDK"](https://bitcoindevkit.github.io/book-of-bdk/) chapter on ["Migrating from 0.x"](https://bitcoindevkit.github.io/book-of-bdk/getting-started/migrating/). The BDK team will continue to publish `bdk` `0.30.x` bug fix releases as needed, but only for a limited time. ## What's Changed * Fix out of memory issue caused by many txs. by @jguinta in https://github.com/bitcoindevkit/bdk/pull/1831 * Fix SQLite panic when syncing many UTXOs by enabling WAL journal mode by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1836 ## New Contributors * @jguinta made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1831 **Full Changelog**: https://github.com/bitcoindevkit/bdk/compare/v0.30.1...v0.30.2
## Summary In this release of bdk_wallet v1.1.0 the tx builder is updated to use transaction version 2 by default, and support for wallets using testnet4 is now live. This release also includes important updates to bdk_electrum which has a new MSRV of 1.75.0 to stay current with the latest security fixes, bdk_bitcoind_rpc introduces a new compact block filter module, as well as various bug fixes and improvements. ## What's Changed * test(wallet): small cleanups to test_wallet_transactions_relevant by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1785 * refactor(wallet): cleanup and remove unused code in create_tx by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1768 * docs: add architectural decision records (ADR) by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1592 * fix(wallet): improve safety on finalize psbt by @f3r10 in https://github.com/bitcoindevkit/bdk/pull/1790 * feat(wallet): change default tx to version 2 by @benalleng in https://github.com/bitcoindevkit/bdk/pull/1789 * test(wallet): create tx locktime cltv for a specific time by @f3r10 in https://github.com/bitcoindevkit/bdk/pull/1682 * feat(wallet): support Testnet4 in valid networks by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1805 * fix(wallet): use `map_keychain` in `Wallet::build_fee_bump` by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1812 * ci: add secondary MSRV job of 1.75.0 by @oleonardolima in https://github.com/bitcoindevkit/bdk/pull/1803 * test(electrum): test for checking that fee calculation is correct by @f3r10 in https://github.com/bitcoindevkit/bdk/pull/1685 * feat(rpc): introduce FilterIter by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1614 * test(core): add unit tests for `merge` trait by @pluveto in https://github.com/bitcoindevkit/bdk/pull/1738 * Bump bdk_wallet to v1.1.0 by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1822 ## New Contributors * @f3r10 made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1790 * @benalleng made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1789 * @pluveto made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1738 **Full Changelog**: https://github.com/bitcoindevkit/bdk/compare/wallet-1.0.0...wallet-1.1.0
## Summary This is the final bdk_wallet 1.0.0 release. It contains small improvements to the wallet `transactions` function and `next_unused_address` API docs. Please thank all the [contributors] who made this first major release possible and who's continued effort make the BDK project so awesome! [contributors]: https://github.com/bitcoindevkit/bdk/graphs/contributors ## Changelog ### Changed - `Wallet::transactions` should only return relevant transactions. #1779 - Minor updates to fix new rustc 1.83.0 clippy warnings. #1776 ### Documentation - Reword the `next_unused_address` API docs. #1680 ## What's Changed * docs(wallet): reword the `next_unused_address` doc by @oleonardolima in https://github.com/bitcoindevkit/bdk/pull/1680 * chore[chain,wallet]: fix build warnings by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1774 * ci: automated update to rustc 1.83.0 by @create-pr-actions in https://github.com/bitcoindevkit/bdk/pull/1776 * `transactions` method should only return relevant transactions by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1779 * Bump bdk_wallet version to 1.0.0 by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1784 **Full Changelog**: https://github.com/bitcoindevkit/bdk/compare/v1.0.0-beta.6...wallet-1.0.0
## Summary This is the final "beta" test release before a final `bdk_wallet` 1.0.0 version. Changes include small bug fixes and API improvements plus an improved algorithm for determining which transactions are in the current best "canonical" block chain. The new canonicalization algorithm processes the transaction graph in linear time versus the prior quadratic time algorithm. ## Changelog * Move transaction testing utilities from `crates/chain/tests/common` to `testenv` crate #1612 * Remove bdk_chain::ConfirmationTime. Use ChainPosition<ConfirmationBlockTime> in its place. #1643 * Fix building change signers in `load_with_params` #1662 * Remove bdk_chain method KeychainTxOutIndex::inner #1652 * Document bdk_file_store is a development/testing database #1661 * Fix incorrect links in docs to wallet examples #1668 * Add bdk_wallet "test-utils" feature flag that exposes common helpers for testing and development #1658 * Removed methods Wallet::insert_tx, Wallet::insert_checkpoint, Wallet::unbroadcast_transactions #1658 * Fix type constraint on list canonical tx #1724 * Fix testenv docs.rs docs #1722 * Use `bitcoin::constants::COINBASE_MATURITY` #1727 * Rename bdk_core::spk_client's SyncResult to SyncResponse #1732 * Fix core checkpoint Drop stack overflow #1731 * Change Utxo::Foreign::sequence type to not be optional #1681 * Check time when persisting in `rusqlite` impl #1730 * Bump hashbrown dependency version to v0.14.5 #1721 * Add usage of debug_assert!() to LocalChain::apply_update #1734 * Allow Sqlite to persist anchor without tx #1736 * Change ChainPosition to represent transitive anchors and unconfirmed-without-last-seen values #1733 * Updated electrum-client dependency to 0.22.0 #1751 * Change TxBuilder to be Send safe and not implement the Clone trait #1737 * Update esplora-client dependency to 0.11.0 #1746 * Fix fetch_prev_txout to no longer queries coinbase transactions #1756 * Remove serde json dependency from chain crate #1752 * Introduce `O(n)` canonicalization algorithm #1670 * Add chain O(n) canonicalization algorithm see: /crates/chain/src/canonical_iter.rs #1670 * Add chain indexing fields in TxGraph; txs_by_anchor_height and txs_by_last_seen #1670 * Removed chain TxGraph methods: try_get_chain_position and get_chain_position #1670 * Change coin_selection and DescriptorExt::dust_value to use Amount type #1763 ## What's Changed * Refactor: Move transaction testing utilities from `crates/chain/tests/common` to `testenv` crate by @tvpeter in https://github.com/bitcoindevkit/bdk/pull/1612 * chore(deps): bump actions/checkout from 1 to 4 by @dependabot in https://github.com/bitcoindevkit/bdk/pull/1211 * ci: update audit.yml workflow to use actions-rust-lang/audit by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1646 * feat(chain,wallet)!: rm `ConfirmationTime` by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1643 * fix(wallet): fix building change signers in `load_with_params` by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1662 * chore(deps): bump tibdex/github-app-token from 1 to 2 by @dependabot in https://github.com/bitcoindevkit/bdk/pull/1657 * refactor(chain)!: remove `inner` method from KeychainTxOutIndex by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1652 * chore(file_store): Document that it's a dev database by @LLFourn in https://github.com/bitcoindevkit/bdk/pull/1661 * chore(deps): bump Swatinem/rust-cache from 2.2.1 to 2.7.5 by @dependabot in https://github.com/bitcoindevkit/bdk/pull/1645 * docs: fix incorrect links to wallet examples by @torkelrogstad in https://github.com/bitcoindevkit/bdk/pull/1668 * ci: pin deps for MSRV by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1674 * chore(deps): bump peter-evans/create-pull-request from 6 to 7 by @dependabot in https://github.com/bitcoindevkit/bdk/pull/1672 * chore(deps): bump crazy-max/ghaction-import-gpg from 5 to 6 by @dependabot in https://github.com/bitcoindevkit/bdk/pull/1673 * fix(wallet)!: Improve test utilities by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1658 * ci: automated update to rustc 1.82.0 by @create-pr-actions in https://github.com/bitcoindevkit/bdk/pull/1719 * Type constraint on list canonical tx by @rustaceanrob in https://github.com/bitcoindevkit/bdk/pull/1724 * fix(testenv): disable downloads (bitcoind and electrsd) for docs.rs b… by @riverKanies in https://github.com/bitcoindevkit/bdk/pull/1722 * Use `bitcoin::constants::COINBASE_MATURITY` by @rustaceanrob in https://github.com/bitcoindevkit/bdk/pull/1727 * chore(core)!: rename `SyncResult` to `SyncResponse` by @oleonardolima in https://github.com/bitcoindevkit/bdk/pull/1732 * fix(core): Fix checkpoint Drop stack overflow by @LLFourn in https://github.com/bitcoindevkit/bdk/pull/1731 * types: Make Utxo::Foreign::sequence not optional by @stevenroose in https://github.com/bitcoindevkit/bdk/pull/1681 * Check time when persisting in `rusqlite` impl by @rustaceanrob in https://github.com/bitcoindevkit/bdk/pull/1730 * chore(deps): bump hashbrown to v0.14.5 by @tvolk131 in https://github.com/bitcoindevkit/bdk/pull/1721 * chore(chain)!: use `debug_assert!` on `apply_update` by @oleonardolima in https://github.com/bitcoindevkit/bdk/pull/1734 * ci: pin `rustls` dependency version to build with rust 1.63 by @LagginTimes in https://github.com/bitcoindevkit/bdk/pull/1745 * Sqlite - allow persisting anchor without tx by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1736 * chore: Revert `rustls` pin dependency by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1749 * feat(chain,wallet)!: Transitive `ChainPosition` by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1733 * deps(electrum): bump `electrum-client` to 0.22.0 by @LagginTimes in https://github.com/bitcoindevkit/bdk/pull/1751 * fix(tx_builder)!: make TxBuilder Send safe, remove Clone trait by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1737 * deps(esplora): bump `esplora-client` to 0.11.0 by @ValuedMammal in https://github.com/bitcoindevkit/bdk/pull/1746 * fix(electrum): prevent `fetch_prev_txout` from querying coinbase transactions by @LagginTimes in https://github.com/bitcoindevkit/bdk/pull/1756 * Remove serde json dependency from chain crate by @nymius in https://github.com/bitcoindevkit/bdk/pull/1752 * Introduce `O(n)` canonicalization algorithm by @evanlinjin in https://github.com/bitcoindevkit/bdk/pull/1670 * Change coin_selection and DescriptorExt::dust_value to use Amount type by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1763 * Bump bdk_wallet version to 1.0.0-beta.6 by @notmandatory in https://github.com/bitcoindevkit/bdk/pull/1772 ## New Contributors * @tvpeter made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1612 * @dependabot made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1211 * @torkelrogstad made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1668 * @riverKanies made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1722 * @tvolk131 made their first contribution in https://github.com/bitcoindevkit/bdk/pull/1721 **Full Changelog**: https://github.com/bitcoindevkit/bdk/compare/v1.0.0-beta.5...v1.0.0-beta.6