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

AI review queuedprimitives: Add hash type name to Debug outputby Mitchell Bagot · b75a2633 · Feb 13, 2026 · 12 filesMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

primitives: Add hash type name to Debug output

The hash types from primitives all debug using hexadecimal. Unlike
typical newtypes, they don't debug with the newtype name, making
the exact hash type unclear without contextual clues.

Introduce newtype name to debug output for hash types in primitives.

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 only changes how hash values look when printed for debugging. It adds the type name (like 'Txid(...)') around the hexadecimal hash string so developers can more easily tell which kind of hash they are looking at. It does not change how hashes are compared, stored, serialized, or used in Bitcoin logic.

AI review queuedhashes: Add hash type name to Debug outputby Mitchell Bagot · 17322bff · Feb 13, 2026 · 3 filesMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

hashes: Add hash type name to Debug output

For the sake of uniformity with the changes in primitives, change
the Debug format in the hashes implementations for hash wrapper
types.

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 only changes how hash values look when printed in debugging output. Instead of showing just the raw hex string, the debug format now also includes the type name, like 'Txid(bitcoin_hashes::sha256d::Hash(...))'. It does not change any behavior that handles real bitcoin data, secrets, or network messages, and it introduces no security risk.

Security candidateChange hex re-export in bitcoin to stable hexby Mitchell Bagot · 9e5136d6 · Feb 13, 2026 · 24 filesMessage 68 · AdequateInformational 18Details
Commit message · Mitchell Bagot

Change hex re-export in bitcoin to stable hex

As per the repo policy, all exports from bitcoin must be a superset of
those from primitives. This includes crate re-exports. In bitcoin, the
hex re-export exports the unstable v0.3.0 crate, whilst primitives
exports the stable 1.0 crate. Since bitcoin makes extensive use of
unstable hex features, the export should be updated, but both included
as dependencies, like with primitives.

Introduce both hex unstable and hex stable as dependencies for bitcoin
and change re-export to stable hex to match primitives.

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 18/100

This commit is a routine internal dependency cleanup. The project had been re-exporting an unstable version of a hex-encoding helper crate, but its policy says the main crate must only re-export stable versions. The change swaps the public re-export to the stable version while keeping the unstable version as a private internal dependency for code that still needs it. There is no security bug being fixed here.

Security candidatehashes: Add cpufeatures for no_std SIMD detectionby jrakibi · 5074a7d1 · Feb 13, 2026 · 4 filesMessage 88 · StrongInformational 19Details
Commit message · jrakibi

hashes: Add cpufeatures for no_std SIMD detection

Currently SIMD requires `std` because we use `is_x86_feature_detected!`
and `is_aarch64_feature_detected!` macros for runtime CPU feature detection.
This means `no_std` users cannot benefit from the performance boost
provided by hardware SHA extensions.

This adds `cpufeatures` crate as an optional dependency.
When enabled, it provides runtime CPU feature detection in `no_std`
environments for both x86/x86_64 and aarch64.

Discussed in https://github.com/rust-bitcoin/rust-bitcoin/issues/5568#issuecomment-3816450830

Update lock files

88/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
Why it was queued
cryptography-sensitive path
AI analysis · Informational 19/100

This change lets users of the library who don't use the standard Rust library ('no_std' environments, common in embedded or blockchain hardware) benefit from faster SHA-256 hashing via CPU-specific instructions. It adds an optional helper crate that detects CPU features in 'no_std' mode, similar to how the standard library already does it. There is no direct evidence in the commit that this fixes a security vulnerability; it is a performance and portability improvement.

Lower-priorityRemove excess allocations from Witness::from_iterby Mitchell Bagot · 25740334 · Feb 12, 2026 · 1 fileMessage 68 · AdequateInformational 18Details
Commit message · Mitchell Bagot

Remove excess allocations from Witness::from_iter

The FromIterator implementation for Witness currently relies on
from_slice to function. This requires it to provide an indexable slice
of slices. To facilitate this, FromIterator currently allocates a
Vec<Vec<u8>> from the iterator. With the new single-allocation
WitnessDecoder, this can be rewritten to significantly reduce the
quantity of allocations necessary.

Refactor FromIterator to use WitnessDecoder and reduce excess
allocations.

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

This commit is a routine performance optimization. It rewrites how a Bitcoin transaction witness is built from an iterator so that it uses a single decoder pass instead of allocating many small temporary vectors. There is no indication of a security bug being fixed.

Lower-priorityp2p: Implement `encoding` traits for `HeadersMessage`by rustaceanrob · 41aac35e · Feb 11, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · rustaceanrob

p2p: Implement `encoding` traits for `HeadersMessage`

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

This commit adds standard encoding and decoding support for the Bitcoin P2P 'headers' message type in the rust-bitcoin library. It is a routine feature implementation with no visible security fix or behavior change to existing code paths.

Lower-priorityp2p: Implement `encoding` traits for `NetworkHeader`by rustaceanrob · ca29982b · Feb 11, 2026 · 1 fileMessage 50 · ThinInformational 12Details
Commit message · rustaceanrob

p2p: Implement `encoding` traits for `NetworkHeader`

For use in `HeadersMessage`.

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

This commit adds new serialization/deserialization code for a Bitcoin P2P message wrapper type called NetworkHeader. It is a routine feature addition that implements internal encoding traits so NetworkHeader can be used inside another message type (HeadersMessage). There is no indication in the commit of a security bug, vulnerability, or fix.

Lower-priorityp2p: Introduce a `NetworkHeader` wrapperby rustaceanrob · 81922018 · Feb 11, 2026 · 1 fileMessage 68 · AdequateLow 34Details
Commit message · rustaceanrob

p2p: Introduce a `NetworkHeader` wrapper

The block headers when sent over the network include a 0 byte suffix for
the length of transactions to follow, which happens to always be 0. It
is possible this byte gets repurposed for something more useful in the
future depending on the `ProtocolVersion` sent in the request. We
should not fail the decoding if a non-zero byte is sent, as doing so
guarentees any client cannot follow the most work chain if this byte is
non-zero.

This also allows the new `encoding` traits to be implemented gracefully.
On other branches without the wrapper type, I've found this to be a
nightmare.

Note that the old traits must be implemented as we implement
`encoding::Encodable` for `NetworkMessage` _based on_ the old traits.
This is unfortunate for adding new wrapper types in the messages, as
this code will inevitably be removed, but it's too late to change the
`encoing::Encodable` for `NetworkMessage` so I think we bite the bullet
and add this temporarily.

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

This commit changes how Bitcoin block headers received over the peer-to-peer network are parsed. Previously, the code would reject a headers message if the trailing byte (which indicates how many transactions follow) was anything other than zero. The commit introduces a wrapper type that accepts any value for that byte. The stated reason is future-proofing: if Bitcoin ever uses that byte for something useful, clients using this stricter library would be unable to follow the longest chain because they'd reject valid messages. There is no claim in the commit that this fixes an active security bug, and the change is framed as a protocol-compatibility improvement.

Lower-prioritytest(p2p): Migrate merkle block deser tests to `encoding`by rustaceanrob · 95d530f6 · Feb 11, 2026 · 1 fileMessage 72 · AdequateInformational 15Details
Commit message · rustaceanrob

test(p2p): Migrate merkle block deser tests to `encoding`

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

This commit only changes test code. It updates a handful of unit tests in the Merkle tree module to use a newer internal encoding helper (`encoding::encode_to_vec` / `encoding::decode_from_slice`) instead of the older `encode::serialize` / `encode::deserialize` helpers. No production code is modified, so it cannot affect the security of the library at runtime.

Lower-priorityp2p: Implement `encoding` traits for `MerkleBlock`by rustaceanrob · 885bf394 · Feb 11, 2026 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · rustaceanrob

p2p: Implement `encoding` traits for `MerkleBlock`

Self explanatory given the previous commit of `PartialMerkleTree`
encoding.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit adds new encoding and decoding machinery for a data structure called MerkleBlock in the library's peer-to-peer networking code. It is a routine feature addition that mirrors a similar change already made for PartialMerkleTree. There is no indication in the commit that this fixes a security bug or introduces a vulnerability.

Lower-priorityp2p: Implement `encoding` traits for `PartialMerkleTree`by rustaceanrob · 1743aa77 · Feb 11, 2026 · 1 fileMessage 73 · AdequateLow 28Details
Commit message · rustaceanrob

p2p: Implement `encoding` traits for `PartialMerkleTree`

Needs an intermediate `Encoder` to convert the `Vec<bool>` to the
compressed bit vector. The bit-packing logic of course remains the same.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 28/100

This commit adds new serialization/deserialization code for PartialMerkleTree, a data structure used in Bitcoin peer-to-peer messages. It re-implements the existing bit-packing logic using a new internal encoding framework. There is no direct evidence of a security bug, but the change touches low-level binary parsing and could introduce subtle correctness issues if the new decoder does not exactly match the old behavior.

Security candidatebenches: add sha256d benchby jrakibi · 5e813e3f · Feb 11, 2026 · 2 filesMessage 66 · AdequateInformational 15Details
Commit message · jrakibi

benches: add sha256d bench

Add sha256d benchmark and a 64 byte input target to help measure the
optimized-double-sha256 performance for 64 bytes if we implement it
in the future (see https://github.com/rust-bitcoin/rust-bitcoin/issues/5540)

66/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ 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 performance benchmark for the SHA256d hashing function. It does not change any production code, cryptographic logic, or user-facing behavior. There is no security issue.

Security candidatebenches: fix hash benches to measure full hashby jrakibi · 2e12407c · Feb 11, 2026 · 10 filesMessage 76 · AdequateInformational 15Details
Commit message · jrakibi

benches: fix hash benches to measure full hash

The current hash benchmarks create the engine once and then repeatedly call
`engine.input()` on the same engine. This does not measure a full hash
operation per iteration (create engine -> `input()` -> `finalize()`).

The previous benchmark numbers are optimistic, especially for small
inputs, and does not reflect real cost of hashing.

I ran a before/after comparison for sha256:
On master:
- 10 bytes: 9.5514 ns
- 1024 bytes: 532.90 ns
- 65536 bytes: 34.533 us
This PR:
- 10 bytes: 51.360 ns
- 1024 bytes: 553.34 ns
- 65536 bytes: 33.796 us

On small inputs the old benchmark was around 5x too optimistic.
(for larger inputs the difference is small)

Discussed in https://github.com/rust-bitcoin/rust-bitcoin/pull/5604#issuecomment-3866577775

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

This change only fixes how hash performance is measured in benchmark tests. It does not change any real hashing code that users or applications rely on, so it has no security impact on the library itself.

Lower-priorityp2p: Re-export hash typesby Mitchell Bagot · ed19c454 · Feb 10, 2026 · 1 fileMessage 68 · AdequateInformational 20Details
Commit message · Mitchell Bagot

p2p: Re-export hash types

In bitcoin 0.32.8, the FilterHash and FilterHeader hash types were
exported from the top level of the crate. Following the split of p2p,
these types now need to be accessed inside of the module in p2p. To
match the previous interface (albeit in the new crate), these should be
re-exported from the top level of the p2p crate.

Re-export FilterHash and FilterHeader from the top level of the p2p
crate.

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

This commit simply makes two existing data types (FilterHash and FilterHeader) easier to import from the top level of the new 'p2p' crate. It is a straightforward API-compatibility cleanup after a crate split and does not change any behavior, logic, or security-sensitive code.

Lower-priorityAdd next target calculationby Mitchell Bagot · 5d2d1163 · Feb 10, 2026 · 6 filesMessage 58 · ThinInformational 20Details
Commit message · Mitchell Bagot

Add next target calculation

Since the earlier from_next_work_required implementation, it has been
a desired feature to allow calculating the target for subsequent
blocks without having the user manually calculate the block offsets
themselves.

Add next_target_after function to calculate the compact target for a
subsequent block by header. Introduce logic to handle BIP-94
(testnet 4) to from_header_difficulty_adjustment.

Original work by Tobin C. Harding <me@tobin.cc>

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 20/100

This commit adds a new public function for calculating Bitcoin's next mining difficulty target and updates the library to support a recent test network rule (BIP-94). It is a feature addition that mirrors Bitcoin Core's consensus logic. There is no direct evidence in the commit that it fixes an active security bug, but any mistake in difficulty-target arithmetic could, in principle, cause a node or wallet built on this library to disagree with the rest of the Bitcoin network about which chain is valid. The change is well-documented, heavily tested, and appears to be a straightforward port of existing reference code.

Lower-priorityunits: Use lazy && operatorby Tobin C. Harding · cbda447d · Feb 10, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Tobin C. Harding

units: Use lazy && operator

> Why is this bad?
> The bitwise operators do not support short-circuiting, so it may
> hinder code performance. Additionally, boolean logic “masked” as
> bitwise logic is not caught by lints like unnecessary_fold

ref: https://rust-lang.github.io/rust-clippy/master/index.html#needless_bitwise_bool

As suggested, use `&&`.

No logic change.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 15/100

This commit is a harmless code-quality cleanup. It swaps two bitwise AND operators (`&`) for logical AND operators (`&&`) in functions that check Bitcoin transaction sequence numbers. The author explicitly states there is no logic change. Because both operands are already boolean expressions, the result is identical; the only difference is that `&&` skips evaluating the second expression when the first is false, which is slightly more efficient.

Lower-prioritytest(p2p): Migrate `Magic` deser tests to `encoding`by rustaceanrob · e48e6aaf · Feb 9, 2026 · 1 fileMessage 87 · StrongInformational 15Details
Commit message · rustaceanrob

test(p2p): Migrate `Magic` deser tests to `encoding`

Use the traits in the previous commit and pass all of the existing unit
tests.

87/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit only changes test code. It swaps one set of internal helper functions for another inside unit tests for the Bitcoin network 'magic' bytes. No production code is altered, so it cannot affect security.

Lower-priorityp2p: Implement `encoding` traits for `Magic`by rustaceanrob · d76ecba5 · Feb 9, 2026 · 1 fileMessage 45 · ThinInformational 18Details
Commit message · rustaceanrob

p2p: Implement `encoding` traits for `Magic`

Usual encoding business here.

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 18/100

This commit adds new serialization/deserialization code for the Bitcoin network 'magic' bytes (the 4-byte identifier at the start of P2P messages). It is a routine feature addition that mirrors existing consensus encoding support. There is no indication of a security bug, fix, or vulnerability in the change itself.

Lower-priorityUpdate API filesby Mitchell Bagot · 42d9d43d · Feb 9, 2026 · 3 filesMessage 51 · ThinInformational 15Details
Commit message · Mitchell Bagot

Update API files

Following the introduction of the macros, the ordering for the generics
in the api files has changed. While there are no true changes to the
api, the CI will complain about the file changes.

Update consensus encoding API files.

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 reorders the text in automatically generated API snapshot files so they match the new output from a macro change. No actual code or library behavior changed, and there is no security relevance.

AI review queuedReplace DecoderNError implementations with macroby Mitchell Bagot · 6bec9c13 · Feb 9, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Replace DecoderNError implementations with macro

As with the EncoderN composite encoders, the DecoderNError types
can be trivially replaced with a macro to significantly reduce the
quantity of repeated boilerplate code for each of them.

Introduce define_decoder_n_error macro to define DecoderNError types
for any N.

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

This commit is a routine code cleanup. It replaces several nearly identical error-type definitions with a single Rust macro, reducing duplicated boilerplate. There is no change to how the library behaves, what data it accepts, or how it handles errors.

Lower-priorityReplace EncoderN implementations with macroby Mitchell Bagot · 07409b27 · Feb 9, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Replace EncoderN implementations with macro

The EncoderN composite encoders currently rely on composition of
Encoder2 instances to achieve N > 2. Since the basic structure lends
itself to unrolling, we can introduce a macro to produce encoders for
any N.

Introduce define_encoder_n macro to define EncoderN types for any N.

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 straightforward internal code cleanup: it replaces several hand-written composite encoder types with a Rust macro that generates equivalent types. There is no change to public behavior, no bug fix, and no security relevance visible in the diff or commit message.

Security candidateFix PSBT key deserialisation byte sizeby Mitchell Bagot · 65229278 · Feb 9, 2026 · 1 fileMessage 68 · AdequateModerate 50Details
Commit message · Mitchell Bagot

Fix PSBT key deserialisation byte size

The PSBT Key decoding makes an assumption that the key type will always
encoding in a single byte in it's compact form. While this is often
correct, this is not correct according to the spec and may fail in
cases where key type values are large.

Fix the encode and decode implementations on Key to correctly calculate
the type value size to add to the key length size.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 50/100

This commit fixes a bug in how Partially Signed Bitcoin Transactions (PSBTs) read and write their internal 'key' fields. The old code assumed the key's type number always fits in one byte when encoded as a compact size. That assumption is wrong for large type numbers, so the code could misread the key's length and either reject valid PSBTs or, in the worst case, allocate too much memory. The fix makes the encoder and decoder correctly account for the actual number of bytes the type number occupies.

Lower-priorityUpdate dep-tree in docsby Mitchell Bagot · fe3e26f2 · Feb 9, 2026 · 1 fileMessage 61 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Update dep-tree in docs

The dep-tree file provides an outline of all of the crate dependencies
in the repository. Since it was initially generated, a few crates have
been split out, while others have been modified and their dependencies
changed. To provide a better reference for the current crate state, it
should be updated.

Re-run just gen-dep-tree to update doc/dep-tree file.

61/100 · AdequateMessage clarity
✓ Subject identifies a change✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only updates a documentation file (docs/dep-tree) that shows the dependency tree of the project's Rust crates. No source code, build scripts, or configuration files were changed. It is a routine documentation refresh with no security relevance.

Lower-priorityapi: Update sha3_256 hashing apiby Liam Aharon · 077c6bb3 · Feb 8, 2026 · 3 filesMessage 68 · AdequateInformational 15Details
Commit message · Liam Aharon

api: Update sha3_256 hashing api

a983c10 introduced changes to the sha3-256 hashing api.

Applies the diff generated by './contrib/check-for-api-changes.sh' to
keep 'api/hashes/..' consistent with the aforementioned code change.

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

This commit only updates generated API snapshot text files to match a recent code change. It renames a function parameter from 'data' to 'inp' and changes a return type description from the full type name to 'Self'. These are documentation-like API snapshots, not actual source code changes, and they have no effect on program behavior or security.

Lower-priorityhashes: Fix sha3_256 incremental hashingby Liam Aharon · 1a15728b · Feb 8, 2026 · 1 fileMessage 78 · AdequateModerate 62Details
Commit message · Liam Aharon

hashes: Fix sha3_256 incremental hashing

The previous implementation incorrectly applies padding at the end of
every `input()` call, treating each data chunk as a standalone message.
This resulted in hashing `Pad(a) || Pad(b)` instead of `Pad(a || b)`.

Refactor `HashEngine`'s `input()` to buffer partial blocks instead of
padding and absorbing them immediately.

Move padding logic into `finalize()` so it is applied exactly once at
the end of the stream.

Add a regression test for incremental input.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidence
AI analysis · Moderate 62/100

This commit fixes a bug in the SHA3-256 hashing code in rust-bitcoin. Previously, when data was fed in chunks (rather than all at once), the code incorrectly added end-of-message padding after every chunk. That produced the wrong hash for any multi-chunk input. The fix buffers partial blocks and only applies padding once at the end. The commit adds a regression test that hashes byte-by-byte and compares the result to the known correct output.