Skip to content

Commit fd82512

Browse files
committed
Merge rust-bitcoin#5339: Release tracking PR: bitcoin_hashes v0.18.0
628a2c8 hashes: Bump version to 0.18.0 (Tobin C. Harding) 00cef09 hashes: Remove FromSliceError (Tobin C. Harding) Pull request description: Bump the `hashes` version. Update in all crates that depend on it including adding an explicit version field in `p2p`. Add a changelog entry and update the lock files. Before undrafting, remember to run `cargo publish --dry-run -p bitcoin_hashes` Now removes the `FromSliceError` also. Not sure why we left it in there, was it because we forgot to deprecated it along with `from_slice` (deprecated in `v0.15.0`)? ACKs for top commit: apoelstra: ACK 628a2c8; successfully ran local tests; niceee Tree-SHA512: f889dee6e987e0bf3e93cc935c4d0f86133f9cbc58cbf325b37fd0b79691eeab9a0dd9c0d1b20fd74d2a089424823cbcd457b54e2468300be9f26916df83fa86
2 parents b22b1ab + 628a2c8 commit fd82512

File tree

10 files changed

+11
-57
lines changed

10 files changed

+11
-57
lines changed

Cargo-minimal.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ dependencies = [
164164

165165
[[package]]
166166
name = "bitcoin_hashes"
167-
version = "0.17.0"
167+
version = "0.18.0"
168168
dependencies = [
169169
"bitcoin-consensus-encoding",
170170
"bitcoin-internals",

Cargo-recent.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ dependencies = [
163163

164164
[[package]]
165165
name = "bitcoin_hashes"
166-
version = "0.17.0"
166+
version = "0.18.0"
167167
dependencies = [
168168
"bitcoin-consensus-encoding",
169169
"bitcoin-internals",

bitcoin/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ arbitrary = ["dep:arbitrary", "units/arbitrary", "primitives/arbitrary"]
2727
[dependencies]
2828
base58 = { package = "base58ck", path = "../base58", version = "0.2.0", default-features = false, features = ["alloc"] }
2929
bech32 = { version = "0.11.0", default-features = false, features = ["alloc"] }
30-
hashes = { package = "bitcoin_hashes", path = "../hashes", version = "0.17.0", default-features = false, features = ["alloc", "hex"] }
30+
hashes = { package = "bitcoin_hashes", path = "../hashes", version = "0.18.0", default-features = false, features = ["alloc", "hex"] }
3131
hex = { package = "hex-conservative", version = "0.3.0", default-features = false, features = ["alloc"] }
3232
internals = { package = "bitcoin-internals", path = "../internals", version = "0.4.1", features = ["alloc", "hex"] }
3333
io = { package = "bitcoin-io", path = "../io", version = "0.2.0", default-features = false, features = ["alloc", "hashes"] }

hashes/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.18.0 - 2025-11-27
2+
3+
* Add a dependency on the new `consensus_encoding` crate [#5181](https://github.com/rust-bitcoin/rust-bitcoin/pull/5181)
4+
15
# 0.17.0 - 2025-10-17
26

37
* Bump MSRV from 1.63.0 to 1.74.0 for all crates in the repo [#4926](https://github.com/rust-bitcoin/rust-bitcoin/pull/4926)

hashes/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bitcoin_hashes"
3-
version = "0.17.0"
3+
version = "0.18.0"
44
authors = ["Andrew Poelstra <[email protected]>"]
55
license = "CC0-1.0"
66
repository = "https://github.com/rust-bitcoin/rust-bitcoin"

hashes/src/error.rs

Lines changed: 0 additions & 42 deletions
This file was deleted.

hashes/src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ pub mod _export {
9191
}
9292
}
9393

94-
#[deprecated(since = "TBD", note = "unused now that `Hash::from_slice` is deprecated")]
95-
mod error;
9694
mod internal_macros;
9795

9896
pub mod cmp;
@@ -153,11 +151,6 @@ pub use sha512_256::Hash as Sha512_256;
153151
#[doc(inline)]
154152
pub use siphash24::Hash as Siphash24;
155153

156-
/// Attempted to create a hash from an invalid length slice.
157-
#[deprecated(since = "TBD", note = "unused now that `Hash::from_slice` is deprecated")]
158-
#[allow(deprecated_in_future)]
159-
pub type FromSliceError = crate::error::FromSliceError; // Alias instead of re-export so we can deprecate it.
160-
161154
/// Tagged SHA-256: Type alias for the [`sha256t::Hash`] hash type.
162155
pub type Sha256t<T> = sha256t::Hash<T>;
163156

hashes/tests/api.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// Import using module style e.g., `sha256::Hash`.
1515
use bitcoin_hashes::{
1616
hash160, hash_newtype, hkdf, hmac, ripemd160, sha1, sha256, sha256d, sha256t, sha256t_tag,
17-
sha384, sha3_256, sha512, sha512_256, siphash24, FromSliceError, Hash, HashEngine,
17+
sha384, sha3_256, sha512, sha512_256, siphash24, Hash, HashEngine,
1818
};
1919
// Import using type alias style e.g., `Sha256`.
2020
use bitcoin_hashes::{
@@ -165,7 +165,6 @@ struct Keyed<T: Hash> {
165165
// These derives are the policy of `rust-bitcoin` not Rust API guidelines.
166166
#[derive(Debug, Clone, PartialEq, Eq)] // All public types implement Debug (C-DEBUG).
167167
struct Errors {
168-
a: FromSliceError,
169168
b: hkdf::MaxLengthError,
170169
c: sha256::MidstateError,
171170
}

p2p/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ arbitrary = ["dep:arbitrary", "bitcoin/arbitrary"]
1919

2020
[dependencies]
2121
bitcoin = { path = "../bitcoin/", default-features = false }
22-
hashes = { package = "bitcoin_hashes", path = "../hashes", default-features = false }
22+
hashes = { package = "bitcoin_hashes", version = "0.18.0", path = "../hashes", default-features = false }
2323
hex = { package = "hex-conservative", version = "0.3.0", default-features = false }
2424
internals = { package = "bitcoin-internals", path = "../internals", default-features = false }
2525
io = { package = "bitcoin-io", path = "../io", default-features = false }

primitives/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ hex = ["dep:hex-stable", "dep:hex-unstable", "hashes/hex", "internals/hex"]
2222

2323
[dependencies]
2424
encoding = { package = "bitcoin-consensus-encoding", path = "../consensus_encoding", version = "1.0.0-rc.1", default-features = false }
25-
hashes = { package = "bitcoin_hashes", path = "../hashes", version = "0.17.0", default-features = false }
25+
hashes = { package = "bitcoin_hashes", path = "../hashes", version = "0.18.0", default-features = false }
2626
internals = { package = "bitcoin-internals", path = "../internals", version = "0.4.1" }
2727
units = { package = "bitcoin-units", path = "../units", version = "1.0.0-rc.2", default-features = false, features = [ "encoding" ] }
2828
arrayvec = { version = "0.7.2", default-features = false }

0 commit comments

Comments
 (0)