RB
← All projectsRust Bitcoin

rust-bitcoin

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

BitcoinCryptographic librariesNormal
Repository coverage

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

459security candidates448second-pass queue816AI analyses
188commits · 30 days
404commits · 60 days
1283commits · 180 days
2064commits · 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.

64/100 average clarity
311Strong · 80–100
1054Adequate · 60–79
555Thin · 40–59
150Opaque · 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 Bagot640192307068
Tobin C. Harding40965124063
jrakibi944959068
Nick Johnson1892068059
Andrew Poelstra512028075
Jamil Lambert, PhD1141842061
Fmt Bot311420045
Trevor Arjeski111111069
Shing Him Ng31718056
Ismail Daif2268050
satsfy (Renato Britto)1769066
Martin Habovstiak27511069
Analysis record

Published AI watches

Last scanned 31 minutes ago

Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6670: ci: fix labeller permissions

This is a routine GitHub Actions workflow fix. The change gives the automated PR labeler workflow permission to download artifacts and explicitly tells the GitHub CLI which repository to act on. It does not change the Bitcoin library code,…

CI workflow permission fixNo source code changesNo cryptographic or consensus changes
276e0a61by Andrew Poelstra+5−01 file
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6657: Release tracking PR: `base58ck 0.5.0`

This commit is a routine version bump for the base58ck crate from 0.4.0 to 0.5.0. It only updates version numbers in package manifests, lock files, and adds a changelog entry. There are no code changes and no security relevance.

9deb5de1by Andrew Poelstra+22−168 files
No security note in commit
Informational 21 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6440: base58: Introduce `decode_check_to_array` for alloc-less decoding

This commit is a routine feature addition to the rust-bitcoin base58 crate. It adds a new no-allocator function to decode short base58-check strings into fixed-size byte arrays, and renames the existing error type while keeping a deprecate…

No security-relevant bug fix is described in the commit message or diff.New decoding path uses a fixed 128-byte scratch buffer (`ArrayVec`) and rejects oversized inputs.Checksum verification and invalid-character handling are preserved from the existing alloc implementation.
c5fd1832by Andrew Poelstra+330−775 files
No security note in commit
Informational 15 AI analysisMessage 93 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6646: hashes: add several methods to `Midstate` and release 1.2.0

This commit is a routine feature release for the bitcoin_hashes crate. It adds new public methods and a constant to the SHA-256 Midstate type so developers can compute SHA-256 midstates in const contexts. There is no indication of a securi…

0f68fcb3by Andrew Poelstra+157−4210 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6667: Make the `WitnessesEncoder` private

This commit makes a small internal helper type called WitnessesEncoder private. It was previously exported as public API but is only used inside the transaction encoder. The change removes it from the public API surface and moves the code …

07d91f7fby Andrew Poelstra+54−1324 files
No security note in commit
Informational 12 AI analysisMessage 75 · Adequate
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

ci: fix labeller permissions

This commit adjusts a GitHub Actions workflow that automatically labels pull requests based on CI results. It adds a built-in repository token, tells the artifact download step to merge single-file artifacts, and explicitly sets the reposi…

Workflow-only change with no library code modificationsUses the default GITHUB_TOKEN rather than a custom secretRuns in workflow_run context, which already has elevated repository access by design
715f2bd6by Nick Johnson+5−01 file
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6668: Scrub the transaction encoding logic

This commit is a pure code reorganization (refactor) in the rust-bitcoin library. It moves transaction encoding and decoding definitions around within a single file so the code follows the project's preferred layout. No logic, behavior, or…

c5588ba5by Andrew Poelstra+57−571 file
No security note in commit
Informational 18 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6662: build(deps): bump actions/checkout from 6.0.2 to 6.0.3

This commit is a routine update to the GitHub Actions checkout tool used by the project's automated workflows. It changes the pinned version from 6.0.2 to 6.0.3 across many workflow files. The newer version fixes minor bugs related to SHA-…

Dependency bump of actions/checkout to a patch releaseUpstream fixes for SHA-256 repository checkout and merge commit regexAll affected workflows already disable persisted credentials
f7d364cdby Andrew Poelstra+29−2915 files
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6663: build(deps): bump taiki-e/install-action from 2.79.12 to 2.81.4

This is a routine Dependabot update that bumps the version of a third-party GitHub Action used only in automated testing workflows. The change does not touch the project's actual Bitcoin library code, and there is no indication it fixes or…

5c92c0b0by Andrew Poelstra+2−22 files
No security note in commit
Informational 15 AI analysisMessage 68 · Adequate
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Scrub the transaction encoding logic

This commit is a pure code reorganization: it moves existing transaction encoding and decoding definitions around within a single file so they follow the project's preferred layout. No logic was changed, no security bug was fixed, and no n…

80dcef15by Tobin C. Harding+57−571 file
No security note in commit
Informational 15 AI analysisMessage 58 · Thin
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Make the WitnessesEncoder private

This commit simply hides an internal helper type called WitnessesEncoder from public view. It is a routine API-cleanup change with no security relevance visible in the code or commit message.

b37accc3by Tobin C. Harding+54−542 files
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.1.0 to 8.2.0

This is a routine automated update by Dependabot that changes the pinned version of a GitHub Action used to install the 'uv' Python tool in two workflow files. The new commit hash corresponds to the legitimate 8.2.0 release of astral-sh/se…

1c438632by dependabot[bot]+2−22 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 automated update by Dependabot that changes the pinned version of a GitHub-provided security scanning helper used in a workflow. It does not modify the project's actual Bitcoin library code, its cryptographic logic, or an…

5293bee4by 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 taiki-e/install-action from 2.79.12 to 2.81.4

This is a routine Dependabot update that bumps a GitHub Actions helper used in automated testing workflows from version 2.79.12 to 2.81.4. It only changes which version of the action is invoked during CI runs; it does not modify the Rust B…

eb9544f9by dependabot[bot]+2−22 files
No security note in commit
Informational 15 AI analysisMessage 93 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

build(deps): bump actions/checkout from 6.0.2 to 6.0.3

This is a routine automated update by Dependabot that bumps the GitHub Actions 'actions/checkout' dependency from version 6.0.2 to 6.0.3 across all project workflow files. It only changes pinned commit hashes and version comments for the a…

Routine patch-level dependency bumpNo changes to permissions, inputs, or workflow logicpersist-credentials: false already present on all checkout steps
ae935fadby dependabot[bot]+29−2915 files
No security note in commit
Informational 15 AI analysisMessage 28 · Opaque
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Update API files

This commit only updates generated API snapshot text files to remove two lines that documented a `From<u16>` conversion for a locktime type. No actual Rust source code was changed, so there is no runtime behavior change or security fix in …

6ea25bedby Mitchell Bagot+0−123 files
No security note in commit
Informational 15 AI analysisMessage 60 · Adequate
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

base58ck: Bump version to 0.5.0

This commit is a routine version bump for the base58ck crate from 0.4.0 to 0.5.0. It only updates version numbers in package manifests, lock files, and adds a changelog entry describing unrelated feature changes. There are no code changes,…

8479b56eby Tobin C. Harding+22−168 files
No security note in commit
Informational 20 AI analysisMessage 58 · Thin
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Rename Error to DecodeCheckError

This commit is a routine code cleanup: it renames the `Error` type in the base58 module to the more descriptive `DecodeCheckError`, and adds a deprecated type alias so existing code using `base58::Error` continues to work. There is no chan…

b0eba4c0by Mitchell Bagot+45−395 files
No security note in commit
Informational 15 AI analysisMessage 28 · Opaque
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Update API files

This commit only updates generated API snapshot text files to reflect that the remainder (modulo) operator for the Weight type now returns another Weight instead of a plain number. It contains no source code changes, no bug fix, and no sec…

351acf8eby Mitchell Bagot+6−63 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

consensus_encoding: decoder docs which are consensus specific

This commit only changes documentation comments in the consensus_encoding crate. It renames descriptions like 'Primitive decoders' to 'Primitive and combinator decoder types' and updates several function doc comments to say 'consensus deco…

5cdd5aa0by Nick Johnson+11−132 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 queued2026-06-21 automated rustfmt nightlyby Fmt Bot · 70a946b9 · Jun 21, 2026 · 2 filesMessage 45 · ThinInformational 15Details
Commit message · Fmt Bot

2026-06-21 automated rustfmt nightly

45/100 · ThinMessage clarity
✓ 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 is an automated code-formatting commit. It only reorders import and module declarations to match the latest rustfmt nightly style. No logic, behavior, or security-sensitive code was changed.

Lower-priorityFix typo in p2p decoding error docsby haoshengzhen · f91a7995 · Jun 19, 2026 · 8 filesMessage 60 · AdequateTriage 0Details
Commit message · haoshengzhen

Fix typo in p2p decoding error docs

Signed-off-by: haoshengzhen <haoshengzhen@outlook.com>

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI review queuedUpdate API filesby Mitchell Bagot · 483e8f9f · Jun 19, 2026 · 2 filesMessage 28 · OpaqueInformational 15Details
Commit message · Mitchell Bagot

Update API files

28/100 · OpaqueMessage clarity
✓ Subject identifies a change! No meaningful explanatory body
Why it was queued
documentation-only discountsecond-pass: opaque commit message
AI analysis · Informational 15/100

This commit only updates two generated API snapshot files (all-features.txt and alloc-only.txt) to reflect newly added public types and methods in the bitcoin_primitives crate. It contains no actual source code changes, no bug fixes, and no security-related modifications.

Lower-priorityAdd and move tests to kill mutantsby Mitchell Bagot · 407b83e5 · Jun 19, 2026 · 5 filesMessage 90 · StrongTriage 0Details
Commit message · Mitchell Bagot

Add and move tests to kill mutants

With the move of Builder and the script functions to primitives, new
tests are needed to ensure sufficient coverage of the code and mutants.

Introduce tests to builder and owned modules and move tests from
bitcoin to primitives to cover new logic and mutants.

Assisted by: Claude Opus 4.8 for new tests.

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
Lower-priorityRemove From impls on FromStrErrorby Mitchell Bagot · a7e974e9 · Jun 19, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Mitchell Bagot

Remove From impls on FromStrError

Since the error type is being stabilised, we want to eliminate needless
From impls to minimise the API surface. These From impls can be
trivially replaced by map_err calls, and so should be removed.

Remove From<ParseIntError> and From<TryFromError> for FromStrError.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityChange match to *self in Display and Errorby Mitchell Bagot · 81ff9eb0 · Jun 19, 2026 · 1 fileMessage 60 · AdequateTriage 0Details
Commit message · Mitchell Bagot

Change match to *self in Display and Error

The std::error::Error and Display impls should match on a deref'ed copy
of the error, rather than on self.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI review queuedAdjust docs on WitnessVersionby Mitchell Bagot · f7f9164b · Jun 19, 2026 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Mitchell Bagot

Adjust docs on WitnessVersion

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

This commit is a one-character documentation fix: it adds a missing period at the end of a comment describing the first witness version. There are no code, logic, or API changes.

AI review queuedprimitives: Update API filesby Mitchell Bagot · 460d8c0d · Jun 19, 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 API listing files (text snapshots that document what functions and types are publicly available). It adds entries for a newly exposed 'witness_version' module and some conversions to/from opcodes. There is no actual code change, no bug fix, and no security-relevant behavior change in this commit itself.

Lower-priorityAdd tests for WitnessVersion and Opcodeby Mitchell Bagot · b1c6b5bb · Jun 19, 2026 · 2 filesMessage 78 · AdequateTriage 0Details
Commit message · Mitchell Bagot

Add tests for WitnessVersion and Opcode

The new WitnessVersion logic introduces mutants in primitives. In order
to both test the logic and kill the mutants, new tests are needed.

Add tests to WitnessVersion module in primitives.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-priorityFix lint errors in primitivesby Mitchell Bagot · 78550d5f · Jun 19, 2026 · 2 filesMessage 60 · AdequateTriage 0Details
Commit message · Mitchell Bagot

Fix lint errors in primitives

The move of bitcoin code to primitives has revealed some lint errors.

Fix lint errors in the new code in primitives.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-priorityMove Builder to primitivesby Mitchell Bagot · 1d65a54c · Jun 19, 2026 · 3 filesMessage 58 · ThinTriage 0Details
Commit message · Mitchell Bagot

Move Builder to primitives

With the BuilderExt split complete, the Builder type can now be cleanly
moved to primitives.

Move Builder to primitives and re-export in bitcoin.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Lower-priorityMove WitnessVersion to primitivesby Mitchell Bagot · 8175f7e1 · Jun 19, 2026 · 4 filesMessage 58 · ThinTriage 0Details
Commit message · Mitchell Bagot

Move WitnessVersion to primitives

As part of moving Address to addresses and the script functionality to
primitives, WitnessVersion will both also need to be available to both.

Move WitnessVersion and associated errors to primitives, re-exporting
from bitcoin.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Lower-priorityMove ScriptBuf extension trait functions to primitivesby Mitchell Bagot · 6f89a820 · Jun 19, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Mitchell Bagot

Move ScriptBuf extension trait functions to primitives

Following the move of Opcode to primitives, a handful of ScriptBufExt
functions can now be moved to primitives on the main type. These
functions will be used in Builder.

Move push_slice, push_slice_non_minimal, push_opcode to ScriptBuf.
Duplicate private extension functions on ScriptBuf and copy
ScriptBufAsVec to primitives.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityRemove access to private fields of Builderby Mitchell Bagot · 9a644e42 · Jun 19, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Mitchell Bagot

Remove access to private fields of Builder

In preparation for the upcoming split of Builder into a BuilderExt
trait, various functions which rely on internal access to the private
fields of Builder to function need to change.

Adjust functions to be left behind to not rely on internal field access
of Builder.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityMove push_int_non_minimal to BuilderExtPrivby Mitchell Bagot · ddd1de3a · Jun 19, 2026 · 3 filesMessage 58 · ThinTriage 0Details
Commit message · Mitchell Bagot

Move push_int_non_minimal to BuilderExtPriv

The push_int_non_minimal function on Builder is not supposed to be
public, nor should it be moved to primitives. As such, it should be
split to a private extension trait to be used in crate::blockdata.

Add BuilderExtPriv trait and move push_int_non_minimal to it.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Lower-prioritySplit Builder into BuilderExtby Mitchell Bagot · a5db61b9 · Jun 19, 2026 · 6 filesMessage 58 · ThinTriage 0Details
Commit message · Mitchell Bagot

Split Builder into BuilderExt

The Builder type has various functions that rely on unstable types or
provide an unclean interface. Since we don't want these in primitives,
they should be split to an extension trait to be left behind.

Split Builder into BuilderExt

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Lower-priorityRemove the second field of Builderby Mitchell Bagot · 6e1e545e · Jun 19, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Mitchell Bagot

Remove the second field of Builder

The second field in the Builder struct, the Option<Opcode>, is
exclusively used to optimise the push_verify function. Since retaining
it greatly complicates the process of moving Opcode to primitives, it
should be removed.

Remove the Option<Opcode> field of Builder.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityfee_rate: fix mul_by_weight to use ceil not floorby Muhammad · 8c7584ca · Jun 18, 2026 · 1 fileMessage 45 · ThinTriage 0Details
Commit message · Muhammad

fee_rate: fix mul_by_weight to use ceil not floor

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Lower-priorityfee_rate: add test for mul_by_weight roundingby Muhammad · 517705a0 · Jun 18, 2026 · 1 fileMessage 55 · ThinTriage 0Details
Commit message · Muhammad

fee_rate: add test for mul_by_weight rounding

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Lower-priorityfix: InstructionIndices::nth byte position bugby Alexey Gradoboev · e4c49d41 · Jun 18, 2026 · 1 fileMessage 100 · StrongTriage 0Details
Commit message · Alexey Gradoboev

fix: InstructionIndices::nth byte position bug

Remove the custom `nth` implementation for `InstructionIndices` because
it captures position via `next_with` and returns as byte offset instead of advancing it in later next_fn calls.

Fixes #6377

100/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
Lower-prioritytest: adding test for InstructionIndices::nth byte position bugby Alexey Gradoboev · 2f5e9ace · Jun 18, 2026 · 1 fileMessage 100 · StrongTriage 0Details
Commit message · Alexey Gradoboev

test: adding test for InstructionIndices::nth byte position bug

Remove the custom `nth` implementation for `InstructionIndices` because
it captures position via `next_with` and returns as byte offset instead of advancing it in later next_fn calls.

Adding test to show that nth position is not in sync with returned opcode value, no real fix in the commit

Fixes #6377

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Lower-priorityUse core::cmp in units kani verificationby Mitchell Bagot · 09897b03 · Jun 18, 2026 · 1 fileMessage 78 · AdequateTriage 8Details
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
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.