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
f0cec015b59ab484e81ca675d1170af5eb553911 Add small clarification to docs (thunderbiscuit)
Pull request description:
### Description
Very small fixes to documentation:
1. I got a DM last week from a user who thought we had a bug with our timestamps. It turns out he was using the milliseconds version of the Unix timestamp in his project and didn't realize we were giving out a standard Unix timestamp. The docs now mention this explicitly.
2. I noticed some small inconsistencies in the documentation on the public templates while porting them over to Kotlin. This PR also fixes that so that all templates use a common documentation wording.
### 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:
Re-ACK f0cec015b59ab484e81ca675d1170af5eb553911
Tree-SHA512: ad42278126a0613fb1ba15f4e0ca92e05038389ac2e6b1015ea045f30ee8e92a40d6c089c35d0492bba0dc6d71e44b29879bd37a8bc491ff6367a89cab958db2
4ada11f3581a172ec2d5980378267f578e998740 Update CHANGELOG and release process (Steve Myers)
Pull request description:
### Description
Per discussion on discord with @danielabrozzoni this PR updates our release process to go back to updating our CHANGELOG.md file for each release.
### Notes to the reviewers
This adds one more step the person making releases has to do but it isn't much.
### 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 4ada11f3581a172ec2d5980378267f578e998740
Tree-SHA512: 80c116c90b4a5c5d4091678dd7714c9eee881c0f181dd220e878011001ad458db2bb81dea7dc13f2d768b9169c3644191d7969c533b784a5e26f5aa6c9e66fc2
ff720780950e010cb13af7def1d2226841ca3f97 Document return type of `sign` method. (Thibaut Le Guilly)
Pull request description:
Small thing but I had to look up the code to see what the returned boolean was about, thought it might be good to have in the docs.
### Description
Documents the meaning of the returned value on the wallet `sign` method.
I've just edited from github so skipped all the checks if that's not ok maybe someone else can update it properly.
ACKs for top commit:
w0xlt:
ACK ff72078095
notmandatory:
ACK ff720780950e010cb13af7def1d2226841ca3f97
Tree-SHA512: e0dd52a0af663b88d3fe0a20cb2909b9ba00bcf4f224b4f87cfd53fee0a199a01679dc5cd74aeb440326dfc52d45fa887534138d25df6fa1c8a38678be23204e
45d41416ede5d2e26a8ef4c2cac6f44d0346fb23 Derive `PartialEq`, `Eq` on `SyncTime` (Max Fang)
Pull request description:
### Description
This enables e.g. `assert_eq!` comparisons of `SyncTime` in tests (we use this)
### Changelog notice
Derived `PartialEq`, `Eq` on `SyncTime`
#### 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 45d41416ede5d2e26a8ef4c2cac6f44d0346fb23
evanlinjin:
ACK 45d41416ede5d2e26a8ef4c2cac6f44d0346fb23
Tree-SHA512: eb2dc87762c33874a3a521c2f020250e83401c0f0e784911de6139bc8bf8c56f40c93ad2aa93cf20058ba796efd050979bddc5414acdd6856003e7a9f88c75c6
32912eaa05fd3bb4fa1577ca413dcedf909544d9 Don't default to use `async`/`await` on `wasm32` (Elias Rohrer)
Pull request description:
### Description
We don't automatically want to make the interface `async` based on the used architecture, but now require the user to explicitly set the `async-interface` feature.
#### 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 32912eaa05fd3bb4fa1577ca413dcedf909544d9
Tree-SHA512: 41a8f3ab29508a359a8c0d96994e4fa97e52c15e8b8003c1988bcfe036cafa81d6210d446ed825672ce52aff684ebb328dc61b8ae3d25cda6f51a3cae838de58
9019793bd4090d704b17876c57bf255a75507ed2 Improve display error formatting (Yuki Kishimoto)
Pull request description:
### Description
Closes#555
### 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:
* [ ] This pull request breaks the existing API
* [ ] 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:
ACK 9019793bd4090d704b17876c57bf255a75507ed2
Tree-SHA512: 44f0c7e0374e255bf99cbbfb01f2af76746e52afe67ace1595d2830bd60be99f3c8726e6ad9744878978257796a79b3933e7ef21c30a5e4b99a16aaf9ac7ff64
We don't automatically want to make the interface `async` based on the
used architecture, but now require the user to explicitly set the
`async-interface` feature.
b02bfb347d1faa0ce0a7ad6f67d0b92458510239 Bump project MSRV to 1.57.0, update stable for all jobs to 1.65.0 (Steve Myers)
Pull request description:
### Description
Bump project MSRV from 1.56.1 to 1.57.0.
Also bumped the `check-wasm` and `test_hardware_wallet` jobs rust STABLE version to 1.65.0 to match other jobs.
### Notes to the reviewers
The `rustls` crate changed their MSRV to 1.57 on 2023-01-12 with a patch release from 0.20.7 to 0.20.8, rustls/rustls#1152. This breaks our CI builds that use `explora-client` 0.3 because it depends on a version of `ureq` that uses the latest `rustls`.
```
rustls v0.20.8
└── ureq v2.6.2
└── esplora-client v0.3.0
└── bdk v0.26.0 (/Users/steve/git/notmandatory/bdk)
[build-dependencies]
└── electrsd v0.21.1
[dev-dependencies]
└── bdk v0.26.0 (/Users/steve/git/notmandatory/bdk)
```
https://github.com/rustls/rustls/blob/main/README.md
### Changelog notice
Project MSRV changed from 1.56.1 to 1.57.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
Top commit has no ACKs.
Tree-SHA512: 86b3ec2a7412a5ca1d1f620a3a16ccf315ce6afc363fdaa096187054de2edca09e4ce394df86174bfe45640b8226ed919bd4dc2d6e2149842355cb66e5c834be