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
141commits · 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 40 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 Abeeujah · 1fdb9c65 · Jun 30, 2026 · 2 filesMessage 28 · OpaqueInformational 15Details
Commit message · Abeeujah

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 generated API snapshot files that list what types and functions are publicly exposed by the library. The actual code did not change; only the recorded API signatures were updated to reflect new type aliases (shorter names for encoder combinations). There is no security issue here.

AI review queuedUpdate API filesby Mitchell Bagot · a074762e · Jun 30, 2026 · 1 fileMessage 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 an automatically generated API listing file. It reflects a change in how an error type is declared in the source code (from a public enum to a public struct wrapper), but the commit itself does not contain any actual code changes, logic changes, or security fixes. There is no indication this is a security patch.

AI review queuedClose FromHexErrorby Mitchell Bagot · f0e8e7bc · Jun 30, 2026 · 4 filesMessage 41 · ThinInformational 18Details
Commit message · Mitchell Bagot

Close FromHexError

The FromHexError is currently unreleased but is necessary for hex
functionality. Since it is not ready for 1.0 as an enum, it should be
enclosed in a private struct as is typical for error types from units,
primitives, etc.

Rename FromHexError enum to FromHexErrorInner and add a new
FromHexError struct to privately wrap the inner enum.

41/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context! Too few words to establish purpose
Why it was queued
signing or wallet pathparser or protocol pathsecond-pass: security-sensitive path
AI analysis · Informational 18/100

This commit is a routine API design change, not a security fix. It renames an internal error enum and wraps it in a private struct so the library can keep the error type flexible before its first stable release. No vulnerability is patched and no exploit is possible.

Lower-priorityconsensus_encoding: Adjust ConsensusHex impl in serde_as_consensusby Mitchell Bagot · aad85d1e · Jun 30, 2026 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Mitchell Bagot

consensus_encoding: Adjust ConsensusHex impl in serde_as_consensus

The ConsensusHex Display impl in serde_as_consensus currently uses the
EncoderByteIter. While this functions correctly, it is inefficient as
it repeatedly calls current_chunk internally to fetch successive chars
as well as writing to the Formatter one char at a time. Instead, the
DisplayHex trait can be used to dump entire chunks at a time.

Adjust ConsensusHex Display impl in serde_as_consensus to write using
DisplayHex rather than char-by-char with EncoderByteIter.

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

This is a routine performance refactor. It swaps a slow, character-by-character hex formatting loop for one that writes whole chunks at a time. There is no security-relevant change.

Lower-priorityAdd ExactSizeEncoder impl for Option<T: ExactSizeEncoder>by Mitchell Bagot · 574415ea · Jun 30, 2026 · 5 filesMessage 73 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Add ExactSizeEncoder impl for Option<T: ExactSizeEncoder>

Currently, there exists an Encoder impl for Option<T: Encoder>. Since
ExactSizeEncoder can be useful, there is no reason not to include an
ExactSizeEncoder impl for Option<T: ExactSizeEncoder> also.

Add ExactSizeEncoder impl for Option<T: ExactSizeEncoder>.

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

This commit adds a small, harmless feature to a Rust Bitcoin encoding library. It lets an optional encoder report its length when it has a value, and report zero length when it is empty. There is no security issue here.

Security candidateReplace uses of bitcoin::consensus with consensus_encodingby Mitchell Bagot · 22cf8fb6 · Jun 29, 2026 · 6 filesMessage 73 · AdequateLow 33Details
Commit message · Mitchell Bagot

Replace uses of bitcoin::consensus with consensus_encoding

Throughout the bitcoin code, there are various uses of the old encoding
traits used to implement functionality. With the introduction of the
new encoding and decoding implementations, all of these can be replaced
with the new implementations to remove the dependency on bitcoin.

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

This commit swaps out an older Bitcoin data-encoding system for a newer one across six files. It is a routine internal refactoring change. There is no direct evidence in the commit that it fixes a security vulnerability, but any encoding change in consensus-critical code carries a small risk that a subtle behavior difference could affect transaction or block validation. The commit message and diff do not describe any security issue or credit a researcher.

AI review queuedAdjust fuzz targets to use consensus_encodingby Mitchell Bagot · f5041528 · Jun 29, 2026 · 9 filesMessage 78 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Adjust fuzz targets to use consensus_encoding

Various fuzz targets use the old consensus code for serialisation and
deserialisation. Since we want to remove this consensus code, the fuzz
targets must be updated.

Replace all uses of old consensus code in fuzz targets with
consensus_encoding.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidencesigning or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit only updates internal fuzz-testing code to use a newer serialization API (consensus_encoding) instead of an older one being removed. It does not change the library's runtime behavior or fix any security bug.

Security candidateReplace uses of consensus in testsby Mitchell Bagot · 171f6661 · Jun 29, 2026 · 7 filesMessage 78 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Replace uses of consensus in tests

As with the uses of consensus::encode in the main code, the uses in the
tests and doctest examples can also be replaced.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
cryptography-sensitive pathsigning or wallet path
AI analysis · Informational 15/100

This commit only changes test code and documentation examples in the rust-bitcoin library. It replaces older consensus encoding/decoding helper functions with newer equivalents from a different internal module. There is no change to production code, no bug fix, and no security-relevant behavior change.

Security candidateReplace use of con_serde in sighash testby Mitchell Bagot · 09d0c9df · Jun 29, 2026 · 2 filesMessage 78 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Replace use of con_serde in sighash test

The bip_341_sighash_tests test in sighash relies on con_serde to hex
decode a transaction in the test data. Since we want to remove old
consensus logic, con_serde will not be available. As such, this test
should be modified to use consensus_encoding's decode_from_hex.

Add hex feature to consensus_encoding dependency in bitcoin.
Replace use of con_serde in bip_341_sighash_tests test with
decode_from_hex.

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

This commit is a routine internal test refactor. It swaps one test-only helper for another so that a unit test can still decode hex transaction data after an older helper is removed. There is no change to production code or to how real transactions are handled.

Lower-priorityRemove old consensus code from examplesby Mitchell Bagot · d5cbd077 · Jun 29, 2026 · 3 filesMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Remove old consensus code from examples

Various examples in bitcoin use old consensus code but should instead
make use of the modern consensus_encoding functionality. This also
provides users with a demonstration on how to use the new logic as
opposed to the old.

Replace all uses of consensus in examples with new consensus_encoding
functionality.

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

This commit only updates example code in the rust-bitcoin project. It replaces older 'consensus' encoding/decoding API calls with newer 'consensus_encoding' API calls in three example files. There is no change to the library's actual security-sensitive code, no bug fix, and no security patch.

Security candidateAdd XOnlyPublicKey::verifyby Mitchell Bagot · 8a5deee2 · Jun 29, 2026 · 1 fileMessage 73 · AdequateInformational 18Details
Commit message · Mitchell Bagot

Add XOnlyPublicKey::verify

At present, users who wish to verify a message with a Schnorr signature
need to use the secp256k1 library directly. Since Legacy/FullPublicKey
already provide verify functions for ECDSA, XOnlyPublicKey should
provide a similar function for Schnorr.

Add XOnlyPublicKey::verify to Schnorr verify messages with a
taproot::Signature.

73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarycryptography-sensitive path
AI analysis · Informational 18/100

This commit adds a new convenience method, XOnlyPublicKey::verify, that lets users verify Schnorr (taproot) signatures without calling the underlying secp256k1 library directly. It is a straightforward API addition with no obvious security bug; it simply wraps the existing, well-tested secp256k1 Schnorr verification routine.

Security candidateMove TapTweak trait to taproot-primitivesby Mitchell Bagot · 6912358e · Jun 29, 2026 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Move TapTweak trait to taproot-primitives

The TapTweak trait is necessary for WitnessProgram::p2tr and thus
Address::p2tr. With from_key_and_merkle_root moved back to
taproot-primitives, this trait can now be moved alongside it and
and later used in addresses.

Move TapTweak trait to taproot-primitives.

68/100 · AdequateMessage clarity
✓ 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 the TapTweak trait and its implementations from the main bitcoin crate into a smaller taproot-primitives crate. The actual logic for tweaking Taproot keys is copied unchanged; only its location in the codebase changes. There is no security bug being fixed or introduced.

Lower-priorityprimitives: Implement ExactSizeEncoder for WitnessEncoderby awn · 8a3c27d9 · Jun 26, 2026 · 3 filesMessage 83 · StrongInformational 18Details
Commit message · awn

primitives: Implement ExactSizeEncoder for WitnessEncoder

WitnessEncoder wraps Encoder2<CompactSizeEncoder, BytesEncoder>. Both inner
encoders implement ExactSizeEncoder, but WitnessEncoder only manually
implemented Encoder and was therefore missing an ExactSizeEncoder impl for
no reason.

The manual struct definition and Encoder impl is replaced with the
encoder_newtype_exact! macro, consistent with the other encoder newtypes in
the codebase. This adds the missing ExactSizeEncoder implementation.

Also add a test asserting that the encoder's reported length matches the
actual encoded length, including the CompactSize one-byte boundary for both
element length and element count.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 18/100

This commit adds a missing 'ExactSizeEncoder' implementation for the WitnessEncoder in the rust-bitcoin library. Previously, WitnessEncoder only implemented the basic Encoder trait, even though the underlying encoders already supported exact-size reporting. The change uses an existing macro to automatically provide the exact-size capability and adds tests to verify the reported length matches the actual encoded bytes. There is no direct security vulnerability being fixed; it is a correctness and API-completeness improvement.

AI review queuedhashes: update API filesby jrakibi · 6c0f1ea5 · Jun 26, 2026 · 3 filesMessage 28 · OpaqueInformational 15Details
Commit message · jrakibi

hashes: 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 three text files that list the public API surface of the `bitcoin_hashes` crate. It records two newly added methods (`hash` and `with_input`) on the `HashEngine` trait. There are no code changes, no bug fixes, and no security-sensitive behavior introduced by this commit itself.

Lower-priorityhashes: Add with_input method to HashEngineby jrakibi · 641d75b3 · Jun 26, 2026 · 1 fileMessage 60 · AdequateInformational 20Details
Commit message · jrakibi

hashes: Add with_input method to HashEngine

this is the same as input but takes and returns self,
which allows calls to be chained without a mutable variable.

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

This commit adds a new convenience method called with_input to the hash engine API. It is purely a quality-of-life change that lets callers chain hash-input calls together. There is no security-relevant change: the existing input method still does the actual work, and no behavior, validation, or cryptographic logic is modified.

Security candidateReplace dyn fmt::Write with fmt::Formatterby Mitchell Bagot · 22da6c4f · Jun 26, 2026 · 3 filesMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Replace dyn fmt::Write with fmt::Formatter

In Rust, the dyn keyword for a function parameter provides generic-like
functionality for a parameter. However, unlike impl or a generic, dyn
enables dynamic dispatch for the function, preventing inlining by the
compiler. Since all such uses of dyn fmt::Write are used with formatter
anyway, the dynamic dispatch cost can be eliminated by replacing the
dyn param with a fmt::Formatter type.

Replace dyn fmt::Write with fmt::Formatter in all non-deprecated
functions.

68/100 · AdequateMessage clarity
✓ 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 performance and code-quality refactor. It replaces dynamically-dispatched formatter parameters with concrete Rust formatter types so the compiler can inline the code. There is no security-relevant change: no new inputs are accepted, no validation logic changes, and no sensitive data handling is altered.

AI review queuedfuzz: rename old_bitcoin to bitcoin_0_32by Nick Johnson · e739ebb8 · Jun 25, 2026 · 10 filesMessage 55 · ThinInformational 15Details
Commit message · Nick Johnson

fuzz: rename old_bitcoin to bitcoin_0_32

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
fuzzing or regression evidencesigning or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a simple renaming of a dependency alias used only in fuzz testing code. It changes 'old_bitcoin' to 'bitcoin_0_32' throughout the fuzz test suite and generation script. There is no change to production code, no security fix, and no vulnerability introduced.

AI review queuedfuzz: migrate 0.32.x fuzz targets to masterby Nick Johnson · f01340ee · Jun 25, 2026 · 13 filesMessage 78 · AdequateInformational 15Details
Commit message · Nick Johnson

fuzz: migrate 0.32.x fuzz targets to master

Centralize all fuzz infra on the master branch, including targets from
the LTS 0.32.x branch. This should make the infra and targets easier to
maintain, and they will probably be run more often in practice here.

The 0.32.x targets were migrated from hongfuzz to master's libfuzzer.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidencesigning or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit only adds and reorganizes fuzz testing code. It brings older 0.32.x fuzz targets onto the master branch and switches them from hongfuzz to libfuzzer. There are no changes to production library code, so ordinary users of the crate are not affected and no new security vulnerability is introduced.

AI review queuedconsensus_encoding: always enable alloc for serdeby Nick Johnson · d6730d68 · Jun 24, 2026 · 3 filesMessage 68 · AdequateInformational 15Details
Commit message · Nick Johnson

consensus_encoding: always enable alloc for serde

Since there is no "collect_bytes" exposed in serde, an allocation is
unavoidable for non-human-readable serialization. Make the alloc
dependency explicit in the feature declaration.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 15/100

This is a small build-configuration cleanup, not a security fix. The change makes the 'alloc' feature automatically enabled whenever the 'serde' feature is enabled, because serializing to non-human-readable formats requires allocating memory. It also removes an unnecessary 'hex' feature gate from the serde module. There is no vulnerability here.

Lower-priorityAdd recent 0.32.x releases to relevant changelogsby Nick Johnson · 0c39a2bd · Jun 24, 2026 · 5 filesMessage 60 · AdequateInformational 15Details
Commit message · Nick Johnson

Add recent 0.32.x releases to relevant changelogs

The `[YANKED]` tag is following the keep-a-changelog convention.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only edits changelog Markdown files. It documents that several prior releases were yanked from crates.io because their required Rust version was raised too aggressively, and it adds notes about newer replacement releases. There are no code changes, no bug fixes, and no security patches in the diff.

Lower-priorityhashes: fix tag name in sha256t_tag macro docsby jrakibi · bb887edb · Jun 24, 2026 · 1 fileMessage 76 · AdequateInformational 15Details
Commit message · jrakibi

hashes: fix tag name in sha256t_tag macro docs

The sha256t_tag! macro referred to `$hash_name`, which does not exist, so every
generated tag showed "The tag used for [`$hash_name`]" in its docs.

eg: https://docs.rs/bitcoin-taproot-primitives/0.1.0/bitcoin_taproot_primitives/

76/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 15/100

This is a one-word documentation fix in a Rust macro. The generated documentation for a cryptographic tag structure was accidentally referring to a non-existent variable name, so it displayed broken placeholder text like '[`$hash_name`]' instead of the actual tag name. The change makes the docs show the correct tag name. There is no code behavior change and no security impact.

Security candidateAdd tests to verify 0 return for overflowby Mitchell Bagot · 4ee43312 · Jun 24, 2026 · 1 fileMessage 83 · StrongInformational 12Details
Commit message · Mitchell Bagot

Add tests to verify 0 return for overflow

Following the previous change to Target::from_compact, the tests should
be updated to confirm the 0 for overflow, and also to check the
boundary values for the overflow.

Add and adjust pow unit tests to check the overflow logic if
Target::from_compact.

83/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
memory safety
AI analysis · Informational 12/100

This commit only adds new unit tests to verify that a previously changed function, Target::from_compact, returns zero when a Bitcoin 'compact' difficulty value overflows a 256-bit target. It does not change any production code. The tests confirm the overflow behavior and check values right at the overflow boundary.

Security candidateReturn 0 on Target::from_compact overflowby Mitchell Bagot · 1fb9a651 · Jun 24, 2026 · 1 fileMessage 73 · AdequateModerate 59Details
Commit message · Mitchell Bagot

Return 0 on Target::from_compact overflow

Currently, the Target::from_compact function treats a negative mantissa
as a failure mode and returns a Target value of zero. This lines up
with Core's SetCompact, which sets a pfNegative flag in the same case.
In Core, a pfOverflow flag is similarly set in overflow cases, and in
every case where a negative flag is treated as a failure, the overflow
is too. As such, our implementation should also return Target::ZERO in
the overflow case as it does for the negative case.

Return Target::ZERO for mantissa/exponent values which overflow in
Target::from_compact.

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 · Moderate 59/100

This commit fixes a bug in how rust-bitcoin converts Bitcoin 'compact' difficulty targets into full numeric Target values. Previously, if the compact value encoded a number too large to fit in a valid Target, the code would silently produce a truncated/wrapped result instead of treating it as invalid. The fix makes overflow behave like an invalid negative mantissa: return zero. This aligns the library with Bitcoin Core's consensus behavior, reducing the risk of consensus divergence or incorrect difficulty calculations.

Lower-priorityhashes: add one-shot hash method to HashEngineby jrakibi · aa2050a2 · Jun 24, 2026 · 1 fileMessage 68 · AdequateInformational 16Details
Commit message · jrakibi

hashes: add one-shot hash method to HashEngine

There is currently no generic way to compute a hash.
The hash() methods we have now live on the hash types, not on any trait.
This adds a one-shot hash() method to HashEngine.

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

This commit adds a small convenience method that lets any hash type compute a hash from a chunk of data in a single call. It is a pure API addition with no changes to existing behavior, no bug fixes, and no security-related content.

Security candidateClear pushnum cache on signature operations in sigop countby Abeeujah · 7c8db561 · Jun 23, 2026 · 2 filesMessage 78 · AdequateModerate 60Details
Commit message · Abeeujah

Clear pushnum cache on signature operations in sigop count

The `pushnum_cache` was not cleared when encountering a non-push
signature opcode like `OP_CHECKSIG`. This allowed stale push numbers
to leak into subsequent multisig operations if they weren't directly
preceded by a small int push.

Fix this by resetting the cache on signature opcodes, aligning the
sigop calculation with Bitcoin Core consensus logic.

78/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Moderate 60/100

This commit fixes a bug in how the library counts 'signature operations' (sigops) in Bitcoin scripts. A small cache that remembers recently pushed numbers was not being cleared after signature-checking opcodes. This could cause a later multi-signature operation to incorrectly reuse a stale number, making the sigop count too low or too high in edge cases. The fix resets the cache whenever a signature opcode is seen, matching Bitcoin Core's consensus behavior.