RB
← All projectsRust Bitcoin

rust-bitcoin

Rust library for Bitcoin data structures, serialization, consensus encoding, and scripts.

BitcoinCryptographic librariesNormal
Repository coverage

2313 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

532security candidates511second-pass queue2206AI analyses
130commits · 30 days
248commits · 60 days
1102commits · 180 days
2011commits · 365 days
Backfill bands
Aug 5 → Feb 6787 seen32 candidatesComplete
Feb 6 → Jun 6878 seen53 candidatesComplete
Jun 6 → Jul 6211 seen15 candidatesComplete
Jul 6 → Aug 5184 seen2 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

66/100 average clarity
510Strong · 80–100
1085Adequate · 60–79
567Thin · 40–59
151Opaque · 0–39
20security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Andrew Poelstra23179157290
Mitchell Bagot649193645068
Tobin C. Harding41566410063
jrakibi944994068
Nick Johnson19121190060
Jamil Lambert, PhD11919116061
satsfy (Renato Britto)381527066
Fmt Bot331431045
Trevor Arjeski111111069
Shing Him Ng31731056
Martin Habovstiak30628068
Ismail Daif22622050
Analysis record

Published AI watches

Last scanned 21 minutes ago

Moderate 62 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6954: units: serialize unsigned amounts as u64

This commit fixes a mismatch in how unsigned Bitcoin amounts were serialized versus deserialized when using certain compact binary formats. Previously, an unsigned amount (like 100 satoshis) was written as a signed number, which caused for…

Data integrity bug: serialized values decode to different numeric values in varint binary formatsRange-check failure: Amount::MAX and large values near the cap fail deserialization after round-tripSerde serialize/deserialize hint mismatch for unsigned amount types
295c9d8aby Andrew Poelstra+66−112 files
No security note in commit
Low 25 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6955: key_expression: preserve master-key invariants in Xpub Arbitrary

This change fixes a bug in test-only code that generates random fake Bitcoin extended public keys (xpubs). Previously, when generating a master xpub (depth 0), the code could pick random values for the parent fingerprint and child number, …

BIP32 master-key invariant violation in generated test dataEncode/decode round-trip failure for generated master xpubsFix aligns Xpub::arbitrary with existing Xpriv::arbitrary behavior
4116ecc6by Andrew Poelstra+35−31 file
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6947: build(deps): bump cargo-bins/cargo-binstall from 1.21.0 to 1.21.1

This commit updates the version of a helper tool (cargo-binstall) used only inside GitHub Actions automation. It is a routine dependency bump by Dependabot and does not change any code that ships to users. There is no indication of a secur…

c1be49cbby Andrew Poelstra+2−22 files
No security note in commit
High 70 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6919: Sanitize serde size hints before allocating

This commit fixes a denial-of-service weakness in how the library deserializes lists of Bitcoin data (witnesses, amounts, fee rates) from untrusted input. Before the fix, a few bytes of attacker-controlled data could claim a list would con…

Untrusted serde size hint fed directly into Vec::with_capacityPotential memory exhaustion / OOM kill from small malicious inputDenial-of-service vector in deserialization paths
55ddbc0cby Andrew Poelstra+88−105 files
Vendor flagged security relevance
Moderate 60 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6945: bitcoin: handle OP_CODESEPARATOR in legacy

This commit fixes how the Rust Bitcoin library calculates old-style (legacy) transaction signatures when the spending script contains a special opcode called OP_CODESEPARATOR. Previously the library did not handle this opcode at all, which…

Protocol correctness fix for legacy sighash serializationOP_CODESEPARATOR handling added to match Bitcoin Core consensus behaviorPreviously omitted test vectors restored, indicating prior non-compliance
5b815281by Andrew Poelstra+600−3093 files
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6948: build(deps): bump taiki-e/install-action from 2.83.2 to 2.85.4

This is a routine update by Dependabot to the version of a third-party GitHub Action used in the project's automated testing workflows. The change only affects internal continuous integration (CI) scripts, not the actual Bitcoin library co…

d1431904by Andrew Poelstra+2−22 files
No security note in commit
Low 33 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6946: Fix integer overflow in `get_array`

This commit fixes a small but real bug in a Rust helper that reads fixed-size chunks from a data slice. The helper was supposed to safely return 'nothing' when asked to read past the end of the data, but it accidentally added two numbers t…

Integer overflow in bounds-checking helperContract violation: method documented to return None on out-of-bounds access could panic insteadDebug-build panic (denial of service) possible
c6e80843by Andrew Poelstra+2−11 file
Vendor flagged security relevance
Moderate 62 AI analysisMessage 73 · Adequate
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Fix integer overflow in `get_array`

This commit fixes a bug in a Rust helper method called `get_array`, which is meant to safely read a fixed-size chunk from a slice and return nothing if the requested range is out of bounds. The bug was that the code added the caller's offs…

Integer overflow in bounds calculationPotential panic due to violated internal length expectationCaller-controlled arithmetic used for memory access bounds
56fb1287by Martin Habovstiak+2−11 file
Vendor flagged security relevance
High 71 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6915: primitives: Fix `Witness` handling of oversized items

This commit fixes a bug in how the Rust Bitcoin library counts and compares transaction witness data when a witness contains an oversized item. Previously, several functions relied on an iterator that silently skips oversized items, causin…

Inconsistent serialization/iterator behavior for oversized witness itemswtxid collision risk between transactions differing only in oversized witness bytesIncorrect witness equality for oversized single-item stacks
e1ed5884by Andrew Poelstra+106−273 files
Vendor flagged security relevance
Informational 19 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6922: Use `try_fold` instead of `fold` in `Sum` impl

This is a code-quality and performance improvement, not a security fix. It changes how the library adds up lists of Bitcoin amounts so that it stops early once an overflow is detected, rather than continuing to process the rest of the list…

No security-relevant signal in commit message or diffRefactor preserves overflow-checking behavior (short-circuits instead of continuing)New API method `NumOpResult::from_result` is a pure inverse of existing `into_result`
86e4d5daby Andrew Poelstra+60−562 files
No security note in commit
Moderate 52 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6893: units: Reject malformed amount strings

This update fixes a bug in how the library reads Bitcoin amount strings like '1.5 BTC'. Previously, certain malformed inputs such as '.', '._', '1_', '1_.0', and '1._0' were incorrectly accepted and treated as valid amounts (often zero), i…

Input validation bypass in amount parserMalformed strings silently parsed as zero or ordinary amountsUnderscore separator placement not enforced
fcb14622by Andrew Poelstra+88−343 files
Vendor flagged security relevance
Low 48 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6921: units: fix div_by_fee_rate_ceil precision

This commit fixes a rounding bug in how the rust-bitcoin library calculates the minimum transaction weight needed to pay a given fee at a given fee rate. The old code rounded the fee rate up too early, which could produce a weight slightly…

Incorrect fee-weight calculation due to premature integer roundingPotential transaction fee shortfall when using div_by_fee_rate_ceilOverflow protection added for Amount::MAX * 4_000_000 intermediate value
b31212e0by Andrew Poelstra+38−82 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6898: Release tracking PR: `consensus-encoding 1.3.0`

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.…

0cfc7908by Andrew Poelstra+37−349 files
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6909: build(deps): bump actions/labeler from 6.2.0 to 7.0.0

This commit updates a GitHub Actions automation tool (actions/labeler) used to automatically tag pull requests with labels. It is a routine dependency version bump from 6.2.0 to 7.0.0, with no indication of a security fix or vulnerability.…

4ed7c068by Andrew Poelstra+1−11 file
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6910: build(deps): bump actions/checkout from 7.0.0 to 7.0.1

This commit is a routine update to the GitHub Actions checkout tool used by the project's automated workflows. It only changes version numbers in configuration files and does not alter the actual Bitcoin library code that users run. There …

328c4ae9by Andrew Poelstra+37−3717 files
No security note in commit
Informational 15 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6911: build(deps): bump astral-sh/setup-uv from 8.3.2 to 9.0.0

This commit updates a GitHub Actions helper used to install a Python tool called uv, which runs the zizmor security scanner. The change only bumps the pinned version of the helper from 8.3.2 to 9.0.0. The new version's release notes mentio…

No security-relevant signals in commit or upstream release notesDependency bump in CI only, not in library codeNo CVE or advisory referenced
67600795by Andrew Poelstra+2−22 files
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6912: build(deps): bump github/codeql-action/upload-sarif from 4.37.0 to 4.37.3

This is a routine Dependabot update that changes the pinned version of GitHub's official CodeQL upload-sarif action from 4.37.0 to 4.37.3 in a single CI workflow. The action only uploads static analysis results to GitHub; it does not touch…

b51cec63by Andrew Poelstra+1−11 file
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6913: build(deps): bump dtolnay/rust-toolchain from 6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 to 02cb101ec7c40f2c49e1d9714d64511d8e1b74de

This is a routine update to a GitHub Actions helper used to install Rust during automated testing. It only changes the pinned version of the dtolnay/rust-toolchain action in workflow files. There is no change to the actual rust-bitcoin lib…

90330d15by Andrew Poelstra+8−84 files
No security note in commit
Informational 20 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6906: consensus_encoding, primitives: expose exact encoding size for block and transaction

This commit adds a way to ask, in advance, exactly how many bytes a Bitcoin block or transaction will take when serialized. It is a feature addition for the library's encoding system, not a fix for a vulnerability. There is no indication i…

No security-relevant signals in commit message or diffFeature addition: expose exact encoded sizeNo mention of vulnerability, CVE, bug bounty, or security report
1a365d53by Andrew Poelstra+129−1068 files
No security note in commit
Informational 15 AI analysisMessage 88 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

build(deps): bump dtolnay/rust-toolchain

This is a routine update by Dependabot that changes which version of a popular GitHub Action (dtolnay/rust-toolchain) is used to install Rust in automated CI workflows. The commit only updates pinned commit hashes in workflow files; it doe…

a31e0b0eby dependabot[bot]+8−84 files
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Lower-priorityMove `MerkleBlock` to `p2p`by rustaceanrob · 64697b1d · Feb 8, 2026 · 7 filesMessage 68 · AdequateInformational 19Details
Commit message · rustaceanrob

Move `MerkleBlock` to `p2p`

Moves the module into a duplicate named `merkle_tree` module, fixes all
of the new lints, moves the test vectors to a new folder that mirrors
that of `bitcoin`, and updates all available `primitives` imports.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidence
AI analysis · Informational 19/100

This commit is a straightforward code reorganization: it moves the MerkleBlock and PartialMerkleTree implementation from the main `bitcoin` crate into the `p2p` crate, where it is more logically grouped with peer-to-peer message types. The actual logic, tests, and test data files are copied almost unchanged. There is no indication this fixes or introduces a security vulnerability.

Lower-priorityFix justfile with cargo-rbmtby Mitchell Bagot · e251673f · Feb 6, 2026 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Fix justfile with cargo-rbmt

The new cargo-rbmt tool supplants the prior maintainer tools. For
contributors using the just ci commands (like just ci-stable), the move
to cargo-rbmt broke their workflow.

Fix justfile and ensure-maintainer-tools.sh to work with new cargo-rbmt
tools.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit is a routine build-tooling update. It replaces an older set of maintainer helper scripts with a new Rust-based tool called cargo-rbmt, and updates the project's justfile (a command runner) accordingly. There is no indication this change fixes or introduces a security problem.

Security candidatehashes: Test hmac incremental inputby Liam Aharon · 5b713745 · Feb 6, 2026 · 1 fileMessage 86 · StrongInformational 15Details
Commit message · Liam Aharon

hashes: Test hmac incremental input

Issue https://github.com/rust-bitcoin/rust-bitcoin/issues/5601 flagged
sha3-256 did not test or handle incremental input correctly.

While correcting sha3-256 behavior in PR #5604, an audit of all hashing
algorithms was undertaken to check they handle and test incremental
input correctly.

All algorithms passed, except hmac which handled incremental input
correctly but did not test it.

Extends the hmac hashing test suite with incremental input cases.

86/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
cryptography-sensitive path
AI analysis · Informational 15/100

This commit only adds a new test to verify that HMAC hashing still produces the correct result when data is fed in one byte at a time. It does not change any production code, fix a bug, or alter behavior. The existing code already handled incremental input correctly; the change simply adds missing test coverage.

Lower-prioritytests: verify all max attainable target constants against explicit hexby Alkamal01 · d4e6456f · Feb 5, 2026 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Alkamal01

tests: verify all max attainable target constants against explicit hex

60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only adds new unit tests that check the hexadecimal string representation of existing maximum mining target constants for Bitcoin's mainnet, testnet, regtest, and signet networks. It does not change any production code, library behavior, or security-sensitive logic. It is purely a regression test addition.

AI review queueddev: implement standard traits for ChaCha20-Poly1305 data typesby Abeeujah · 0df18257 · Feb 5, 2026 · 3 filesMessage 90 · StrongInformational 17Details
Commit message · Abeeujah

dev: implement standard traits for ChaCha20-Poly1305 data types

Implement a comprehensive suite of common traits (Copy, Clone, Eq, Ord, Hash)
across chacha20_poly1305 cryptographic structures to improve API usability and integration with
standard library collections.

Changes
- Added Copy, Clone, PartialEq, Eq, PartialOrd, Ord, and Hash to:
- Poly1305
- Key
- Nonce
- U32x4
- State
- ChaCha20
- ChaCha20Poly1305
- Added Debug only to non-sensitive internal types (U32x4, State).

Security Note
The Debug trait was intentionally omitted for types holding sensitive data
(Key, Nonce, ChaCha20, etc.) to prevent accidental leakage of secret
keying values or internal cipher states through logging or unwraps.

90/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Names security-relevant behavior explicitly
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 17/100

This commit adds common Rust traits like Copy, Clone, Eq, Ord, and Hash to ChaCha20-Poly1305 cryptographic types. It is a routine developer-facing API improvement. The commit deliberately avoids adding Debug to types that hold secret keys or nonces to prevent accidental leakage in logs. There is no direct security vulnerability in the diff itself.

Security candidatepsbt: Add bounds check for non-witness UTXO output indexby Erick Cestari · 9cfc3f09 · Feb 4, 2026 · 6 filesMessage 85 · StrongModerate 60Details
Commit message · Erick Cestari

psbt: Add bounds check for non-witness UTXO output index

Add validation to ensure the vout specified in a transaction input
does not exceed the number of outputs in the non-witness UTXO.
This aligns with Bitcoin Core's PSBT deserialization behavior, which
rejects PSBTs where the input references a non-existent output index.

The new NonWitnessUtxoOutOfBounds error provides detailed context
including the input index, the referenced vout, and the actual
number of outputs available in the non-witness UTXO.

Found by differential fuzzing using bitcoinfuzz.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing boundaryfuzzing or regression evidencesigning or wallet path
AI analysis · Moderate 60/100

This commit fixes a validation gap in how the library handles Partially Signed Bitcoin Transactions (PSBTs). A PSBT can include a reference to a previous transaction output (the 'non-witness UTXO') that doesn't actually exist. Before this fix, the library would not reject this, which could allow malformed or malicious PSBTs to be processed. The fix adds a bounds check so that if a PSBT input claims an output index that is too high, deserialization returns a clear error instead of silently continuing. The issue was found by differential fuzzing against Bitcoin Core.

Lower-priorityapi: update api for ArrayRefEncoderby Nick Johnson · ec1c1999 · Feb 4, 2026 · 6 filesMessage 45 · ThinInformational 15Details
Commit message · Nick Johnson

api: update api for ArrayRefEncoder

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only updates generated API snapshot files (text listings of public types and functions) to reflect a new ArrayRefEncoder type and a change in BlockHashEncoder's constructor. No actual source code implementing behavior is modified, and nothing in the commit suggests a security fix or vulnerability.

Lower-priorityconsensus_encoding: add ArrayRefEncoderby Nick Johnson · 76b5004a · Feb 4, 2026 · 2 filesMessage 50 · ThinInformational 15Details
Commit message · Nick Johnson

consensus_encoding: add ArrayRefEncoder

Allow an array to be encoded without taking a copy. This also exposes
the length of the array for encoders.

50/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit adds a new helper type that lets the library encode a borrowed fixed-size byte array without copying it. It is a straightforward performance and API improvement with no security-relevant behavior change.

Lower-priorityprimitives: switch BlockHash to array ref encodingby Nick Johnson · 6ad8028a · Feb 4, 2026 · 1 fileMessage 50 · ThinInformational 16Details
Commit message · Nick Johnson

primitives: switch BlockHash to array ref encoding

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 16/100

This tiny change switches how a 32-byte Bitcoin block hash is encoded internally. Instead of copying the hash bytes into a new owned array before encoding, it now encodes directly from a borrowed reference to the existing bytes. This is a routine performance and memory-efficiency cleanup. There is no direct evidence in the commit that it fixes a security bug.

Lower-priorityprimitives: Fix hash debug reversal for no-hexby Mitchell Bagot · 3535bfad · Feb 4, 2026 · 2 filesMessage 68 · AdequateInformational 20Details
Commit message · Mitchell Bagot

primitives: Fix hash debug reversal for no-hex

The hash_types in primitives can have a reversal flag as defined in
the hashes impl of the wrapped hash type. For non-hex builds, the
debug implementation doesn't currently handle reversing correctly.

Fix Debug impl for reversed hash types in primitives

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 20/100

This commit fixes a formatting bug in how Bitcoin transaction and block hashes are displayed when the library is built without the optional 'hex' feature. Some hash types in Bitcoin are conventionally shown in reverse byte order. The old no-hex debug code ignored that convention and always printed bytes forward, so a developer could see a hash string that looks wrong compared to the rest of the ecosystem. It is a display bug, not a cryptographic or consensus bug, and it does not directly let an attacker steal funds or corrupt data.

Lower-priorityprimitives: Use hashes format implementationsby Mitchell Bagot · 294e343f · Feb 4, 2026 · 5 filesMessage 68 · AdequateInformational 18Details
Commit message · Mitchell Bagot

primitives: Use hashes format implementations

The hash_types in primitives are simple wrappers around the hash
types defined in hashes. Since hashes already implements the correct
formatting (including reversal, upper/lower, etc), we can simplify
hash_types by simply calling through to the fmt implementations in
hashes.

Replace format traits in primitives hash_types with call-through
impls to the implementations in hashes.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 18/100

This is a small internal code cleanup in the rust-bitcoin library. It changes how Bitcoin hash types (like transaction IDs) are printed as text, making them reuse formatting code from a lower-level module instead of defining it separately. There is no indication this fixes a security bug or introduces a vulnerability.

AI review queuedrefactor: remove From<UnexpectedEof> impls for decoder errorsby Abeeujah · 73ee530d · Feb 3, 2026 · 9 filesMessage 93 · StrongInformational 17Details
Commit message · Abeeujah

refactor: remove From<UnexpectedEof> impls for decoder errors

Replace From UnexpectedEOF implementations with .map_err() calls
across various primitive decoder types.

Modified types:
- VersionDecoderError
- BlockHashDecoderError
- TxMerkleNodeDecoderError
- WitnessMerkleNodeDecoderError
- CompactTargetDecoderError

Fixes: #5562

93/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 17/100

This is a code cleanup change in the rust-bitcoin library. It removes automatic error conversions (From trait implementations) for certain decoder errors and replaces them with explicit .map_err() calls. The behavior of the code appears functionally identical—errors are still propagated the same way. There is no indication this fixes a security vulnerability.

Lower-priorityAdd note about Target maximum valuesby Mitchell Bagot · 26c44292 · Feb 3, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Add note about Target maximum values

The Target type does not (and feasibly cannot) enforce a limit on the
maximum value in its constructors. As such, we should document this
behaviour in case it's unclear for users who expect typical behaviour.

Add note to Target struct about the lack of a maximum value invariant.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit only adds a documentation comment to the Target type explaining that it does not enforce a maximum value limit. No code behavior was changed, and no security vulnerability is present in the commit itself.

Lower-priorityUpdate API filesby Mitchell Bagot · 804882f6 · Feb 2, 2026 · 7 filesMessage 51 · ThinInformational 15Details
Commit message · Mitchell Bagot

Update API files

The changes to the public api from introducing lifetimes to all
encoders are substantial. To simplify review, they are introduced
in a separate patch.

Update api files for all crates.

51/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only updates generated API snapshot files that document the public interface of the Rust Bitcoin crates. It does not change any source code, logic, or behavior. The snapshots reflect a separate, earlier code change that added lifetime parameters to encoder types. There is no security issue in this commit itself.

Lower-priorityUnify encoder lifetimes to 'eby Mitchell Bagot · b2248736 · Feb 2, 2026 · 10 filesMessage 80 · StrongInformational 15Details
Commit message · Mitchell Bagot

Unify encoder lifetimes to 'e

At the moment, single char encoder lifetimes use 's, 'a, and 'e,
without any particular pattern. These should be unified to 'e in order
to prevent confusion for users about the reasoning for each value.

Replace all Encoder lifetimes with 'e in all crates and ADR.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 15/100

This commit is a purely cosmetic renaming of lifetime parameters in Rust code. It changes labels like 's, 'a, and 'e to consistently use 'e across encoder-related code. There is no functional change, no bug fix, and no security impact.

AI review queuedEnforce lifetime in encoder_newtypeby Mitchell Bagot · d49f587c · Feb 2, 2026 · 23 filesMessage 58 · ThinInformational 17Details
Commit message · Mitchell Bagot

Enforce lifetime in encoder_newtype

Since we want all encoder types to include a lifetime, encoder_newtype
must be changed to introduce a lifetime to be passed to inner encoder
types.

Require lifetime specifier for encoder_newtype macro and introduce
lifetime for all affected call sites.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: unusually broad changesecond-pass: security-sensitive path
AI analysis · Informational 17/100

This commit is a Rust type-system cleanup. It changes a macro that creates encoder wrapper types so that every wrapper must carry a lifetime parameter, and updates all uses across the codebase. There is no change to runtime behavior, wire format, or cryptographic logic. It prevents future misuse of the macro but does not fix a known exploitable bug.

AI review queuedMove Transaction encoder inner type to aliasby Mitchell Bagot · 46d514de · Feb 2, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Move Transaction encoder inner type to alias

With the introduction of lifetimes, the inner encoder type for the
Transaction encoder will become sufficiently complex to trigger lints.

Introduce a type alias TransactionEncoderInner.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a minor internal code cleanup in the Rust Bitcoin library. It replaces a long, complex type definition inside a macro with a shorter type alias name. There is no change to how transactions are encoded, no change to public behavior, and no security relevance.

Security candidateEncapsulate key wrapper typesby Mitchell Bagot · 4ad6e1bf · Feb 2, 2026 · 1 fileMessage 70 · AdequateInformational 17Details
Commit message · Mitchell Bagot

Encapsulate key wrapper types

Following patterns elsewhere in bitcoin, the wrapper types in the crypto
module should be encapsulated to ensure a consistent interface for
access and to prevent implementation/structure details from requiring
substantial refactors.

Encapsulate CompressedPublicKey, Keypair, SerializedXOnlyPublicKey,
SortKey, TweakedKeypair, TweakedPublicKey and XOnlyPublicKey types.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
cryptography-sensitive path
AI analysis · Informational 17/100

This commit is a routine internal code reorganization in the rust-bitcoin library. It moves several key-related wrapper types into a single private 'encapsulate' module and re-exports them, without changing their public behavior or adding any security fixes. There is no indication of a vulnerability being patched.

Security candidateIntroduce from_secp constructor for Keypairby Mitchell Bagot · 7668df29 · Feb 2, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Introduce from_secp constructor for Keypair

The Keypair type differs from the other crypto keys in that it doesn't
have a constructor, and can only be constructed with From on a
secp256k1 keypair. This makes it messy to encapsulate.

Introduce a from_secp constructor for Keypair, convert From impl to call
into from_secp, and move inner accessor under new constructor.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive path
AI analysis · Informational 15/100

This commit is a routine code cleanup. It adds a new public constructor method called from_secp for the Keypair type and makes the existing From conversion use that constructor. It also moves an existing inner accessor method to a different spot in the file. There is no security fix or behavior change.

Security candidateRemove all direct access to key typesby Mitchell Bagot · fd574bc7 · Feb 2, 2026 · 1 fileMessage 68 · AdequateInformational 18Details
Commit message · Mitchell Bagot

Remove all direct access to key types

Various key types in bitcoin::crypto are implemented and used such
that the internal key values are directly accessed. Since we want to
encapsulate these types, the access to the inner values needs to be
adjusted to always run through the exposed constructors and getters.

Replace all .0 access with .to_* accessors and pub constructors with
equivalent exposed constructors.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive path
AI analysis · Informational 18/100

This commit is a code cleanup in the rust-bitcoin library. It replaces direct internal access to cryptographic key data (like reading the hidden `.0` field) with official getter methods and constructors. There is no direct evidence this fixes an active security bug, but it strengthens encapsulation so future mistakes are less likely.

Security candidateRename into_inner on XOnlyPublicKeyby Mitchell Bagot · b4e109d7 · Feb 2, 2026 · 1 fileMessage 58 · ThinInformational 20Details
Commit message · Mitchell Bagot

Rename into_inner on XOnlyPublicKey

According to the Rust API guidelines, conversion functions that
convert from owned -> owned on Copy types should use the to_ prefix,
not the into_ prefix. For consistency with the other types and those
guidelines, into_inner should thus be to_inner.

Rename into_inner to to_inner in XOnlyPublicKey

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive path
AI analysis · Informational 20/100

This commit is a routine API cleanup: it renames a method from `into_inner()` to `to_inner()` on a public-key wrapper type and keeps the old name as a deprecated alias. There is no security bug, no behavior change, and no vulnerability introduced or fixed.

Security candidateRemove pub access to CompressedPublicKey innerby Mitchell Bagot · 8857a066 · Feb 2, 2026 · 7 filesMessage 68 · AdequateInformational 19Details
Commit message · Mitchell Bagot

Remove pub access to CompressedPublicKey inner

The CompressedPublicKey newtype in bitcoin exposes a
secp256k1::PublicKey as a pub field, to allow for convenient
construction and access. However, this breaks our desired
encapsulation for the type.

Introduce a constructor and getter on CompressedPublicKey and force
the field to be private outside the key module.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive pathsigning or wallet path
AI analysis · Informational 19/100

This commit is a routine API cleanup, not a security fix. It hides the internal secp256k1 public key inside the CompressedPublicKey type and replaces direct field access with a constructor (from_secp) and a getter (to_inner). That improves encapsulation but does not change how keys are validated or used. There is no evidence this fixes a vulnerability.

Lower-priorityhashes: Fix reverse hashes for no-hex debugby Mitchell Bagot · 0216aa00 · Feb 2, 2026 · 1 fileMessage 68 · AdequateInformational 20Details
Commit message · Mitchell Bagot

hashes: Fix reverse hashes for no-hex debug

The impl_debug_only macro implements rudimentary hash printing when
the hex feature is disabled. However, it does not currently handle
the reverse flag for a hash type correctly.

Handle reversed hash debugging correctly for no-hex builds.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 20/100

This commit fixes a minor display bug in how certain Bitcoin hash values are printed as debug text when the optional 'hex' feature is turned off. Reversed hash types (like transaction IDs in Bitcoin, which are conventionally shown backwards) were being printed in the wrong order. This only affects debug/log output, not the actual hash data or cryptographic operations, so it is not a direct security vulnerability.

Lower-priorityhashes: Convert debug_hex to take u8 iteratorby Mitchell Bagot · 6032004d · Feb 2, 2026 · 4 filesMessage 68 · AdequateInformational 16Details
Commit message · Mitchell Bagot

hashes: Convert debug_hex to take u8 iterator

The debug_hex function is used to write u8 slices as hexadecimal to
a provided writer. Since u8 slices are iterators, we can trivially
convert the function to instead take impl IntoIterator<&u8>, allowing
for usage with reversed iterators over arrays.

Convert debug_hex to take impl IntoIterator<Item = &'a u8> instead of
&[u8].

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 16/100

This is a small, safe API refactor. A helper function that writes bytes as hexadecimal text was changed to accept any iterator over bytes instead of only a fixed slice. This does not fix a vulnerability and does not change runtime behavior for existing callers.

AI review queuedprimitives: Add fmt traits for simple wrapper typesby Mitchell Bagot · 6b534904 · Feb 2, 2026 · 6 filesMessage 73 · AdequateInformational 15Details
Commit message · Mitchell Bagot

primitives: Add fmt traits for simple wrapper types

The integer wrapper types have inconsistent display trait
implementations. For 1.0, these should be unified to make working
with numeric types simple for users.

Introduce all fmt traits as passthroughs for CompactTarget and
both Version types.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit adds extra text formatting abilities (like showing numbers in hexadecimal, binary, or octal) to three simple numeric wrapper types in the rust-bitcoin library: block version, transaction version, and compact target. It is a routine usability improvement with no security relevance.