Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rust bitcoin #1023

Merged
merged 12 commits into from
Aug 4, 2023

Conversation

danielabrozzoni
Copy link
Member

@danielabrozzoni danielabrozzoni commented Jun 28, 2023

Description

Updates to rust-bitcoin 0.30.0 and miniscript 0.10.0

Not covered in this PR:

Heads up, I'm explicitly denying multipath descriptors until we have better tests for them. See the commit message of 23fba7a

Changelog notice

  • Update to rust-bitcoin 0.30.0 and miniscript 10.0.0

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

@danielabrozzoni danielabrozzoni marked this pull request as draft June 28, 2023 13:34
@apoelstra
Copy link

Done reviewing 81ef698.

Overall looks great. I apologize for what an effort this was.

@notmandatory notmandatory mentioned this pull request Jul 13, 2023
24 tasks
@notmandatory
Copy link
Member

This should fix #916

Copy link
Contributor

@tcharding tcharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow you guys really use rust-bitcoin a lot. I hope we can stabalize the API soon so you don't have to go through all this work too many times. Thanks for being patient with our wild API changes.

crates/bdk/Cargo.toml Outdated Show resolved Hide resolved
crates/bdk/src/descriptor/mod.rs Outdated Show resolved Hide resolved
crates/bdk/src/descriptor/policy.rs Outdated Show resolved Hide resolved
crates/bdk/src/wallet/coin_selection.rs Outdated Show resolved Hide resolved
crates/bdk/src/wallet/coin_selection.rs Outdated Show resolved Hide resolved
crates/bdk/tests/wallet.rs Outdated Show resolved Hide resolved
crates/bdk/tests/wallet.rs Outdated Show resolved Hide resolved
crates/chain/src/spk_iter.rs Outdated Show resolved Hide resolved
nursery/tmp_plan/src/lib.rs Outdated Show resolved Hide resolved
nursery/tmp_plan/src/lib.rs Outdated Show resolved Hide resolved
@danielabrozzoni danielabrozzoni force-pushed the update_rust_bitcoin branch 13 times, most recently from f940de6 to 6259639 Compare July 19, 2023 17:05
@tcharding
Copy link
Contributor

Clean! Nice one.

@danielabrozzoni danielabrozzoni force-pushed the update_rust_bitcoin branch 2 times, most recently from de47a98 to 4b8a1f8 Compare July 25, 2023 15:11
Copy link
Member

@evanlinjin evanlinjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this work!

Can I suggest to use .expect() instead of .unwrap() in some places?

I understand that it becomes tedious to do it everywhere, especially if there are multiple calls to .at_derivation_index() (in which case I would suggest to leave a comment explaining why we don't expect a hardened wildcard).

An explanation as to why we do not expect an error goes a long way.

crates/bdk/src/descriptor/error.rs Outdated Show resolved Hide resolved
crates/bdk/src/descriptor/template.rs Show resolved Hide resolved
nursery/coin_select/src/coin_selector.rs Outdated Show resolved Hide resolved
crates/electrum/Cargo.toml Outdated Show resolved Hide resolved
crates/chain/src/spk_txout_index.rs Outdated Show resolved Hide resolved
crates/bdk/src/wallet/mod.rs Show resolved Hide resolved
Copy link
Member

@evanlinjin evanlinjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have looked through everything and tested the examples and made sure they all still work 😄

In my opinion, these are mandatory changes:

After which, I will give an ACK.

@danielabrozzoni
Copy link
Member Author

Rebased and fixed review comments.

Copy link
Member

@evanlinjin evanlinjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 1da3b30

Looked through everything and made sure the examples still worked as expected (which they did).

@evanlinjin evanlinjin merged commit feafaac into bitcoindevkit:master Aug 4, 2023
@danielabrozzoni danielabrozzoni deleted the update_rust_bitcoin branch October 11, 2023 12:14
@notmandatory notmandatory mentioned this pull request Oct 11, 2023
12 tasks
notmandatory added a commit that referenced this pull request Jun 25, 2024
55a1729 ref(signer): Use `Psbt::sighash_ecdsa` for computing sighashes (valued mammal)
f2a2dae refactor(signer): Remove trait ComputeSighash (valued mammal)

Pull request description:

  This PR does some cleanup of the `bdk_wallet` signer module most notably by removing the internal trait `ComputeSighash` and replacing old code for computing the sighash (for legacy and segwit context) with a single method [`Psbt::sighash_ecdsa`](https://docs.rs/bitcoin/0.31.2/bitcoin/psbt/struct.Psbt.html#method.sighash_ecdsa). The logic for computing the taproot sighash is unchanged and extracted to a new helper function `compute_tap_sighash`.

  - [x] Unimplement `ComputeSighash`
  - [x] Try de-duplicating code by using `Psbt::sighash_ecdsa`. see #1023 (comment)
  - Not done in this PR: Consider removing unused `SignerError` variants

  fixes #1038

  ### Notes to the reviewers

  ### Changelog notice

  ### 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: 56af3c9c463513ca3bae5480aa5b90d78de119c3c09c824a7220eb6832d5f403b172afc8168228918ea1adabb4bf8fca858790adfebf84fc334b4fc1cc99d3cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants