RB
← All projectsRust Bitcoin

rust-bitcoin

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

BitcoinCryptographic librariesNormal
Repository coverage

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

527security candidates508second-pass queue2197AI analyses
140commits · 30 days
276commits · 60 days
1132commits · 180 days
2038commits · 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
498Strong · 80–100
1083Adequate · 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.
Mitchell Bagot649193645068
Andrew Poelstra21975149090
Tobin C. Harding41566410063
jrakibi944994068
Nick Johnson19121190060
Jamil Lambert, PhD11919116061
satsfy (Renato Britto)381527066
Fmt Bot331431045
Trevor Arjeski111111069
Shing Him Ng31731056
Ismail Daif22622050
Martin Habovstiak29527068
Analysis record

Published AI watches

Last scanned 16 minutes ago

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
Informational 15 AI analysisMessage 93 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

build(deps): bump github/codeql-action/upload-sarif

This is a routine patch-version update of a GitHub-maintained action used only to upload static-analysis results (SARIF files) from a scheduled CI job. The change does not touch any project source code, cryptographic logic, or user-facing …

2cac6e38by dependabot[bot]+1−11 file
No security note in commit
Informational 15 AI analysisMessage 93 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

build(deps): bump astral-sh/setup-uv from 8.3.2 to 9.0.0

This is a routine automated update by Dependabot that changes the pinned version of a GitHub Action used to install a Python tool called 'uv' in two workflow files. The new version is a major release of the setup-uv action itself, but the …

7d7e7269by dependabot[bot]+2−22 files
No security note in commit
Informational 21 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6894: Harden `Copy` policy and apply to all pre-1.0 crates

This commit removes the automatic `Copy` trait from several public error types in the rust-bitcoin library and updates the project's written policy to discourage `Copy` on error types. `Copy` is a Rust trait that lets values be duplicated …

API hardening: removes `Copy` from public error types to preserve future flexibilityPolicy update: docs/policy.md now explicitly discourages `Copy` on error typesNo vulnerability fix: change is defensive/preventive, not reactive to a disclosed issue
457cb9b5by Andrew Poelstra+14−146 files
No security note in commit
Informational 18 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6787: Move `from_script` to `Address` and drop `AddressExt`

This change is a routine code cleanup, not a security fix. It moves a method that converts Bitcoin output scripts into human-readable addresses from a temporary 'extension trait' directly onto the main Address type. The actual conversion l…

ed42dabdby Andrew Poelstra+38−414 files
No security note in commit
Low 35 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6061: Units improvements

This is a routine code-quality and API-expansion pull request for the rust-bitcoin library's 'units' crate. It widens some fee-rate constructors from 32-bit to 64-bit inputs, renames the old 32-bit versions, improves serde error messages, …

API surface change: new u64 fee-rate constructors return NumOpResult to prevent silent overflowRenaming of existing u32 constructors to *_u32 may break downstream callers at compile time (breaking API change)Removal of artificial restriction in from_per_vb allows larger valid inputs
f9460859by Andrew Poelstra+266−12211 files
No security note in commit
Low 49 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6862: units: Preserve error in NumOpResult add and sub

This commit fixes a bug in how the library handles math errors. Previously, if you added or subtracted two values and one of them already had an error (for example, dividing by zero), the library would silently replace that original error …

Error-state information loss in arithmetic wrapper typeIncorrect error propagation could mask prior failures such as division by zeroDefensive correctness fix in numeric operation result handling
5324e59aby Andrew Poelstra+26−41 file
No security note in commit
Low 37 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6896: Fix `cargo audit` findings

This is a routine dependency-maintenance merge that swaps out old, unmaintained helper libraries for newer, patched versions in the project's example embedded programs and benchmark harness. The changes are driven by automated security sca…

cargo audit advisory remediationdependency upgrade for known-vulnerable crate (rand 0.7 / jobserver)dependency upgrade for known-vulnerable crate (crossbeam-epoch)
5f5f666dby Andrew Poelstra+51−1849 files
Vendor flagged security relevance
Low 37 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6897: consensus_encoding: fix overcounting bug in the composite encoders exact size len calculation

This commit fixes a counting bug in a Rust Bitcoin library. The library has combined encoders that bundle multiple pieces of data together. A method called len() is supposed to report how many bytes are left to encode, but it was incorrect…

Violation of documented API contract (ExactSizeEncoder::len)Potential incorrect buffer-size or progress decisions by downstream callersComposite encoder state not fully isolated in size reporting before fix
22bbc326by Andrew Poelstra+19−13 files
No security note in commit
Low 37 AI analysisMessage 73 · Adequate
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

consensus_encoding: fix bug in the composite encoder's exact size

This commit fixes a bookkeeping bug in a Rust Bitcoin library's composite encoder. The encoder is a tool that combines multiple pieces of data into a single byte stream, and it has a method that is supposed to report how many bytes are lef…

Incorrect implementation of a documented size/length contractPotential for callers to over-allocate buffers or miscompute transaction/witness sizesComposite encoder used in consensus-critical serialization paths
914365b4by Nick Johnson+19−13 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-priorityUse core::cmp in units kani verificationby Mitchell Bagot · 09897b03 · Jun 18, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Use core::cmp in units kani verification

In the units::amount::verification kani tests make use of cmp for min
and max calculations. These are imported from std, even though they
could be imported from core. In some unpredictable cases, this causes
kani to choke on a lack of std. Since there is no functionality loss,
it's better to use core::cmp in place of std::cmp and avoid the problem
entirely.

Replace use std::cmp with use core::cmp in verification.rs of
units::amount.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
defensive validation
AI analysis · Informational 15/100

This is a tiny, non-security change in test-only code. It swaps one standard-library import for an equivalent core-library import so that a verification tool (Kani) can run in environments without the full standard library. There is no change to actual wallet or transaction logic, and no user-facing behavior changes.

Security candidateAdd regression test for from_base64 bugby Mitchell Bagot · 188f9f30 · Jun 17, 2026 · 1 fileMessage 90 · StrongInformational 12Details
Commit message · Mitchell Bagot

Add regression test for from_base64 bug

To prevent changes to the from_base64 function reintroducing the non-65
byte invalid behaviour, a regression test should be added to catch any
changes.

Introduce regression test for
sign_message::MessageSignature::from_base64.

90/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
signing boundaryfuzzing or regression evidencesigning or wallet path
AI analysis · Informational 12/100

This commit only adds a new regression test. It does not change any production code. The test checks that a function called from_base64 correctly rejects base64 inputs that decode to fewer or more than 65 bytes. Because no actual fix is included in this commit, the commit itself does not introduce or remove a security vulnerability; it merely adds a test to help catch the bug in the future.

AI review queuedFix base64 panic in from_base64by Mitchell Bagot · 33968200 · Jun 17, 2026 · 1 fileMessage 68 · AdequateModerate 62Details
Commit message · Mitchell Bagot

Fix base64 panic in from_base64

In sign_message, the from_base64 function can panic if the string has
both a length of 88 bytes, and decodes to an array of bytes > 65. This
can happen for a string of 88 "A" characters, for example. Further, the
function incorrectly parses base64 strings that produce 64 byte arrays.
While the latter is likely caught by the underlying secp parsing, both
should be checked to provide a more meaningful error return.

Add checks for non-65 byte base64 decoding in from_base64, returning
an InvalidLength error for 64 or 66 byte decodes. Also prevent panic on
66 byte decode.

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: broader security terminologysecond-pass: security-sensitive path
AI analysis · Moderate 62/100

This commit fixes a bug in the rust-bitcoin library where a specific function used to verify Bitcoin signed messages could crash the program. The crash could be triggered by feeding it a carefully crafted 88-character base64 string that decoded to 66 bytes instead of the expected 65 bytes. The fix adds proper length checks so the function returns a clean error instead of panicking, and also rejects 64-byte results that were previously silently accepted.

AI review queuedFix buffer bug in encoding::decode_from_read_unbuffered_withby Mitchell Bagot · 3ddab5d8 · Jun 17, 2026 · 1 fileMessage 85 · StrongModerate 61Details
Commit message · Mitchell Bagot

Fix buffer bug in encoding::decode_from_read_unbuffered_with

In decode_from_read_unbuffered_with, the clamped buffer is pushed into
the decoder after a successful read. Some decoders do not completely
consume all provided bytes in a single push_bytes call, which can lead
to parts of the buffer being dropped. Like encoding::decode_from_hex,
the push_bytes should instead be called in a loop until the buffer is
empty, or the error case occurs.

Call push_bytes in a loop to prevent buffer bug in
encoding::decode_from_read_unbuffered_with.

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
parser or protocol pathsecond-pass: security-sensitive path
AI analysis · Moderate 61/100

This commit fixes a bug where a Bitcoin data decoder could silently ignore parts of incoming data. The decoder only processed each chunk of data once, but some decoders don't finish a chunk in one go. Leftover bytes were effectively dropped, which could cause malformed or incomplete data to be accepted as valid. The fix repeatedly feeds the remaining bytes until the chunk is fully consumed or an error occurs.

AI review queuedAdd regression test for decode_from_read_unbuffered_with bugby Mitchell Bagot · 29314bbe · Jun 17, 2026 · 1 fileMessage 95 · StrongInformational 11Details
Commit message · Mitchell Bagot

Add regression test for decode_from_read_unbuffered_with bug

The bug in decode_from_read_unbuffered_with is finicky and can only
be triggered in very particular cases. To ensure it is not
reintroduced, a test case should be included.

Introduce regression test for encoding::decode_from_read_unbuffered_with.

Test case produced by Project Loupe.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidenceparser or protocol pathsecond-pass: security-sensitive path
AI analysis · Informational 11/100

This commit only adds a regression test for a previously existing bug in a decoding helper. It does not change any production code, so by itself it cannot introduce a security vulnerability. The test documents a bug where a decoder could lose unconsumed bytes under specific conditions, but the actual fix must have happened in an earlier commit not shown here.

Lower-priorityAdd regression test for decode_from_read_unbuffered_with bugby Mitchell Bagot · 4b71a5ad · Jun 17, 2026 · 1 fileMessage 95 · StrongInformational 11Details
Commit message · Mitchell Bagot

Add regression test for decode_from_read_unbuffered_with bug

The bug in decode_from_read_unbuffered_with is finicky and can only
be triggered in very particular cases. To ensure it is not
reintroduced, a test case should be included.

Introduce regression test for io::decode_from_read_unbuffered_with.

Test case produced by Project Loupe.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidence
AI analysis · Informational 11/100

This commit only adds a new regression test for an already-fixed bug in a Rust Bitcoin IO decoding function. It does not change any production code, so by itself it cannot introduce or fix a security vulnerability. The test documents a subtle edge case where a decoder consumes input one byte at a time.

Lower-priorityfix: off-by-one in MedianTimePast::is_satisfied_byby Alexey Gradoboev · 66a8ee70 · Jun 16, 2026 · 1 fileMessage 100 · StrongModerate 66Details
Commit message · Alexey Gradoboev

fix: off-by-one in MedianTimePast::is_satisfied_by

Fix the comparison operator in `MedianTimePast::is_satisfied_by` from
`<=` to `<`, leading to subsequent rejection by Bitcoin Core.

Per BIP-113 and Bitcoin Core's `IsFinalTx` implementation, a time-based
transaction absolute locktime `T` is final in the next block if and
only if `T < MTP_of_previous_block` (strict less-than).

Update existing invalid test constraints and add an extended test suite

Fixes: #6373

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
AI analysis · Moderate 66/100

This commit fixes a one-unit boundary error in how rust-bitcoin decides whether a time-based transaction lock has expired. The code previously treated 'lock time equal to median time past' as satisfied, but Bitcoin's BIP-113 rule requires strict less-than. A transaction built with rust-bitcoin using an equal-time lock could be accepted locally but then rejected by Bitcoin Core, causing inconsistent behavior, failed broadcasts, or mempool rejection.

AI review queuedinternals: Update API filesby Mitchell Bagot · aa25afb4 · Jun 16, 2026 · 3 filesMessage 35 · OpaqueInformational 15Details
Commit message · Mitchell Bagot

internals: Update API files

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
documentation-only discountsecond-pass: opaque commit message
AI analysis · Informational 15/100

This commit only updates generated text files that list the public API surface of the `bitcoin_internals` crate. The removed lines describe a simple helper trait (`ToU64`) and its implementations for unsigned integer types. There is no code change, no bug fix, and no security relevance visible in the diff.

AI review queuedMove ToU64 to bitcoinby Mitchell Bagot · f3b49833 · Jun 16, 2026 · 9 filesMessage 51 · ThinInformational 15Details
Commit message · Mitchell Bagot

Move ToU64 to bitcoin

Outside of a single usage in p2p which can be replaced by a From call,
the ToU64 trait is only used in bitcoin.

Move ToU64 trait to bitcoin, keeping it pub for use in existing public
API code.

51/100 · ThinMessage clarity
✓ Subject identifies a change✓ 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 simple internal code reorganization. It moves a small helper trait called ToU64 from one internal crate (internals) into the main bitcoin crate, and updates import statements accordingly. There is no change to what the code does, no bug fix, and no security-relevant behavior change.

Lower-priorityp2p: Remove uses of ToU64by Mitchell Bagot · 32dff197 · Jun 16, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

p2p: Remove uses of ToU64

Outside of bitcoin, ToU64 is only used in a single place in p2p. This
can trivially be replaced by a u64::from call, as a u32 will always be
smaller than a u64.

Remove the only use of ToU64 from p2p.

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

This is a small internal cleanup change in the rust-bitcoin library's peer-to-peer networking code. It replaces one use of a helper trait called ToU64 with a direct Rust built-in conversion (u64::from). The behavior is identical because a u32 value always fits safely into a u64. There is no security issue here.

Lower-priorityFix read bug in io::decode_from_read_unbuffered_withby Mitchell Bagot · 53b3f3e9 · Jun 16, 2026 · 1 fileMessage 85 · StrongModerate 61Details
Commit message · Mitchell Bagot

Fix read bug in io::decode_from_read_unbuffered_with

In decode_from_read_unbuffered_with, the clamped buffer is pushed into
the decoder after a successful read. Some decoders do not completely
consume all provided bytes in a single push_bytes call, which can lead
to parts of the buffer being dropped. Like encoding::decode_from_hex,
the push_bytes should instead be called in a loop until the buffer is
empty, or the error case occurs.

Call push_bytes in a loop to prevent buffer bug in
io::decode_from_read_unbuffered_with.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Moderate 61/100

This commit fixes a bug in a Rust Bitcoin library function that reads and decodes data. Previously, when reading data in chunks, the code would pass a chunk to the decoder once and then discard any leftover bytes the decoder did not fully consume. This could cause incomplete decoding, corrupted results, or unexpected failures when processing Bitcoin data streams. The fix repeatedly feeds the same chunk to the decoder until it is fully consumed.

Security candidateUse write! in UnknownAddressTypeError displayby Mitchell Bagot · 5d63ec21 · Jun 16, 2026 · 1 fileMessage 73 · AdequateLow 35Details
Commit message · Mitchell Bagot

Use write! in UnknownAddressTypeError display

The write_err! macro is intended to provide source information for
errors in no_std environments. Where an error type does not have a
source, the write! macro should be used instead.
For UnknownAddressTypeError specifically, the use of write_err! causes
a stack overflow as it recurses infinitely to attempt to display self
as the source in write_err! in no_std builds.

Replace use of write_err! with write! in UnknownAddressTypeError
Display impl.

73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
memory safety
AI analysis · Low 35/100

This commit fixes a bug where displaying a specific error message in Bitcoin address parsing could cause the program to crash with a stack overflow. The crash only happens in 'no_std' builds (a special configuration without the standard library). The fix replaces an incorrect macro with the correct one so the error message is shown without trying to endlessly include itself as its own source.

Lower-prioritybitcoin: remove unused internals::ToU64 importby Update Nightly Rustc Bot · 0d8b5a7b · Jun 15, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Update Nightly Rustc Bot

bitcoin: remove unused internals::ToU64 import

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

This commit simply removes an unused import statement from a test module. It does not change any program logic, data handling, or security behavior. There is no security relevance.

Lower-priorityAutomated update to rustc nightly-2026-06-12by Update Nightly Rustc Bot · 41f58f19 · Jun 15, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Update Nightly Rustc Bot

Automated update to rustc nightly-2026-06-12

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

This is a routine automated update that changes one line in the project's configuration file, bumping the pinned Rust nightly compiler version from April 2026 to June 2026. There is no code change, no bug fix, and no security-related content in the commit.

AI review queuedprimitives: drop redundant reference in format! callsby satsfy (Renato Britto) · 2d45904e · Jun 15, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · satsfy (Renato Britto)

primitives: drop redundant reference in format! calls

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit only cleans up test code by removing unnecessary '&' symbols inside format!() calls. It does not change any runtime behavior or fix a security issue.

Lower-prioritybitcoin: simplify logic replacing match blockby satsfy (Renato Britto) · 51d1b140 · Jun 15, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · satsfy (Renato Britto)

bitcoin: simplify logic replacing match block

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

This is a minor code cleanup in the rust-bitcoin library. A developer replaced a verbose match block with the shorter `?` operator, which does the exact same thing in Rust: if an error occurs, return it immediately; otherwise continue. There is no functional change and no security impact.

Lower-priorityAdjust Display string for UnprefixedHexErrorby Mitchell Bagot · 8dd66363 · Jun 15, 2026 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Adjust Display string for UnprefixedHexError

The ContainsPrefix display string for UnprefixedHexError is poorly
worded.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit fixes a typo in an error message displayed to users. The message 'hex string is contains prefix' was corrected to 'hex string contains prefix'. It has no security relevance.

Lower-priorityAdjust docs for impl_parse_str_from_int_infallible macroby Mitchell Bagot · 4dc821c4 · Jun 15, 2026 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Adjust docs for impl_parse_str_from_int_infallible macro

The macro parameters for impl_parse_str_from_int_infallible are out of
date and don't reflect the actual required parameters. Although this is
not public-facing, it should be kept up-to-date.

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

This commit is a one-line documentation fix inside a non-public Rust macro. It corrects the description of a macro parameter from 'err' to 'inner' so the internal comments match the actual code. There is no code behavior change, no security fix, and no user-facing effect.

Lower-priorityRemove redundant sentences in function docsby Mitchell Bagot · 92e30bff · Jun 15, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Remove redundant sentences in function docs

The is_satisfied_by_* functions repeat their shorthand description in
their first extended docs sentence. The latter sentence can simply be
removed without any loss of information.

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

This commit only removes two redundant sentences from Rust documentation comments. It does not change any executable code, logic, or behavior. There is no security impact.

AI review queuedAdjust wording on docs to match function behaviourby Mitchell Bagot · 3a3fe1dc · Jun 15, 2026 · 3 filesMessage 73 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Adjust wording on docs to match function behaviour

There are a couple of functions in units that have docs that don't
clearly describe their behaviour. These should be adjusted to better
read and match the functionality.

Adjust from_float_in docs for Amount + SignedAmount and unwrap_or and
unwrap_or_else on NumOpResult.

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 only fixes wording in code comments/documentation. It changes descriptions of three functions so the docs accurately describe what the functions do. No actual code behavior was changed, so there is no security impact.

AI review queuedFix typos, grammar and formatting in docsby Mitchell Bagot · 4bd10aa2 · Jun 15, 2026 · 9 filesMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Fix typos, grammar and formatting in docs

The docs have various typos, grammar and formatting mistakes that should
ideally be fixed before the 1.0 release. This also includes strange
formatting for code in examples.

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 fixes typos, grammar, punctuation, and formatting in documentation comments and one code example. There are no code logic changes, no API changes, and no behavior changes. It is purely a documentation quality cleanup.

Lower-priorityMove normal opcodes to primitivesby Mitchell Bagot · 619efc32 · Jun 15, 2026 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Move normal opcodes to primitives

With the Opcode type moved, the individual opcode constants can now
also be moved to primitives from bitcoin.

Move all opcodes in Ordinary + OP_RETURN + OP_NOP to primitives and
re-export in bitcoin.

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 code reorganization: it moves many Bitcoin script opcode constants from the main `bitcoin` crate into a lower-level `primitives` crate, then re-exports them so existing users still see the same names and values. There is no change to what the opcodes mean or how they behave, and no security fix or vulnerability is described.

AI review queuedprimitives: Update API filesby Mitchell Bagot · 9d133152 · Jun 15, 2026 · 3 filesMessage 35 · OpaqueInformational 15Details
Commit message · Mitchell Bagot

primitives: Update API files

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
documentation-only discountsecond-pass: opaque commit message
AI analysis · Informational 15/100

This commit only updates generated text files that list the public API surface of the rust-bitcoin 'primitives' crate. It records that the opcodes module and its constants are now publicly exposed. There are no code changes, no bug fixes, and no security-related modifications.

Lower-priorityAdd From<Opcode> for u8 and roundtrip testby Mitchell Bagot · 5d49acb8 · Jun 15, 2026 · 1 fileMessage 90 · StrongInformational 15Details
Commit message · Mitchell Bagot

Add From<Opcode> for u8 and roundtrip test

In order to mirror the From<u8> for Opcode and provide a complete Into
roundtrip, From<Opcode> for u8 is needed. Then, to ensure both the
original from_u8 and to_u8 and the From impls function correctly, a
roundtrip test should be added.

Add From<Opcode> for u8 and a test to roundtrip through from_u8, to_u8
and the From impl pair.

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

This commit adds a harmless convenience conversion that lets an Opcode be turned into a u8 number, matching the existing conversion from u8 to Opcode. It also adds a test to confirm the conversions work both ways. There is no security issue here.

Lower-priorityMove Opcode to primitivesby Mitchell Bagot · 739463f0 · Jun 15, 2026 · 2 filesMessage 58 · ThinInformational 15Details
Commit message · Mitchell Bagot

Move Opcode to primitives

With all of the prior adjustments to the type, Opcode can now be moved
to primitives.

Move Opcode to primitives and re-export from bitcoin.

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

This commit simply moves the definition of the Opcode type from one internal module to another and re-exports it so existing code keeps working. It is a routine code reorganization with no functional or security changes.