What changed, and why it matters
This commit only changes build configuration files (Cargo.toml and lock files) to add a new internal crate dependency. It does not modify any executable code, fix a bug, or address a security issue. It is a routine refactoring step to resolve a dependency direction problem during library development.
No security action required. Treat as normal dependency refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds bitcoin-primitives as a dependency of the bitcoin-crypto crate and wires its std/alloc features through the feature flags. The commit message explains this is a temporary inversion of the intended dependency graph so that PushBytes trait implementations involving crypto types can live in crypto until the crypto types themselves stabilize. No code behavior changes; only Cargo metadata and lockfile entries are affected.
Changed components
crypto/Cargo.tomlCargo-minimal.lockCargo-recent.lockInspect captured patch +6 / −2
diff --git a/Cargo-minimal.lock b/Cargo-minimal.lock
index dc37b898..1100ed71 100644
--- a/Cargo-minimal.lock
+++ b/Cargo-minimal.lock
@@ -123,6 +123,7 @@ dependencies = [
"base58ck 0.4.0",
"bitcoin-internals 0.5.0",
"bitcoin-network-kind",
+ "bitcoin-primitives",
"bitcoin_hashes 0.20.0",
"hex-conservative 1.1.0",
"secp256k1 0.32.0-beta.2",
diff --git a/Cargo-recent.lock b/Cargo-recent.lock
index 08dd3612..0881ae6b 100644
--- a/Cargo-recent.lock
+++ b/Cargo-recent.lock
@@ -122,6 +122,7 @@ dependencies = [
"base58ck 0.4.0",
"bitcoin-internals 0.5.0",
"bitcoin-network-kind",
+ "bitcoin-primitives",
"bitcoin_hashes 0.20.0",
"hex-conservative 1.1.0",
"secp256k1 0.32.0-beta.2",
diff --git a/crypto/Cargo.toml b/crypto/Cargo.toml
index 7cd86b67..e93c88b5 100644
--- a/crypto/Cargo.toml
+++ b/crypto/Cargo.toml
@@ -15,9 +15,9 @@ exclude = ["tests", "contrib"]
[features]
default = ["std"]
-std = ["alloc", "base58/std", "hashes/std", "hex/std", "internals/std", "network/std", "secp256k1/std", "serde?/std"]
+std = ["alloc", "base58/std", "hashes/std", "hex/std", "internals/std", "network/std", "primitives/std", "secp256k1/std", "serde?/std"]
rand = ["secp256k1/rand"]
-alloc = ["base58/alloc", "hashes/alloc", "hex/alloc", "internals/alloc", "network/alloc", "secp256k1/alloc", "serde?/alloc"]
+alloc = ["base58/alloc", "hashes/alloc", "hex/alloc", "internals/alloc", "network/alloc", "primitives/alloc", "secp256k1/alloc", "serde?/alloc"]
serde = ["dep:serde", "hashes/serde", "internals/serde", "secp256k1/serde"]
arbitrary = ["dep:arbitrary", "secp256k1/arbitrary"]
@@ -27,6 +27,8 @@ hashes = { package = "bitcoin_hashes", path = "../hashes", version = "0.20.0", d
hex = { package = "hex-conservative", version = "1.1.0", default-features = false }
internals = { package = "bitcoin-internals", path = "../internals", version = "0.5.0", features = ["hex"] }
network = { package = "bitcoin-network-kind", path = "../network", version = "0.1.0", default-features = false }
+# This is a temporary dep for the sake of PushBytes impls. This should not be retained for crypto 1.0.
+primitives = { package = "bitcoin-primitives", path = "../primitives", version = "0.102.0", default-features = false, features = ["hex"] }
secp256k1 = { version = "0.32.0-beta.2", default-features = false }
arbitrary = { version = "1.4.1", optional = true }
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.