emeraldpay / emeraldpay/hdpath-rs
Recent changes to `bitcoin` crate may break hdpath
- Dominant language
- Rust
- Stars
- 13
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
In our crate [`ibc-rs/relayer`](https://github.com/informalsystems/ibc-rs/tree/master/relayer) we're using hdpath for [this particular](https://github.com/emeraldpay/hdpath-rs#use-with-bitcoin-library) `with-bitcoin` functionality.
We depend on hdpath as follows:
```
hdpath = { version = "0.6.0", features = ["with-bitcoin"] }
```
We also depend on the bitcoin crate:
```
bitcoin = { version = "0.25" }
```
Currently, hdpath has the following dep configuration towards `bitcoin` crate:
https://github.com/emeraldpay/hdpath-rs/blob/5762d6904af1698c933db37794a00b1551e6eecc/Cargo.toml#L18
Given this dependency configuration, cargo builds a dependency graph that looks as follows:
```
...
relayer v0.0.6 (/Users/adi/Hammers/ibc-rs/relayer)
├── anomaly v0.2.0 (*)
├── async-trait v0.1.42 (proc-macro) (*)
├── bech32 v0.7.2
├── bitcoin v0.25.2 <-------
├── hdpath v0.6.0
│ ├── bitcoin v0.26.0 <-------...
```
Notice the two versions of `bitcoin` (one is for `0.25`, a direct dep for crate `relayer`, and another is at `0.26`, a dep from `hdpath`). It is unclear why, but this leads to [compilation issues](https://github.com/informalsystems/ibc-rs/issues/525), because the trait bound `DerivationPath: From` could no longer be resolved.
The problem appeared recently, probably linked with the recent release of [bitcoin v0.26.0](https://github.com/rust-bitcoin/rust-bitcoin/releases/tag/0.26.0); these [changes](https://github.com/rust-bitcoin/rust-bitcoin/commit/1cc466fec67e067caeef0ee47b9ad565bbce5f5f#diff-ed6d25d8a91cc20f7f718eb556851c1b5957b57868d35bcf3b5795853656c0d7) may be relevant.
We solved this problem by depending on the latest version of `bitcoin` crate:
```diff
- bitcoin = { version = "0.25" }
+ bitcoin = { version = "=0.26" }
```
But we're not sure why the problem appeared in the first place.
Just wanted to flag this issue here, as other users of `hdpath` may run into this issue.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.