RB
← All projectsRust Bitcoin

rust-bitcoin

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

BitcoinCryptographic librariesNormal
Repository coverage

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

612security candidates555second-pass queue2330AI analyses
153commits · 30 days
279commits · 60 days
977commits · 180 days
2058commits · 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.

68/100 average clarity
702Strong · 80–100
1135Adequate · 60–79
582Thin · 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 Poelstra407139251391
Mitchell Bagot659200654068
Tobin C. Harding42167411063
jrakibi1015096069
satsfy (Renato Britto)652235065
Nick Johnson19621190060
Jamil Lambert, PhD12619117062
Fmt Bot351532045
Trevor Arjeski111111069
Shing Him Ng31731056
Martin Habovstiak31629069
Ismail Daif22622050
Analysis record

Published AI watches

Last scanned 24 minutes ago

Informational 19 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#7220: refactor(bip32)!: replace KeySource with KeyOrigin

This is a routine code cleanup in a Bitcoin library. It renames a simple data container from KeySource to KeyOrigin and gives it named fields (fingerprint and path) instead of numbered tuple slots (.0 and .1). The serialized format is inte…

6bb507b2by Andrew Poelstra+84−33 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#7204: key-expression: Get secp256k1 from the crypto dep

This change is a routine internal cleanup: the key_expression crate stops depending directly on the secp256k1 cryptography library and instead uses a re-export provided by another internal crate called crypto. No user-facing behavior, type…

d193efc5by Andrew Poelstra+7−107 files
No security note in commit
Informational 17 AI analysisMessage 68 · Adequate
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

key_expression: Forward serde feature to network

This is a small Cargo.toml fix in a Rust Bitcoin subcrate. When the optional 'serde' feature was enabled on the key_expression crate alone, it did not also enable serde on the network crate. That meant a type called NetworkKind could not b…

806f1e1fby bytescape30+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#7223: build(deps): bump taiki-e/install-action from 2.87.9 to 2.87.13

This is a routine update to a GitHub Actions helper used in automated testing workflows. It bumps the version of taiki-e/install-action, which downloads and installs Rust developer tools during CI runs. There is no change to the actual Bit…

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

Merge rust-bitcoin/rust-bitcoin#7224: build(deps): bump astral-sh/setup-uv from 10.0.1 to 10.1.0

This is a routine update to a GitHub Actions helper used only in automated security-scanning workflows. The new version adds minor improvements, including respecting proxy settings and verifying downloaded files with checksums. It does not…

Dependency bump of a third-party GitHub Action used in CI onlyUpstream release notes mention generic security improvements (checksum verification, npm install defaults, NO_PROXY)No CVE, advisory, or vendor security disclosure is present in the commit or supplied references
7bc9d696by Andrew Poelstra+2−22 files
No security note in commit
Informational 19 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#7105: Remove derived serde impls for types in stabilising crates

This commit removes automatic serde (serialization/deserialization) code generation from several Rust Bitcoin library crates and replaces it with hand-written implementations. The stated goal is to reduce dependencies and make the code eas…

Manual serde implementations replace derived ones, increasing the surface area for serialization-format bugsNo validation logic changes are visible in the diffNo mention of security fixes, CVEs, or vulnerability reports in commit message or PR description
9eeb7774by Andrew Poelstra+219−4110 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#7205: Manual update to rustc stable (to 1.100.0)

This commit updates the project's automated Rust compiler version from 1.99.1 to 1.100.0 and adjusts a CI cache cleanup script to match a new directory layout used by Cargo 1.100. It is purely an infrastructure/maintenance change to keep a…

44e6f0caby Andrew Poelstra+8−22 files
No security note in commit
Informational 18 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#7197: ci: bump rbmt to 0.5.5 and fail API job on private dep leak

This is a build-system improvement, not a code change. It updates a CI helper tool and makes the automated API-checking job fail if a private internal crate accidentally becomes part of the public API. That prevents future leaks of interna…

CI guardrail added to prevent private dependency leaks into stable crate public APIsTool bump enables detection of re-exported private dependenciesNo source-code vulnerability is patched
be14c72eby Andrew Poelstra+7−12 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#7185: Refactor/bip32 flatten error constructors

This is a minor internal code cleanup in the Rust Bitcoin library. It changes how two functions (Xpriv::decode and Xpub::decode) build their error messages when an input is the wrong length. The behavior is the same before and after; only …

271f662aby Andrew Poelstra+8−61 file
No security note in commit
Informational 24 AI analysisMessage 93 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#7167: units: remove `Denomination::MicroBitcoin`

This is a routine API cleanup, not a security fix. The change removes one way of naming a Bitcoin unit ('MicroBitcoin' / 'uBTC') and keeps the equivalent 'bits' form. Any code that previously used the old name will fail to compile or fail …

No security signal: public API deprecation and enum variant removalNo memory safety, cryptographic, or consensus code modifiedError message change is informational only
d0602195by Andrew Poelstra+53−403 files
No security note in commit
Informational 19 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#7127: key_expression: Reduce `alloc` gating to minimal types

This commit is a code cleanup and feature-gating refactor for the rust-bitcoin library's key_expression crate. It makes more BIP32 (Bitcoin wallet key derivation) types available when the 'alloc' memory allocator feature is disabled, and s…

Refactor of error types and parsing paths for Xpriv/Xpub base58 decodingSwitch from unbounded base58 decode to fixed-size array decode (78 bytes)Removal of explicit length-check error path in favor of decoder-reported length error
c3d27d5dby Andrew Poelstra+60−823 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#7039: primitives: Fix daily Miri cron failures with measured test gating

This change only adds `#[cfg_attr(miri, ignore)]` annotations to a handful of slow unit tests so they are skipped when run under Miri, a Rust interpreter used for detecting undefined behavior. It does not change any production code, consen…

1dc09077by Andrew Poelstra+6−03 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#7182: Update local dependencies

This commit only updates version numbers in package configuration files (Cargo.toml) for internal dependencies so that all crates in the project require the same minimum versions of shared libraries. There are no code changes, no bug fixes…

06f41225by Andrew Poelstra+7−75 files
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#7179: build(deps): bump taiki-e/install-action from 2.87.4 to 2.87.9

This is a routine update to a GitHub Actions helper used in automated testing workflows. It changes which version of a third-party tool-installer action is used, but only for installing the cargo-mutants testing tool. There is no indicatio…

4fda66b5by 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#7180: build(deps): bump cargo-bins/cargo-binstall from 1.22.0 to 1.23.0

This commit updates the version of a helper tool called cargo-binstall used in two automated GitHub workflows. The change only affects internal build/CI tooling and does not alter the rust-bitcoin library code that users install or run. Th…

53eae24dby 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#7181: build(deps): bump github/codeql-action/upload-sarif from 4.37.9 to 4.38.0

This is a routine update by Dependabot to the GitHub CodeQL upload-sarif action used in a scheduled security scanning workflow. It changes one pinned commit hash to a newer version of the same action. There is no indication this introduces…

4bb555f0by Andrew Poelstra+1−11 file
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

key_expression: Flatten BIP32 decode error construction

This commit is a minor code cleanup in the Rust Bitcoin library. It changes how an error message is built when decoding BIP32 extended keys, switching from one nested construction style to two chained calls. The actual behavior and returne…

c31c11e0by Adewale Ijalana+8−61 file
No security note in commit
Low 36 AI analysisMessage 100 · Strong
RB Rust Bitcoinrust-bitcoin BitcoinCryptographic libraries

Merge rust-bitcoin/rust-bitcoin#7168: units: add `visit_units` in optional serde visitors

This commit fixes a bug in how optional Bitcoin amount and fee-rate values are read from JSON when those fields are inside a flattened struct and the value is null. Previously, the code would error out because it did not handle a special s…

Deserialization failure in optional numeric types under serde flattenMissing serde visitor method (visit_unit) causing runtime errorsRegression test added for null handling in flattened structs
47340d2fby Andrew Poelstra+79−03 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 dependency update by Dependabot, bumping the version of a GitHub-provided action used to upload security scan results. There is no indication of a security vulnerability in the project itself or in this change.

fe755619by 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 cargo-bins/cargo-binstall from 1.22.0 to 1.23.0

This is a routine automated update by Dependabot that changes the version of a GitHub Action used to install Rust tools in two CI workflows. There is no indication of a security issue in the commit itself, and no verified security referenc…

2ccb0029by dependabot[bot]+2−22 files
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Security candidateMerge rust-bitcoin/rust-bitcoin#7005: feat(units): add saturating arithmetic methods to FeeRateby Andrew Poelstra · 9079f0cb · Oct 11, 2026 · 1 fileMessage 96 · StrongInformational 18Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#7005: feat(units): add saturating arithmetic methods to FeeRate

ab56fd63b79c22966bc35edda724d8fdbadc6860 feat(units): add saturating arithmetic methods to FeeRate (luhrhenz)

Pull request description:

## Summary

- Add `saturating_mul`, `saturating_div`, `saturating_add`, and `saturating_sub` to `FeeRate`, following the pattern established by `BlockHeight` and the existing `checked_*` methods.
- All four are `const fn`, `#[inline]`, `#[must_use]`, delegating to the underlying `u64` saturating operations.
- Add unit tests covering normal operation, boundary values, and overflow/underflow saturation.

Ref #6793


ACKs for top commit:
Kixunil:
ACK ab56fd63b79c22966bc35edda724d8fdbadc6860
Abeeujah:
ACK ab56fd63b79c22966bc35edda724d8fdbadc6860
apoelstra:
ACK ab56fd63b79c22966bc35edda724d8fdbadc6860; successfully ran local tests


Tree-SHA512: ff12235f6e6ff496937536df2adac85ef5cf64c9ec4645c4d11b37cd8f21872f1211aa3a724c57cba47c16a0e15fc52f8bc3db2e1b375dd9532ad6f462a0ed99

96/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✓ Names security-relevant behavior explicitly
Why it was queued
memory safetymerge-commit duplicate discount
AI analysis · Informational 18/100

This commit adds new safe arithmetic helpers to the FeeRate type in the rust-bitcoin library. These methods multiply, add, or subtract fee rates while capping the result at the maximum or minimum allowed value, preventing accidental numeric overflow. It is a routine feature addition with no security fix or vulnerability indicator.

Security candidateMerge rust-bitcoin/rust-bitcoin#6941: consensus_encoding: do not drop encoders with an empty first chunkby Andrew Poelstra · b3789f8b · Oct 11, 2026 · 6 filesMessage 91 · StrongModerate 64Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#6941: consensus_encoding: do not drop encoders with an empty first chunk

8eefb6abafb9cce2080e51c0eb94cbcbcb95a1e4 consensus_encoding: handle empty composite chunks in state transitions (zjubiology)
193bbae46ecc0c34cbc6f3bd64fe1e63fe22dc9e consensus_encoding: skip empty composite encoders (zjubiology)
66fbb6d993959cc2ddfe203c0a1d0d00c526dc6d consensus_encoding: clarify empty chunk contract (zjubiology)

Pull request description:

`IterEncoder::new` skips leading encoders by testing `current_chunk().is_empty()` on a freshly constructed encoder and discarding it if so. But `Encoder::current_chunk` is explicitly documented as "May return an empty slice", so an encoder is allowed to be:

current_chunk() -> []
advance() -> HasMore
current_chunk() -> [0xaa, 0xbb]

Such an encoder is dropped entirely by `new()` and its bytes are lost, i.e. composing encoders through `IterEncoder` changes the encoded output.

This is not hypothetical: `EncoderN` yields its first component's chunk first, so

IterEncoder::new([Encoder2::new(
BytesEncoder::without_length_prefix(&[]),
BytesEncoder::without_length_prefix(&[1, 2, 3]),
)])

encodes to `[]` instead of `[1, 2, 3]` on master.

The fix advances each encoder until it yields a non-empty chunk or reports `Finished`, rather than judging it by its first chunk. `advance()` already handled this correctly; it is moved onto the same helper so the two paths can't drift apart, and two comments claiming a non-existent "chunk must be non-empty" trait contract are removed.


ACKs for top commit:
apoelstra:
ACK 8eefb6abafb9cce2080e51c0eb94cbcbcb95a1e4; successfully ran local tests


Tree-SHA512: dcdf3613d734f5de9c33dda815d9836c1bf689a9ec5526f28373fe76ef522c5f1d208d7bbf1b7d4e4737f9904cbd131f5274bdd8972e9e36027f93da4f761853

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
consensus or confidential-proof validationmerge-commit duplicate discount
AI analysis · Moderate 64/100

This commit fixes a bug in the way the rust-bitcoin library chains together small data encoders. Previously, if an encoder's first output chunk was empty but it later produced real bytes, the library would silently throw the encoder away and lose those bytes. The fix makes the library advance each encoder past any initial empty chunks before deciding whether to keep it. This could change the bytes produced when encoding certain Bitcoin network messages or other composite data structures.

Security candidateMerge rust-bitcoin/rust-bitcoin#2435: Enforce `$source: std::error::Error` in `write_err`by Andrew Poelstra · 3bb3585a · Oct 11, 2026 · 4 filesMessage 100 · StrongLow 31Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#2435: Enforce `$source: std::error::Error` in `write_err`

71eea3d7f3c15ecae1360ded73c9710aec563e30 Enforce `$source: std::error::Error` in `write_err` (Martin Habovstiak)

Pull request description:

Sometimes people accidentally use `write_err` where `write` should be used or forget to implement `std::error::Error` for their types. So far we've relied mainly on review to catch these but it's difficult to see them and as this commit demonstrates one case slipped in #1400.

This commit add a check to `write_err` that enforces implementation of `std::error::Error + 'static` on types passed to `write_err` as `$source`. This doesn't trigger on `no_std` builds but does in `std` builds. While this would normally be weird in this case it's OK because `std` is tested.

There are still cases where this check is a false positive so the original macro is preserved as `write_err_unchecked_source`.

This change simultaneusly fixes the horrible bug introduced in #1400 which would cause infinite recursion when displaying error on `no_std`.


ACKs for top commit:
apoelstra:
ACK 71eea3d7f3c15ecae1360ded73c9710aec563e30; successfully ran local tests


Tree-SHA512: d9ea970b6b55d39334efa6d4baf3f366f6508d1ed77c8eb53d861c01e94a4b6cf47bd47d748ad6cec76224fc381b67802f6e2fa5ce4ab3db526ff9eda3e3db3e

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
access controlcryptography-sensitive pathmerge-commit duplicate discount
AI analysis · Low 31/100

This commit tightens a Rust helper macro used to format error messages so it only accepts real error types. It also fixes a bug where, in builds without the standard library, displaying certain errors would call itself forever (infinite recursion) and crash the program. Most of the changes are defensive compile-time checks; the actual recursion bug is mentioned in the pull request description but the diff only shows the macro change, not the original buggy code path.

AI review queuedMerge rust-bitcoin/rust-bitcoin#7008: primitives: Improve unit testsby Andrew Poelstra · f90bd5b5 · Oct 10, 2026 · 4 filesMessage 91 · StrongInformational 15Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#7008: primitives: Improve unit tests

63a578061b8167d2238f4d58f611a10551a06744 primitives: Remove redundant alloc gates in tests (Jamil Lambert, PhD)
4aff57b93625a91766647ec2f4ea59cfeaab6e34 primitives: Fix typo in OutPoint serde test names (Jamil Lambert, PhD)
1520aba850184e11324f3a999e89996beb2c10ed primitives: Test lower hex for all hash types (Jamil Lambert, PhD)
9302d14aecc86204159e859c57ebcc071e59be17 primitives: Test as_byte_array for all hash types (Jamil Lambert, PhD)
f835b0e9d5879a1ce73e7e6d07cc5465b48fc075 primitives: Rename witness test module to tests (Jamil Lambert, PhD)
d3a0d0edc99d55b1da1eab8aabced5e870321adb primitives: Simplify Merkle root test assertions (Jamil Lambert, PhD)
3a71e1cf7ca0593c50c5eafea108f3cba43d90aa primitives: Remove duplicate Merkle root test code (Jamil Lambert, PhD)

Pull request description:

Several unit tests are inconsistent with the rest of the crate, hard to follow or could be improved:

- `merkle_root_batched` tests against a pasted copy of the default Merkle root code, replace it with `assert_roots_match` cases that test against the real code.
- Some Merkle tests use `is_some`/`unwrap` with messages that repeat the test name, compare the option directly.
- The witness test module is called `test` not `tests` like the others.
- The hash byte array macro only checks `as_byte_array` when given an extra argument that is then ignored, always check it.
- The lower hex tests miss `Txid` and `Wtxid`.
- Two test names misspell "roundtrips"
- Items are gated on `alloc` inside test modules that only exist with `alloc`.

Fix each of these in its own commit. Test changes only.


ACKs for top commit:
apoelstra:
ACK 63a578061b8167d2238f4d58f611a10551a06744; successfully ran local tests


Tree-SHA512: dc016db04b8cf90be0bc55f9e1812584671a76d1bb3d1a41eeb79fa2fd413736a67cd71b7fc9daad1e5306dcd0f324b357f0ece29ce2d4b8aa00e9e2739390cf

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
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit only improves and cleans up unit tests in the rust-bitcoin library. It renames misspelled test functions, removes unnecessary feature gates, adds missing test cases for hash types, simplifies Merkle root test assertions, and renames a test module for consistency. There are no changes to production code, so this does not fix or introduce any security vulnerability.

Lower-priorityMerge rust-bitcoin/rust-bitcoin#6995: primitives: Export WitnessMerkleNode encoder and decoder typesby Andrew Poelstra · ca4d1789 · Oct 10, 2026 · 4 filesMessage 91 · StrongTriage 0Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#6995: primitives: Export WitnessMerkleNode encoder and decoder types

3a9bd99c87009d20a93ad2d82479be4e0ec56f1f bitcoin: Re-export WitnessMerkleNode codec types (Jamil Lambert, PhD)
2168b93aacf6993960ec6be1b1b368a3c88a175e primitives: Export WitnessMerkleNode codec types (Jamil Lambert, PhD)

Pull request description:

`WitnessMerkleNode` implements `Encode` and `Decode`, but its encoder, decoder and decoder error types aren't exported, so users get types they can't name. The `TxMerkleNode` equivalents are exported from `merkle_tree`.

Export them from `primitives` the same way, add them to the API tests and re-export them from `bitcoin`.


ACKs for top commit:
Abeeujah:
ACK 3a9bd99c87009d20a93ad2d82479be4e0ec56f1f
tcharding:
ACK 3a9bd99c87009d20a93ad2d82479be4e0ec56f1f
apoelstra:
ACK 3a9bd99c87009d20a93ad2d82479be4e0ec56f1f; successfully ran local tests


Tree-SHA512: 920b4016c32a96998a35496249cc3eb0315ba2c2bdaa422b4dd3b43588f2bd70a11528b9437101d0e8bf24cd1f48fed9e5d7750f5ed1c0458af413d9fdf09996

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
merge-commit duplicate discount
AI review queuedMerge rust-bitcoin/rust-bitcoin#7007: primitives: Add track_caller to panicking functionsby Andrew Poelstra · 0ef79473 · Oct 10, 2026 · 3 filesMessage 91 · StrongInformational 21Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#7007: primitives: Add track_caller to panicking functions

83ff3989a412984114917e7cb278665b89a761d4 primitives: Document and track Witness push panics (Jamil Lambert, PhD)
a14fc127b5b7556541541aca1153f7e141e8594a primitives: Track caller in ScriptBuf capacity fns (Jamil Lambert, PhD)
f4e454eb0d2258491cbe03a11daa1a69e55df8c5 primitives: Remove stale duplicate code comments (Jamil Lambert, PhD)

Pull request description:

Policy is to use `#[track_caller]` on functions that panic on invalid arguments. `ScriptBuf::reserve` and `reserve_exact` document a panic but don't have the attribute, and `with_capacity` has the same panic undocumented. `Witness` stores each element's offset as a `u32`, so `from_slice` and `push` panic, undocumented, if an element would start more than `u32::MAX` bytes in.

Remove two stale comments.

Add the attribute and document the panics.

Part of #5518


ACKs for top commit:
Kixunil:
ACK 83ff3989a412984114917e7cb278665b89a761d4
apoelstra:
ACK 83ff3989a412984114917e7cb278665b89a761d4; successfully ran local tests


Tree-SHA512: 09d9d107214efdd8e41b00f7efbad7f8eb4e53b3f9736cb2398a6157e7f394c4f13fbf54618bb4aeb13163d7768b9d65b90430781c8e61eca85c11770c45aff5

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
signing or wallet pathmerge-commit duplicate discountsecond-pass: broader security terminologysecond-pass: security-sensitive path
AI analysis · Informational 21/100

This change is a code-quality and documentation improvement, not a security fix. It adds Rust's #[track_caller] attribute to several functions that can panic when given extremely large inputs, and documents those panic conditions. The panics themselves already existed; the patch only makes error messages more accurate and documents behavior. There is no vulnerability being fixed.

AI review queuedMerge rust-bitcoin/rust-bitcoin#7012: units: add track_caller to panic opsby Andrew Poelstra · 4369bd34 · Oct 10, 2026 · 6 filesMessage 100 · StrongInformational 19Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#7012: units: add track_caller to panic ops

48fac6da7f6d4186083496cec217eee17ac06124 units: add track_caller to panic ops (satsfy (Renato Britto))
9a6cbd9a33b16726e482931fbe4bbf7a603aebd6 units: propagate fn attrs in op macro (satsfy (Renato Britto))

Pull request description:

Part of https://github.com/rust-bitcoin/rust-bitcoin/issues/5518

Policy is to use `#[track_caller]` on functions that panic on invalid arguments. In units, there is arithmetic on block heights, weights, fee rates, etc. A panic links code inside units instead of at the caller mistake. The macro now copies fn attributes onto the impls it generates, so that `&a - &b` also links properly.


ACKs for top commit:
apoelstra:
ACK 48fac6da7f6d4186083496cec217eee17ac06124; successfully ran local tests


Tree-SHA512: 122db363e288809bd3f2c2b721d2278318facea1f9136ff30756f3359d61f5fb895b920621726aadd5f887585cf1eb1819017f0f6160f4e1556ba1d49c100c27

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discountsecond-pass: broader security terminology
AI analysis · Informational 19/100

This change adds Rust's #[track_caller] annotation to arithmetic operations in the rust-bitcoin 'units' crate that can panic on invalid input (for example, subtracting a larger number from a smaller one). This annotation does not change whether or when panics happen; it only improves the quality of panic error messages by pointing to the caller's code instead of deep inside the library. It is a debugging/diagnostics improvement, not a security fix.

Security candidateMerge rust-bitcoin/rust-bitcoin#7013: Manual weekly update to rustc (to nightly-2026-10-03) on masterby Andrew Poelstra · 8922579c · Oct 9, 2026 · 4 filesMessage 91 · StrongInformational 15Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#7013: Manual weekly update to rustc (to nightly-2026-10-03) on master

c774e9ec2340feaaec10c89f24cdf6f89b0d293e taproot_primitives: add missing docs backtics (satsfy (Renato Britto))
730ffdd309a92dd51fde2e2eaffb5d0d4ad8d476 Automated update to rustc nightly-2026-10-03 (Update Nightly Rustc Bot)

Pull request description:

Supersedes https://github.com/rust-bitcoin/rust-bitcoin/pull/6979

Needed a doc backtics fix for lint.


ACKs for top commit:
apoelstra:
ACK c774e9ec2340feaaec10c89f24cdf6f89b0d293e; successfully ran local tests


Tree-SHA512: f2784be8e699c362d48c7d9dd764c424a7aeefa983e4a96895abaa1050b155f59d6fee899a766bd89f25125aaeb07fab72dfe4851f9a4f3a831f5b9d2017d376

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
cryptography-sensitive pathmerge-commit duplicate discount
AI analysis · Informational 15/100

This commit is a routine weekly update of the Rust compiler version used by the project, plus three tiny documentation fixes that add correct backtick formatting around type names. There is no change to program logic, no bug fix, and no security relevance.

AI review queuedMerge rust-bitcoin/rust-bitcoin#7001: units: fix serialization of optional amountsby Andrew Poelstra · 6585c779 · Oct 9, 2026 · 3 filesMessage 91 · StrongLow 48Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#7001: units: fix serialization of optional amounts

cfa43314a5616e920201cb1c0d40403cff27a155 units: check Optional amount round trip with bincode (jrakibi)
4b4208ceaf5396b85bfb40e6ae8730e5b0b1a19d units: fix serialization of optional amounts (jrakibi)

Pull request description:

Serializing/deserializing an optional amount using `as_btc::opt` or `as_str::opt` does not round trip with bincode.

The issue is in serialization: we directly serialize the inner value instead of `Some` variant. So deserialization can fail or return incorrect value.

The first commit fixes the issue by using `serialize_some`, and updates serde_bincode to include the two missing bytes that encode `Some` (for unsigned_opt_as_btc and signed_opt_as_btc)

The second commit adds tests.

Found while auditing `units` crate with Codex. This may already be tracked in Loupe. I don’t have access to check.


ACKs for top commit:
Abeeujah:
ACK cfa43314a5616e920201cb1c0d40403cff27a155
apoelstra:
ACK cfa43314a5616e920201cb1c0d40403cff27a155; successfully ran local tests; great catch!


Tree-SHA512: 2309b34bd20ca0dad8a9090e2da67ac5bb078eed89180f4125dc62527ee0c222a7f414015f198e9c7e69b12e8b9b7ea6c3205e98d175b65598d2a74da5eab893

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
merge-commit duplicate discountsecond-pass: broader security terminology
AI analysis · Low 48/100

This commit fixes a bug in how optional Bitcoin amounts are serialized when using certain compact binary formats (like bincode). The code was writing the raw inner value for a Some(amount) instead of properly marking it as 'Some'. This could cause deserialization to fail or produce wrong values when round-tripping optional amounts. The fix changes the serializer to use the standard 'serialize_some' method and adds tests to confirm round-tripping now works.

AI review queuedMerge rust-bitcoin/rust-bitcoin#7003: Fix creusot cache by running on push to `master`by Andrew Poelstra · bc026dc2 · Oct 9, 2026 · 1 fileMessage 100 · StrongInformational 15Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#7003: Fix creusot cache by running on push to `master`

8f9a6dec87f84c5b125b144b8d6144d8437af5cb Fix creusot cache by running on push to `master` (Martin Habovstiak)

Pull request description:

According to the [documentation], PRs don't get to share their cache for security reasons which severely limits its usefulness to us. They can however restore the cache of the base branch which solves the issue but to have any cache on base branch we have to run Creusot on push.

This commit enables the cache on pushes to `master`. It is expected that this will require a full re-build but all subsequent builds which do not modify the dependencies should get faster.

[documentation]: https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching#restrictions-for-accessing-a-cache

Adding P-high label because not having this wastes a lot of time on every PR and fills our cache storage.


ACKs for top commit:
apoelstra:
ACK 8f9a6dec87f84c5b125b144b8d6144d8437af5cb; successfully ran local tests
jamillambert:
ACK 8f9a6dec87f84c5b125b144b8d6144d8437af5cb


Tree-SHA512: e7bc82bd71d8e5f8851aa247b051b745301f43f7aa7fdd1e58dbf944849d4722e045eb538502136fccb7d18c522cd177c10b29c32cea05c90c5a65824c4dcc7f

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
documentation-only discountmerge-commit duplicate discountsecond-pass: broader security terminology
AI analysis · Informational 15/100

This change simply tells GitHub to run the Creusot verification workflow whenever code is pushed to the master branch, in addition to running it on pull requests. The goal is to populate a build cache for the master branch so that future pull requests can reuse it and run faster. There is no change to the actual Bitcoin library code, no bug fix, and no security patch.

Lower-priorityMerge rust-bitcoin/rust-bitcoin#7002: internals: Restore T: Eq in ArrayVec Eq implby Andrew Poelstra · 660e263a · Oct 9, 2026 · 1 fileMessage 100 · StrongTriage 0Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#7002: internals: Restore T: Eq in ArrayVec Eq impl

8ca009407c18bbc1b81a8c417de20034a43540e4 internals: Restore T: Eq in ArrayVec Eq impl (jrakibi)

Pull request description:

The bound was changed from `T: Eq` to `T: PartialEq` in #6942. This allows ArrayVec to implement Eq for types such as f64, even though f64 does not implement Eq (because NaN != NaN).

Change the bound back to T: Eq

Follow up to https://github.com/rust-bitcoin/rust-bitcoin/pull/6942#discussion_r4216067635


ACKs for top commit:
Kixunil:
ACK 8ca009407c18bbc1b81a8c417de20034a43540e4
apoelstra:
ACK 8ca009407c18bbc1b81a8c417de20034a43540e4; successfully ran local tests


Tree-SHA512: 8dcec8621de6c5465ec0d7e7b62a81e27ee1375210ed0be6eec676dae3460c8edc171e3f871a103f25702d97f4774813e655d68158c122c246822e3b84fa6415

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Security candidateMerge rust-bitcoin/rust-bitcoin#7000: internals: add track_caller to U256 opsby Andrew Poelstra · 0870db2e · Oct 9, 2026 · 2 filesMessage 86 · StrongInformational 20Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#7000: internals: add track_caller to U256 ops

276712155d4467198fa7797afbd530467a8ea2e3 internals: add track_caller to U256 ops (satsfy (Renato Britto))

Pull request description:

Part of https://github.com/rust-bitcoin/rust-bitcoin/issues/5518#issuecomment-5981738769

In debug builds, internals Add, Sub and Mul on U256 panic on overflow, Div and Rem panic on a zero divisor.

The panics linked code inside internals instead of at the caller's mistake, and the policy document asks for `track_caller` on functions that panic on invalid arguments.


ACKs for top commit:
Kixunil:
ACK 276712155d4467198fa7797afbd530467a8ea2e3


Tree-SHA512: b6186db89f26113194b03da248301d0b34d4684b7e54ffff21abcc37fb417df45a7e194b52f55836dc922fb50cadaf155140b5cb693a940068e4f7ac69334ef3

86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
memory safetymerge-commit duplicate discount
AI analysis · Informational 20/100

This change adds Rust's #[track_caller] attribute to several internal math and array helper functions. It does not fix a bug or change any calculation; it only improves panic error messages so that if an overflow or division-by-zero happens in testing, the error points to the caller's code rather than deep inside the library. There is no security vulnerability being patched.

Lower-priorityMerge rust-bitcoin/rust-bitcoin#6999: units: Make parse_int helper functions privateby Andrew Poelstra · d9309fcd · Oct 9, 2026 · 2 filesMessage 91 · StrongTriage 0Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#6999: units: Make parse_int helper functions private

01bedbb8835f977f8d198440a2d87528ac97ed8b units: Make parse_int helper functions private (Tobin C. Harding)

Pull request description:

These two functions are not needed publicly. They are helper functions.

Make the two functions `pub(crate)`.


ACKs for top commit:
satsfy:
tACK 01bedbb8835f977f8d198440a2d87528ac97ed8b
Kixunil:
ACK 01bedbb8835f977f8d198440a2d87528ac97ed8b
apoelstra:
ACK 01bedbb8835f977f8d198440a2d87528ac97ed8b; successfully ran local tests


Tree-SHA512: 98a65f67e5d46e41e886467490c4daf50259fd6a5748e2985806c36db5757a146db5ec7b9532a93a19dd66a21b7e8e09a13d2263152353ca139983ffdce2ec3b

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
merge-commit duplicate discount
Security candidateMerge rust-bitcoin/rust-bitcoin#6998: Fix regtest parameters to match Bitcoin Coreby Andrew Poelstra · 621a3900 · Oct 9, 2026 · 1 fileMessage 91 · StrongInformational 19Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#6998: Fix regtest parameters to match Bitcoin Core

8c0930daac175ef912c533186c2108e1d5d0da67 params: Align regtest values with Bitcoin Core (moisesPomilio)

Pull request description:

Updates the regtest parameters to match Bitcoin Core's current regtest configuration.

* Sets BIP34, BIP65, and BIP66 activation heights to 1.
* Changes the regtest difficulty adjustment timespan from 2 weeks to 1 day.

Fixes #6997


ACKs for top commit:
apoelstra:
ACK 8c0930daac175ef912c533186c2108e1d5d0da67; successfully ran local tests


Tree-SHA512: 0f8b2635e4f903facc94dcae268ffa3927bcef11711a7385ccb0be0e4d0f159039d1ee5d0c4b5ccf2c92301c98a75d629b9b9814d5daae0ae55f0c7fe1c74138

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
proof-of-work or emission validationmerge-commit duplicate discount
AI analysis · Informational 19/100

This commit updates the built-in 'regtest' network parameters in the rust-bitcoin library so they match Bitcoin Core's current regtest defaults. Regtest is a private test network used only for local development and automated testing, not for real money. The changes make several Bitcoin protocol rules active from block 1 and shorten the difficulty adjustment window from two weeks to one day. There is no indication this fixes a security vulnerability; it is a compatibility/maintenance fix.

Security candidateMerge rust-bitcoin/rust-bitcoin#6934: Release tracking PR: `internals 0.8.0`by Andrew Poelstra · 3c20d042 · Oct 8, 2026 · 20 filesMessage 91 · StrongInformational 15Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#6934: Release tracking PR: `internals 0.8.0`

915c04b327bfd345e9e932da26f4d74f860274a7 internals: Bump version to 0.8.0 (Tobin C. Harding)

Pull request description:

In preparation for release add a changelog entry, bump the version number, and update the lockfiles.


ACKs for top commit:
apoelstra:
ACK 915c04b327bfd345e9e932da26f4d74f860274a7; successfully ran local tests


Tree-SHA512: afdb2f835757f30bc88524d79810f9e27b437dad522ed56fa0190bfccd0bfccc39778d255c131c086c7105b8d65620ac22a6398992aa82a9987c9ccc87a6707c

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
cryptography-sensitive pathmerge-commit duplicate discount
AI analysis · Informational 15/100

This commit is a routine release-tracking merge that bumps the version of the `bitcoin-internals` crate from 0.7.0 to 0.8.0 and updates all dependent crates' version requirements and lockfiles. It does not contain any code changes, bug fixes, or security patches itself. The changelog notes that other pull requests included in this release address items such as sanitizing serde size hints and fixing work/target conversions, but those changes are not part of this merge commit's diff.

Security candidatetaproot_primitives: add missing docs backticsby satsfy (Renato Britto) · c774e9ec · Oct 8, 2026 · 3 filesMessage 45 · ThinInformational 15Details
Commit message · satsfy (Renato Britto)

taproot_primitives: add missing docs backtics

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 only fixes documentation formatting by adding Rustdoc backtick link syntax to comments. It changes no executable code, no APIs, and no behavior. There is no security relevance.

Lower-priorityMerge rust-bitcoin/rust-bitcoin#6970: units: Fix inverted relative locktime error msgby Andrew Poelstra · 930082e8 · Oct 8, 2026 · 1 fileMessage 91 · StrongTriage 0Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#6970: units: Fix inverted relative locktime error msg

1be2848cb7d08c9cc6f83f0d372b462b55b5ca2f units: Fix inverted relative locktime error msg (Jamil Lambert, PhD)

Pull request description:

The relative `IncompatibleHeightError` is defined as "Tried to satisfy a lock-by-time locktime...", but its message says "tried to satisfy a lock-by-height locktime...". `IncompatibleTimeError` has the same inversion.

Fix the lock type and the value used to check it.


ACKs for top commit:
apoelstra:
ACK 1be2848cb7d08c9cc6f83f0d372b462b55b5ca2f; successfully ran local tests


Tree-SHA512: 7f47c11a3fc8bfee02e2d59fb8d375677e25592ad993c0c2adae83cb2c75acaacaaac7424fce8d393386680fcf62297d5afbd1b2783794af72cb10188ad3e2dc

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
merge-commit duplicate discount
Security candidateMerge rust-bitcoin/rust-bitcoin#6963: Clean up Pedantic Clippy Lintsby Andrew Poelstra · 82d60e08 · Oct 8, 2026 · 21 filesMessage 91 · StrongInformational 15Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#6963: Clean up Pedantic Clippy Lints

38de85291f7b17e909590407b8d9510d4e374b91 bitcoin: Fix pedantic clippy lints (Abeeujah)
463a5c1f13c86281445fbfa8314e41aac9946816 addresses: Use Option::map_or for `rfind` (Abeeujah)
a86f9029c889741bbfb9671f872cb7287afffbfb p2p: Use Option Combinators (Abeeujah)
74c132c866f614a4aa10edf1ae4a91e613d0c480 primitives: Fix pedantic clippy lints (Abeeujah)
c61c04fc892432fcfabbff0ee04aa5e2c01b3f13 clippy: Use Option combinators (Abeeujah)
c1e940cd4c629406d4e116fc8de01d3f3097f07a Drop deprecated from_iter_instead_of_collect lint (Abeeujah)

Pull request description:

This PR does a sweep across all crates where fixing the triggered clippy lints would provide some value.


ACKs for top commit:
apoelstra:
ACK 38de85291f7b17e909590407b8d9510d4e374b91; successfully ran local tests


Tree-SHA512: d4ce61575a00d6fc4faabfa9a4b7517f7b85067bde38e2cf04cced6eead88c3ed7f6a9b657b408bf5601f80b0bc63695be32b23cc9fcd62c0917b255bd829378

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
cryptography-sensitive pathsigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 15/100

This is a routine code-cleanup pull request that fixes style warnings reported by the Clippy linter. It replaces verbose match/if-let blocks with shorter Option combinators, removes an obsolete lint rule, and uses explicit integer conversion helpers. There is no security bug being fixed and no behavior change intended.

AI review queuedFix creusot cache by running on push to `master`by Martin Habovstiak · 8f9a6dec · Oct 8, 2026 · 1 fileMessage 81 · StrongInformational 15Details
Commit message · Martin Habovstiak

Fix creusot cache by running on push to `master`

According to the [documentation], PRs don't get to share their cache for
security reasons which severely limits its usefulness to us. They can
however restore the cache of the base branch which solves the issue but
to have any cache on base branch we have to run Creusot on push.

This commit enables the cache on pushes to `master`. It is expected that
this will require a full re-build but all subsequent builds which do not
modify the dependencies should get faster.

[documentation]: https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching#restrictions-for-accessing-a-cache

81/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
documentation-only discountsecond-pass: broader security terminology
AI analysis · Informational 15/100

This commit changes the project's automated GitHub workflow so that a verification tool called Creusot also runs whenever code is pushed to the main 'master' branch. The only goal is to make the workflow's build cache work better for pull requests. There is no change to the actual Bitcoin library code, no bug fix, and no security vulnerability being addressed.

Lower-priorityinternals: Restore T: Eq in ArrayVec Eq implby jrakibi · 8ca00940 · Oct 8, 2026 · 1 fileMessage 88 · StrongTriage 0Details
Commit message · jrakibi

internals: Restore T: Eq in ArrayVec Eq impl

The bound was changed from `T: Eq` to `T: PartialEq` in #6942.
This allows ArrayVec to implement Eq for types such as f64,
even though f64 does not implement Eq (because NaN != NaN).

Change the bound back to T: Eq

88/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
Lower-priorityunits: check Optional amount round trip with bincodeby jrakibi · cfa43314 · Oct 8, 2026 · 1 fileMessage 75 · AdequateTriage 0Details
Commit message · jrakibi

units: check Optional amount round trip with bincode

Add bincode round trip checks to the existing as_btc::opt and
as_str::opt tests.

75/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
AI review queuedunits: fix serialization of optional amountsby jrakibi · 4b4208ce · Oct 8, 2026 · 2 filesMessage 80 · StrongModerate 50Details
Commit message · jrakibi

units: fix serialization of optional amounts

Optional amounts do not round trip with bincode because we
directly serialize the inner value instead of `Some` variant.
Deserialization can therefore fail or return incorrect values.

Use serialize_some in as_btc::opt and as_str::opt.

Also update serde_bincode to include the two missing bytes that
encode `Some` (for unsigned_opt_as_btc and signed_opt_as_btc)

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
second-pass: broader security terminology
AI analysis · Moderate 50/100

This commit fixes a bug in how optional Bitcoin amounts are serialized when using the bincode format. Previously, an optional amount like `Some(1 BTC)` was written as just the raw number/string, without the marker that says "this value is present." That meant when reading it back, the code could misinterpret the data or fail. The fix uses the standard `serialize_some` method so the `Some` wrapper is preserved. The test data file was also updated to include the two missing bytes that represent `Some`.

Lower-priorityMerge rust-bitcoin/rust-bitcoin#6993: primitives: Fix InvalidWitnessVersionError conventionsby Andrew Poelstra · e7581fef · Oct 8, 2026 · 1 fileMessage 91 · StrongTriage 0Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#6993: primitives: Fix InvalidWitnessVersionError conventions

d54990ae3c59f01671add359f2e59a9f05bcaac8 primitives: Fix witness version error message (Jamil Lambert, PhD)
a8f89a058befc6bb6dbe1eb032fe916920e2107f primitives: Add From<Infallible> for witness error (Jamil Lambert, PhD)

Pull request description:

`InvalidWitnessVersionError` is the only public error that doesn't implement `From<Infallible>` (P-ERROR-INFALLIBLE), and its message says "invalid witness script version".

Add the impl and change the message to "invalid witness version".


ACKs for top commit:
apoelstra:
ACK d54990ae3c59f01671add359f2e59a9f05bcaac8; successfully ran local tests
Abeeujah:
ACK d54990ae3c59f01671add359f2e59a9f05bcaac8
tcharding:
ACK d54990ae3c59f01671add359f2e59a9f05bcaac8


Tree-SHA512: abfd13cd6f058aeefed1342b2b100436044f031abaf7c51013897bfb772106fe57bda49a4165b65d38c05c0920da0a20e4739d66ef3a361ca08246e340bc7138

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
merge-commit duplicate discount
Lower-priorityMerge rust-bitcoin/rust-bitcoin#6994: primitives: Test parsing WitnessVersionby Andrew Poelstra · 2e69a9cd · Oct 7, 2026 · 1 fileMessage 91 · StrongTriage 0Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#6994: primitives: Test parsing WitnessVersion

d217a1b113d1673e80b50220adbb3af3df4e3bfc primitives: Test parsing WitnessVersion (Jamil Lambert, PhD)

Pull request description:

There are no unit tests for parsing a `WitnessVersion` from a string or for the error returned by `TryFrom<u8>`, so the range check and error variants are only covered by a doc example.

Add tests for both.


ACKs for top commit:
apoelstra:
ACK d217a1b113d1673e80b50220adbb3af3df4e3bfc; successfully ran local tests
Abeeujah:
ACK d217a1b113d1673e80b50220adbb3af3df4e3bfc
tcharding:
ACK d217a1b113d1673e80b50220adbb3af3df4e3bfc


Tree-SHA512: 646af3c78d58961a93c2deda38fe6e274de6bb08164d09060583c8a823397f2f994312808a3c1d2eaba7fe5113d350946ba88504d79355857daed2cd7fdee704

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
merge-commit duplicate discount
Security candidateMerge rust-bitcoin/rust-bitcoin#6989: units: drop PartialOrd and Ord from CompactTargetby Andrew Poelstra · 7074bfe1 · Oct 7, 2026 · 3 filesMessage 91 · StrongLow 28Details
Commit message · Andrew Poelstra

Merge rust-bitcoin/rust-bitcoin#6989: units: drop PartialOrd and Ord from CompactTarget

78c5fce5a3c46509157637681c0b333143e119bf units: drop PartialOrd and Ord from CompactTarget (satsfy (Renato Britto))
9162fe34bfe5816ac893ef8d691e0aaf83b06d05 primitives: implement lexicographic Header Ord (satsfy (Renato Britto))

Pull request description:

Close https://github.com/rust-bitcoin/rust-bitcoin/issues/2758
See discussion on https://github.com/rust-bitcoin/rust-bitcoin/pull/2754#issuecomment-2102736580

Conversion between `CompactTarget` and `Target` is lossy both ways. A derived order on the underlying `u32` does not correspond to which target is actually harder. The policy doc says to consider carefully before deriving `PartialOrd` or `Ord` on types where the comparison has no semantic meaning, and this is one instance of. `block::Header` and p2p `HeaderAndShortIds` contain a `CompactTarget`, they get derive removed.

About equality, it stays on the consensus encoded `u32` and that is ok. Simplified the docs for it.

The issue also suggests `ArbitraryOrd` but we removed that some time ago, so nothing takes its place and its up to the user to convert their `CompactTargets` to compare.

Note that the issue and discussion is somewhat old (2024), but it still seems just as relevant, so I jumped directly to PR.


ACKs for top commit:
tcharding:
ACK 78c5fce5a3c46509157637681c0b333143e119bf
apoelstra:
ACK 78c5fce5a3c46509157637681c0b333143e119bf; successfully ran local tests


Tree-SHA512: f7fac55887e1f4ad4c98f6ce12c099b0997b73bace9504a63ad7661ca7e38ee8916444e8488d7be6e8b0b44e1f414259bd5c9e80b058b49d8da00e7777369bd9

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
consensus or confidential-proof validationmerge-commit duplicate discount
AI analysis · Low 28/100

This change removes automatic numeric ordering from a Bitcoin type called CompactTarget because its underlying u32 value does not reliably reflect which mining target is actually harder. It also replaces the derived ordering of block headers with a clear byte-by-byte (lexicographic) ordering based on how headers are serialized. The patch is a correctness and API-safety improvement rather than a fix for an active exploit, but it prevents future bugs where code might accidentally sort or compare CompactTarget values as if the raw number meant 'harder' or 'easier'.