RB
← All projectsRust Bitcoin

rust-bitcoin

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

BitcoinCryptographic librariesNormal
Repository coverage

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

524security candidates506second-pass queue2193AI analyses
140commits · 30 days
284commits · 60 days
1150commits · 180 days
2046commits · 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
489Strong · 80–100
1083Adequate · 60–79
566Thin · 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 Poelstra21072145089
Tobin C. Harding41566410063
jrakibi944994068
Nick Johnson19121190060
Jamil Lambert, PhD11919116061
satsfy (Renato Britto)381527066
Fmt Bot331431045
Trevor Arjeski111111069
Shing Him Ng31731056
Ismail Daif22622050
Martin Habovstiak28527069
Analysis record

Published AI watches

Last scanned 56 minutes ago

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

Merge rust-bitcoin/rust-bitcoin#6809: addresses: Add `AddressParams` type and remove most uses of network types

This is a routine API refactoring in the rust-bitcoin library. It introduces a new AddressParams type and replaces most public uses of the older Network/NetworkKind types when creating or validating Bitcoin addresses. There is no security …

No memory-safety issues, cryptographic errors, or input-validation changes observedNo new unsafe blocks, no new dependencies, no new parsing of untrusted dataAPI surface change only: parameter types replaced with semantically equivalent AddressParams
81032b1aby Andrew Poelstra+208−16414 files
No security note in commit
Low 38 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6886: units: preserve original err summing `NumOpResult`

This patch fixes a bug in how rust-bitcoin adds up a list of numeric operation results. Previously, if any item in the list already carried an error (for example, dividing by zero), the summing code would overwrite that error and falsely r…

Error-type confusion / misattribution in arithmetic result aggregationLoss of original failure context across iterator foldPotential for downstream logic to act on wrong `MathOp`/`MathErrorKind`
4af1ee1dby Andrew Poelstra+23−191 file
No security note in commit
Informational 15 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6618: ci: disable fail-fast in weekly rustc update crons

This commit changes two GitHub Actions workflow files used for weekly automated Rust toolchain updates. It adds `fail-fast: false` so that if one branch's update job fails, the other branch jobs continue running instead of all being cancel…

c0a70548by Andrew Poelstra+2−02 files
No security note in commit
Moderate 62 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6884: units: Fix div_by_fee_rate_floor precision

This commit fixes a precision bug in a Rust Bitcoin library function that calculates how much transaction weight a given amount of money can afford at a given fee rate. The old code rounded the fee rate up to a coarser unit (satoshis per k…

Incorrect fee-rate-to-weight conversion leading to understated affordable weightInteger rounding direction (ceil) used as divisor in floor division causing off-by-one or larger precision lossAddition of overflow handling for Weight::MAX
9caad2c1by Andrew Poelstra+23−52 files
Vendor flagged security relevance
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 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 · StrongInformational 15Details
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
AI analysis · Informational 15/100

This commit only adds and moves automated tests for Bitcoin script building code. It does not change any production logic, fix bugs, or alter behavior. There is no security issue here.

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-priorityChange match to *self in Display and Errorby Mitchell Bagot · 81ff9eb0 · Jun 19, 2026 · 1 fileMessage 60 · AdequateInformational 15Details
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 analysis · Informational 15/100

This is a tiny code-style cleanup in error message formatting code. It changes how a Rust error type inspects its own contents when producing text or finding the underlying cause. There is no security-relevant change: the behavior is functionally identical before and after.

Lower-priorityRemove From impls on FromStrErrorby Mitchell Bagot · a7e974e9 · Jun 19, 2026 · 1 fileMessage 68 · AdequateInformational 19Details
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
AI analysis · Informational 19/100

This commit is a routine API cleanup, not a security fix. It removes two automatic error-conversion shortcuts (From impls) from a Bitcoin library's witness-version parsing error type and replaces them with explicit error mapping. The behavior of parsing errors remains the same.

Lower-priorityAdd tests for WitnessVersion and Opcodeby Mitchell Bagot · b1c6b5bb · Jun 19, 2026 · 2 filesMessage 78 · AdequateInformational 15Details
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
AI analysis · Informational 15/100

This commit only adds unit tests for existing WitnessVersion and Opcode logic. It does not change any production behavior except making one internal opcode constant available during test builds. There is no security issue here.

Lower-priorityFix lint errors in primitivesby Mitchell Bagot · 78550d5f · Jun 19, 2026 · 2 filesMessage 60 · AdequateInformational 15Details
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
AI analysis · Informational 15/100

This commit fixes compiler lint warnings in the rust-bitcoin library's script-building code. It adds #[must_use] annotations to builder methods and changes a numeric literal format for readability. There is no security-relevant behavior change.

Lower-priorityMove Builder to primitivesby Mitchell Bagot · 1d65a54c · Jun 19, 2026 · 3 filesMessage 58 · ThinInformational 15Details
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
AI analysis · Informational 15/100

This commit is a routine code reorganization. It moves the `Builder` type (used to construct Bitcoin scripts step by step) from the main `bitcoin` crate into the lower-level `primitives` crate, then re-exports it so existing users can still use it the same way. No behavior changes are visible in the diff.

Lower-priorityMove WitnessVersion to primitivesby Mitchell Bagot · 8175f7e1 · Jun 19, 2026 · 4 filesMessage 58 · ThinInformational 15Details
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
AI analysis · Informational 15/100

This commit is a routine internal code reorganization. It moves the `WitnessVersion` type and its related error types from the main `bitcoin` crate into a lower-level `primitives` crate, then re-exports them so existing users still see the same public API. There is no functional change, no bug fix, and no security relevance.

Lower-priorityMove ScriptBuf extension trait functions to primitivesby Mitchell Bagot · 6f89a820 · Jun 19, 2026 · 2 filesMessage 73 · AdequateInformational 15Details
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
AI analysis · Informational 15/100

This commit is a routine internal code reorganization. It moves some helper methods for building Bitcoin scripts from one internal module to another, without changing what the code actually does. There is no security-relevant change visible in the diff.

Lower-priorityRemove access to private fields of Builderby Mitchell Bagot · 9a644e42 · Jun 19, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
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
AI analysis · Informational 15/100

This commit is a routine internal code cleanup in the rust-bitcoin library. It changes how the Script Builder accesses its own data so that future code reorganization is easier. There is no indication this fixes a security bug or changes behavior visible to users.

Lower-priorityMove push_int_non_minimal to BuilderExtPrivby Mitchell Bagot · ddd1de3a · Jun 19, 2026 · 3 filesMessage 58 · ThinInformational 15Details
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
AI analysis · Informational 15/100

This commit is a routine internal code reorganization. It moves a helper function for building Bitcoin scripts from a public-ish location on the Builder type into a private extension trait only visible inside one module. There is no security bug being fixed here; the change is about keeping an internal implementation detail from accidentally becoming part of the public API.

Lower-prioritySplit Builder into BuilderExtby Mitchell Bagot · a5db61b9 · Jun 19, 2026 · 6 filesMessage 58 · ThinInformational 18Details
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
AI analysis · Informational 18/100

This commit is a routine internal code reorganization. It moves several helper methods off the `Builder` type into a new `BuilderExt` extension trait so that the core `Builder` can be kept clean and moved to a more basic crate. There is no bug fix, behavior change, or security patch here.

Lower-priorityRemove the second field of Builderby Mitchell Bagot · 6e1e545e · Jun 19, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
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
AI analysis · Informational 15/100

This commit is a straightforward internal code cleanup in the Rust Bitcoin library. It removes a redundant field from the script Builder struct and replaces it with an equivalent method call. There is no security-relevant change visible in the diff.

Lower-priorityfee_rate: add test for mul_by_weight roundingby Muhammad · 517705a0 · Jun 18, 2026 · 1 fileMessage 55 · ThinInformational 12Details
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
AI analysis · Informational 12/100

This commit only adds a new unit test that checks how a fee rate multiplied by a transaction weight rounds up. It does not change any production code, so it cannot introduce or fix a security vulnerability by itself. It may be related to a prior bug fix, but the commit alone is just a test.

Lower-priorityfee_rate: fix mul_by_weight to use ceil not floorby Muhammad · 8c7584ca · Jun 18, 2026 · 1 fileMessage 45 · ThinModerate 51Details
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
AI analysis · Moderate 51/100

This commit fixes a rounding bug in a Bitcoin fee calculation. The code previously rounded the fee rate down to the nearest whole number before multiplying by transaction weight, which could cause the calculated fee to be slightly too low. After the fix, it rounds up, ensuring the fee is always sufficient. A too-low fee could cause a transaction to be rejected by the Bitcoin network or get stuck unconfirmed.

Lower-priorityfix: InstructionIndices::nth byte position bugby Alexey Gradoboev · e4c49d41 · Jun 18, 2026 · 1 fileMessage 100 · StrongLow 35Details
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
AI analysis · Low 35/100

This commit fixes a bug in a Rust Bitcoin library iterator that reports byte positions of script instructions. The custom `nth` method incorrectly returned the byte offset of the found instruction without updating the iterator's internal position, so later calls to advance the iterator would report wrong positions. Removing the custom `nth` lets the normal iterator machinery keep positions correct. The practical security impact is limited because it is a correctness bug in reporting indices, not a direct memory-safety or cryptographic flaw, but code relying on these indices could make wrong decisions.

Lower-prioritytest: adding test for InstructionIndices::nth byte position bugby Alexey Gradoboev · 2f5e9ace · Jun 18, 2026 · 1 fileMessage 100 · StrongLow 35Details
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
AI analysis · Low 35/100

This commit only adds a new test to the rust-bitcoin library. The test demonstrates that a method called `InstructionIndices::nth` can report incorrect byte positions when used in certain ways. The commit message explicitly says there is 'no real fix in the commit' and that the custom `nth` implementation should be removed because it returns a byte offset without properly advancing the iterator. So this is a test that exposes a bug, not a patch that fixes it.

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.