Upgrade to rust-bitcoin 0.29#770
Conversation
|
I added a link in the description to bitcoindevkit/rust-esplora-client#20, it should be merged shortly and then we can create a new |
4116dfa to
8cab6f0
Compare
15c9385 to
1ffd59d
Compare
| @@ -1,8 +1,18 @@ | |||
| // Bitcoin Dev Kit | |||
| // | |||
| // Copyright (c) 2020-2021 Bitcoin Dev Kit Developers | |||
There was a problem hiding this comment.
Small nit, the year should be bumped to 2022 or soon 2023. But I think we should do this for all the files that need updating in one PR. I'll open a PR and we can discuss there.
| let addr = wallet.get_address(AddressIndex::New).unwrap(); | ||
|
|
||
| let path = vec![("rn4nre9c".to_string(), vec![0])] | ||
| let path = vec![("e5mmg3xh".to_string(), vec![0])] |
There was a problem hiding this comment.
Just curious, why did the policy path id change here? is it related to the miniscript update?
| assert!(result); | ||
| } | ||
|
|
||
| #[test] |
There was a problem hiding this comment.
Were the tests here removed because they aren't needed/valid? or are did they break and need to be fixed?
There was a problem hiding this comment.
ACK c7a43d9
I was only able to do a shallow review, and had a few questions but no show stoppers. Since this is primarily version bumping dependencies I'm counting our our test coverage to ensure nothing important was broke.
danielabrozzoni
left a comment
There was a problem hiding this comment.
I have some comments, I still need to review src/descriptor/mod.rs
|
|
||
| # This feature is used to run `cargo check` in our CI targeting wasm. It's not recommended | ||
| # for libraries to explicitly include the "getrandom/js" feature, so we only do it when | ||
| # necessary for running our CI. See: https://docs.rs/getrandom/0.2.8/getrandom/#webassembly-support |
There was a problem hiding this comment.
nit: add something along the lines as
If you plan to use BDK with wasm, don't include this feature, but include getrandom instead. More info here: link to README
There was a problem hiding this comment.
I found this a little confusing too, but I was thinking a little example project would be the best way to demo how to use bdk + wasm.
| @@ -1,63 +0,0 @@ | |||
| // Bitcoin Dev Kit | |||
There was a problem hiding this comment.
Why are address validators being removed? Is it because they are replaced by something in the new rust-bitcoin? (If you could expand a bit more in the changelog as well, it'd be great!)
There was a problem hiding this comment.
Ohhh they were deprecated already, sorry
| >= self | ||
| .create_height | ||
| .unwrap_or(0) | ||
| .checked_add(n.to_consensus_u32()) |
There was a problem hiding this comment.
if n is in seconds, doing create_height + *seconds value* is wrong
There was a problem hiding this comment.
Ugggggh this is the good ol' #642, which we never bothered to fix (an attempt was made in #669)
We ignored this for 4 months now, it can wait a little bit longer
| } | ||
|
|
||
| // Unsupported | ||
| Terminal::RawPkH(_) => None, |
There was a problem hiding this comment.
I am not really sure what's going on here, can you add a little comment explaining why it's unsupported? (If it's trivial, it's ok if you just reply to this comment without commenting the code :))
| psbt_input.redeem_script = derived_descriptor.psbt_redeem_script(); | ||
| psbt_input.witness_script = derived_descriptor.psbt_witness_script(); | ||
| psbt_input | ||
| .update_with_descriptor_unchecked(&derived_descriptor) |
There was a problem hiding this comment.
Can you add a comment explaining why it's unchecked here?
Description
Upgrade BDK to rust-bitcoin 0.29
Missing pieces:
update_output_with_descriptor- AddPsbtOutputExt::update_with_descriptorrust-bitcoin/rust-miniscript#465Notes to the reviewers
The commits still need to be reordered and cleaned up
Changelog notice
Checklists
All Submissions:
cargo fmtandcargo clippybefore committing