Merge rust-bitcoin/rust-bitcoin#6898: Release tracking PR: `consensus-encoding 1.3.0`
What changed, and why it matters
This is a routine release-management commit that bumps the version number of the `bitcoin-consensus-encoding` crate from 1.2.0 to 1.3.0 and updates lock files accordingly. It contains no code changes that fix or introduce a security issue. The actual bug fixes and new features were merged in earlier pull requests and are only being documented in the changelog here.
No security action required. Treat as a normal dependency version bump and changelog update.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit is a merge of release tracking PR #6898. It updates consensus_encoding/Cargo.toml to version 1.3.0, removes a prerelease metadata flag, updates dependency version pins in multiple Cargo.lock files, and edits consensus_encoding/CHANGELOG.md to move prior unreleased changes into the 1.3.0 section. The only source-code change is a documentation clarification in consensus_encoding/src/encode/mod.rs stating that ExactSizeEncoder::len is not required to be constant time. The functional fixes referenced in the changelog (composite encoder len() overcounting in #6897 and new ExactSizeEncoder implementations in #6906) are not present in this diff.
Changed components
consensus_encoding/Cargo.tomlconsensus_encoding/CHANGELOG.mdconsensus_encoding/src/encode/mod.rs (documentation only)Cargo-minimal.lockCargo-recent.lockbenches/Cargo.lockbitcoin/embedded/Cargo.lockhashes/embedded/Cargo.lockprimitives/Cargo.tomlInspect captured patch +37 / −34
### Cargo-minimal.lock
@@ -88,7 +88,7 @@ dependencies = [
"bech32",
"bincode",
"bitcoin-addresses",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-crypto",
"bitcoin-internals 0.7.0",
"bitcoin-io 0.6.0",
@@ -126,7 +126,7 @@ dependencies = [
name = "bitcoin-bip158"
version = "0.0.0"
dependencies = [
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-internals 0.7.0",
"bitcoin-primitives",
"bitcoin_hashes 1.2.0",
@@ -145,7 +145,7 @@ dependencies = [
[[package]]
name = "bitcoin-consensus-encoding"
-version = "1.2.0"
+version = "1.3.0"
dependencies = [
"bitcoin-internals 0.7.0",
"hex-conservative 1.1.0",
@@ -177,7 +177,7 @@ dependencies = [
"bitcoin 0.32.102",
"bitcoin 0.33.0-beta",
"bitcoin-bip158",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-p2p-messages",
"libfuzzer-sys",
"serde",
@@ -216,7 +216,7 @@ dependencies = [
name = "bitcoin-io"
version = "0.6.0"
dependencies = [
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-internals 0.7.0",
"bitcoin_hashes 1.2.0",
]
@@ -254,7 +254,7 @@ name = "bitcoin-p2p-messages"
version = "0.1.0"
dependencies = [
"arbitrary",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-internals 0.7.0",
"bitcoin-network-kind",
"bitcoin-primitives",
@@ -270,7 +270,7 @@ version = "0.103.1"
dependencies = [
"arbitrary",
"bincode",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-internals 0.7.0",
"bitcoin-units 0.5.0",
"bitcoin_hashes 1.2.0",
@@ -290,7 +290,7 @@ name = "bitcoin-taproot-primitives"
version = "0.1.0"
dependencies = [
"arbitrary",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-crypto",
"bitcoin-internals 0.7.0",
"bitcoin_hashes 1.2.0",
@@ -314,7 +314,7 @@ version = "0.5.0"
dependencies = [
"arbitrary",
"bincode",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-internals 0.7.0",
"serde",
"serde_json",
@@ -346,7 +346,7 @@ name = "bitcoin_hashes"
version = "1.2.0"
dependencies = [
"arbitrary",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-internals 0.7.0",
"cpufeatures",
"hex-conservative 1.1.0",
### Cargo-recent.lock
@@ -81,7 +81,7 @@ dependencies = [
"bech32",
"bincode",
"bitcoin-addresses",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-crypto",
"bitcoin-internals 0.7.0",
"bitcoin-io 0.6.0",
@@ -119,7 +119,7 @@ dependencies = [
name = "bitcoin-bip158"
version = "0.0.0"
dependencies = [
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-internals 0.7.0",
"bitcoin-primitives",
"bitcoin_hashes 1.2.0",
@@ -138,7 +138,7 @@ dependencies = [
[[package]]
name = "bitcoin-consensus-encoding"
-version = "1.2.0"
+version = "1.3.0"
dependencies = [
"bitcoin-internals 0.7.0",
"hex-conservative 1.1.0",
@@ -170,7 +170,7 @@ dependencies = [
"bitcoin 0.32.102",
"bitcoin 0.33.0-beta",
"bitcoin-bip158",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-p2p-messages",
"libfuzzer-sys",
"serde",
@@ -209,7 +209,7 @@ dependencies = [
name = "bitcoin-io"
version = "0.6.0"
dependencies = [
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-internals 0.7.0",
"bitcoin_hashes 1.2.0",
]
@@ -247,7 +247,7 @@ name = "bitcoin-p2p-messages"
version = "0.1.0"
dependencies = [
"arbitrary",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-internals 0.7.0",
"bitcoin-network-kind",
"bitcoin-primitives",
@@ -263,7 +263,7 @@ version = "0.103.1"
dependencies = [
"arbitrary",
"bincode",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-internals 0.7.0",
"bitcoin-units 0.5.0",
"bitcoin_hashes 1.2.0",
@@ -277,7 +277,7 @@ name = "bitcoin-taproot-primitives"
version = "0.1.0"
dependencies = [
"arbitrary",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-crypto",
"bitcoin-internals 0.7.0",
"bitcoin_hashes 1.2.0",
@@ -301,7 +301,7 @@ version = "0.5.0"
dependencies = [
"arbitrary",
"bincode",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-internals 0.7.0",
"serde",
"serde_json",
@@ -324,7 +324,7 @@ name = "bitcoin_hashes"
version = "1.2.0"
dependencies = [
"arbitrary",
- "bitcoin-consensus-encoding 1.2.0",
+ "bitcoin-consensus-encoding 1.3.0",
"bitcoin-internals 0.7.0",
"cpufeatures",
"hex-conservative 1.1.0",
### benches/Cargo.lock
@@ -108,7 +108,7 @@ dependencies = [
[[package]]
name = "bitcoin-consensus-encoding"
-version = "1.2.0"
+version = "1.3.0"
dependencies = [
"bitcoin-internals",
"hex-conservative",
### bitcoin/embedded/Cargo.lock
@@ -69,7 +69,7 @@ dependencies = [
[[package]]
name = "bitcoin-consensus-encoding"
-version = "1.2.0"
+version = "1.3.0"
dependencies = [
"bitcoin-internals",
"hex-conservative",
### consensus_encoding/CHANGELOG.md
@@ -2,14 +2,17 @@
## [Unreleased]
-- Fix `ExactSizeEncoder::len()` overcounting in composite encoders (`Encoder2`/`3`/`4`/`6`) after
- sub-encoders are exhausted. The `len()` method now correctly reports only the remaining bytes
- rather than unconditionally summing all sub-encoder lengths.
+## [1.3.0] - 2026-09-21
+
- Add `ExactSizeEncoder` implementations for `IterEncoder`, `SliceEncoder`, and
`PrefixedSliceEncoder`. When the inner encoder types implement `ExactSizeEncoder`, these
encoder combinators now provide exact size information, cascading automatically through the
encoder composition tree. Enables higher level protocols like PSBT and BIP324 to obtain the
- encoded size of variable-length collections (e.g. `Transaction` inputs/outputs).
+ encoded size of variable-length collections (e.g. `Transaction` inputs/outputs). Note that
+ these are *not* constant time as all previous `ExactSizeEncoder::len` implementations [#6906](https://github.com/rust-bitcoin/rust-bitcoin/pull/6906).
+- Fix `ExactSizeEncoder::len()` overcounting in composite encoders (`Encoder2`/`3`/`4`/`6`) after
+ sub-encoders are exhausted. The `len()` method now correctly reports only the remaining bytes
+ rather than unconditionally summing all sub-encoder lengths [#6897](https://github.com/rust-bitcoin/rust-bitcoin/pull/6897).
## [1.2.0] - 2026-08-11
@@ -113,7 +116,8 @@ around but the work got done. Props to him for many of the ideas.
Empty crate to reserve the name on crates.io
-[Unreleased]: https://github.com/rust-bitcoin/rust-bitcoin/compare/bitcoin-consensus-encoding-1.2.0...HEAD
+[Unreleased]: https://github.com/rust-bitcoin/rust-bitcoin/compare/bitcoin-consensus-encoding-1.3.0...HEAD
+[1.3.0]: https://github.com/rust-bitcoin/rust-bitcoin/compare/bitcoin-consensus-encoding-1.2.0...bitcoin-consensus-encoding-1.3.0
[1.2.0]: https://github.com/rust-bitcoin/rust-bitcoin/compare/bitcoin-consensus-encoding-1.1.0...bitcoin-consensus-encoding-1.2.0
[1.1.0]: https://github.com/rust-bitcoin/rust-bitcoin/compare/bitcoin-consensus-encoding-1.0.0...bitcoin-consensus-encoding-1.1.0
[1.0.0]: https://github.com/rust-bitcoin/rust-bitcoin/compare/bitcoin-consensus-encoding-0.2.0...bitcoin-consensus-encoding-1.0.0
### consensus_encoding/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "bitcoin-consensus-encoding"
-version = "1.2.0"
+version = "1.3.0"
authors = ["Andrew Poelstra <apoelstra@wpsoftware.net>", "Nick Johnson <nick@yonson.dev>", "Tobin C. Harding <me@tobin.cc>"]
license = "CC0-1.0"
homepage = "https://rust-bitcoin.org/"
@@ -48,6 +48,3 @@ private = ["bitcoin_internals"]
[package.metadata.rbmt.test]
examples = ["encoder:alloc"]
-
-[package.metadata.rbmt.prerelease]
-enabled = true
### consensus_encoding/src/encode/mod.rs
@@ -302,7 +302,9 @@ where
/// An encoder with a known size.
pub trait ExactSizeEncoder: Encoder {
- /// The number of bytes remaining that the encoder will yield.
+ /// The number of bytes *remaining* that the encoder will yield.
+ ///
+ /// There is no requirement for this function to be constant time.
///
/// **Important**: returns an unspecified value if [`Encoder::advance`] has returned
/// `EncoderStatus::Finished`.
### hashes/embedded/Cargo.lock
@@ -19,7 +19,7 @@ dependencies = [
[[package]]
name = "bitcoin-consensus-encoding"
-version = "1.2.0"
+version = "1.3.0"
dependencies = [
"bitcoin-internals",
]
### primitives/Cargo.toml
@@ -22,7 +22,7 @@ arbitrary = ["dep:arbitrary", "units/arbitrary"]
hex = ["dep:hex", "hashes/hex", "encoding/hex"]
[dependencies]
-encoding = { package = "bitcoin-consensus-encoding", path = "../consensus_encoding", version = "1.1.0", default-features = false }
+encoding = { package = "bitcoin-consensus-encoding", path = "../consensus_encoding", version = "1.3.0", default-features = false }
hashes = { package = "bitcoin_hashes", path = "../hashes", version = "1.1.0", default-features = false }
internals = { package = "bitcoin-internals", path = "../internals", version = "0.7.0" }
units = { package = "bitcoin-units", path = "../units", version = "0.5.0", default-features = false, features = [ "encoding" ] }Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.