Commit 3b040a7
committed
1120081 chore(wallet): rm dup code (志宇)
2a45640 deps(bdk): bump `bitcoin` to `0.32.0`, miniscript to `12.0.0` (Leonardo Lima)
Pull request description:
fixes #1422
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
### Description
This PR focuses on upgrading the `rust-bitcoin` and `miniscript` versions, to `0.32.0` and `0.12.0`, respectively. It also bumps the versions of other BDK ecosystem crates that also rely on both `rust-bitcoin` and `miniscript`, being:
- electrum-client bitcoindevkit/rust-electrum-client#133
- esplora-client bitcoindevkit/rust-esplora-client#85
- hwi bitcoindevkit/rust-hwi#99
<ins>I structured the PR in multiple commits, with closed scope, being one for each BDK crate being upgraded, and one for each kind of fix and upgrade required, it seems like a lot of commits (**that should be squashed before merging**), but I think it'll make it easier during review phase.</ins>
In summary I can already mention some of the main changes:
- using `compute_txid()` instead of deprecated `txid()`
- using `minimal_non_dust()` instead of `dust_value()`
- using the renamed `signature` and `sighash_type` fields
- using proper `sighash::P2wpkhError`, `sighash::TaprootError` instead of older `sighash::Error`
- conversion from `Network` to new expected `NetworkKind` #1465
- conversion from the new `Weight` type to current expected `usize` #1466
- using `.into()` to convert from AbsLockTime and `RelLockTime` to `absolute::LockTime` and `relative::LockTime`
- using Message::from_digest() instead of relying on deprecated `ThirtyTwoByteHash` trait.
- updating the miniscript policy and dsl to proper expect and handle new `Threshold` type, instead of the previous two parameters.
<!-- Describe the purpose of this PR, what's being adding and/or fixed -->
### Notes to the reviewers
<ins>Again, I structured the PR in multiple commits, with closed scope, being one for each BDK crate being upgraded, and one for each kind of fix and upgrade required, it seems like a lot of commits (**that should be squashed before merging**), but I think it'll make it easier during review phase.</ins>
It should definitely be carefully reviewed, especially the last commits for the wallet crate scope, the ones with the semantic `fix(wallet)`.
I would also appreciate if @tcharding reviewed it, as he gave a try in the past (#1400 ), and I relied on some of it for the policy part of it, other rust-bitcoin maintainers reviews are a definitely welcome 😁
<!-- 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
> // TODO(@oleonardolima): Do another pass and double check the changes
- Use `compute_txid()` instead of deprecated `txid()`
- Use `minimal_non_dust()` instead of `dust_value()`
- Use `signature` and `sighash_type` fields, instead of previous `sig` and `hash_type`
- Use `sighash::P2wpkhError`, and `sighash::TaprootError` instead of older `sighash::Error`
- Converts from `Network` to `NetworkKind`, where expected
- Converts from `Weight` type to current used `usize`
- Use `.into()` to convert from `AbsLockTime` and `RelLockTime` to `absolute::LockTime` and `relative::LockTime`
- Remove use of deprecated `ThirtyTwoByteHash` trait, use `Message::from_digest()`
- Update the miniscript policy and dsl macros to proper expect and handle new `Threshold` type, instead of the previous two parameters.
<!-- 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
#### New Features:
* [ ] I've added tests for the new feature
* [ ] I've added docs for the new feature
#### Bugfixes:
* [ ] This pull request breaks the existing API
* [ ] I've added tests to reproduce the issue which are now passing
* [ ] I'm linking the issue being fixed by this PR
ACKs for top commit:
notmandatory:
ACK 1120081
Tree-SHA512: ba1ab64603b41014d3f0866d846167f77d31959ca6f1d9c3181d5e543964f5d772e05651d63935ba7bbffeba41a66868d27de4c32129739b9ca50f3bbaf9f2a1
File tree
41 files changed
+430
-305
lines changed- .github/workflows
- crates
- bitcoind_rpc
- tests
- chain
- src
- keychain
- tests
- common
- electrum
- src
- esplora
- hwi
- sqlite/src
- testenv
- wallet
- src
- descriptor
- keys
- wallet
- tests
- example-crates
- example_cli/src
- wallet_electrum/src
- wallet_esplora_async/src
- wallet_esplora_blocking/src
- nursery/tmp_plan/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+430
-305
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 16 | + | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
| 443 | + | |
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
| 512 | + | |
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
| 521 | + | |
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| |||
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
541 | | - | |
| 541 | + | |
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
599 | | - | |
| 599 | + | |
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | | - | |
| 636 | + | |
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
| |||
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
651 | | - | |
| 651 | + | |
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
| 448 | + | |
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
520 | | - | |
521 | | - | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
522 | 523 | | |
523 | 524 | | |
524 | 525 | | |
| |||
533 | 534 | | |
534 | 535 | | |
535 | 536 | | |
536 | | - | |
| 537 | + | |
537 | 538 | | |
538 | 539 | | |
539 | 540 | | |
| |||
642 | 643 | | |
643 | 644 | | |
644 | 645 | | |
645 | | - | |
| 646 | + | |
646 | 647 | | |
647 | 648 | | |
648 | 649 | | |
| |||
660 | 661 | | |
661 | 662 | | |
662 | 663 | | |
663 | | - | |
| 664 | + | |
664 | 665 | | |
665 | 666 | | |
666 | 667 | | |
| |||
825 | 826 | | |
826 | 827 | | |
827 | 828 | | |
828 | | - | |
| 829 | + | |
829 | 830 | | |
830 | 831 | | |
831 | 832 | | |
| |||
843 | 844 | | |
844 | 845 | | |
845 | 846 | | |
846 | | - | |
| 847 | + | |
847 | 848 | | |
848 | 849 | | |
849 | 850 | | |
| |||
884 | 885 | | |
885 | 886 | | |
886 | 887 | | |
887 | | - | |
| 888 | + | |
888 | 889 | | |
889 | 890 | | |
890 | 891 | | |
| |||
1255 | 1256 | | |
1256 | 1257 | | |
1257 | 1258 | | |
1258 | | - | |
| 1259 | + | |
1259 | 1260 | | |
1260 | 1261 | | |
1261 | 1262 | | |
| |||
0 commit comments