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

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

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

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

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

Update existing invalid test constraints and add an extended test suite

Fixes: #6373

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

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

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

internals: Update API files

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

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

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

Move ToU64 to bitcoin

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

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

51/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a simple internal code reorganization. It moves a small helper trait called ToU64 from one internal crate (internals) into the main bitcoin crate, and updates import statements accordingly. There is no change to what the code does, no bug fix, and no security-relevant behavior change.

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

p2p: Remove uses of ToU64

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

Remove the only use of ToU64 from p2p.

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

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

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

Fix read bug in io::decode_from_read_unbuffered_with

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

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

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

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

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

Use write! in UnknownAddressTypeError display

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

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

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

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

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

bitcoin: remove unused internals::ToU64 import

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

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

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

Automated update to rustc nightly-2026-06-12

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

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

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

primitives: drop redundant reference in format! calls

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

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

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

bitcoin: simplify logic replacing match block

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

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

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

Adjust Display string for UnprefixedHexError

The ContainsPrefix display string for UnprefixedHexError is poorly
worded.

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

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

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

Adjust docs for impl_parse_str_from_int_infallible macro

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

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

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

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

Remove redundant sentences in function docs

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

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

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

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

Adjust wording on docs to match function behaviour

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

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

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

This commit only fixes wording in code comments/documentation. It changes descriptions of three functions so the docs accurately describe what the functions do. No actual code behavior was changed, so there is no security impact.

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

Fix typos, grammar and formatting in docs

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

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

This commit only fixes typos, grammar, punctuation, and formatting in documentation comments and one code example. There are no code logic changes, no API changes, and no behavior changes. It is purely a documentation quality cleanup.

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

Move normal opcodes to primitives

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

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

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

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

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

primitives: Update API files

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

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

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

Add From<Opcode> for u8 and roundtrip test

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

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

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

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

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

Move Opcode to primitives

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

Move Opcode to primitives and re-export from bitcoin.

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

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

Lower-priorityAdd Debug derive and remove Debug, Display and serde::Serialize implsby Mitchell Bagot · 5d60f663 · Jun 15, 2026 · 2 filesMessage 85 · StrongInformational 19Details
Commit message · Mitchell Bagot

Add Debug derive and remove Debug, Display and serde::Serialize impls

Due to the orphan rules in Rust, the Debug, Display and
serde::Serialize impls cannot be provided on Opcode in bitcoin once the
type moves. Since we do not want stringify functionality in primitives,
these trait impls must be removed. Existing stringify can be worked
around using Opcode::as_str.

In order to retain assert_eq functionality, Debug must be present, so
it should be replaced by a derive which will move with the type.

Add Debug derive to Opcode.
Remove manual Debug, Display and serde::Serialize trait impls.

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

This commit is a routine code cleanup, not a security fix. It removes some text-formatting features from the Bitcoin opcode type and replaces them with a simpler automatically-generated debug format. The change is driven by Rust language rules (orphan rules) that prevent adding certain traits once a type moves to another crate. Existing string output remains available through Opcode::as_str().

Lower-priorityRemove opcode serde testsby Mitchell Bagot · 48f81582 · Jun 15, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Remove opcode serde tests

Since the serde trait has been removed from Opcode, the regression test
is no longer applicable and can be removed.

Remove serde opcode regression test.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidence
AI analysis · Informational 15/100

This commit simply deletes a test file that checked how Bitcoin script opcodes were serialized to JSON. The underlying serialization feature for opcodes had already been removed in a previous change, so this test was no longer useful. There is no code change that affects how the library behaves, and no security issue is introduced or fixed here.

Lower-priorityMove as_str outside of all moduleby Mitchell Bagot · 6636c843 · Jun 15, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Move as_str outside of all module

The as_str function on Opcode will not be able to be moved to
primitives. As such, it must be modified ahead of time such that it
can be moved to an extension trait.

Introduce pub(super) opcode_to_str in all and move pub as_str
function outside of all module.

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 reorganization. It moves the implementation of a function that returns the human-readable name of a Bitcoin script opcode from one place in the source file to another. The public behavior of the library does not change, and there is no security relevance.

Lower-priorityReplace all Opcode.code access with to_u8()by Mitchell Bagot · 6ef52fd4 · Jun 15, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Replace all Opcode.code access with to_u8()

The Opcode code field is a private field which holds the u8 value of
the opcode. Since this should not be made public, the functionality
in the OpcodeExt extension trait will need to rely instead on the
public to_u8 function.

Replace all Opcode.code access in OpcodeExt and tests with to_u8().

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 is a straightforward internal code cleanup. The change replaces direct access to a private field (`Opcode.code`) with calls to an existing public method (`to_u8()`). The behavior of the code is identical; it is purely a refactoring step to keep a field private while still allowing the same logic to work.

Lower-priorityMake primitives::opcodes pub with pub(crate) contentby Mitchell Bagot · 8063b435 · Jun 15, 2026 · 2 filesMessage 73 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Make primitives::opcodes pub with pub(crate) content

In preparation for the move of Opcode to primitives, the opcodes module
in primitives will need to be public. Since the existing content is not
supposed to be public, it should all be changed individually to
pub(crate) and gated appropriately.

Make primitives::opcode pub. Make all content of the module pub(crate)
and gate on alloc as needed.

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 refactoring in the rust-bitcoin library. It makes an internal module visible at the crate level (but not to end users) so that a future change can move a data type into it. It does not change any behavior, fix a bug, or alter security logic.

Lower-prioritySplit Opcode to OpcodeExtby Mitchell Bagot · fe6723c2 · Jun 15, 2026 · 4 filesMessage 58 · ThinInformational 18Details
Commit message · Mitchell Bagot

Split Opcode to OpcodeExt

As part of moving Opcode to primitives, we want to minimise the size
of the new API surface to that which we're sure of the correctness of.
As such, outside of the to/from u8 functionality, all other functions
should be split to an extension trait.

Add OpcodeExt and move as_str, decode_pushnum and classify to it.

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 three helper methods (classify, decode_pushnum, as_str) off the main Opcode type into a new 'extension trait' called OpcodeExt. The actual behavior of those methods is unchanged; only how callers access them is different. There is no security fix or vulnerability here.