530ba36b07f2cddad90b844ef1a56cb27ee1cf74 ci: fix msrv dependency versions for reqest and h2 (Daniela Brozzoni)
7a359d5eef66e60e0ab604fb0d043c2db260252d fix(electrum): Don't ignore multiple coinbase txs (Daniela Brozzoni)
Pull request description:
We would previously insert just one coinbase transaction in the database if we caught multiple in the same sync.
When we sync with electrum, before committing to the database, we remove from the update conflicting transactions, using the `make_txs_consistent` function. This function considers two txs to be conflicting if they spend from the same outpoint - but every coinbase transaction spends from the same outpoint!
Here we make sure to avoid filtering out coinbase transactions, by adding a check on the txid just before we do the filtering.
Fixes#1051
### Changelog notice
- Fix a bug when syncing coinbase utxos on electrum
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo fmt` and `cargo clippy` before committing
#### Bugfixes:
* [x] I've added tests to reproduce the issue which are now passing
* [x] I'm linking the issue being fixed by this PR
ACKs for top commit:
notmandatory:
tACK 530ba36b07f2cddad90b844ef1a56cb27ee1cf74
Tree-SHA512: ebbc6af86d4433ac4083212033a23f183d109641db345cc06ab4d506995ab71657761351c03772462ab4ff0d081226ecc97f1042490194aaf8661914cbeb72cb
We would previously insert just one coinbase transaction in the database
if we caught multiple in the same sync.
When we sync with electrum, before committing to the database, we remove
from the update conflicting transactions, using the
`make_txs_consistent` function. This function considers two txs to be
conflicting if they spend from the same outpoint - but every coinbase
transaction spends from the same outpoint!
Here we make sure to avoid filtering out coinbase transactions, by
adding a check on the txid just before we do the filtering.
Fixes#1051
Although there is *some* code to handle multipath keys inside bdk,
it's all untested, and from a few quick tests it
seems that it's pretty easy to find buggy edge cases.
Better to deny multipath descs for now, and revisit the
decision once we work on supporting multidescriptor wallets.
Summary
This patch release backports (from the BDK 1.0 dev branch) a fix for a bug in the policy condition calculation and adds a new taproot single key descriptor template (BIP-86). The policy condition calculation bug can cause issues when a policy subtree fails due to missing info even if it's not selected when creating a new transaction, errors on unused policy paths are now ignored.
Fixed
- Backported #932 fix for policy condition calculation #1008
Added
- Backported #840 taproot descriptor template (BIP-86) #1033
b6fecc8bc04e51c7f8d5a81580bd34c8ba6ab8cc ci: pin dependencies with Cargo update instead of in Cargo.toml (Steve Myers)
Pull request description:
### Description
Remove 1.57.0 MSRV dependency pinning from Cargo.toml and use `cargo update --precise` method instead. This is how bdk 1.0.0 and other rust projects are doing it now.
### Notes to the reviewers
This is needed to get the release/0.28 branch to build again. After it's merged I'll be able to start making the `0.28.1` release.
### Changelog notice
none.
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo fmt` and `cargo clippy` before committing
ACKs for top commit:
thunderbiscuit:
ACK b6fecc8bc04e51c7f8d5a81580bd34c8ba6ab8cc. Neat fix.
Tree-SHA512: 67b78a29eefb247500b7f583ef7e928222fe0fe58464427739e7dcf83ec02ab9703f5cf5e760d60a2681ea0b11ae013aae291dc51b352d109e2100adb020a031
7587f1603d66d17906378cc7c9227227931fd9cc feat(descriptor): backport from master branch new taproot descriptor template (BIP86) (Steve Myers)
177c96db5a2a8416f5ae8a14d7a3086f05dd0b10 Create taproot descriptor template (Vladimir Fomene)
Pull request description:
### Description
This PR solves #836 for the release/0.28 branch. This PR adds a P2TR descriptor template and a BIP86 taproot descriptor template. With this, users can now create a taproot descriptor with templates.
### Notes to the reviewers
The commit from #840 is cherry-picked from the `master` branch to the `release/0.28` branch without any changes.
### Changelog notice
Add taproot descriptor template (BIP-86).
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo fmt` and `cargo clippy` before committing
#### New Features:
* [x] I've added tests for the new feature
* [x] I've added docs for the new feature
ACKs for top commit:
danielabrozzoni:
utACK 7587f1603d66d17906378cc7c9227227931fd9cc
Tree-SHA512: e5b07473e27bba8ca5ec58854fa318c5a82cb67ce751d352ef17e9926dd08f8e6b7a720a77170b6f6f018c58ed9f8741cee396dc8e8721f4022c33ef2904815f
This PR solves #836. This PR adds a P2TR
descriptor template and a BIP86 taproot
descriptor template. With this, users
can now create a taproot descriptor with templates.
9cffaad71f3d090196a3e35e84ad714118ea2846 Fix build errors (junderw)
3ccdb84523997d3a9582b1ebd2cf2fe373ddaa55 Fix policy condition calculation When constructing the `Condition` struct we recursively call `get_condition` on all the items in a threshold and short-circuit if there's an error somewhere (for example, because the policy-path hasn't been provided for a specific threshold). (Alekos Filini)
Pull request description:
Fixes#942
### Description
This backports "Fix policy condition calculation" (#932) onto release/0.28
### Notes to the reviewers
Currently kept the Author the same and the committer is myself. Let me know if this is not the desired outcome of the history. (I have made no modifications myself)
### Changelog notice
Backported "Fix policy condition calculation"
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo fmt` and `cargo clippy` before committing
ACKs for top commit:
notmandatory:
ACK 9cffaad71f3d090196a3e35e84ad714118ea2846
Tree-SHA512: c505bc9c8efd75cfa23db7a0e77f010f1758a1b6725661a1af1bcb40c6fd606a13e50ca005c7752fe28c3b7cd748c182fdb5870693e299adaf230adeef02517a
When constructing the `Condition` struct we recursively call
`get_condition` on all the items in a threshold and short-circuit if
there's an error somewhere (for example, because the policy-path hasn't
been provided for a specific threshold).
This can cause issues when the user doesn't care about a subtree, because
we still try to call `get_condition` on all the items and fail if
something is missing, even if the specific subtree isn't selected and
won't be used later on.
This commit changes the logic so that we first filter only the `selected`
items, and then unwrap the error using the question mark. If errors
happened somewhere else they will be ignored, as it should.
cbcbdd120d48742ed70fcb47c159266ae6c5b1ae Update CHANGELOG for 0.28.0 release (Steve Myers)
f5071857294f3a0002aa3e2774f86a588ac4af3e Change workflows to run for release branches (Steve Myers)
573bf52578d0f3e93b9dae7f17faffc3aad3839b Add default feature std (Steve Myers)
Pull request description:
### Description
Add new `std` feature which enables `bitcoin/std` and `miniscript/std`, and enable `std` feature in `default` feature set.
### Notes to the reviewers
When using `bdk` in a wasm environment then `default` features should be disabled and `bitcoin/no-std` and `miniscript/no-std` must be enabled. This is a breaking change for anyone using `bdk` with `--no-default-features`.
I also updated the workflows to also run for `release/*` branches in addition to `master`.
### Changelog notice
Changed
- Added new `std` feature as part of `default` features, `std` must be enabled unless building for wasm.
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo fmt` and `cargo clippy` before committing
#### New Features:
* [ ] I've added tests for the new feature
* [x] I've added docs for the new feature
ACKs for top commit:
rajarshimaitra:
ACK cbcbdd120d48742ed70fcb47c159266ae6c5b1ae
Tree-SHA512: fc0e1495d2f4e65c015d771366ac8d9589736b4464cf496de5093cdef145abfed037c0701c3c210f70a7bde5128b681492202cecfca7cd94771d498e8fb8e565
a4647cfa98c300a196cafc5303cc08221d0e23bb Bump bip39 crate to v2.0.0 (Elias Rohrer)
Pull request description:
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
### Description
The updated version of `rust-bip39` was just released. It also [bumped the pinned version](https://github.com/rust-bitcoin/rust-bip39/pull/41) of `unicode-normalization`, which previously had lead to some incompatibilities.
### Notes to the reviewers
<!-- In this section you can include notes directed to the reviewers, like explaining why some parts
of the PR were done in a specific way -->
### Changelog notice
<!-- Notice the release manager should include in the release tag message changelog -->
<!-- See https://keepachangelog.com/en/1.0.0/ for examples -->
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo fmt` and `cargo clippy` before committing
ACKs for top commit:
rajarshimaitra:
tACK a4647cfa98c300a196cafc5303cc08221d0e23bb
notmandatory:
tACK a4647cfa98c300a196cafc5303cc08221d0e23bb
Tree-SHA512: c13f2c5081cd1cf0477ed41717b09b4854651ee43434760b12a460c19657ec6f437d6401b0b6d32c8315491301d7c9848f0575d427f027adc8390d649fe898a9
bb2b2d6dd8949a84675554c05b9880199c460fcf Update esplora-client dependency to version 0.4 (Steve Myers)
Pull request description:
### Description
Update the `esplora-client` to the new `0.4` release.
### Notes to the reviewers
The `esplora-client` was updated in bitcoindevkit/rust-esplora-client#39 to not include default `rust-bitcoin` dependencies.
### Changelog notice
- Update the `esplora-client` optional dependency to version `0.4`.
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo fmt` and `cargo clippy` before committing
ACKs for top commit:
vladimirfomene:
ACK bb2b2d6dd8949a84675554c05b9880199c460fcf
rajarshimaitra:
tACK bb2b2d6dd8949a84675554c05b9880199c460fcf
Tree-SHA512: 0f277106166ab4a8144a641ac9507f1a32d735f99c0b73a026ff6e0b82589110a71fe81f880caa01dab247572f3146b771cc28bdab5b22bcd87ff628e15b2e1a
0c2570ae07e7e90b66b2161121718ffac38dc3aa Pin dev-dependency zip to 0.6.3 (Steve Myers)
e83bb7c4dccd94d5876dc4361bd64c8405cf9f93 Bump version to 0.27.0 (Steve Myers)
Pull request description:
### Description
Bump version to 0.27.0.
### Notes to the reviewers
Updating changelog file again.
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
ACKs for top commit:
danielabrozzoni:
ACK 0c2570ae07e7e90b66b2161121718ffac38dc3aa
Tree-SHA512: 334e0a6933be18152f266e3622b877ccf67dafadd3a641eaf9ffa4e671babafbedcdaef431e2195aa7e11945f164b8da44bd8a208c8e7287ce87684fb2459787
147a4ed141accc83aa2781b2468d3d950674f8e7 Update electrsd to version 0.22 (Steve Myers)
Pull request description:
### Description
Update `electrsd` dev-dependency to version `0.22`.
### Notes to the reviewers
We're able to do this now that esplora was updated in #830 and our MSRV was bumped to `1.57.0` in #842.
### Changelog
None.
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
ACKs for top commit:
rajarshimaitra:
ACK 147a4ed141accc83aa2781b2468d3d950674f8e7
Tree-SHA512: 20e0aebb02d786a4d426a2d2e66b78225a803eee2c2f6092b0cf8f18e6fe91e37ef7a74e109e3ad4d734af8de4dc71598f7e80f50d40187442dad323000c6090
cf8cd2f2b4a975afbea18309a5dae0158acd8805 Update rust-miniscript to version 9.0, hwi to version 0.5 (Steve Myers)
Pull request description:
### Description
A new [`rust-miniscript` release 9.0](https://github.com/rust-bitcoin/rust-miniscript/blob/master/CHANGELOG.md#900---november-5-2022) came out on Nov 14, updating to it to pickup the bug fixes. Also updating dependency`hwi` to new `0.5` version which used the `9.0` version of `rust-miniscript`.
### Notes to the reviewers
This new version of `rust-miniscript` uses the same version of `rust-bitcoin` we are on, 0.29.1.
### Changelog notice
Update rust-miniscript dependency to latest bug fix release 9.0.
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo fmt` and `cargo clippy` before committing
ACKs for top commit:
rajarshimaitra:
ACK cf8cd2f2b4a975afbea18309a5dae0158acd8805
Tree-SHA512: 12473f67d2a4388e3d93b91988233e067328c344bb993981b014e1f7469db82f12d8f68eb1bf093feb25c4428d10451d8f361497c71c4f696d19939d4be9d858