Releases: bitcoindevkit/bdk
Release 1.0.0-alpha.12
Summary
This bi-weekly release fixes an electrum syncing bug when calculating fees and adds the bdk_sqlite crate for storing wallet data in a SQLite tables. The Wallet::allow_shrinking function was also remove because it was too easy to misuse. Also the bdk
crate was renamed to bdk_wallet
. See the changelog for all the details.
Changelog
Fixed
- Fixed
calculate_fee
result when syncing with electrum. #1443
Changed
- Removed
TxBuilder::allow_shrinking()
function. #1386 - Renamed
bdk
crate tobdk_wallet
. #1326 - Update Wallet to use
CombinedChangeSet
for persistence. #1128
Added
- Add
CombinedChangeSet
in bdk_persist crate. #1128 - Add
bdk_sqlite
crate implementing SQLite based wallet data storage. #1128 - Update
bdk_wallet
export feature to support taproot descriptors. #1393
What's Changed
- chore: rename bdk crate to bdk_wallet by @notmandatory in #1326
- fix(electrum): Fix
fetch_prev_txout
by @ValuedMammal in #1443 - feat: add bdk_sqlite crate implementing PersistBackend by @notmandatory in #1128
- Remove TxBuilder allow_shrinking() and unneeded context param by @notmandatory in #1386
- fix(export): add tr descriptor by @rustaceanrob in #1393
- Bump bdk version to 1.0.0-alpha.12 by @notmandatory in #1450
Full Changelog: v1.0.0-alpha.11...v1.0.0-alpha.12
Release 1.0.0-alpha.11
Summary
This incremental bi-weekly release includes three big improvements. New electrum full_scan and sync APIs were added for more efficiently querying blockchain data. And the keychain::Changeset now includes public key descriptors and keychain::Balance uses bitcoin::Amount instead of u32 sats amounts. See the changelog for all the details.
Changelog
Changed
- Include the descriptor in keychain::Changeset #1203
- Update bdk_electrum crate to use sync/full-scan structs #1403
- Update keychain::Balance to use bitcoin::Amount #1411
- Change
bdk_testenv
to re-export internally used crates. #1414 - Updated documentation for
full_scan
andsync
inbdk_esplora
. #1427
What's Changed
- test(wallet): add thread safety test by @rustaceanrob in #1417
- docs(esplora): fixed
full_scan
andsync
documentation by @LagginTimes in #1427 - chore: clean up
electrsd
andanyhow
dev dependencies by @LagginTimes in #1414 - feat: update
keychain::Balance
to usebitcoin::Amount
by @oleonardolima in #1411 - fix(persist): add default feature to enable bdk_chain/std by @notmandatory in #1423
- ci: Pin clippy to rust 1.78.0 by @ValuedMammal in #1430
- Include the descriptor in
keychain::Changeset
by @danielabrozzoni in #1203 - Update
bdk_electrum
crate to use sync/full-scan structs by @LagginTimes in #1403 - Bump bdk version to 1.0.0-alpha.11 by @notmandatory in #1437
New Contributors
- @oleonardolima made their first contribution in #1411
Full Changelog: v1.0.0-alpha.10...v1.0.0-alpha.11
Release 1.0.0-alpha.10
Summary
This incremental bi-weekly release improves the address API, simplifies the Esplora API, and introduced new structures for spk-based scanning that will enable easier syncing with electrum/esplora. It also introduces a new bdk-persist crate, removes the generic T from the Wallet, and makes KeychainTxOutIndex more range based.
Changelog
Fixed
- Enable blocking-https-rustls feature on esplora client #1408
Changed
- KeychainTxOutIndex methods modified to take ranges of keychains instead. #1324
- Remove the generic from wallet #1387
- Changed PersistenceBackend errors to depend on the anyhow crate
- Remove the generic T from Wallet
- Improve address API #1402
- Added Wallet methods:
- peek_address
- reveal_next_address
- next_unused_address
- reveal_addresses_to
- list_unused_addresses
- mark_used
- unmark_used
- Removed Wallet methods:
- get_address
- get_internal_address
- try_get_address
- try_get_internal_address
- Added Wallet methods:
- Simplified EsploraExt API #1380
- Changed EsploraExt API so that sync only requires one round of fetching data. The local_chain_update method is removed and the local_tip parameter is added to the full_scan and sync methods.
- Removed TxGraph::missing_heights and tx_graph::ChangeSet::missing_heights_from methods.
- Introduced CheckPoint::insert which allows convenient checkpoint-insertion. This is intended for use by chain-sources when crafting an update.
- Refactored merge_chains to also return the resultant CheckPoint tip.
- Optimized the update LocalChain logic - use the update CheckPoint as the new CheckPoint tip when possible.
- Introduce
bdk-persist
crate #1412 - Introduce universal sync/full-scan structures for spk-based syncing #1413
- Add universal structures for initiating/receiving sync/full-scan requests/results for spk-based syncing.
- Updated bdk_esplora chain-source to make use of new universal sync/full-scan structures.
What's Changed
- [chain] Make KeychainTxOutIndex more range based by @LLFourn in #1324
- fix(wallet): remove the generic from wallet by @rustaceanrob in #1387
- [wallet] Improve address API by @ValuedMammal in #1402
- Fix: enable blocking-https-rustls feature on esplora client by @thunderbiscuit in #1408
- Simplified
EsploraExt
API by @evanlinjin in #1380 - Add new crate
bdk-persist
by @rustaceanrob in #1412 - Introduce universal sync/full-scan structures for spk-based syncing by @evanlinjin in #1413
- fix: Cargo clippy lints by @danielabrozzoni in #1421
- Bump bdk version to 1.0.0-alpha.10 by @danielabrozzoni in #1420
New Contributors
- @rustaceanrob made their first contribution in #1387
Full Changelog: v1.0.0-alpha.9...v1.0.0-alpha.10
Release 1.0.0-alpha.9
Summary
This regular bi-weekly alpha release updates dependencies rust-bitcoin to v0.31.0 and rust-miniscript to v11.0.0 plus replaces the deprecated rust-miniscript function max_satisfaction_weight with max_weight_to_satisfy. It also adds chain module improvements needed to simplify syncing with electrum and esplora blockchain clients.
Changelog
Fixed
- Replace the deprecated max_satisfaction_weight from rust-miniscript to max_weight_to_satisfy. #1345
Changed
- Update dependencies: rust-bitcoin to v0.31.0 and rust-miniscript to v11.0.0. #1177
- Changed TxGraph to store transactions as Arc. This allows chain-sources to cheaply keep a copy of already-fetched transactions. #1373
- Add get and range methods to CheckPoint #1369
- Added get and range methods to CheckPoint (and in turn, LocalChain). This simulates an API where we have implemented a skip list of checkpoints (to implement in the future). This is a better API because we can query for any height or height range with just a checkpoint tip instead of relying on a separate checkpoint index (which needs to live in LocalChain).
- Changed LocalChain to have a faster Eq implementation. We now maintain an xor value of all checkpoint block hashes. We compare this xor value to determine whether two chains are equal.
- Added PartialEq implementation for CheckPoint and local_chain::Update.
- Methods into_tx_graph and into_confirmation_time_tx_graph for RelevantTxids are changed to no longer accept a seen_at parameter. #1385
- Added method update_last_seen_unconfirmed for TxGraph.
- Added proptest for CheckPoint::range. #1397
What's Changed
- Wrap transactions as
Arc<Transaction>
inTxGraph
by @evanlinjin in #1373 - fix: remove deprecated max_satisfaction_weight by @storopoli in #1345
- feat(chain): add
get
andrange
methods toCheckPoint
by @evanlinjin in #1369 - Fix last seen unconfirmed by @ValuedMammal in #1385
- Introduce proptesting, starting with
CheckPoint::range
by @evanlinjin in #1397 - Upgrade bitcoin/miniscript dependencies by @tcharding in #1177
- Bump bdk version to 1.0.0-alpha.9 by @notmandatory in #1404
Full Changelog: v1.0.0-alpha.8...v1.0.0-alpha.9
Release 1.0.0-alpha.8
Summary
This incremental bi-weekly release migrates API to use the rust-bitcoin FeeRate type, fixes PSBT finalization to remove extra taproot fields, and fixes blockchain scanning stop_gap definition and documentation. We recommend all 1.0.0-alpha users upgrade to this release.
Changelog
Fixed
Changed
What's Changed
- Explicitly state that we truncate file for
create_new
by @evanlinjin in #1384 - Migrate to bitcoin::FeeRate by @ValuedMammal in #1216
- Remove extra taproot fields when finalizing PSBT by @ValuedMammal in #1310
- Update bdk README by @ValuedMammal in #1378
- chore: extract
TestEnv
into separate crate by @LagginTimes in #1171 - fix: define and document
stop_gap
by @storopoli in #1351 - Fix cargo manifest for
bdk_testenv
by @evanlinjin in #1391 - Bump bdk version to 1.0.0-alpha.8 by @notmandatory in #1389
Full Changelog: v1.0.0-alpha.7...v1.0.0-alpha.8
Release 1.0.0-alpha.7
Summary
This incremental bi-weekly release includes an API change to relax the generic requirements on the wallet transaction builder and a small fix when manually looking ahead to unrevealed scripts. Unless you need one of these changes there's no need to upgrade to this release.
Changelog
Fixed
- Fix
KeychainTxOutIndex::lookahead_to_target
to look ahead to correct index. #1349
Changed
- Relax the generic requirements on
TxBuilder
. #1312
What's Changed
- Add
map_anchors
forTxGraph
by @yanganto in #1325 - ci: Remove jobserver pin by @danielabrozzoni in #1357
- tx_builder: Relax generic constraints on TxBuilder by @stevenroose in #1344
- Fix
KeychainTxOutIndex::lookahead_to_target
by @evanlinjin in #1349 - Bump bdk version to 1.0.0-alpha.7 by @notmandatory in #1365
New Contributors
Full Changelog: v1.0.0-alpha.6...v1.0.0-alpha.7
Release 1.0.0-alpha.6
Summary
This small bi-weekly release fixes TxBuilder to support setting explicit nSequence for foreign inputs and a bug in tx_graph::ChangeSet::is_empty where is returns true even when it wasn't empty 🙈. We also added a new option for Esplora APIs to include floating TxOuts in pudates for fee calculations.
Changelog
Fixed
- TxBuilder now supports setting explicit nSequence for foreign inputs. #1316
- Fix bug in tx_graph::ChangeSet::is_empty where is returns true even when it wasn't empty. #1335
Added
- New Option for Esplora APIs to include floating TxOuts in updates for fee calculation. #1308
What's Changed
- Clean up clippy allows by @ValuedMammal in #1186
- chore: typos by @storopoli in #1319
- tx_builder: Support setting explicit nSequence for foreign inputs by @stevenroose in #1316
- feat(esplora): include previous
TxOut
s for fee calculation by @LagginTimes in #1308 - Reorder fields in ConfirmationHeightAnchor fields so Ord DWIM by @LLFourn in #1334
- fix(chain): tx_graph::ChangeSet::is_empty by @LLFourn in #1335
- Bump bdk version to 1.0.0-alpha.6 by @notmandatory in #1347
New Contributors
- @stevenroose made their first contribution in #1316
Full Changelog: v1.0.0-alpha.5...v1.0.0-alpha.6
Release 1.0.0-alpha.5
Summary
This release introduces a block-by-block API to bdk::Wallet and adds a RPC wallet example, improves performance of bdk_file_store::EntryIter, and simplifies Esplora::update_local_chain with additional tests. See release notes for all the details.
Changelog
Fixed
InsertTxError
now implementsstd::error::Error
. #1172- Simplified
EsploraExt::update_local_chain
logic. #1267
Changed
EntryIter
performance is improved by reducing syscalls. #1270- Changed to implement
ElectrumExt
for all that implementsElectrumApi
. #1306
Added
Wallet
methods to apply full blocks (apply_block
andapply_block_connected_to
) and a method to apply a batch of unconfirmed transactions (apply_unconfirmed_txs
). #1172CheckPoint::from_block_ids
convenience method. #1172LocalChain
methods to apply a block header (apply_header
andapply_header_connected_to
). #1172- Test to show that
LocalChain
can apply updates that are shorter than original. This will happen during reorgs if we sync wallet withbdk_bitcoind_rpc::Emitter
. #1172
What's Changed
- Introduce block-by-block API to
bdk::Wallet
and add RPC wallet example by @vladimirfomene in #1172 - fix(store): Remove lifetime by @LLFourn in #1292
- doc(wallet): improve docs for
Wallet::sent_and_received
by @ValuedMammal in #1285 - doc(esplora): fix broken link in README by @ValuedMammal in #1288
- doc(chain,esplora): minor documentation improvements by @ValuedMammal in #1291
- doc(electrum_ext): fix docs for `RelevantTxids::into_confirmation_tim… by @ValuedMammal in #1289
- fix(readme): update examples by @storopoli in #1277
- Remove deprecated checksum routines by @theStack in #1253
- Expose
SpkIterator::new_with_range
by @evanlinjin in #1294 - Improve performance of
bdk_file_store::EntryIter
by @evanlinjin in #1270 - chain: set
DEFAULT_LOOKAHEAD
to 25 by @yukibtc in #1296 - Fix
ConfirmationTime
conversion fromChainPosition
by @evanlinjin in #1301 - fix(file_store): rm lifetime from
FileError
by @evanlinjin in #1299 - doc(example_cli): add missing cli docs by @ValuedMammal in #1290
- doc(store): update doc for
Store::aggregate_changesets
by @ValuedMammal in #1287 - Filter duplicate coins before coin selection by @evanlinjin in #1279
- Simplify
Esplora::update_local_chain
and add tests by @evanlinjin in #1267 - Implement
ElectrumExt
for all that implementsElectrumApi
by @evanlinjin in #1306 - Bump version to 1.0.0-alpha.5 by @notmandatory in #1307
New Contributors
Full Changelog: v1.0.0-alpha.4...v1.0.0-alpha.5
Release 1.0.0-alpha.4
Summary
This release improves the KeychainTxOutIndex
API and contains a few bug fixes and performance improvements.
Changelog
Fixed
- Avoid using
BTreeMap::append
due to performance issues (refer to rust-lang/rust#34666 (comment)). #1274
Changed
- The old
hardwaresigner
module has been moved out ofbdk
and inside a newbdk_hwi
crate. #1161 - Wallet's peek-address logic is optimized by making use of
<SpkIterator as Iterator>::nth
. #1269 KeychainTxOutIndex
API is refactored to better differentiate between methods that return unbounded vs stored spks. #1269KeychainTxOutIndex
no longer directly exposesSpkTxOutIndex
methods viaDeRef
. This was problematic becauseSpkTxOutIndex
also contains lookahead spks which we want to hide. #1269
Added
- LocalChain::disconnect_from method to evict a chain of blocks starting from a given BlockId. #1276
SpkIterator::descriptor
method which gets a reference to the internal descriptor. #1269
What's Changed
- ref(hwi): Move hwi out of bdk by @danielabrozzoni in #1161
- Bump bdk_esplora and bdk_file_store versions for 1.0.0-alpha.3 release by @notmandatory in #1263
- Refactor
reveal_to_target
andnext_store_index
by @danielabrozzoni in #1261 - fix(example_electrum): init LocalChain from genesis by @ValuedMammal in #1264
- Avoid using
BTreeMap::append
by @evanlinjin in #1274 - Add
LocalChain::disconnect_from
method by @evanlinjin in #1276 - Revamp
KeychainTxOutIndex
API to be safer by @evanlinjin in #1269 - doc, example(bdk): fix derivation path in mnemonic_to_descriptors by @ValuedMammal in #1286
- Bump version to 1.0.0-alpha.4 by @notmandatory in #1282
New Contributors
- @ValuedMammal made their first contribution in #1264
Full Changelog: v1.0.0-alpha.3...v1.0.0-alpha.4
Release 1.0.0-alpha.3
Summary
This release changes LocalChain to have a hard-wired genesis block, adds context specific Wallet TxBuilder errors, and bumps the projects MSRV to 1.63. It also includes other API and docs improvements and bug fixes, see the changelog for all the details.
Changelog
Fixed
- Further improve unconfirmed tx conflict resolution. #1109
- Stuck Electrum chain sync issue. #1145
- Bug related to taproot signing with internal keys. We would previously sign with the first private key we had, without checking if it was the correct internal key or not. #1200
- Coinbase transactions cannot exist in the mempool and be unconfirmed. TxGraph::try_get_chain_position should always return None for coinbase transactions not anchored in best chain. #1202
- Esplora incorrect gap limit check in blocking client. #1225
- Loading a wallet from persistence now restores keychain indices. #1246
Changed
- Rename ConfirmationTimeAnchor to ConfirmationTimeHeightAnchor. #1206
- New LocalChain now have a hardwired genesis block: #1178
- Changed ChainOracle::get_chain_tip method to return a BlockId instead of an Option of a BlockId.
- Refactored LocalChain so that the genesis BlockId is hardwired. This way, the ChainOracle::get_chain_tip implementation can always return a tip.
- Add is_empty method to PersistBackend. This returns true when there is no data in the persistence.
- Changed Wallet::new to initialize a fresh wallet only.
- Added Wallet::load to restore an instance of a wallet.
- Replaced Store::new with separate methods to create/open the database file.
- Updated the bdk module to use new context specific error types: #1028
- wallet: MiniscriptPsbtError, CreateTxError, BuildFeeBumpError error enums.
- coin_selection: module Error enum.
- Renamed fallible Wallet address functions to try_get_address() and try_get_internal_address(). #1028
- Rename LocalUtxo to LocalOutput. #1190
- MSRV is now 1.63.0 for bdk, chain, and bitcoind_rpc crates. #1183
- Use a universal lookahead value for KeychainTxOutIndex and have a reasonable default. #1229
- Return NonEmptyDatabase error when constructing a wallet with Wallet::new if the file already contains data (in which case, the caller should use load or new_or_load). #1256
- In electrum_ext rename functions scan_without_keychain to sync and scan to full_scan. #1235
- In esplora_ext rename functions scan_txs to sync and scan_txs_with_keychains to full_scan. #1235
- Increase rust-bip39 dependency version to 2.0 #1259
Removed
Added
- Add infallible Wallet get_address and get_internal_address functions. #1028
- Add Wallet::list_output method. #1190
- New async-https-rustls feature flag for the bdk_esplora crate, allowing to compile rust-esplora-client using rustls-tls instead of the default native-tls. #1179
What's Changed
- chore: add meta data to bitcoind_rpc crate by @notmandatory in #1174
- chore: fix MSRV for flate2 by @evanlinjin in #1182
- Further improve unconfirmed tx conflict resolution by @LagginTimes in #1109
- fix(electrum): fixed chain sync issue by @LagginTimes in #1145
- fix(bdk): Check if we're using the correct internal key before signing by @danielabrozzoni in #1200
- ci: Pin jobserver after cc by @danielabrozzoni in #1207
- chore: rename
ConfirmationTimeAnchor
toConfirmationTimeHeightAnchor
by @LagginTimes in #1206 - fix(chain): filter coinbase tx not in best chain by @LagginTimes in #1202
- feat: add dependabot by @realeinherjar in #1121
LocalChain
with hardwired genesis block by @evanlinjin in #1178- chore: fix typos by @realeinherjar in #1220
- Add CreateTxError and use as error type for TxBuilder::finish() by @notmandatory in #1028
- chore: remove bdk dependency on log and dev dependency on env_logger by @notmandatory in #1204
- Add
Wallet::list_output
method by @evanlinjin in #1190 - esplora: fix incorrect gap limit check in blocking client by @darosior in #1225
- build(esplora): Add async-https-rustls flag to esplora client by @thunderbiscuit in #1179
- doc(bdk): Clarify the absolute_fee docs by @danielabrozzoni in #1158
- Bump MSRV to 1.63.0 by @notmandatory in #1183
- doc: Improve TxGraph & co docs by @danielabrozzoni in #1188
- ci: pin home dependency to 0.5.5 and check_clippy to rust stable version by @notmandatory in #1247
- Fix: apply loaded changeset to indexed_graph when loading a wallet from persistence by @thunderbiscuit in #1246
- Use a universal lookahead value for
KeychainTxOutIndex
and have a reasonable default by @darosior in #1229 - Refactor/rename electrum_ext and esplora_ext to have sync and full_scan functions by @notmandatory in #1235
- cherry-pick feat(wallet)!: add
NonEmptyDatabase
variant toNewError
by @notmandatory in #1256 - fix(typos): existant -> existent by @storopoli in #1258
- Bump
bip39
dependency to v2.0 by @tnull in #1259 - Bump bdk version to 1.0.0-alpha.3 by @notmandatory in #1255
New Contributors
- @realeinherjar made their first contribution in #1121
- @darosior made their first contribution in #1225
- @storopoli made their first contribution in #1258
Full Changelog: v1.0.0-alpha.2...v1.0.0-alpha.3