From 05f3451b108c5fdec518c0a54d6ebace07990e3c Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Thu, 10 Sep 2020 16:40:31 +0000 Subject: [PATCH 1/4] un-deperate contracthash during testing Avoids a rust test runner bug, see https://github.com/rust-lang/rust/issues/47238 --- src/util/contracthash.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/contracthash.rs b/src/util/contracthash.rs index a215ea85..fa893f2d 100644 --- a/src/util/contracthash.rs +++ b/src/util/contracthash.rs @@ -18,7 +18,7 @@ //! at http://blockstream.com/sidechains.pdf for details of //! what this does. -#![deprecated] +#![cfg_attr(not(test), deprecated)] use secp256k1::{self, Secp256k1}; use PrivateKey; From a1450058d9e075eedf5667710e18014194fc5978 Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Thu, 10 Sep 2020 16:41:06 +0000 Subject: [PATCH 2/4] bump major versions of rust-secp and bitcoin_hashes deps --- Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4374ce0d..4689a0a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,8 +22,8 @@ use-serde = ["serde", "bitcoin_hashes/serde", "secp256k1/serde"] [dependencies] bech32 = "0.7.2" -bitcoin_hashes = "0.7.3" -secp256k1 = "0.17.1" +bitcoin_hashes = "0.8.0" +secp256k1 = "0.18.0" bitcoinconsensus = { version = "0.19.0-1", optional = true } serde = { version = "1", optional = true } @@ -33,6 +33,6 @@ hex = "=0.3.2" serde_derive = "<1.0.99" serde_json = "<1.0.45" serde_test = "1" -secp256k1 = { version = "0.17.1", features = ["rand-std"] } +secp256k1 = { version = "0.18.0", features = ["rand-std"] } # We need to pin ryu (transitive dep from serde_json) to stay compatible with Rust 1.22.0 ryu = "<1.0.5" From e2bef1c4a6001d2861fa81a868c620144d0926ca Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Thu, 10 Sep 2020 16:48:06 +0000 Subject: [PATCH 3/4] bump version to 0.24.0 --- CHANGELOG.md | 16 ++++++++++++++++ Cargo.toml | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a4475e8..32a07a4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,20 @@ +# 0.24.0 - 2020-09-10 + +- [Remove](https://github.com/rust-bitcoin/rust-bitcoin/pull/385) the `BitcoinHash` trait +- [Introduce `SigHashCache` structure](https://github.com/rust-bitcoin/rust-bitcoin/pull/390) to replace `SighashComponents` and support all sighash modes +- [Add](https://github.com/rust-bitcoin/rust-bitcoin/pull/416) `Transaction::get_size` method +- [Export](https://github.com/rust-bitcoin/rust-bitcoin/pull/412) `util::amount::Denomination` +- [Add](https://github.com/rust-bitcoin/rust-bitcoin/pull/417) `Block::get_size` and `Block::get_weight` methods +- [Add](https://github.com/rust-bitcoin/rust-bitcoin/pull/415) `MerkleBlock::from_header_txids` +- [Add](https://github.com/rust-bitcoin/rust-bitcoin/pull/429) `BlockHeader::u256_from_compact_target` +- [Add](https://github.com/rust-bitcoin/rust-bitcoin/pull/448) `feefilter` network message +- [Cleanup/replace](https://github.com/rust-bitcoin/rust-bitcoin/pull/397) `Script::Instructions` iterator API +- [Disallow uncompressed pubkeys in witness address generation](https://github.com/rust-bitcoin/rust-bitcoin/pull/428) +- [Deprecate](https://github.com/rust-bitcoin/rust-bitcoin/pull/451) `util::contracthash` module +- [Add](https://github.com/rust-bitcoin/rust-bitcoin/pull/435) modulo division operation for `Uint128` and `Uint256` +- [Add](https://github.com/rust-bitcoin/rust-bitcoin/pull/436) `slice_to_u64_be` endian conversion method + # 0.23.0 - 2020-01-07 - Update `secp256k1` dependency to `0.17.1`. diff --git a/Cargo.toml b/Cargo.toml index 4689a0a0..09c58e19 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bitcoin" -version = "0.23.0" +version = "0.24.0" authors = ["Andrew Poelstra "] license = "CC0-1.0" homepage = "https://github.com/rust-bitcoin/rust-bitcoin/" From 1c46b32d2b224df0453c82c2ecf63cc940e892b6 Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Thu, 10 Sep 2020 17:55:47 +0000 Subject: [PATCH 4/4] update Travis and README for manual rustc 1.22.0 steps --- README.md | 6 ++++++ contrib/test.sh | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index b7791921..e849c156 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,12 @@ freenode. ## Minimum Supported Rust Version (MSRV) This library should always compile with any combination of features on **Rust 1.22**. +Because some dependencies have broken the build in minor/patch releases, to +compile with 1.22.0 you will need to run the following version-pinning command: +``` +cargo update -p cc --precise "1.0.41" --verbose +``` + ## Installing Rust Rust can be installed using your package manager of choice or [rustup.rs](https://rustup.rs). The former way is considered more secure since diff --git a/contrib/test.sh b/contrib/test.sh index de1cb3ec..4eb69239 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -45,5 +45,12 @@ then cargo new dep_test cd dep_test echo 'bitcoin = { path = "..", features = ["use-serde"] }' >> Cargo.toml + + # Pin `cc` for Rust 1.22 + if [ "$TRAVIS_RUST_VERSION" = "1.22.0" ]; then + cargo generate-lockfile --verbose + cargo update -p cc --precise "1.0.41" --verbose + fi + cargo test --verbose fi