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

Security candidateReplace impl_to_hex_from_lower_hex with deprecated inherent to_hexby Mitchell Bagot · a88ecdfa · Jun 23, 2026 · 6 filesMessage 73 · AdequateInformational 18Details
Commit message · Mitchell Bagot

Replace impl_to_hex_from_lower_hex with deprecated inherent to_hex

The impl_to_hex_from_lower_hex macro from internals implements a to_hex
function for a type by calling through to an existing LowerHex impl.
This has been something that we've wanted to remove for a while, so
a first step involves deprecating the macro and removing all uses.

Replace impl_to_hex_from_lower_hex with deprecated inherent to_hex on
all types.

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

This is a routine code cleanup change. It replaces an internal helper macro that generated `to_hex` methods with manually-written, equivalent `to_hex` methods that are marked as deprecated. The public API behavior stays the same; callers will just receive a deprecation warning encouraging them to use Rust's standard `format!("{var:x}")` instead. There is no security fix or vulnerability here.

Security candidateMove impl_array_newtype to include/array_newtype.rsby Mitchell Bagot · 177d87b8 · Jun 23, 2026 · 9 filesMessage 73 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Move impl_array_newtype to include/array_newtype.rs

The array_newtype.rs include file has been used for bitcoin's
previously internal macro impl_array_newtype_stringify. Since the name
lends itself to dual usage with the impl_array_newtype macro, and the
two may be used together, the macro can be copied from internals to
this include file.

Move impl_array_newtype macro to include/array_newtype.rs. Deprecate in
internals and replace uses with include! copy.

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

This commit is a routine code reorganization. It moves a Rust macro called impl_array_newtype from one internal location to a shared include file and updates call sites to use the new location. No behavior changes, bug fixes, or security fixes are visible in the diff.

Lower-prioritySeal the Tag traitby Mitchell Bagot · 81f65b30 · Jun 22, 2026 · 3 filesMessage 51 · ThinInformational 18Details
Commit message · Mitchell Bagot

Seal the Tag trait

The Tag trait used for script/key tags in primitives claims to be a
sealed trait. Sealing prevents outside users from adding new types
which satisfy the trait, but the Tag trait has no such sealing.

Add sealed::Sealed module + trait and seal Tag trait on Sealed trait.

51/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context
AI analysis · Informational 18/100

This commit fixes a design bug in a Rust Bitcoin library. The library claimed a certain internal trait called Tag was 'sealed' (meaning only the library authors could add new types that satisfy it), but it actually was not sealed. The commit properly seals it so outside users cannot create new Tag types. This is a defensive API-correctness change, not a fix for an active security vulnerability. It prevents future misuse rather than closing an exploitable hole.

AI review queuedprimitive: Fix typos, grammar and formatting in docsby Mitchell Bagot · 8c1f7a61 · Jun 22, 2026 · 10 filesMessage 65 · AdequateInformational 15Details
Commit message · Mitchell Bagot

primitive: 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.

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

This commit only fixes typos, grammar mistakes, and formatting in documentation comments. No code behavior changes. There is no security issue.

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 · AdequateInformational 15Details
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 analysis · Informational 15/100

This commit only fixes spelling mistakes in code comments and documentation (changing 'occuring' to 'occurring' and adding a missing 'when'). No program logic, behavior, or security properties are changed.

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.