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.
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
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…
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…
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…
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…
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
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
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…
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
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 …
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
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
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…
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…
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…
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…
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…
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…
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
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.
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…
Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.
Security candidateMerge rust-bitcoin/rust-bitcoin#7051: pow: Fix overflow in min difficulty time checkby Andrew Poelstra · 529394c2 · Oct 17, 2026 · 1 fileMessage 96 · StrongLow 45Details
Commit message · Andrew Poelstra
Merge rust-bitcoin/rust-bitcoin#7051: pow: Fix overflow in min difficulty time check
7559880f2c3f98c9ebc4ab2e065fdd598300b4ad pow: Add test for min difficulty time near u32::MAX (Nuem.dev) b2547a3221d39d9ab33660d630db7e556765f43f pow: Fix overflow in min difficulty time check (Nuem.dev)
Pull request description:
In `next_target_after` the testnet min difficulty check adds twice the target spacing to the current header's time using `u32`. If the time is within 1200 seconds of `u32::MAX` this panics in debug builds and wraps in release builds, returning the wrong target.
Bitcoin Core does this comparison using `int64_t`. Do the same by converting to `i64` first, and add a regression test.
ACKs for top commit: apoelstra: ACK 7559880f2c3f98c9ebc4ab2e065fdd598300b4ad; successfully ran local tests tcharding: ACK 7559880f2c3f98c9ebc4ab2e065fdd598300b4ad
✓ 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 safetyfuzzing or regression evidencemerge-commit duplicate discount
AI analysis · Low 45/100
This commit fixes an arithmetic overflow bug in the code that calculates the next mining difficulty target for Bitcoin's testnet. When a block's timestamp was very close to the maximum value a 32-bit unsigned integer can hold, adding 20 minutes to it would either crash the program in debug builds or silently wrap around to a small number in release builds, causing the wrong difficulty target to be returned. The fix converts the values to 64-bit integers before adding them, matching how Bitcoin Core handles the same calculation.
The script integer decoding docs conflate two different limits: read_scriptint accepts at most four bytes, while read_cltv_scriptint accepts at most five bytes.
Correct the documented ranges and replace the contradictory four-byte explanation for CLTV decoding. Also clarify that NumericOverflow reports an encoding exceeding the decoding method's byte-length limit.
ACKs for top commit: apoelstra: ACK e4b1cff94ff3dda0fcec49720e597b7678cb4c54; successfully ran local tests
✓ 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
memory safetymerge-commit duplicate discount
AI analysis · Informational 15/100
This commit only fixes incorrect documentation comments for two functions that decode script integers. The actual code behavior did not change; only the explanatory text was corrected to match what the code already does.
e4db9c5aea015ea7606b6036dbe6dd0afff114eb Use backticks for code in Returns docs (Jamil Lambert, PhD) 5cc0fd2f447c2cf97c884910ffa3cd31bf7258f4 Fix network_hash return docs (Jamil Lambert, PhD) 1db36aeb3c5a02df33730d5d15665ee6a83624e5 Improve U256 overflowing operation docs (Jamil Lambert, PhD)
Pull request description:
`U256` overflowing operation docs call the result "the addition" and say an overflow "would have occurred" when the boolean means it did. Return docs also mix bare and backticked code values such as `true`, `None` and `Err`.
Reword the `U256` docs, fix the `network_hash` docs, and format code values in return docs as code.
ACKs for top commit: apoelstra: ACK e4db9c5aea015ea7606b6036dbe6dd0afff114eb; successfully ran local tests
✓ 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 safetycryptography-sensitive pathsigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 15/100
This commit is purely a documentation cleanup. It puts code words like true, false, None, and Err inside backticks in Rust doc comments, fixes a grammar mistake (who's -> whose), and rewords descriptions of U256 arithmetic overflow so they correctly say an overflow did occur rather than would occur. No program logic, function behavior, or security properties were changed.
6ec25a0e4548b16c2eb8c09a0bf2843565456533 internals: Bump version to 0.8.1 (Tobin C. Harding) 0b83d84c08bb92a453a7b0ecdfab07c440ad781d internals: Fix the changelog header links (Tobin C. Harding)
Pull request description:
In preparation for release add a changelog entry, bump the version, and update the lock files.
Also upgrade the dep for all users in this workspace.
`internals 0.8.0` is to be yanked because of #7002
ACKs for top commit: apoelstra: ACK 6ec25a0e4548b16c2eb8c09a0bf2843565456533; successfully ran local tests
✓ 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
This is a routine patch release (bitcoin-internals 0.8.1) that bumps a dependency version across the rust-bitcoin workspace. The changelog says it fixes a bug introduced in 0.8.0 (#7002) and that 0.8.0 will be yanked, but the actual code fix is not included in this commit. The commit only changes version numbers and lock files, so it is a release-tracking merge rather than a security patch itself.
Security candidateMerge rust-bitcoin/rust-bitcoin#6986: docs: move OP_CODESEPARATOR docs to ScriptCodeby Andrew Poelstra · 78534172 · Oct 13, 2026 · 2 filesMessage 91 · StrongInformational 19Details
Commit message · Andrew Poelstra
Merge rust-bitcoin/rust-bitcoin#6986: docs: move OP_CODESEPARATOR docs to ScriptCode
dc7982737271eda761b004f750811508e4a68eb9 docs: move OP_CODESEPARATOR docs to ScriptCode (jrakibi)
Pull request description:
Document `OP_CODESEPARATOR` logic and move the docs from the `WitnessScript` `AsRef` impl to the `ScriptCode` definition. They also apply to script code derived from `RedeemScript` and `ScriptPubKey`, so document them once instead of repeating them on each `AsRef` impl.
ACKs for top commit: tcharding: ACK dc7982737271eda761b004f750811508e4a68eb9 apoelstra: ACK dc7982737271eda761b004f750811508e4a68eb9; successfully ran local tests
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
This change is purely documentation. It moves existing explanations about a special Bitcoin script opcode, OP_CODESEPARATOR, from one place in the code comments to a more central location. No program logic, code behavior, or security checks were changed.
Security candidateMerge rust-bitcoin/rust-bitcoin#7038: feat(units): add saturating arithmetic methods to Weightby Andrew Poelstra · 89c8eb3d · Oct 13, 2026 · 1 fileMessage 96 · StrongInformational 15Details
Commit message · Andrew Poelstra
Merge rust-bitcoin/rust-bitcoin#7038: feat(units): add saturating arithmetic methods to Weight
6bda64fb9cbb76c46803e9e5f4baaf7fc35f6ecf feat(units): add saturating arithmetic methods to Weight (luhrhenz)
Pull request description:
Adds `saturating_add`, `saturating_sub` and `saturating_mul` to `Weight`, following `FeeRate` and the existing `checked_*` methods.
All three are `const fn`, `#[inline]`, `#[must_use]`, and delegate to the underlying `u64` saturating operations. Tests cover normal operation, boundary values, and overflow/underflow saturation.
No `saturating_div`: unsigned division cannot overflow, so there is nothing to saturate, and `checked_div` already returns `None` for `rhs == 0`.
Staging branch held in this fork. Relates to upstream rust-bitcoin closes #7031
ACKs for top commit: apoelstra: ACK 6bda64fb9cbb76c46803e9e5f4baaf7fc35f6ecf; successfully ran local tests tcharding: ACK 6bda64fb9cbb76c46803e9e5f4baaf7fc35f6ecf
✓ 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 15/100
This commit adds safe math helpers to a Bitcoin library's Weight type. It lets developers add, subtract, and multiply weight values without worrying about overflow or underflow, because the result will clamp to the largest or smallest allowed value instead of wrapping around. There is no security flaw here; it is a routine feature addition with tests.
Security candidateMerge rust-bitcoin/rust-bitcoin#7035: build(deps): bump astral-sh/setup-uv from 9.0.0 to 10.0.0by Andrew Poelstra · 9427fff4 · Oct 13, 2026 · 2 filesMessage 96 · StrongInformational 18Details
Commit message · Andrew Poelstra
Merge rust-bitcoin/rust-bitcoin#7035: build(deps): bump astral-sh/setup-uv from 9.0.0 to 10.0.0
7d4530345e92fa25fe8349a4c354b7db8d6bc41e build(deps): bump astral-sh/setup-uv from 9.0.0 to 10.0.0 (dependabot[bot])
Pull request description:
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 9.0.0 to 10.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/setup-uv/releases">astral-sh/setup-uv's releases</a>.</em></p> <blockquote> <h2>v10.0.0 🌈 Disable automatic caching for sensitive events and new QOL features</h2> <h2>Changes</h2> <p>Another breaking release, directly after v9.0.0 but we think the added security justifies that.</p> <h3>Extra security by default</h3> <p>If you use the default <code>enable-cache: auto</code> this will now <strong>DISABLE THE CACHE</strong> to protect against cache poisoning for the following events:</p> <ul> <li><code>pull_request_target</code></li> <li><code>workflow_run</code></li> <li><code>release</code></li> </ul> <p>You can read the full reasoning in <a href="https://redirect.github.com/astral-sh/setup-uv/issues/984">astral-sh/setup-uv#984</a></p> <h3><code>version: latest-known</code></h3> <pre lang="yaml"><code>- name: Install the latest version of uv known to setup-uv uses: astral-sh/setup-uv@v10.0.0 with: version: "latest-known" </code></pre> <p>This will now install the latest version with a checksum that is known by this action. The <a href="https://github.com/astral-sh/setup-uv/blob/4f6036f71cec78afb113b323f220c9185d983c12/src/download/checksum/known-checksums.ts">known <code>uv</code> checksums</a> are automatically updated but will take a release of this action to take effect. You won't be always using the latest & greatest but you will have an extra level of security.</p> <h3>Read python version from <code>.tool-versions</code></h3> <pre lang="yaml"><code>- name: Install uv based on the version defined in .tool-versions and also set python uses: astral-sh/setup-uv@v10.0.0 with: version-file: "pyproject.toml" </code></pre> <p>Will now also set the python version if it is defined in <code>.tool-versions</code>. You can read the details <a href="https://github.com/astral-sh/setup-uv/blob/main/docs/advanced-version-configuration.md#install-a-version-defined-in-a-requirements-or-config-file">in the docs</a></p> <h2>🚨 Breaking changes</h2> <ul> <li>Disable automatic caching for sensitive events <a href="https://github.com/eifinger"><code>@eifinger</code></a> (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/992">#992</a>)</li> </ul> <h2>🐛 Bug fixes</h2> <ul> <li>Reject paths in .tool-versions <a href="https://github.com/eifinger"><code>@eifinger</code></a> (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/1007">#1007</a>)</li> </ul> <h2>🚀 Enhancements</h2> <ul> <li>Read Python version from .tool-versions <a href="https://github.com/eifinger"><code>@eifinger</code></a> (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/996">#996</a>)</li> <li>Add latest-known version selector <a href="https://github.com/eifinger"><code>@eifinger</code></a> (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/993">#993</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/setup-uv/commit/ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d"><code>ae62891</code></a> chore(deps): roll up Dependabot updates (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/1013">#1013</a>)</li> <li><a href="https://github.com/astral-sh/setup-uv/commit/f9cdb47d487aee2be8925d1e57290177ad9e1ac2"><code>f9cdb47</code></a> Reject paths in .tool-versions (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/1007">#1007</a>)</li> <li><a href="https://github.com/astral-sh/setup-uv/commit/4f6036f71cec78afb113b323f220c9185d983c12"><code>4f6036f</code></a> Require pull requests for Dependabot rollups (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/1005">#1005</a>)</li> <li><a href="https://github.com/astral-sh/setup-uv/commit/8d6402c9b71205b2d8d0b82de531d8fed8430182"><code>8d6402c</code></a> chore(deps): roll up Dependabot updates (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/1004">#1004</a>)</li> <li><a href="https://github.com/astral-sh/setup-uv/commit/46f427bd47c794e99536b75ffaa9f27602425027"><code>46f427b</code></a> Read Python version from .tool-versions (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/996">#996</a>)</li> <li><a href="https://github.com/astral-sh/setup-uv/commit/8ed89c51143f65ea13eaba62db51dbb8ea52d0a3"><code>8ed89c5</code></a> ci: pin Alpine container image (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/995">#995</a>)</li> <li><a href="https://github.com/astral-sh/setup-uv/commit/8473c7fea42cdfd540f4b01317a17ac5f54126ae"><code>8473c7f</code></a> chore(deps): roll up Dependabot updates (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/994">#994</a>)</li> <li><a href="https://github.com/astral-sh/setup-uv/commit/18d451d679e1650bc59f25f17116168d04f30748"><code>18d451d</code></a> Add latest-known version selector (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/993">#993</a>)</li> <li><a href="https://github.com/astral-sh/setup-uv/commit/f45168497b927d08c229345a5ab9ad5c85418d0b"><code>f451684</code></a> Disable automatic caching for sensitive events (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/992">#992</a>)</li> <li><a href="https://github.com/astral-sh/setup-uv/commit/b68407c192114b6e47cc45b98289832c3df00d5e"><code>b68407c</code></a> chore: update known checksums for 0.12.3 (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/991">#991</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/setup-uv/compare/c771a70e6277c0a99b617c7a806ffedaca235ff9...ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d">compare view</a></li> </ul> </details> <br />
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
<details> <summary>Dependabot commands and options</summary> <br />
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
ACKs for top commit: satsfy: ACK 7d4530345e92fa25fe8349a4c354b7db8d6bc41e apoelstra: ACK 7d4530345e92fa25fe8349a4c354b7db8d6bc41e; successfully ran local tests
This is a routine update to a GitHub Actions helper used to install a Python tool called uv. The new version of the helper disables its built-in cache during sensitive workflow events to reduce the risk of cache poisoning. The change only affects two internal security-scanning workflows and does not alter the rust-bitcoin library code that users install.
Security candidateMerge rust-bitcoin/rust-bitcoin#7036: build(deps): bump dtolnay/rust-toolchain from 7e38f4b43b4db5c8dd498af069a4f6196df1d067 to e2a55d2ffb04f378e9626c28d38b36d230d1e12fby Andrew Poelstra · a44bee6a · Oct 13, 2026 · 4 filesMessage 91 · StrongInformational 16Details
Commit message · Andrew Poelstra
Merge rust-bitcoin/rust-bitcoin#7036: build(deps): bump dtolnay/rust-toolchain from 7e38f4b43b4db5c8dd498af069a4f6196df1d067 to e2a55d2ffb04f378e9626c28d38b36d230d1e12f
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from 7e38f4b43b4db5c8dd498af069a4f6196df1d067 to e2a55d2ffb04f378e9626c28d38b36d230d1e12f. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dtolnay/rust-toolchain/commit/e2a55d2ffb04f378e9626c28d38b36d230d1e12f"><code>e2a55d2</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/rust-toolchain/issues/187">#187</a> from dtolnay/pwn</li> <li><a href="https://github.com/dtolnay/rust-toolchain/commit/6af9a09a9f985be78d729e2c9b2440bdb0314675"><code>6af9a09</code></a> Unify flags[@] and downgrade[@]</li> <li><a href="https://github.com/dtolnay/rust-toolchain/commit/83d06109b7912fe94032e68e59feb6b9e3070e34"><code>83d0610</code></a> Safely handle action inputs</li> <li>See full diff in <a href="https://github.com/dtolnay/rust-toolchain/compare/7e38f4b43b4db5c8dd498af069a4f6196df1d067...e2a55d2ffb04f378e9626c28d38b36d230d1e12f">compare view</a></li> </ul> </details> <br />
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
<details> <summary>Dependabot commands and options</summary> <br />
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
ACKs for top commit: satsfy: ACK ceb67fdbc796e5f8e63fc02f9076f90beb48613b apoelstra: ACK ceb67fdbc796e5f8e63fc02f9076f90beb48613b; successfully ran local tests
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
This commit updates the version of a third-party GitHub Action used to install Rust in the project's automated workflows. The new version of the action fixes a security issue in how it handled workflow inputs, which could potentially be exploited in supply-chain attacks. The change only affects the project's own CI/build automation, not the Rust Bitcoin library code that end users run.
Security candidateMerge rust-bitcoin/rust-bitcoin#7017: key_expression: Add BIP-0032 test vector 4by Andrew Poelstra · 1a62a03d · Oct 13, 2026 · 1 fileMessage 96 · StrongInformational 15Details
Commit message · Andrew Poelstra
Merge rust-bitcoin/rust-bitcoin#7017: key_expression: Add BIP-0032 test vector 4
475e7a2232d3ef6788a20d837c65f106858912c4 key_expression: Add BIP-0032 test vector 4 (Ferdinando Ametrano)
Pull request description:
The tests in `key_expression/src/bip32.rs` cover BIP-0032 test vectors 1, 2, 3 and 5. This adds vector 4, which derives a hardened child from a private key with a leading zero byte (see btcsuite/btcutil#172).
The data is copied from BIP-0032 and checked with the existing `test_path` helper. The test passes on master with no code change.
*Assisted-by: my usual tools (Claude Sonnet 5.5, Internet, computer). Mistakes are mine.*
ACKs for top commit: apoelstra: ACK 475e7a2232d3ef6788a20d837c65f106858912c4; successfully ran local tests
✓ 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
secret or key materialdefensive validationfuzzing or regression evidencecryptography-sensitive pathmerge-commit duplicate discount
AI analysis · Informational 15/100
This commit only adds a new test case to the project's test suite. It does not change any production code. The new test verifies that the library correctly handles a specific Bitcoin key derivation scenario (BIP-32 test vector 4, involving a private key with a leading zero byte). The test already passes before this commit, so no bug is being fixed here.
Security candidateMerge rust-bitcoin/rust-bitcoin#6956: bitcoin: introduce ScriptCode for sighash computationby Andrew Poelstra · 4dcd466b · Oct 12, 2026 · 12 filesMessage 100 · StrongInformational 19Details
Commit message · Andrew Poelstra
Merge rust-bitcoin/rust-bitcoin#6956: bitcoin: introduce ScriptCode for sighash computation
dc64b80c64a062badef7f070c60be329862e13fe bitcoin: accept ScriptCode in P2WSH sighash (jrakibi) b7dab15c0912524f19e9234f2923613c7dda3ec8 bitcoin: test legacy and Segwit script code (jrakibi) 00462c353ae26e8a6c39e2500a6e36724975ae45 bitcoin: accept ScriptCode in legacy sighash (jrakibi) b0eb34c9a7a9c066883bceb03990232cbf513e04 bitcoin: return P2wpkhScriptCode from p2wpkh_script_code (jrakibi) 0ece781f091b113616756f79a4a1100db20b8ea7 bitcoin: change SegWit v0 encoding to accept ScriptCode (jrakibi) ab63f7a73db5ccdeb5a7d4178c157542510815dd bitcoin: add P2wpkhScriptCode (jrakibi) 8940e6697c2c77ab938c5c206e8d02d0d73f8df0 primitives: add AsRef<ScriptCode> for RedeemScript and ScriptPubKey (jrakibi) 1cfb377923fb746ab4fe30f0a61e2d2e6b5db07c primitives: add AsRef<ScriptCode> for witness scripts (jrakibi) ee4e9f0be5560c950c93ad057e28649339a71028 primitives: add new ScriptCode type (jrakibi)
Pull request description:
Introduce `ScriptCode` for sighash computation and `P2wpkhScriptCode` to hold the fixed 25 byte P2WPKH script code without allocating.
I tried to make the commits as atomic as possible and explain the reason behind each change in the commit message.
For witness scripts, I only added `AsRef<ScriptCode>` since the witness script is not always the script code. For the new `P2wpkhScriptCode`, it makes sense to implement `Deref` because it already holds the complete P2WPKH script code.
For OP_CODESEPARATOR handling in Segwit, we don’t need to introduce any removal logic as we did for legacy, since the remaining separators must be kept. tho it's still up to the caller to remove everything up to and including the last executed OP_CODESEPARATOR before the signature check, as clarified in the doc comment.
In #6079, Kix proposed `ScriptCodeBuf([u8; SCRIPT_CODE_LEN])`. I used `P2wpkhScriptCode` instead because ScriptCodeBuf might suggest a type that covers other output types too. I’m happy to rename it to ScriptCodeBuf if preferred.
Closes https://github.com/rust-bitcoin/rust-bitcoin/issues/6079, https://github.com/rust-bitcoin/rust-bitcoin/issues/6808 and #4135
ACKs for top commit: apoelstra: ACK dc64b80c64a062badef7f070c60be329862e13fe; successfully ran local tests
This is a code-quality and type-safety refactor for the rust-bitcoin library. It introduces a dedicated ScriptCode type for computing Bitcoin transaction signatures (sighashes), replacing the previous practice of reusing the WitnessScriptBuf type. The change makes the API clearer and reduces the chance that developers accidentally pass the wrong kind of script when signing transactions. There is no direct security vulnerability being patched here; it is a preventive correctness improvement.
✓ 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
access controlmerge-commit duplicate discount
AI analysis · Informational 15/100
This is a purely cosmetic code-formatting commit. A bot ran the nightly rustfmt tool and re-indented or rewrapped lines in four source files. No program logic, security checks, or behavior were changed.
Security candidateMerge rust-bitcoin/rust-bitcoin#7023: Evaluate macro arguments once in load_int_le and impl_hexby Andrew Poelstra · 497d877c · Oct 12, 2026 · 2 filesMessage 91 · StrongLow 32Details
Commit message · Andrew Poelstra
Merge rust-bitcoin/rust-bitcoin#7023: Evaluate macro arguments once in load_int_le and impl_hex
f5ba7ffcc43a031b9c0a8b36ad78d90dc4902c2a internals: Test impl_hex evaluates the lookup once (PeterXMR) 13da54c82b8f468d3f8a3bb1e86095168e2b6bc6 internals: Evaluate impl_hex lookup table once (PeterXMR) a792c1a96a05d6948a1ef962ad932e461f449314 hashes: Test load_int_le evaluates its arguments once (PeterXMR) 05721fc5aaf4c13a478e04cf7e43b7dcccc7ffbc hashes: Evaluate load_int_le arguments once (PeterXMR)
Pull request description:
Follow-up to the discussion on rust-bitcoin/hex-conservative#264, where apoelstra asked for an audit of rust-bitcoin for `macro_rules!` arguments that get evaluated more than once, and for a "hit count" unit test that locks the property in.
I checked every `macro_rules!` definition in the workspace for `expr`, `tt` and `block` captures that appear more than once in an expansion. Only two library macros re-evaluate a runtime argument:
* `load_int_le!` in `hashes/src/siphash24/mod.rs` expanded `$buf` twice and `$i` three times. * `impl_hex!` in `internals/src/u256.rs` expanded `$lookup` twice inside the per-byte loop, so the lookup table expression was evaluated 64 times per formatted `U256`.
Everything else is either a compile-time position (array lengths, const generics), a place expression that cannot be bound (`round!` in sha256, `compress!` in siphash24), mutually exclusive branches (`write_err!`, `read_push_data_len!`), or a test-only macro, so those are left alone.
Both fixes bind the argument with `match $x { x => ... }` as discussed in the hex-conservative PR. Each fix commit is followed by a test commit that passes a counting block expression as the argument and asserts it is hit exactly once; without the fix commit the tests observe 2/3 and 64 evaluations respectively.
The audit and patches were produced with the help of an LLM (Claude Fable 5.1, see the `Assisted-by` trailers) and reviewed by me.
ACKs for top commit: Kixunil: ACK f5ba7ffcc43a031b9c0a8b36ad78d90dc4902c2a apoelstra: ACK f5ba7ffcc43a031b9c0a8b36ad78d90dc4902c2a; successfully ran local tests; these are easy fixes so might as well merge them even if we decide to fix the macros later
✓ 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
access controlmerge-commit duplicate discount
AI analysis · Low 32/100
This merge commit fixes two internal Rust macros that accidentally evaluated their arguments multiple times instead of once. In one case, a buffer and index used in a hashing function were evaluated 2-3 times per call; in the other, a hex-character lookup table was rebuilt 64 times every time a large number was formatted as hex. The patch binds each argument to a single variable using a match expression, and adds tests that prove the arguments are now evaluated exactly once. These are correctness/performance hygiene fixes rather than an obvious remote exploit, but repeated evaluation of user-supplied expressions in macros can hide subtle bugs or side effects.
Security candidateMerge rust-bitcoin/rust-bitcoin#7014: Make source destructure official policy and apply it everywhereby Andrew Poelstra · db3686c3 · Oct 12, 2026 · 3 filesMessage 91 · StrongInformational 15Details
Commit message · Andrew Poelstra
Merge rust-bitcoin/rust-bitcoin#7014: Make source destructure official policy and apply it everywhere
A follow up of https://github.com/rust-bitcoin/rust-bitcoin/pull/6872#discussion_r4203301150
Add a new policy rule `P-ERROR-SOURCE`. An error with no inner error implements `source` by destructuring `self` and returning `None`. Adding a field later fails to compile at `source` instead of returning `None`.
The whole workspace already does this since the [sweep that introduced it](https://github.com/rust-bitcoin/rust-bitcoin/pull/6293), but nothing in the policy documents or enforces it. The consequence is that 3 posteriorly created types missed it. Fixed the two bip32 derivation errors in key_expression and `FeatureDataError` in p2p.
The last commit adds an internal link to `From<Infallible>` rule, which is not necessary but makes the document better IMO.
ACKs for top commit: apoelstra: ACK ad1906b2cd4c97e0108deb7d78b4d26d0a2e25cf; successfully ran local tests tcharding: ACK ad1906b2cd4c97e0108deb7d78b4d26d0a2e25cf
✓ 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
secret or key materialcryptography-sensitive pathmerge-commit duplicate discount
AI analysis · Informational 15/100
This is a code-quality and documentation patch. It adds a project policy saying that when a Rust error type has no underlying cause, the `source` method should explicitly destructure the error's fields before returning `None`. This makes future additions to the error type fail to compile unless `source` is updated, preventing accidental omissions. The patch also applies this style to three recently-added error types. There is no runtime behavior change and no security vulnerability is fixed or introduced.
Security candidateMerge rust-bitcoin/rust-bitcoin#7022: taproot-primitives: Add consensus validation tests for LeafVersionby Andrew Poelstra · 7723efad · Oct 11, 2026 · 1 fileMessage 91 · StrongInformational 15Details
Commit message · Andrew Poelstra
Merge rust-bitcoin/rust-bitcoin#7022: taproot-primitives: Add consensus validation tests for LeafVersion
a4eca1edbff5aabff13284a442fb5e81330e631a taproot-primitives: Add consensus validation tests for LeafVersion (Jaydbrown)
Pull request description:
This PR adds specific unit tests for `taproot_primitives` covering valid and invalid leaf versions:
- `leaf_version_future_valid`: Locks the rule that even, non-tapscript bytes (`0x00`, `0x02`, `0xc2`, `0xc4`, `0xfe`) round-trip through `from_consensus` and `to_consensus`. (The BIP tests in `bitcoin/tests/taproot.rs` only unwrap versions that already appear in vectors). - `leaf_version_invalid_rejected`: Makes sure `0x50` (annex prefix) returns an error as it is not a valid leaf. Verifies odd bytes (`0x01`, `0x03`, `0x51`, `0xc1`, `0xc3`, `0xff`) are invalid bytes and fail as per BIP-341/BIP-342. This test verifies invalid leaf versions are rejected. - `serde_leaf_version`: Exercises deserialization round-trip for `0xc2` and rejection of invalid values (`80`, `193`, and `256`) using `IntoDeserializer` behind the existing `serde` feature, requiring no extra dependencies or lockfile changes.
ACKs for top commit: apoelstra: ACK a4eca1edbff5aabff13284a442fb5e81330e631a; successfully ran local tests
✓ 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 · Informational 15/100
This commit only adds new unit tests for an existing Bitcoin Taproot leaf-version validation function. It does not change any production code, fix a bug, or alter behavior. There is no security issue in the commit itself.
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
✓ 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
`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:
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
✓ 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
✓ 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
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.
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
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
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.
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
✓ 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.
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
✓ 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.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
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.
✓ 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.
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
✓ 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.
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
✓ 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'.
Arithmetic on block heights, weights, fee rates and work panics on overflow, weight division on zero. The panic linked code inside units instead of at the caller.
std puts track_caller on its integer ops too.
73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
memory safety
AI analysis · Informational 19/100
This commit adds Rust's #[track_caller] attribute to arithmetic operations in the units crate. This is a debugging/quality-of-life improvement: when an operation panics (for example, adding two numbers that overflow), the error message will now point to the caller's code instead of deep inside the library. It does not change when panics happen, what values are computed, or fix any security vulnerability. It simply makes crash reports more useful for developers.