AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

Merge rust-bitcoin/rust-bitcoin#6711: primitives: Make `ScriptHash` and `WScriptHash` no-alloc

Public commit record

What the developer wrote

Authored by Andrew Poelstra

91/100 · Strong
Merge rust-bitcoin/rust-bitcoin#6711: primitives: Make `ScriptHash` and `WScriptHash` no-alloc

b2386c666d4b34bffb0c5b8f6a8da69663472595 Update API files (Mitchell Bagot)
4312fac4d6972b17c62f0f5c5675874091f5a93a primitives: Make ScriptHash and WScriptHash no-alloc (Mitchell Bagot)

Pull request description:

Currently, the entire primitives::script module is gated on the alloc feature. The ScriptHash and WScriptHash types as they are don't strictly require an allocator, and would permit most of the addresses crate to be no-alloc if they were available without the alloc feature.

Remove alloc feature gating for ScriptHash and WScriptHash by enabling a small script module with only them if the alloc feature is disabled.


ACKs for top commit:
apoelstra:
ACK b2386c666d4b34bffb0c5b8f6a8da69663472595; successfully ran local tests
tcharding:
ACK b2386c666d4b34bffb0c5b8f6a8da69663472595


Tree-SHA512: 01c03dc37dbf3ebbd3a80e0c1d9b68eb94eeb21e02f7c9aedf6f396a33f9fe0bb1299f44247b5ad279b8f36229e0c59512a93f68e9166625761514cc0e60b182
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit is a routine feature-gating refactor. It makes two small hash types (ScriptHash and WScriptHash) available even when the library is compiled without an allocator. It does not change how those types behave, does not fix a bug, and does not alter any security-sensitive logic.

Recommended action

No security action required. Review as normal library maintenance if relevant to downstream feature usage.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.