Upgrade bitcoin to v0.30.0#51
Conversation
vladimirfomene
left a comment
There was a problem hiding this comment.
Code LGTM. I was wondering why we suddenly need a std feature for rust-bitcoin. Will having this feature stop using the client in a no-std environment? I think you should pin the log dependency to pass CI MSRV test. See: bitcoindevkit/bdk@fa54a2e
Thanks for the review.
I didn't see
Cool, thanks - I'll have a go at that. |
|
I can re-order the commits if this passes CI, I'm not totally sure of the syntax used in github actions to achieve pinning. |
| serde = { version = "1.0", features = ["derive"] } | ||
| bitcoin = { version = "0.29.1", features = ["serde"], default-features = false } | ||
| bitcoin = { version = "0.30.0", features = ["serde", "std"], default-features = false } | ||
| # Temporary dependency on internals until the rust-bitcoin devs get their shit together and release the hex-conservative crate. |
There was a problem hiding this comment.
Go easy on the poor devs! ;-)
| # Temporary dependency on internals until the rust-bitcoin devs get their shit together and release the hex-conservative crate. | |
| # Temporary dependency on internals until the rust-bitcoin devs release the hex-conservative crate. |
There was a problem hiding this comment.
Ha, I am pretty disappointed with our effort so thought the personal dig was justified :)
|
Looks like build is breaking because rustls changed their MSRV from 1.57.0 (in 0.21.1) to 1.60.0 (in 0.21.2). Yet again I wish crates wouldn't changes their MSRV in patch releases. Can we pin this the same way you did https://github.com/rustls/rustls/blob/v/0.21.1/rustls/Cargo.toml |
8c99930 to
491efb9
Compare
|
I re-ordered the commits to put the pinning first. (And I removed attack on myself since others won't necessarily know it was me who both wrote the comment and caused the problem :) |
| run: rustup update | ||
| - name: pin dependencies | ||
| if: ${{ matrix.rust.version }} == 1.57.0 | ||
| run: cargo update -p log --precise 0.4.18 && cargo update --p rustls --precise 0.21.1 |
There was a problem hiding this comment.
Little typo here:
| run: cargo update -p log --precise 0.4.18 && cargo update --p rustls --precise 0.21.1 | |
| run: cargo update -p log --precise 0.4.18 && cargo update -p rustls --precise 0.21.1 |
The cargo documentation states that changing the rust version is only a "possibly breaking change": https://doc.rust-lang.org/cargo/reference/semver.html#env-new-rust ...where the possibility is 100% if you use an older version of rust. FWIW my opinion is to look at the difference between the two versions and if there's nothing we need just pin it for now. It's not nice pinning things but making possibly (definitely) breaking changes in a patch version is an extreme action for such a core dependency like rustls to take which requires us to take extreme measures. As long as we can use the latest version of the HTTP client library it's fine I'd say. |
|
Why not just pin in CI for MSRV build and add a comment in the README to tell folks wishing to build with MSRV? Just because |
ceaa9fe to
d62ddea
Compare
|
Added notes on pinning to readme. |
|
Since this PR is a breaking change anyway why not just increase the MSRV for this crate?
Writing in the README is code that has to be maintained and can't be tested. It's better not to. |
|
@tcharding, the CI is still failing. If you can fix it, I will merge asap |
Fair point. Will remove. |
I don't know how the MSRV was chosen so I don't want to bump it. More generally I don't want to do it just because |
d62ddea to
9e4389a
Compare
Recently the MSRV build broke. We can pin the dependencies in the MSRV CI job. Pin `log` and `rustls` when running the MSRV CI job.
Upgrade `rust-bitcoin` to v0.30.3, including: - bitcoin - electrsd - electrum-client Also includes addition of a dependency on `bitcoin-internals` for the `DisplayHex` trait. This is a temporary fix while we wait for release of the new `github.com/rust-bitcoin/hex-conservative` crate.
9e4389a to
ea1b6d1
Compare
The problem was that we have two versions of |
|
@tcharding do you mind creating a PR on the |
A pending to `rust-electrum-client` [0] fixes the pinning here in our CI, add a comment to remind us to fix the pinning when the PR is merged and released. [0] bitcoindevkit/rust-electrum-client#110
|
I added a patch to remind us to fix the pinning introduced by this PR after bitcoindevkit/rust-electrum-client#110 merges. I'm not across your release cycle so please instruct me if you'd like it removed or anything else different. Thanks. |
f5a438c Bump version to 0.16.0 (Tobin C. Harding) 9a7cc14 Update rustls dependency to version 0.21 (Tobin C. Harding) Pull request description: Update the `rustls` dependency to version 0.21 and bump the version of this crate to 0.16 so the change can be released. I don't know what stage in your release cycle you guys are up to so I put the version bump as a separate patch - can drop it if not needed. Done to help with bitcoindevkit/rust-esplora-client#51 ACKs for top commit: danielabrozzoni: utACK f5a438c Tree-SHA512: 106cbe57651a6e1365f87836598cbec9b1e837f0376ddc1c56cb75e5615543659f5c05cea7d5eb8da8b6cf278fcbe6ef866a019b9829db40cc8055798eb0f541
4d7487c to
81e2be6
Compare
81e2be6 to
8d1f907
Compare
|
Thanks for catching me @ vladimirfomene :) |
vladimirfomene
left a comment
There was a problem hiding this comment.
@tcharding thanks for these changes! Re-ACK d48ac22
cd497a75a21bad18b514f4ff3da050c223295aaa Redundant import (Vladimir Fomene) 8d1f90745103aaf5e90a6502c770f9572de5311d Upgrade electrum-client to 0.16.0 (Vladimir Fomene) 73768c5e2c6a37c4bebc50068774b5f6be013279 Add pinning note to electrum-client dependency (Tobin C. Harding) ea1b6d1b447cdcf36240080dafea2004d0ce419b Upgrade bitcoin to v0.30.0 (Tobin C. Harding) d48ac225d3be20ba980391920eb17441a8d91697 Pin dependencies in CI for MSRV build (Tobin C. Harding) Pull request description: Upgrade `rust-bitcoin` to v0.30.3, including: - bitcoin - electrsd - electrum-client Also includes addition of a dependency on `bitcoin-internals` for the `DisplayHex` trait. This is a temporary fix while we wait for release of the new [`github.com/rust-bitcoin/hex-conservative`](https://github.com/rust-bitcoin/hex-conservative) crate. Top commit has no ACKs. Tree-SHA512: 6611f3de827bc5ee81d7e3d4b0facef45b9833ced86bc3467942d7817f7fa806b137ef285a7120dc3e591acf9dbecd2a189e3119a2c5c1ff8b04764386e83721
f5a438cd0a5b68b3f74d3c144e90e2b099c21261 Bump version to 0.16.0 (Tobin C. Harding) 9a7cc14c94f2587a8a794900dea2ba5665c4aa04 Update rustls dependency to version 0.21 (Tobin C. Harding) Pull request description: Update the `rustls` dependency to version 0.21 and bump the version of this crate to 0.16 so the change can be released. I don't know what stage in your release cycle you guys are up to so I put the version bump as a separate patch - can drop it if not needed. Done to help with bitcoindevkit/rust-esplora-client#51 ACKs for top commit: danielabrozzoni: utACK f5a438cd0a5b68b3f74d3c144e90e2b099c21261 Tree-SHA512: 106cbe57651a6e1365f87836598cbec9b1e837f0376ddc1c56cb75e5615543659f5c05cea7d5eb8da8b6cf278fcbe6ef866a019b9829db40cc8055798eb0f541
Upgrade
rust-bitcointo v0.30.3, including:Also includes addition of a dependency on
bitcoin-internalsfor theDisplayHextrait. This is a temporary fix while we wait for release of the newgithub.com/rust-bitcoin/hex-conservativecrate.