RB
← All projectsRust Bitcoin

rust-bitcoin

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

BitcoinCryptographic librariesNormal
Repository coverage

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

532security candidates511second-pass queue2206AI analyses
130commits · 30 days
248commits · 60 days
1102commits · 180 days
2008commits · 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
510Strong · 80–100
1085Adequate · 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.
Andrew Poelstra23179157290
Mitchell Bagot649193645068
Tobin C. Harding41566410063
jrakibi944994068
Nick Johnson19121190060
Jamil Lambert, PhD11919116061
satsfy (Renato Britto)381527066
Fmt Bot331431045
Trevor Arjeski111111069
Shing Him Ng31731056
Martin Habovstiak30628068
Ismail Daif22622050
Analysis record

Published AI watches

Last scanned 51 minutes ago

Moderate 62 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6954: units: serialize unsigned amounts as u64

This commit fixes a mismatch in how unsigned Bitcoin amounts were serialized versus deserialized when using certain compact binary formats. Previously, an unsigned amount (like 100 satoshis) was written as a signed number, which caused for…

Data integrity bug: serialized values decode to different numeric values in varint binary formatsRange-check failure: Amount::MAX and large values near the cap fail deserialization after round-tripSerde serialize/deserialize hint mismatch for unsigned amount types
295c9d8aby Andrew Poelstra+66−112 files
No security note in commit
Low 25 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6955: key_expression: preserve master-key invariants in Xpub Arbitrary

This change fixes a bug in test-only code that generates random fake Bitcoin extended public keys (xpubs). Previously, when generating a master xpub (depth 0), the code could pick random values for the parent fingerprint and child number, …

BIP32 master-key invariant violation in generated test dataEncode/decode round-trip failure for generated master xpubsFix aligns Xpub::arbitrary with existing Xpriv::arbitrary behavior
4116ecc6by Andrew Poelstra+35−31 file
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6947: build(deps): bump cargo-bins/cargo-binstall from 1.21.0 to 1.21.1

This commit updates the version of a helper tool (cargo-binstall) used only inside GitHub Actions automation. It is a routine dependency bump by Dependabot and does not change any code that ships to users. There is no indication of a secur…

c1be49cbby Andrew Poelstra+2−22 files
No security note in commit
High 70 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6919: Sanitize serde size hints before allocating

This commit fixes a denial-of-service weakness in how the library deserializes lists of Bitcoin data (witnesses, amounts, fee rates) from untrusted input. Before the fix, a few bytes of attacker-controlled data could claim a list would con…

Untrusted serde size hint fed directly into Vec::with_capacityPotential memory exhaustion / OOM kill from small malicious inputDenial-of-service vector in deserialization paths
55ddbc0cby Andrew Poelstra+88−105 files
Vendor flagged security relevance
Moderate 60 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6945: bitcoin: handle OP_CODESEPARATOR in legacy

This commit fixes how the Rust Bitcoin library calculates old-style (legacy) transaction signatures when the spending script contains a special opcode called OP_CODESEPARATOR. Previously the library did not handle this opcode at all, which…

Protocol correctness fix for legacy sighash serializationOP_CODESEPARATOR handling added to match Bitcoin Core consensus behaviorPreviously omitted test vectors restored, indicating prior non-compliance
5b815281by Andrew Poelstra+600−3093 files
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6948: build(deps): bump taiki-e/install-action from 2.83.2 to 2.85.4

This is a routine update by Dependabot to the version of a third-party GitHub Action used in the project's automated testing workflows. The change only affects internal continuous integration (CI) scripts, not the actual Bitcoin library co…

d1431904by Andrew Poelstra+2−22 files
No security note in commit
Low 33 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6946: Fix integer overflow in `get_array`

This commit fixes a small but real bug in a Rust helper that reads fixed-size chunks from a data slice. The helper was supposed to safely return 'nothing' when asked to read past the end of the data, but it accidentally added two numbers t…

Integer overflow in bounds-checking helperContract violation: method documented to return None on out-of-bounds access could panic insteadDebug-build panic (denial of service) possible
c6e80843by Andrew Poelstra+2−11 file
Vendor flagged security relevance
Moderate 62 AI analysisMessage 73 · Adequate
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Fix integer overflow in `get_array`

This commit fixes a bug in a Rust helper method called `get_array`, which is meant to safely read a fixed-size chunk from a slice and return nothing if the requested range is out of bounds. The bug was that the code added the caller's offs…

Integer overflow in bounds calculationPotential panic due to violated internal length expectationCaller-controlled arithmetic used for memory access bounds
56fb1287by Martin Habovstiak+2−11 file
Vendor flagged security relevance
High 71 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#6915: primitives: Fix `Witness` handling of oversized items

This commit fixes a bug in how the Rust Bitcoin library counts and compares transaction witness data when a witness contains an oversized item. Previously, several functions relied on an iterator that silently skips oversized items, causin…

Inconsistent serialization/iterator behavior for oversized witness itemswtxid collision risk between transactions differing only in oversized witness bytesIncorrect witness equality for oversized single-item stacks
e1ed5884by Andrew Poelstra+106−273 files
Vendor flagged security relevance
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
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 header hex test case commentsby Mitchell Bagot · 65fb7690 · Jan 6, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Fix header hex test case comments

The comments say 'transaction', when the test case only relates to
functionality on the Header type.

Replace 'transaction' with 'header' in header hex round trip test
comments.

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 fixes three incorrect comments in a test function. The comments mistakenly referred to 'transaction' when the test actually exercises the block Header type. No code behavior changes.

Lower-priorityRemove HeaderIter wrapper typeby Mitchell Bagot · 76259478 · Jan 6, 2026 · 1 fileMessage 58 · ThinInformational 15Details
Commit message · Mitchell Bagot

Remove HeaderIter wrapper type

After introducing the ExactSizeEncoder trait, EncodableByteIter now
provides a len() implementation for use with fmt_hex_exact on the
HeaderEncoder.

Remove HeaderIter wrapper type and directly pass the header encoder
in an EncodableByteIter to fmt_hex_exact.

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

This is a small internal code cleanup in the rust-bitcoin library. It removes a hand-written wrapper type called HeaderIter and instead uses a newer built-in trait (ExactSizeEncoder) to achieve the same result. There is no user-visible behavior change and no security relevance.

Security candidateAdd ExactSizeEncoder for known-length Encodersby Mitchell Bagot · 96b8902e · Jan 6, 2026 · 25 filesMessage 68 · AdequateInformational 15Details
Commit message · Mitchell Bagot

Add ExactSizeEncoder for known-length Encoders

Current encoders have no way to distinguish between fixed and variable
sized encoders. Having a way to get the size of fixed-size encoders
in constant time allows for a trivial implementation of
ExactSizeIterator for EncodableByteIter.

Add ExactSizeEncoder trait, implement it on the consensus_encoding
encoders where applicable. Add encoder_newtype_exact macro for
newtype encoders that wrap ExactSizeEncoders and convert most
existing encoder_newtype calls to encoder_newtype_exact.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
constant-time or timing behaviorsigning or wallet path
AI analysis · Informational 15/100

This commit is a routine feature addition to the Rust Bitcoin library. It introduces a new ExactSizeEncoder trait that lets callers ask fixed-size encoders how many bytes they will produce, and adds an ExactSizeIterator implementation for the byte iterator. There is no security fix or vulnerability here; it is purely an API enhancement with tests.

Security candidateprimitives: reject transaction with duplicate inputsby jrakibi · af7a11b9 · Jan 6, 2026 · 1 fileMessage 91 · StrongModerate 60Details
Commit message · jrakibi

primitives: reject transaction with duplicate inputs

As part of adding validation rules to transactions, this check rejects
transactions with duplicate inputs during the decoding stage

Also updated a test case in the encode/decode roundtrip, the test was
using duplicated inputs which causes it to fail with the current
implementation.

Addresses part of https://github.com/rust-bitcoin/rust-bitcoin/issues/5383

Related: CVE-2018-17144

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
explicit security languagesigning or wallet path
AI analysis · Moderate 60/100

This commit adds a safety check in the rust-bitcoin library so that when a Bitcoin transaction is being decoded, it is rejected if it tries to spend the same coin twice within the same transaction. This prevents a known bug class (CVE-2018-17144) where duplicate inputs could cause nodes to crash or accept invalid transactions. The change also updates existing tests that accidentally used duplicate inputs.

Security candidateAdd #[track_caller] to sha256::Midstate::new()by Peter Todd · 802afa6d · Jan 6, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Peter Todd

Add #[track_caller] to sha256::Midstate::new()

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
cryptography-sensitive path
AI analysis · Informational 15/100

This commit adds a Rust compiler annotation called #[track_caller] to a single function. It does not change what the program does, how it validates inputs, or how it handles errors. It only improves the quality of panic messages so that if the function panics, the reported error location points to the caller's code rather than inside this library function. There is no security fix here.

AI review queuedRun the formatterby Jamil Lambert, PhD · d4e6ea90 · Jan 5, 2026 · 9 filesMessage 28 · OpaqueInformational 15Details
Commit message · Jamil Lambert, PhD

Run the formatter

28/100 · OpaqueMessage clarity
✓ Subject identifies a change! No meaningful explanatory body
Why it was queued
signing or wallet pathparser or protocol pathsecond-pass: opaque commit messagesecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is purely a code-formatting run. It rewraps long lines, reorders imports, removes blank lines, and adjusts whitespace to match the project's style rules. No logic, behavior, or security checks were changed.

Lower-priorityShorten comment to fix lintby Jamil Lambert, PhD · 020d5be4 · Jan 5, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Jamil Lambert, PhD

Shorten comment to fix lint

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

This commit only shortens a code comment to satisfy a Rust lint rule. No program logic, behavior, or security properties were changed.

Security candidatepsbt: Fix tapscript witness signature orderingby nervana21 · 343a3a63 · Jan 5, 2026 · 2 filesMessage 100 · StrongLow 45Details
Commit message · nervana21

psbt: Fix tapscript witness signature ordering

BIP-0342 requires that when executing a spend of a P2TR output using the
script path, the witness signatures are ordered in reverse of the order
in which their corresponding public keys appear in the script. For
example, a script with `pubkey_1` CHECKSIG `pubkey_2` CHECKSIGADD ...
`pubkey_n` CHECKSIGADD must have witness signatures ordered as `w_n`,
..., `w_2`, `w_1`, where `w_i` corresponds to `pubkey_i`. This is
necessary because of the LIFO nature of stack execution.

Previously, the example and test code pushed witness signatures onto
the witness stack in sorted key order (from `BTreeMap` iteration), which
may not have matched the order required by the specification. This
commit fixes the logic in the example and test code to match the
specification.

Reference:
- BIP-0342: https://github.com/bitcoin/bips/blob/master/bip-0342.mediawiki

100/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 45/100

This commit fixes example code and a test helper that builds Bitcoin Taproot script-path witness data. The old code placed digital signatures in the wrong order on the transaction witness stack, following the order of an internal sorted map instead of the reverse order required by the Bitcoin Taproot specification (BIP-0342). A transaction finalized with the old ordering would be rejected by the Bitcoin network, so no funds could be stolen, but users copying the example could produce invalid transactions. The fix reads public keys from the script in their actual script order, then pushes the matching signatures in reverse.

Lower-priorityp2p: Implement `encoding` traits for `FilterAdd`by rustaceanrob · aceb40fe · Jan 4, 2026 · 1 fileMessage 60 · AdequateInformational 17Details
Commit message · rustaceanrob

p2p: Implement `encoding` traits for `FilterAdd`

Trying my hand at a pure byte vector decoder.

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

This commit adds new serialization/deserialization code for the Bitcoin P2P 'filteradd' bloom-filter message in the rust-bitcoin library. It is a routine feature implementation with no visible security bug, no fix of a vulnerability, and no disclosed security relevance.

Lower-priorityp2p: Remove BIP-152 indirectionby rustaceanrob · 5755c0e5 · Jan 3, 2026 · 2 filesMessage 80 · StrongInformational 19Details
Commit message · rustaceanrob

p2p: Remove BIP-152 indirection

The types of the `bip152` module already express what these messages are
conveying, and the enumeration name matches the command string.
Especially because we will have to maintain `encoding` traits for any
type in `NetworkMessage`, I think this indirection should be removed and
the `bip152` types should be passed through.

80/100 · StrongMessage clarity
✓ 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 straightforward internal code cleanup in the Bitcoin peer-to-peer message handling code. It removes three thin wrapper types (CmpctBlock, GetBlockTxn, BlockTxn) and uses the underlying BIP-152 types directly in the main NetworkMessage enum. There is no functional change to how messages are parsed, serialized, or validated, and no security fix or vulnerability is present in the diff.

Lower-priorityAdd hex codec traits for Headerby Mitchell Bagot · 17531ce2 · Jan 2, 2026 · 3 filesMessage 68 · AdequateInformational 16Details
Commit message · Mitchell Bagot

Add hex codec traits for Header

Currently, the Header type can be easily encoded into bytes using
consensus_encoding, but there exists no way to encode it to hex without
using the bitcoin crate's serialize_hex or a manual implementation.
Neither such solution is elegant or discoverable.
In implementing traits to hex, FromStr should also be introduced to
decode from a hex string.

Implement FromStr, LowerHex, UpperHex and DisplayHex for Header.

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

This commit adds convenience features to the Rust Bitcoin library so that a Bitcoin block header can be converted to and from a hexadecimal string. It does not fix a bug, change security behavior, or introduce a vulnerability. It is a normal feature addition.

AI review queuedAdd hex codec traits for Transactionby Mitchell Bagot · 7c2ddb17 · Jan 2, 2026 · 4 filesMessage 68 · AdequateInformational 18Details
Commit message · Mitchell Bagot

Add hex codec traits for Transaction

Currently, the Transaction type can be easily encoded into bytes using
consensus_encoding, but there exists no way to encode it to hex without
using the bitcoin crate's serialize_hex or a manual implementation.
Neither such solution is elegant or discoverable.
In implementing traits to hex, FromStr should also be introduced to
decode from a hex string.

Implement FromStr, Display, LowerHex, UpperHex and DisplayHex for
Transactions.

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 18/100

This commit adds convenience features to the rust-bitcoin library so that Bitcoin transactions can be easily converted to and from hexadecimal strings. It does not fix a bug, change security behavior, or introduce any obvious vulnerability. It is a routine API enhancement.

Security candidateAdd PRNG to `MerkleBlock` testsby rustaceanrob · 44ad0ec5 · Jan 2, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · rustaceanrob

Add PRNG to `MerkleBlock` tests

This is a PRNG that can replace the dependency on `rand` in
this unit test. Even if this test failed in CI, I'm not sure how we
would actually reproduce it. The current state of the test seems more
apt for a fuzzing target where there is tooling to log and reproduce
failing cases. This would allow for determinism in the test and could be
used as a sanity check when making changes to `MerkleBlock`

Co-authored-by: apoelstra <apoelstra@wpsoftware.net>

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
entropy or randomnessfuzzing or regression evidence
AI analysis · Informational 15/100

This commit only changes test code. It replaces the use of an external random number generator (from the `rand` crate) with a small, deterministic pseudo-random number generator inside the `MerkleBlock` unit tests. The goal is to make the tests reproducible and remove a test-only dependency on the `rand` feature. There is no change to production code and no security vulnerability is introduced or fixed.

Lower-priorityunits: Extend test coverage for relative locktimeby Mitchell Bagot · 0c32a00c · Jan 2, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Mitchell Bagot

units: Extend test coverage for relative locktime

Extend test cases for is_satisfied_by_time, is_satisfied_by_height
on LockTime, as well as the underlying is_satisfied_by on NumberOf*
types.

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 and updates unit tests for relative locktime logic in the rust-bitcoin library. It does not change any production code, so it cannot introduce a security vulnerability or fix one directly.

Lower-priorityunits: Extend test coverage for parse_int moduleby Mitchell Bagot · cd6d24cd · Jan 2, 2026 · 3 filesMessage 78 · AdequateInformational 15Details
Commit message · Mitchell Bagot

units: Extend test coverage for parse_int module

The parse_int module has some uncovered edge cases, including in the
macro invocations.

Extend tests in parse_int module and add tests to Weight and Height to
cover macro functionality in parse_int module.

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 new test cases to the rust-bitcoin library. It does not change any production code, fix bugs, or alter behavior. The tests cover edge cases for parsing numbers from strings, including uppercase hex prefixes and overflow cases. There is no security issue here.

Lower-priorityunits: Extend test coverage for weight moduleby Mitchell Bagot · f2f5d4e9 · Jan 2, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Mitchell Bagot

units: Extend test coverage for weight module

The weight module currently has no coverage for the Sum trait
implementation.

Introduce tests for Sum over Weight and &Weight iterators.

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 new unit tests for the Sum trait on a Weight type. It does not change any production code, fix a bug, or alter behavior. There is no security relevance.

AI review queuedprimitives: reject transactions with invalid coinbase scriptSig lengthby jrakibi · c621401a · Jan 1, 2026 · 2 filesMessage 65 · AdequateModerate 52Details
Commit message · jrakibi

primitives: reject transactions with invalid coinbase scriptSig length

Coinbase input scriptSig must be between 2 and 100 bytes in length.
Add this validation rule to transaction decoder

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

This commit adds a missing validation rule to the library's Bitcoin transaction decoder: a coinbase transaction (the special first transaction in a block that creates new coins) must have an input script between 2 and 100 bytes long. Before this change, the library would accept shorter or longer coinbase scripts, which violates Bitcoin consensus rules and could let malformed transactions slip through. The fix rejects them with clear errors and includes tests for the boundary cases.

Security candidatedocs: clarify BIP34 rules and fix related testby jrakibi · c0172cfb · Jan 1, 2026 · 2 filesMessage 100 · StrongInformational 12Details
Commit message · jrakibi

docs: clarify BIP34 rules and fix related test

According to BIP34, the coinbase scriptSig must start with a push of
the block height, which already supersedes the lower bound of 2 bytes.

We keep EMPTY_COINBASE producing a 0-byte scriptSig for backward
compatibility with PSBT. Add a comment explaining this behavior.

Also update a test failing due to the new validation rule

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✓ Mentions testing or verification
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 12/100

This commit is a documentation and test fix, not a security patch. It adds a comment explaining that an 'empty coinbase' helper produces a 0-byte scriptSig that is technically invalid under Bitcoin consensus rules (which require 2-100 bytes), but is kept for backward compatibility in PSBT workflows where the scriptSig is filled in later. It also re-enables and updates a previously ignored unit test to use a valid 2-byte coinbase scriptSig.

Lower-prioritybenches: Add block decode and validate benchmarksby jrakibi · bd8a4229 · Dec 31, 2025 · 2 filesMessage 76 · AdequateInformational 15Details
Commit message · jrakibi

benches: Add block decode and validate benchmarks

Add benchmarks for:
- Decoding blocks with N transactions
- Decoding then converting from unchecked to checked (validate)

This helps us decide whether adding duplicate-input-check in
TransactionDecoder::end() is worth the cost (see discussion in #5441)

Note: To know the actual overhead, we need to run these benchmarks with
and without the duplicate input check and compare before/after results,
since the check is embedded in the decoder and cannot be benchmarked in isolation.

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

This commit only adds new performance benchmarks to the project's benchmark suite. It does not change any production code, fix bugs, or alter security behavior. The benchmarks measure how long it takes to decode and validate Bitcoin blocks of various sizes, which is useful for future development decisions but has no direct security impact on its own.

Security candidateio: Bump version to 0.4.0-rc.0by Tobin C. Harding · d00870bb · Dec 31, 2025 · 6 filesMessage 80 · StrongInformational 15Details
Commit message · Tobin C. Harding

io: Bump version to 0.4.0-rc.0

We updated a bunch of dependencies and forgot to re-release
`bitcoin-io`. And this is breaking the attempt at releasing `bitcoin
0.33.0-beta.0`.

Use RC because we have a dependency on `consensus_encoding` RC release
that uses the `=` syntax to pin the exact version. Therefore everytime
we do a new RC release of that crate we have to do `io` as well.

In preparation for release bump the version, add a changelog entry,
and update the lockfiles. Also update the version everywhere `io` is
used as a dependency including adding an explicit version number to
`p2p` (which will be needed to release it).

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
access control
AI analysis · Informational 15/100

This commit is a routine version bump for a small Rust library called bitcoin-io, from version 0.3.0 to 0.4.0-rc.0. It updates lockfiles, a changelog, and dependency references in other crates so they all use the new version. There is no code change and no security issue visible in the commit.

Lower-prioritybitcoin: Set version to beta.0by Tobin C. Harding · f9950399 · Dec 31, 2025 · 4 filesMessage 72 · AdequateInformational 15Details
Commit message · Tobin C. Harding

bitcoin: Set version to beta.0

We haven't done a beta release yet, not sure why, how, or when
presumably I, set it to `beta.1`.

72/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Explains rationale or failure mode
AI analysis · Informational 15/100

This commit only changes the package version number from 0.33.0-beta.1 to 0.33.0-beta.0 and updates the release date in the changelog. There are no code, logic, or dependency changes. It is purely a release bookkeeping adjustment with no security relevance.

Lower-priorityIntroduce network crateby Tobin C. Harding · 65193694 · Dec 30, 2025 · 9 filesMessage 43 · ThinInformational 15Details
Commit message · Tobin C. Harding

Introduce network crate

Introduce a new `network` crate that holds the `Network`,
`NetworkKind`, and `TestnetVersion` types.

43/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit creates a brand-new Rust crate that simply defines which Bitcoin network a program is using (mainnet, testnet, signet, or regtest). It is a pure code-organization/refactoring change with no security relevance.

AI review queuedUpdate the API filesby Tobin C. Harding · 7cef310d · Dec 30, 2025 · 1 fileMessage 28 · OpaqueInformational 15Details
Commit message · Tobin C. Harding

Update the 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 records that a new test-helper trait implementation (for generating random 'relative::LockTime' values) is now part of the crate's public API surface. There is no code change, no bug fix, and no security-sensitive behavior introduced.

Lower-priorityunits: Update API testby Tobin C. Harding · 3adb97f0 · Dec 30, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Tobin C. Harding

units: Update API test

Since we implemented it the API test has gotten out of sync,
unfortunately there is no obvious way to prevent this.

I just used grep on the `units` directory to do the fixes.

73/100 · AdequateMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit only updates an internal API test file to match recent changes in the `bitcoin_units` crate. It adds imports for newly introduced types (like `Sequence`), reorganizes existing ones, and includes new decoder/encoder types behind a feature flag. There is no change to production code, no bug fix, and no security relevance.

Lower-priorityImplement Arbitrary for relative::LockTimeby Tobin C. Harding · ce355b48 · Dec 30, 2025 · 1 fileMessage 80 · StrongInformational 16Details
Commit message · Tobin C. Harding

Implement Arbitrary for relative::LockTime

Looks like we missed this one. The implementation is different to the
one in `absolute` because `relative::LockTime::from_consensus` returns
an error. Instead of using that constructor manually create one of the
inner types with 50% likelihood of either one.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 16/100

This commit adds a missing test helper that lets a library generate random relative locktime values for fuzz testing. It is not a security fix and does not change any runtime behavior of the Bitcoin library.