BC
← All projectsBitcoin Core

Bitcoin Core

The Bitcoin network's reference node and wallet implementation.

BitcoinSupply chainNormal
Repository coverage

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

402security candidates730second-pass queue3152AI analyses
171commits · 30 days
325commits · 60 days
1193commits · 180 days
2758commits · 365 days
Backfill bands
Aug 5 → Feb 61351 seen45 candidatesComplete
Feb 6 → Jun 61033 seen63 candidatesComplete
Jun 6 → Jul 6281 seen11 candidatesComplete
Jul 6 → Aug 5207 seen5 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.

73/100 average clarity
1453Strong · 80–100
1227Adequate · 60–79
715Thin · 40–59
88Opaque · 0–39
6security 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.
merge-script419112196589
Antoine Poinsot25422169
Ava Chow21874203071
MarcoFalke41923411074
fanquake24521230058
Lőrinc18121177081
Hennadii Stepanov25120221066
rkrux57957074
Sjors Provoost89889074
Sebastian Falbesoner33733073
David Gumberg55655072
Pieter Wuille95595066
Analysis record

Published AI watches

Last scanned 50 minutes ago

Informational 15 AI analysisMessage 81 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36704: doc: fix docs and enable `-Wdocumentation-pedantic`

This commit only changes documentation comments and enables a stricter compiler warning for documentation style. It does not alter any executable code, so it cannot introduce or fix a security vulnerability on its own.

0afaa731by Hennadii Stepanov+79−7716 files
No security note in commit
Low 41 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36040: Wallet: Don't backdate locktime rbf

This change fixes a privacy leak in Bitcoin Core's wallet. When users used the 'bumpfee' feature to replace a transaction with a higher fee, the replacement could sometimes end up with an older 'locktime' than the original transaction. Thi…

Privacy/fingerprinting issue in wallet transaction creationReplacement transaction locktime can be lower than original transaction locktimeAnti-fee-sniping random backdating can produce identifiable on-chain pattern
004cfb21by Ava Chow+171−86 files
Vendor flagged security relevance
Moderate 62 AI analysisMessage 86 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36342: wallet: reject recipient amounts above MAX_MONEY

This patch fixes a bug in Bitcoin Core's wallet transaction creation where extremely large output amounts could cause an integer overflow or even crash the node. Before the fix, a user could craft a transaction whose outputs added up to mo…

Integer overflow in recipient amount summationNode abort via failed assertion in coin selectionPossible creation of a transaction with wrapped/invalid total output value
8c360f08by Ava Chow+25−42 files
Vendor flagged security relevance
Low 49 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36637: torcontrol: send -torpassword hex-encoded to avoid escaping bugs

This change fixes how Bitcoin Core sends your Tor control password to the Tor daemon. Previously, the password was wrapped in quotes and only double-quote characters were escaped. If a password contained a backslash, Tor would misinterpret…

Improper escaping of protocol string (QuotedString)Potential Tor control command boundary confusionAuthentication bypass/failure risk for Tor control
6090f0afby Ava Chow+42−62 files
Vendor flagged security relevance
Low 30 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36387: wallet: rpc: Deprecate `encryptwallet` RPC for encrypting existing wallets.

This commit marks the existing 'recortar el video' feature as deprecated. It doesn't remove it, but it now shows a warning and requires a special flag to use. The change is meant to protect users from accidentally losing access to their bi…

Deprecation of risky wallet-encryption workflowKnown data-retention risk: unencrypted key material may remain on disk after late encryptionKnown backup/restore risk: post-encryption keys are not covered by pre-encryption backups
f98888efby Ava Chow+165−8819 files
Vendor flagged security relevance
Informational 21 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36087: util: Add and use AssertUnreachable

This is a code-cleanup change in Bitcoin Core. It replaces many uses of `assert(false)` and similar 'this should never happen' markers with a new macro called `AssertUnreachable()`. The goal is to make the code clearer for developers and a…

No security-relevant functional change: process still aborts on unreachable pathsRefactor only: replaces one abort mechanism with another equivalent oneAdds a new lint rule to enforce the preferred macro going forward
3ee664eaby Ryan Ofsky+274−26484 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36888: test: construct `coinselection_tests` output declaratively

This is a minor cleanup inside a single test file. It changes how a fake transaction output is built in a unit test so the empty script is written explicitly rather than created implicitly by resizing a list. The actual test behavior and t…

a690300eby merge-script+4−31 file
No security note in commit
Low 35 AI analysisMessage 81 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36890: Update secp256k1 subtree to latest master

This is a routine subtree update for the secp256k1 cryptographic library inside Bitcoin Core. It pulls in several upstream fixes, most of which are build-system cleanups, test improvements, and API hardening. The most user-visible changes …

Silent Payments API no longer aborts on empty input/output arrays; returns 0 per documented behaviorSilent Payments label-tweak overflow now rejected with ARG_CHECK instead of being silently handledecmult_const gains a _ge variant that clears intermediate Jacobian coordinates to reduce secret leakage
c3d1b4c0by merge-script+902−49134 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36867: test: remove legacy wallet leftovers from wallet functional tests

This commit only cleans up Bitcoin Core's own functional test suite. It removes unused multisig test code, fixes outdated docstrings, and drops a no-longer-needed command-line flag in test scripts. None of these changes affect the actual B…

c138ff92by merge-script+40−923 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36914: test: simplify wallet_basic and rpc_getblockfilter tests

This commit only cleans up two internal test scripts for the Bitcoin Core project. It replaces a manual network disconnect/reconnect pattern with a simpler way to create an unconnected block header, and removes a hard-coded number in favor…

079437ccby merge-script+6−112 files
No security note in commit
Informational 15 AI analysisMessage 82 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

test: Drop hard-coded magic 3

This is a tiny code cleanup in a Bitcoin Core test file. It replaces the hard-coded number 3 with the actual number of test nodes, making the test slightly easier to maintain. It does not change any real Bitcoin Core software behavior and …

1eeeee49by MarcoFalke+3−31 file
No security note in commit
Informational 20 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36864: rpc: deprecate iswatchonly field of getaddressinfo

This change hides an old, always-false field called 'iswatchonly' from the getaddressinfo API response unless the user explicitly asks for deprecated features. It is a routine cleanup, not a security fix, and does not change how wallets or…

66531447by merge-script+16−34 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36868: test: remove unused nodes and restarts from wallet tests

This commit only cleans up Bitcoin Core's own automated test suite. It removes unused test nodes and an unnecessary double restart in a few wallet-related test scripts. There is no change to the actual Bitcoin node software that users run,…

0fb50460by merge-script+24−324 files
No security note in commit
Moderate 68 AI analysisMessage 81 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36894: net_processing: set fDisconnect instead of calling DisconnectNode

This change fixes a bug where Bitcoin Core would disconnect every peer sharing the same IP address when one peer misbehaved. The problem is especially bad for users connecting through Tor, because all Tor traffic exits through a small set …

Denial of service via shared IP disconnectTor exit-node IP collision exploited to disconnect honest peersPeer-to-peer network isolation of inbound connections
6832a273by merge-script+5−53 files
Vendor flagged security relevance
Moderate 62 AI analysisMessage 73 · Adequate
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

net_processing: set fDisconnect instead of calling DisconnectNode

This commit fixes a bug where Bitcoin Core would disconnect every peer sharing the same IP address when one of them misbehaved. Because Tor exit nodes share a single IP address among many users, a malicious user could deliberately misbehav…

Denial-of-service via shared IP disconnectTor exit-node IP collision exploited to disconnect honest peersPeer-disconnection logic changed from subnet match to single-node flag
d63068c5by Eugene Siegel+5−53 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 81 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36875: scripted-diff: Drop `IWYU pragma: keep` from build config includes

This change is purely a code-cleanup and linting improvement. It removes repetitive 'IWYU pragma: keep' comments from build-config header includes and instead marks the generated config header itself with a single 'always_keep' pragma. The…

1fbb5253by merge-script+67−7265 files
No security note in commit
Informational 19 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36451: refactor: Use NotNull for CreateNewBlock and pimpls

This is a code cleanup change that makes the type system express 'this pointer can never be null' for several internal objects and for block templates. It removes redundant null checks and adds helper functions to create such non-null poin…

No security-relevant bug is patchedChange is purely a type-system refactorRemoves dead null-check error paths rather than adding safety checks
8130b3b8by Ryan Ofsky+78−5230 files
No security note in commit
Informational 15 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36848: test: drop flaky "server too slow" check from interface_http.py

This commit only changes a test file to make a timing check less strict. It removes an upper-bound timing assertion that was causing false test failures on slow CI machines. There is no change to Bitcoin Core's actual network or wallet cod…

e1a27bbbby merge-script+6−61 file
No security note in commit
Informational 20 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36488: rpc: wallet: Schedule mixed-case confTarget option deprecation

This commit is a routine cleanup, not a security fix. It removes support for an old, confusingly-named option ('confTarget') in two Bitcoin wallet commands (bumpfee and psbtbumpfee), leaving only the clearer 'conf_target' name unless the u…

8b0b5775by merge-script+24−34 files
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36408: test: allow 3 bytes of fee overestimate in assert_fee_amount

This is a tiny change to a Bitcoin Core test helper that makes fee-checking tests slightly more tolerant. It is not a security fix and does not affect production wallet code or consensus rules. It simply reduces how often an extremely rare…

dd9d016bby merge-script+3−21 file
No security note in commit
Repository ledger

Explore captured commits

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

Lower-priorityMerge bitcoin/bitcoin#36202: doc: add rel note about potential CJDNS removalby Ava Chow · af83bacd · Sep 9, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Ava Chow

Merge bitcoin/bitcoin#36202: doc: add rel note about potential CJDNS removal

d6a2341632a045f880693b7df60bd135f0c72e82 doc: add rel note about potential CJDNS removal (fanquake)

Pull request description:

Related to discussion in #36041.

ACKs for top commit:
achow101:
ACK d6a2341632a045f880693b7df60bd135f0c72e82
mzumsande:
ACK [d6a2341](https://github.com/bitcoin/bitcoin/commit/d6a2341632a045f880693b7df60bd135f0c72e82)
willcl-ark:
ACK d6a2341632a045f880693b7df60bd135f0c72e82

Tree-SHA512: 4e421a2d7a17202059d34878a0f702cdd12aa41693c281d36e4c0c670e67eef7631a54b66cb237082e5fa491873be6992b6d378cb6c2145fc5c870826225afcc

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
documentation-only discountmerge-commit duplicate discount
AI review queuedwallet: simplify wtx metadata syncby furszy · 31eedfc6 · Sep 9, 2026 · 1 fileMessage 45 · ThinInformational 14Details
Commit message · furszy

wallet: simplify wtx metadata sync

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

This is a small code cleanup in Bitcoin Core's wallet. It replaces a hand-written list of field-by-field copies with a single statement that copies the same set of fields all at once. The behavior is unchanged; no security issue is introduced or fixed.

AI review queuedwallet: sync tx replacement metadata to malleated txsby furszy · 6c16d76f · Sep 9, 2026 · 1 fileMessage 50 · ThinLow 40Details
Commit message · furszy

wallet: sync tx replacement metadata to malleated txs

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

This Bitcoin Core wallet patch fixes a bookkeeping bug: when a user replaces (bumps) a transaction, the wallet now also marks any malleated versions of the original transaction as replaced. Without this, the wallet could let a user try to bump a transaction that was already replaced, which would waste fees and create confusion, but it does not appear to allow theft or remote code execution.

AI review queuedwallet: simplify and restrict SyncMetaData to malleated txsby furszy · 2efaa676 · Sep 9, 2026 · 3 filesMessage 73 · AdequateLow 35Details
Commit message · furszy

wallet: simplify and restrict SyncMetaData to malleated txs

Clarifies that SyncMetaData is supposed to copy metadata for malleated
transactions only. Furthermore, ensure that copied metadata does
actually make it to malleated transactions, rather than copying from a
conflict that is not a malleation.

Code should now be friendlier to read/maintain and faster as well.

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

This Bitcoin Core wallet commit refactors how the wallet copies user metadata (labels, comments, etc.) between transactions that are 'malleated variants' of each other—transactions that spend the same inputs but have different signatures/transaction IDs. Previously, metadata could be copied from any transaction sharing an input, even if it wasn't a true malleated variant. The new code restricts copying to genuine malleated variants only. The commit also fixes a benchmark test that was using unrealistic dummy inputs. The change is described as a cleanup and correctness improvement, not a security fix, but it does close a window where wallet metadata could be incorrectly propagated between unrelated transactions.

AI review queuedMerge bitcoin/bitcoin#36116: iwyu: Fix warnings in `src/rpc` and treat them as errorsby merge-script · 7e75b3b9 · Sep 9, 2026 · 29 filesMessage 81 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36116: iwyu: Fix warnings in `src/rpc` and treat them as errors

7d54a88b44530e5a37f8881b1ea73c2edd8ef541 iwyu: Fix warnings in `src/rpc` and treat them as errors (Hennadii Stepanov)
462ff18d79bd69a4b204e8bd28ce4903eb296060 iwyu, refactor: Fix includes in some source files (Hennadii Stepanov)

Pull request description:

This PR continues the ongoing effort to enforce IWYU warnings.

See [Developer Notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#using-iwyu).

ACKs for top commit:
stickies-v:
re-ACK 7d54a88b44530e5a37f8881b1ea73c2edd8ef541

Tree-SHA512: aeeb8e2851e4012c4e8474c524fafae01f6c323537d533c693e9b018ee2752cedf19b35b3ac0433a287b2ad7953ae0a466d20ddd3a00e854985d2404abce2512

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathparser or protocol pathmerge-commit duplicate discountsecond-pass: unusually broad changesecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a routine code cleanup that adjusts which C++ header files are included in the RPC (remote procedure call) parts of Bitcoin Core. It also tells the project's automated 'include what you use' checker to treat mistakes in those files as errors going forward. There is no change to program logic, no bug fix, and no security-relevant behavior.

Security candidateMerge bitcoin/bitcoin#36203: Update secp256k1 subtree to latest masterby merge-script · 9d4325f4 · Sep 9, 2026 · 31 filesMessage 81 · StrongLow 47Details
Commit message · merge-script

Merge bitcoin/bitcoin#36203: Update secp256k1 subtree to latest master

da3401e50fc12ad71507e646c5e9ae2aaf524722 Squashed 'src/secp256k1/' changes from 687155df6b..a7f264373e (fanquake)

Pull request description:

Primarily prompted by https://github.com/bitcoin-core/secp256k1/pull/1932, which came up here: https://github.com/bitcoin/bitcoin/pull/35301#discussion_r3946630066. See https://github.com/bitcoin-core/secp256k1/issues/1930.

Includes:
* https://github.com/bitcoin-core/secp256k1/pull/1878
* https://github.com/bitcoin-core/secp256k1/pull/1908
* https://github.com/bitcoin-core/secp256k1/pull/1910
* https://github.com/bitcoin-core/secp256k1/pull/1911
* https://github.com/bitcoin-core/secp256k1/pull/1915
* https://github.com/bitcoin-core/secp256k1/pull/1916
* https://github.com/bitcoin-core/secp256k1/pull/1922
* https://github.com/bitcoin-core/secp256k1/pull/1923
* https://github.com/bitcoin-core/secp256k1/pull/1924
* https://github.com/bitcoin-core/secp256k1/pull/1928
* https://github.com/bitcoin-core/secp256k1/pull/1931
* https://github.com/bitcoin-core/secp256k1/pull/1932

ACKs for top commit:
theStack:
ACK ba9050ac9b359d7725bd2308431c0a4fd2fd38ed
sedited:
Re-ACK ba9050ac9b359d7725bd2308431c0a4fd2fd38ed

Tree-SHA512: ff44b7efb77f6f817a5f78c3731cf736ca196be63cb4e0688457e5b01e2fb6dbe5f6ca5257a1d31cdf4d8a59340eba2c99e14ad07e3c86dcd1925dead200982c

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
cryptography-sensitive pathmerge-commit duplicate discount
AI analysis · Low 47/100

This commit updates Bitcoin Core's embedded secp256k1 cryptography library to a newer version. The visible changes are mostly internal cleanups: renaming functions, moving public-key parsing/serialization code into a different file, replacing an internal accessor with direct structure access, and adding compile-time checks. The only user-visible behavior change mentioned by the project is a small API convenience fix in the experimental silentpayments module: callers can now pass either NULL or a non-NULL pointer when an array argument is empty. The commit also adds a size overflow guard when allocating a scratch buffer. There is no direct evidence in the commit message or diff of a critical vulnerability being fixed, but any change to low-level cryptographic code warrants careful review and testing before deployment.

Lower-priorityMerge bitcoin/bitcoin#36199: net: treat RFC 9637 new IPv6 documentation range as invalidby merge-script · ffe6aa57 · Sep 9, 2026 · 4 filesMessage 100 · StrongTriage 0Details
Commit message · merge-script

Merge bitcoin/bitcoin#36199: net: treat RFC 9637 new IPv6 documentation range as invalid

b48a27691ded8c9014be59b190726159b0bff038 fuzz: assert invalid addresses are not routable (Fabian Jahr)
e6c775c6d63a1683c9b2ab68d91b335f17e65d55 net: treat RFC 9637 new IPv6 documentation range as invalid (Fabian Jahr)

Pull request description:

[RFC 9637](https://www.rfc-editor.org/rfc/rfc9637.html) was newly introduced in 2024 but we don't handle this yet. This pull handles it in the same way as RFC 3849 of which 9637 is an extension.

This came up in #36196 because the new `GetMappedAS()` benchmark from https://github.com/bitcoin/bitcoin/pull/35285 asserts on these addresses being unmapped. New maps using `--fill` couldn't be embedded because the filling assigns these addresses. Making this range invalid in the code fixes the benchmarks.

ACKs for top commit:
0xB10C:
ACK b48a27691ded8c9014be59b190726159b0bff038
willcl-ark:
ACK b48a27691ded8c9014be59b190726159b0bff038
hodlinator:
re-ACK b48a27691ded8c9014be59b190726159b0bff038
sedited:
ACK b48a27691ded8c9014be59b190726159b0bff038

Tree-SHA512: d28552c0620f2b4c7de311d9ddf90bffb0f2dfdac4d76e305fc6b8138c8f3f070958a8a50679b45e1875cb5b24f6a7a10297ad327200b3ed5cd5ab5338187bcc

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
fuzzing or regression evidencemerge-commit duplicate discount
Security candidateSquashed 'src/secp256k1/' changes from 687155df6b..a7f264373eby fanquake · da3401e5 · Sep 9, 2026 · 31 filesMessage 96 · StrongLow 29Details
Commit message · fanquake

Squashed 'src/secp256k1/' changes from 687155df6b..a7f264373e

a7f264373e Merge bitcoin-core/secp256k1#1923: group: VERIFY input/output ge/gej/fe exhaustively
3f6ee3e989 Merge bitcoin-core/secp256k1#1931: tests: cover rejection of invalid plain seckey alongside a valid one
05f9289984 tests: silentpayments: cover rejection of invalid plain seckey alongside a valid one
978d3fa7f9 Merge bitcoin-core/secp256k1#1932: silentpayments: drop "empty key arrays must be NULL" requirement
ad3688d1e5 changelog: mention dropped NULL requirement for silentpayments key arrays
89e3a70662 silentpayments: drop "empty key arrays must be NULL" requirement
c36269ef95 group/refactor: Use constant expression for readability
031dbae659 group: Export secp256k1_ge_set_ge(j)_zinv properly in group.h
4f3bd158d5 group: Cover all input/output ge/gej/fe with VERIFY calls
0711443e6d group: Add missing FE_VERIFY checks on rzr outputs
1bd7492181 group: Remove redundant SECP256K1_GEJ_VERIFY
cddd125f72 group: Split functions into pre/post VERIFY and _impl
aa0af2fac4 Merge bitcoin-core/secp256k1#1928: tests: add coverage for exact-size DER signature serialization
500ccb60f7 tests: add coverage for exact-size DER signature serialization
a9a61831bd Merge bitcoin-core/secp256k1#1924: tests: add coverage for the DER long form length encoding
ddb1dfa770 tests: add coverage for the DER long form length encoding
1c8babcd6c Merge bitcoin-core/secp256k1#1922: field: Check that argument of _fe_set_int() is a constant
bae6b89a20 Merge bitcoin-core/secp256k1#1908: refactor: replace `_get_hash_context` with direct `->hash_ctx` access
f6d821db03 field: Fix typo in comment
1ce0066e60 field: Check that argument of _fe_set_int() is a constant
c8745f6b3a refactor: replace `_get_hash_context` with direct `->hash_ctx` access
3397f3cb28 Merge bitcoin-core/secp256k1#1878: field: correct `_fe_half` docs (output is not normalized, input requires magnitude <= 31)
86c7cbaf5a Merge bitcoin-core/secp256k1#1915: refactor: Move (de)ser helpers from musig and eckey to group
bfd40bd0ce refactor: Rename privkey to seckey in eckey helpers
d8ee6e6cf6 refactor: Move parsing helpers from musig to group
a37d7cc064 Merge bitcoin-core/secp256k1#1916: ecdh/ellswift: simplify seckey loading with `_scalar_set_b32_seckey`
3d69f4ce1c Merge bitcoin-core/secp256k1#1911: refactor: rename `ctx` param to `ecmult_gen_ctx` where applicable
c00dc81810 ecdh/ellswift: simplify seckey loading with `_scalar_set_b32_seckey`
81a5a7567d refactor: rename `ctx` param to `ecmult_gen_ctx` where applicable
2577fb1888 refactor: Move pubkey parsing and serialization from eckey to group
439278a649 Merge bitcoin-core/secp256k1#1910: scratch: reject sizes that overflow when added to header
3d4340d173 scratch: reject sizes that overflow when added to header
56e031a148 field: correct `_fe_half` docs (output is not normalized, input requires magnitude <= 31)

git-subtree-dir: src/secp256k1
git-subtree-split: a7f264373e5b187536c21e434f632b571b3ab178

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
signing boundaryaccess controlmemory safetycryptography-sensitive path
AI analysis · Low 29/100

This is a routine subtree update of the secp256k1 cryptographic library inside Bitcoin Core. Most changes are internal cleanups: renaming variables, moving helper functions between files, adding compile-time checks, and expanding test coverage. The only user-visible behavior change is in the experimental silentpayments module, where two functions no longer require callers to pass NULL for empty key arrays. A small hardening change also prevents an integer overflow when allocating a scratch workspace. There is no evidence in the commit of an active security vulnerability being patched.

Security candidateUpdate secp256k1 subtree to latest masterby fanquake · ba9050ac · Sep 9, 2026 · 31 filesMessage 45 · ThinLow 32Details
Commit message · fanquake

Update secp256k1 subtree to latest master

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 · Low 32/100

This commit updates the secp256k1 cryptographic library inside Bitcoin Core to a newer version. The visible changes are mostly internal cleanups: renaming functions, moving code between files, replacing a helper that returned a hash-context pointer with direct access, and adding compile-time checks for some low-level field operations. The changelog explicitly calls out one user-visible fix in the experimental silent-payments module: callers no longer have to pass NULL for empty key arrays. There is also a small hardening change that rejects scratch-space allocation sizes that would wrap around when added to the header size. No Bitcoin Core release notes or security advisory are included in the supplied materials, and the commit message does not describe this as a security fix.

Lower-priorityMerge bitcoin/bitcoin#35468: ci, iwyu: Request IPC file generation explicitlyby merge-script · 2285d193 · Sep 9, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · merge-script

Merge bitcoin/bitcoin#35468: ci, iwyu: Request IPC file generation explicitly

a31eb8bfa41262528cc4c5a1f9cd46c826597552 ci, iwyu: Request IPC file generation explicitly (Hennadii Stepanov)

Pull request description:

Fixes a part of https://github.com/bitcoin/bitcoin/issues/35361:
> ... other sporadic error output:
>
> ```
> [1](https://github.com/bitcoin/bitcoin/actions/runs/26292243180/job/77395542650#step:11:11661)
> error: no such file or directory: '/home/admin/actions-runner/_work/_temp/build/src/ipc/capnp/common.capnp.c++'
> error: no input files
> error: unable to handle compilation, expected exactly one compiler job in ''
> error: no such file or directory: '/home/admin/actions-runner/_work/_temp/build/src/ipc/capnp/common.capnp.proxy-client.c++'
> error: no input files
> error: unable to handle compilation, expected exactly one compiler job in ''
> error: no such file or directory: '/home/admin/actions-runner/_work/_temp/build/src/ipc/capnp/common.capnp.proxy-server.c++'
> error: no input files
> error: unable to handle compilation, expected exactly one compiler job in ''
> error: no such file or directory: '/home/admin/actions-runner/_work/_temp/build/src/ipc/capnp/common.capnp.proxy-types.c++'
> error: no input files
> ```

ACKs for top commit:
ryanofsky:
Code review ACK a31eb8bfa41262528cc4c5a1f9cd46c826597552. Thanks for the updates! This is a minimal fix getting rid of IWYU "fatal error" output from IPC files in the iwyu CI job.
willcl-ark:
ACK a31eb8bfa41262528cc4c5a1f9cd46c826597552

Tree-SHA512: 7059c3adbb1f8cb5f69149b45e180b01753dc93c852829eccbc70e6ddcfa212dec45a0e8625c6cb0ea3b8ee05f8f17181f36fd4d277e8f6cc9fe4578b0228166

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Security candidateMerge bitcoin/bitcoin#35778: scripted-diff: Use C.UTF-8 locale in all shell scriptsby merge-script · 005ea9f4 · Sep 9, 2026 · 13 filesMessage 91 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#35778: scripted-diff: Use C.UTF-8 locale in all shell scripts

46654094beefb6d41cad477fc63e8ddbaa5387a2 lint: Use C.UTF-8 locale only in shell scripts (Hennadii Stepanov)
982ee649381f234507e8286f9ca55239a69c1ad7 lint: Skip `libmultiprocess` subtree in `lint-shell-locale.py` (Hennadii Stepanov)
1194918a5d9c4aad1f7a8b9ab2c29666f89c4052 scripted-diff: Use C.UTF-8 locale in all shell scripts (Hennadii Stepanov)

Pull request description:

This unifies the used locales across the entire codebase.

Additionally, the `test/lint/lint-shell-locale.py` linter has been adjusted accordingly.

Also see https://github.com/bitcoin/bitcoin/pull/35775#issuecomment-5047323736.

ACKs for top commit:
fanquake:
ACK 46654094beefb6d41cad477fc63e8ddbaa5387a2

Tree-SHA512: e72e076614602937c5fe6ca27d0bb7bebe4464ef28455c43a1bd1d700ffeeea684365fa5749cb1e5fdad56178a1e88a544b5854783b57aef468efb105a03af57

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

This commit simply changes every shell script in the project from using the plain 'C' locale to the 'C.UTF-8' locale, and updates the project's linter to enforce the new standard. It is a code-quality and consistency change, not a security fix. There is no indication it addresses any vulnerability or security incident.

Security candidateMerge bitcoin/bitcoin#36181: ci: Upgrade IWYU to 0.27 compatible with Clang 23by merge-script · 064122af · Sep 9, 2026 · 39 filesMessage 81 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36181: ci: Upgrade IWYU to 0.27 compatible with Clang 23

3b944f194fddbcff11f7e5bad4e075a5eac5ed78 iwyu: Switch to generated Clang intrinsics mapping file (Hennadii Stepanov)
1b5ee3be5948a21d72fa671d8ad00d5daa1e9de3 ci: Upgrade IWYU to 0.27 compatible with Clang 23 (Hennadii Stepanov)
6ed7c535adb0eef4d66f33f7bd8a44f9c201805b iwyu: Prefer canonical headers (Hennadii Stepanov)

Pull request description:

The new IWYU [release](https://github.com/include-what-you-use/include-what-you-use/tree/clang_23) includes several improvements and bug fixes, including:
- https://github.com/include-what-you-use/include-what-you-use/pull/1991
- https://github.com/include-what-you-use/include-what-you-use/pull/2013
- https://github.com/include-what-you-use/include-what-you-use/pull/2014
- https://github.com/include-what-you-use/include-what-you-use/pull/2058
- https://github.com/include-what-you-use/include-what-you-use/pull/2062
- https://github.com/include-what-you-use/include-what-you-use/pull/2093

This allows us to remove all corresponding workarounds and patches.

Additionally, the compiler intrinsics mapping has switched from a hardcoded file to a dynamically generated one.

ACKs for top commit:
fanquake:
ACK 3b944f194fddbcff11f7e5bad4e075a5eac5ed78
l0rinc:
shallow code review ACK 3b944f194fddbcff11f7e5bad4e075a5eac5ed78

Tree-SHA512: b4b92be735244c00f667657f55501d60fd65a1b77e39b40275cdb7b82c95b6b53e9df6fa7f36560f0578a175bf61f6dc4409e167c6fdbc2248d957c17a916a67

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
access controlcryptography-sensitive pathsigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 15/100

This is a routine developer tooling update. It upgrades the Include What You Use (IWYU) static-analysis tool used in Bitcoin Core's continuous integration from version 0.22 (for Clang 22) to version 0.27 (for Clang 23), removes now-unnecessary local patches and workarounds, and adjusts many source-file #include directives to match the newer tool's recommendations. There is no change to the Bitcoin protocol, consensus logic, wallet behavior, or runtime security. It only affects how headers are checked during automated CI builds.

Lower-priorityMerge bitcoin/bitcoin#35303: policy: fix negative CFeeRate::ToString() formattingby merge-script · 99f81fe0 · Sep 9, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · merge-script

Merge bitcoin/bitcoin#35303: policy: fix negative CFeeRate::ToString() formatting

4200f8163a5560e3ba9511adf2332fc564ab1e06 policy: fix negative CFeeRate::ToString() formatting (joaonevess)

Pull request description:

`CFeeRate` may represent modified/effective fee rates, for example after a negative `prioritisetransaction` fee delta.

Previously, `CFeeRate::ToString()` formatted the quotient and remainder directly. For negative values, C++ `%` produces a negative remainder, which could result in malformed strings such as `0.-01 sat/vB`.

This changes formatting to emit the sign once and format non-negative quotient/remainder parts. Positive fee rate formatting is unchanged.

This is a display-only change and does not affect fee calculation or policy behavior.

ACKs for top commit:
polespinasa:
ACK 4200f8163a5560e3ba9511adf2332fc564ab1e06
winterrdog:
Re-ACK 4200f8163a5560e3ba9511adf2332fc564ab1e06
sedited:
ACK 4200f8163a5560e3ba9511adf2332fc564ab1e06

Tree-SHA512: bf499078040154ac7828d0a58248b725156b7cfd763a8d6a2e48bcbd77f195a5e0ca9d3a973becdc7436e0bafb46a22cb49dd7ae947f98b434bed7d048d18397

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
AI review queuedMerge bitcoin/bitcoin#35445: wallet, descriptor: Revert `StringType::COMPAT` for Miniscript expressions and drop the concept of a Descriptor ID that can be validatedby merge-script · fb26bc9c · Sep 9, 2026 · 18 filesMessage 100 · StrongModerate 57Details
Commit message · merge-script

Merge bitcoin/bitcoin#35445: wallet, descriptor: Revert `StringType::COMPAT` for Miniscript expressions and drop the concept of a Descriptor ID that can be validated

ec2adf3c51ca7322307be3d052bc0e9fa4332dd2 test: Check miniscript descriptor h and apostrophe equivalence (w0xlt)
a2d001b57c5f7adc6649e96fc2254d729f4ba750 test: Enforce descriptor reimport is an update (Ava Chow)
e2b2f1c5c6f720381b8cc182e750aadd703e4b4f descriptor: Rename DescriptorID to CompatDescriptorHash (Ava Chow)
6ad31c062c70101fe6463fe516de7edc651881be test: Add 31.0 to wallet backwards compatibility test (Ava Chow)
2a6c53371be770f7e945316481b231dcbed01dd9 wallet, spkm: Treat Descriptor ID as an opaque SPKM ID (Ava Chow)
62e826fa76172210572356eef9fa3cd3309baf56 wallet: Update WalletDescriptor from another one instead of overwriting (Ava Chow)
1113f7590ed095ec09a1d483f8c1ee5d54f0b0df wallet, export: Include descriptor cache when exporting descriptors (Ava Chow)
9fc7b2618b6abb0d79e794f34f16bebf74bbbe6a spkm: Remove DescriptorSPKM constructor that doesn't take a descriptor (Ava Chow)
770ff64bd7fd52e2c3d2634dc55046c5137cbe86 test: Add v30.2 and Miniscript to wallet backwards compatibility test (Ava Chow)
35d6a60dbf5a3424804430041f5f4091efb82b6c descriptor: Add ToCanonicalString (Ava Chow)
1d87af26ce1402d6fbc1db855434c36d0f7bd0c2 descriptors: Remove default StringType from PubkeyProvider::ToString() (Ava Chow)
1c7f9aaf758f6c8580a889fa6af675e6b365dbbf miniscript: Don't use StringType::COMPAT (Ava Chow)

Pull request description:

Since keys in Miniscript expressions were not correctly handling `StringType::COMPAT` when generating the Descriptor ID, in order to keep compatibility with previous versions, we need to continue to handle that enum incorrectly when computing the ID.

Given that this it the second time that we have had this issue, this PR also drops the concept of Descriptor ID being something that we can validate. Instead, the ID read in from the database is treated as an opaque blob that is used only to tie together the records related to a particular SPKM. It is instead treated as a ScriptPubKeyMan ID and users of it must be retrieving the ID from somewhere rather than computing it from a descriptor. The check of comparing the read ID to the computed ID is removed so that all previously created wallets can be read.

To clarify that the ID is not actually an ID, the function `DescriptorID` is renamed to `CompatDescriptorHash` and it is still used to generate the SPKM ID that is written to the database.

The ID was additionally being used to determine whether a descriptor is equal to another descriptor. This was used only by `importdescriptors` and `createwalletdescriptor`. These uses have been changed to do a string comparison rather than computing a hash and comparing the hashes. This removes the need to rely on `CompatDescriptorHash`.

The only caveat is that previously the hash was being used to do a map lookup in `m_spk_managers`, but this is now changed to use `std::find_if`. The lookup complexity changes from logarithmic to linear, which may be really bad for wallets with a lot of descriptors, e.g. migrated formerly non-HD wallets. I think in general though, the tradeoff is okay, and neither of these functions purport to be performant, especially as `importdescriptors` may also do a rescan which can take a long time. However, if that is a concern, an additional map of `CompatDescriptorHash` to DescriptorSPKM can be added.

Lastly, the wallet backwards compatibility test is updated to have 30.2 and 31.0 nodes, and a wallet with miniscript expressions. This exercises both creating wallets in previous versions and making sure they load in master, and making new wallets on master and checking whether they load, depending on the version.

Fixes #35432

ACKs for top commit:
pseudoramdom:
ACK ec2adf3c51ca7322307be3d052bc0e9fa4332dd2
davidgumberg:
crACK https://github.com/bitcoin/bitcoin/commit/ec2adf3c51ca7322307be3d052bc0e9fa4332dd2
w0xlt:
ACK ec2adf3c51ca7322307be3d052bc0e9fa4332dd2

Tree-SHA512: a32995c171b829a874cfd1bb03adde46fd8737322d5c44bc2ff27eff1ea8742c16c7ea1bb6fdc0fb2b89d0f11919850383799c3af126e7f55fe0878a8f1a7024

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
defensive validationsigning or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 57/100

This Bitcoin Core update fixes a wallet bug where certain newer-style descriptors (called Miniscript) could not be loaded after being created in older versions. The root cause was an internal ID that was computed differently for Miniscript than for other descriptors. Rather than keep trying to make the ID match perfectly, the developers changed the wallet to treat the stored ID as an opaque label and compare descriptors by their text instead. This prevents 'wallet corrupted' errors and allows older wallets to load safely. It is a backward-compatibility and robustness fix, not a remote-exploitable vulnerability.

Lower-priorityMerge bitcoin/bitcoin#35796: depends: fix IPC listeners on macOS dying when accepting a dead socketby merge-script · 494300f4 · Sep 9, 2026 · 2 filesMessage 93 · StrongTriage 0Details
Commit message · merge-script

Merge bitcoin/bitcoin#35796: depends: fix IPC listeners on macOS dying when accepting a dead socket

e07224f2d5543b207320dad008a6f240bab28301 depends: fix IPC listeners on macOS dying when accepting a dead socket (xyzconstant)

Pull request description:

This PR adds a depends patch to fix a Cap'n Proto bug present in macOS that throws the following exception after accepting a disconnected client:

```
mp/proxy.cpp:48: error: Uncaught exception in daemonized task.; exception = kj/async-io-unix.c++:1365: failed: setsocketopt(IPPROTO_TCP, TCP_NODELAY): Invalid argument
```

This goes uncaught killing `libmultiprocess`'s accept loop (`mp::ListenConnections()`) in the process.

### Root cause

After `accept()`, kj unconditionally calls `setsockopt(TCP_NODELAY)` on the connection socket. For Unix sockets, kj handles the usual "not supported" error codes, however, on macOS EINVAL is returned when the client has already disconnected and kj only tolerates that code when built for FreeBSD. The unexpected error then goes uncaught in the accept loop, causing the listener to stop accepting new connections.

See https://github.com/bitcoin-core/libmultiprocess/issues/319 for more details and instructions on how to reproduce it in Bitcoin Core using socat.

### Fix

The patch is based on the EINVAL handling from capnproto/capnproto@7df5bd078, which is only available on the not yet released v2 branch. It's applied to `capnp.mk` as a temporary workaround until capnproto/capnproto#2748 is available in a v1 release.

ACKs for top commit:
hebasto:
ACK e07224f2d5543b207320dad008a6f240bab28301, I have reviewed the code and it looks OK.
ryanofsky:
Code review ACK e07224f2d5543b207320dad008a6f240bab28301. Confirmed patch matches what was committed upstream (https://github.com/capnproto/capnproto/commit/85d8e47fcb156afc3d95ed9033ba470d6189cbff).

Tree-SHA512: 7d3b3dd6cabdc658971e0f20159ad36594759b3686d2e5dc74fb21900ccec0c637980e36fa71fbd808c642ce83f89c73f5bc788eb42644bceed67acb78e8eee5

93/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Security candidateMerge bitcoin/bitcoin#36076: psbt: preserve sighash type when merging inputsby Ava Chow · 4c9d55a6 · Sep 9, 2026 · 2 filesMessage 91 · StrongModerate 51Details
Commit message · Ava Chow

Merge bitcoin/bitcoin#36076: psbt: preserve sighash type when merging inputs

ea785a31f783e67adc9b4f0c4a8e54acd2794904 psbt: preserve sighash type when merging inputs (Thomas)

Pull request description:

`PSBTInput::Merge` copies every optional input field from the other input when it is absent locally, except `PSBT_IN_SIGHASH_TYPE`. So `combinepsbt` silently drops the sighash type whenever the first PSBT does not carry it, making the result depend on the argument order.

The field is what lets finalizers enforce the sighash type of existing signatures (BIP 174). When it is lost, `FinalizePSBT` falls back to the default type (`SIGHASH_ALL`, or `SIGHASH_DEFAULT` for taproot inputs), rejects signatures made with any other type as a sighash mismatch, and the PSBT can no longer be finalized. Combining a PSBT signed with `ALL|ANYONECANPAY` after a merely updated copy of the same PSBT reproduces this: `finalizepsbt` reports it as incomplete, while the reverse order finalizes and broadcasts fine.

Merge the sighash type like the other optional fields, keeping the one already present, and test both combine orders.

ACKs for top commit:
achow101:
ACK ea785a31f783e67adc9b4f0c4a8e54acd2794904
winterrdog:
Re-ACK ea785a31f783e67adc9b4f0c4a8e54acd2794904
vicjuma:
ACK ea785a31f783e67adc9b4f0c4a8e54acd2794904
rkrux:
lgtm ACK ea785a31f783e67adc9b4f0c4a8e54acd2794904

Tree-SHA512: 3487368509926c3dc0218dfab2e08273676504ad5ed4635e12e56c0484bda4cd94f4ba6f2df26ee4a902ce9a274546f727f8eca4a62eb0add3a700b2141eb272

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 boundarysigning or wallet pathmerge-commit duplicate discount
AI analysis · Moderate 51/100

This commit fixes a bug in Bitcoin Core's handling of Partially Signed Bitcoin Transactions (PSBTs). When two PSBTs for the same transaction were combined, the intended signature hash (sighash) type could be silently dropped depending on the order the PSBTs were provided. This could cause a valid, already-signed PSBT to become impossible to finalize, because the finalizer would fall back to a default sighash type and reject the existing signatures. The fix makes the merge behave like other optional fields: keep the local value if present, otherwise copy it from the other PSBT. A new test verifies both argument orders now produce the same, finalizable result.

Security candidateMerge bitcoin/bitcoin#34931: validation: abort on DB unreadable coins instead of treating them as missingby merge-script · 59fd053d · Sep 8, 2026 · 6 filesMessage 100 · StrongModerate 63Details
Commit message · merge-script

Merge bitcoin/bitcoin#34931: validation: abort on DB unreadable coins instead of treating them as missing

75f64e50c67dce423efb31fd0a0ac9e1d3320739 test: exercise node abort on UTXO deserialization failure (furszy)
4652cd0d828a14c64b896d1c4d435231bc4d0c50 txdb: detect UTXO deserialization errors via CDBWrapper::TryRead() (furszy)
5dfbb91b6cc5d1e0e3e49dad1fe9dddc4b06dfba dbwrapper: add TryRead() to distinguish errors from valid outcomes (furszy)
f78834fac91698ddbcdc807e422fc1bd733a6454 test: add missing coverage for CDBWrapper::Read() errors (furszy)

Pull request description:

Early note: the majority of this PR consists of test coverage. The changes per se are small.

If a UTXO entry on disk can't be deserialized, the node currently treats it as if the coin
wouldn't exist instead of aborting with an error. A non-existing coin has a very specific
meaning for consensus: any block that spends it would be permanently rejected as invalid
(`BLOCK_FAILED_VALID`), silently forking the node from the rest of the network. This can't
currently be triggered in practice (details below), but it's still the wrong behavior.

The root cause is that `CDBWrapper::Read()` returns `false` for both missing entries and
deserialization failures, so `CCoinsViewDB::GetCoin()` has no way to tell them apart.
`CCoinsViewErrorCatcher` was built to catch database read errors and abort, but it never
fires during deserialization errors because `CDBWrapper::Read()` swallows the exception
before it can propagate. This [comment](https://github.com/bitcoin/bitcoin/blob/8a8edc8d8824464ac7ece958f099f9dfa4cf9d3d/src/coins.cpp#L398-L411) in `ExecuteBackedWrapper()` spells out the code
intent very clearly.

As mentioned initially, this can't happen in practice today. It would require either a bug
in the coin serialization path, or a memory corruption before the data reaches LevelDB
(at which point we have bigger problems). Random disk-level bit flips are caught earlier
by LevelDB's verification (`verify_checksums=true`, enabled by default), which already
propagates correctly as `DB_INTERNAL_ERROR`. Regardless, a db read issue should
never be silently misinterpreted as a consensus violation.

This PR adds `CDBWrapper::TryRead()`, which returns a `ReadStatus` that lets callers
discriminate between all possible outcomes. `CCoinsViewDB::GetCoin()` switches on the
result and throws on any error, letting `ExecuteBackedWrapper()` do what it was designed
to do. `CDBWrapper::Read()` becomes a thin wrapper over `TryRead()`, preserving backward
compatibility for all other callers (so we don't have to change non-consensus code here).
`PeekCoin()` is also covered, as it delegates to `CCoinsViewDB::GetCoin()` at the database
level.

The idea of the PR is to go slowly over the code changes, first commit locks-in the current
`CDBWrapper::Read()` behavior . The second adds `TryRead()` with tests for all four
status codes. The third is the `CCoinsViewDB::GetCoin()` fix. The fourth is a functional
that ensures the node aborts correctly instead of silently diverging.

Testing Notes:
Cherry-picking the functional test commit on master demonstrates the consensus split
when the coin entry fails to deserialize.

Extra Note:
`CDBIterator::GetValue()` has the same silent-swallow pattern. Not consensus-critical.
Should be addressed in a follow-up.

ACKs for top commit:
ajtowns:
reACK 75f64e50c67dce423efb31fd0a0ac9e1d3320739
sedited:
ACK 75f64e50c67dce423efb31fd0a0ac9e1d3320739
mzumsande:
Code Review ACK [75f64e5](https://github.com/bitcoin/bitcoin/commit/75f64e50c67dce423efb31fd0a0ac9e1d3320739)

Tree-SHA512: 51b0114ea443544a2f1fbb8e63be6e1dff94d6f287221d566dbc98d666784a2b4c486acfb87eea5392bc1d092fb6d6dc0ff6782bcdccdcf15939281c895e384d

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

This change fixes a bug where Bitcoin Core could silently treat a corrupted UTXO database entry as if the coin did not exist. Under the old behavior, if a coin on disk could not be deserialized, the node would act like the coin was spent, potentially marking valid blocks as permanently invalid and forking away from the rest of the network. The fix makes the node clearly abort with an error instead, so the operator knows something is wrong and can recover without permanent consensus divergence. The bug is not currently triggerable in practice by an attacker, but the behavior was wrong and dangerous.

Security candidateMerge bitcoin/bitcoin#36168: PSBT: Make input/output `Merge()` methods return voidby merge-script · 33a363ea · Sep 8, 2026 · 2 filesMessage 81 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36168: PSBT: Make input/output `Merge()` methods return void

82deb69111f15db60aa364db9b06931918691564 PSBT: Make input/output `Merge()` methods return void (nebula-21)

Pull request description:

PSBT input/output `Merge()` methods always return `true` unconditionally and have no failure paths. As a result, the return value checks in `PartiallySignedTransaction::Merge()` can never fail and are dead code.
This makes the `bool` return type and `[[nodiscard]]` misleading.

This PR changes both methods to return `void` and remove the return value checks. If at some point in the future the failure logic is needed, it can be introduced again. For now using `void` makes the current behavior easier to understand.

ACKs for top commit:
achow101:
ACK 82deb69111f15db60aa364db9b06931918691564
polespinasa:
ACK 82deb69111f15db60aa364db9b06931918691564
sedited:
ACK 82deb69111f15db60aa364db9b06931918691564

Tree-SHA512: 694fdf19292d2f3627c90c5f111d7ecf5ad4f933d69eebf7c9ef37adee19be7de44002030ed4539aa5a28910acb751822b443f7ee22c80614296ef40d21c60da

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundarysigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 15/100

This commit is a straightforward code cleanup in Bitcoin Core's Partially Signed Bitcoin Transaction (PSBT) handling. It changes two internal methods from returning true (always, with no way to fail) to returning nothing at all, and removes now-unnecessary error checks. There is no security bug being fixed and no change in behavior for users.

AI review queuedMerge bitcoin/bitcoin#36176: wallet: avoid a crash when creating a wallet with -nosettingsby Ava Chow · 013b0b2d · Sep 7, 2026 · 3 filesMessage 100 · StrongLow 44Details
Commit message · Ava Chow

Merge bitcoin/bitcoin#36176: wallet: avoid a crash when creating a wallet with -nosettings

a34fc8b11a420c1ed9877a5dd73aab57aba17cd0 wallet: handle disabled startup settings (Robert Hamilton)
b7113e6f42c220792c2a9808943b714eb72c4f3e test: characterize disabled wallet settings (Robert Hamilton)

Pull request description:

I hit a crash while creating a new wallet in Bitcoin-Qt 31.1 on an Apple silicon Mac with `nosettings=1`. After looking through the crash report and code, I traced it to saving the wallet's load-on-startup setting: the settings writer throws when dynamic settings are disabled.

Wallet RPCs report errors with `-nosettings` after changing wallet state. In Qt, the same settings write causes an uncaught exception.

Return a persistence failure when dynamic settings are disabled so wallet operations finish with their existing startup-setting warning. This avoids an uncaught exception in Qt and RPC errors after the wallet state has already changed. Keep in-memory and no-op updates unchanged.

The first commit adds functional coverage for the current behavior. The second adds the fix, updates the assertions to expect success with warnings, and documents that failed settings writes keep the in-memory changes.

### Manual Reproduction

Run on the parent commit and the fixed commit, using a fresh temporary regtest data directory each time:

```sh
{ cmake -B build-wallet-review -DBUILD_GUI=ON && cmake --build build-wallet-review -j --target bitcoin-qt; } >/dev/null 2>&1
build-wallet-review/bin/bitcoin-qt -regtest -datadir="$(mktemp -d)" -nosettings -noconnect
```

Choose `File` > `Create Wallet...`, enter `repro`, leave the defaults unchanged, and click `Create`.

Before the fix, the application terminates with:

```text
libc++abi: terminating due to uncaught exception of type std::logic_error: Attempt to write settings file when dynamic settings are disabled.
```

After the fix, the wallet is created and the application displays:

```text
Wallet load on startup setting could not be updated, so wallet may not be loaded next node startup.
```

ACKs for top commit:
l0rinc:
tested ACK a34fc8b11a420c1ed9877a5dd73aab57aba17cd0
kevkevinpal:
tACK a34fc8b11a420c1ed9877a5dd73aab57aba17cd0
achow101:
ACK a34fc8b11a420c1ed9877a5dd73aab57aba17cd0
jeanpablojp:
tACK a34fc8b11a420c1ed9877a5dd73aab57aba17cd0

Tree-SHA512: 5e43028200478f89e71ebe7e0fc28c559f15e713226124899a69eb90d413d8ecaaaca02267d5a848068d70555b3e4334993f414de2debf6a22d73a51a71d1acd

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

This commit fixes a crash in Bitcoin Core's graphical wallet (Bitcoin-Qt) when creating a wallet while the user has disabled dynamic settings with -nosettings. Previously, the program would terminate with an uncaught exception because it tried to write to settings.json even though that file was disabled. After the fix, the wallet is created successfully and only shows a warning that the startup preference could not be saved. The same issue also caused RPC commands to return errors after the wallet state had already changed. The fix makes the settings write return a failure instead of throwing, so wallet operations complete normally and warn the user.

Security candidateMerge bitcoin/bitcoin#36113: psbt: fix rendering for invalid long sighash type fieldby Ava Chow · 2ed4be47 · Sep 7, 2026 · 4 filesMessage 96 · StrongInformational 24Details
Commit message · Ava Chow

Merge bitcoin/bitcoin#36113: psbt: fix rendering for invalid long sighash type field

1fca81960abcd5331765842776909d4787929cea psbt: fix rendering for invalid long sighash type field (Sjors Provoost)

Pull request description:

The `decodepsbt` incorrectly truncates the (32 bit) sighash type field before looking up its human friendly name. It's not dangerous, as such a signature would be invalid, but potentially confusing.

Fix that and add a test.

I plan to use `SighashToStr` in another pull request to render an error message for invalid sighash type field values, but it seemed worth fixing in a standalone PR.

ACKs for top commit:
jeanpablojp:
ACK 1fca81960abcd5331765842776909d4787929cea
achow101:
ACK 1fca81960abcd5331765842776909d4787929cea
winterrdog:
tACK 1fca81960abcd5331765842776909d4787929cea
rkrux:
lgtm ACK 1fca81960abcd5331765842776909d4787929cea

Tree-SHA512: 74f9206e53f7b72f251f9e0feab68abd8e1a1d99c976314675aba8231fb7c36ee484f21f443b8fee4a7518c9c5125f03c7121b6d9aa94ebb293271b0cc90cc0f

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
signing boundarysigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 24/100

This change fixes a display bug in Bitcoin Core's PSBT decoder. When a PSBT contains an invalid 32-bit sighash type value, the old code silently truncated it to one byte and then showed a friendly name for that truncated value, which could mislead a user into thinking an invalid signature type was valid. The fix makes the decoder return an empty string for any value that is not a single valid byte, and adds a test. It is not a security vulnerability that can steal funds or crash nodes.

Security candidateMerge bitcoin/bitcoin#36136: rpc: remove stale "canonical form" claim from getdescriptorinfo helpby merge-script · 19b0ff2f · Sep 7, 2026 · 1 fileMessage 98 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36136: rpc: remove stale "canonical form" claim from getdescriptorinfo help

1dad06eff3d564a56b72d35b7984ce868957daa7 remove stale canonical form claim from getdescriptorinfo help (Craig Raw)

Pull request description:

`getdescriptorinfo` describes its `descriptor` result as:

> The descriptor in canonical form, without private keys.

The returned string is a re-serialisation of the parsed descriptor with private keys removed. It is not a canonical form: descriptors that describe the same wallet routinely come back as different strings with different checksums, and this is deliberate.

Three things the RPC does not canonicalise:

- **The hardened derivation marker.** #26076 added `m_apostrophe` so that the marker the caller used is preserved rather than rewritten (`src/script/descriptor.cpp:262`, `:512`); it first shipped in v26.0. Before that, `FormatHDKeypath()` emitted `'` unconditionally (v25.0, `src/util/bip32.cpp:54`), so `h` supplied by the caller was rewritten — the behaviour #15740 objected to under the name "canonicalize". Where a single key expression mixes both markers, the style of its last hardened element is applied to the whole expression, which is still input-dependent.
- **Key order in `multi()` / `sortedmulti()`.** The order is preserved as given. For `sortedmulti()` the written order carries no meaning at all, since BIP 383 sorts the derived keys when the output script is built, so the same wallet has n! equally valid descriptors.
- **The checksum.** The `checksum` field is computed over the *input* string (`src/rpc/output_script.cpp:215`), so it can differ from the checksum embedded in the returned `descriptor` — e.g. when a private key was supplied.

```
$ bitcoin-cli getdescriptorinfo "sortedmulti(1,03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd,04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235)" | jq -r .descriptor
sortedmulti(1,03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd,04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235)#fne5696l

$ bitcoin-cli getdescriptorinfo "sortedmulti(1,04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235,03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)" | jq -r .descriptor
sortedmulti(1,04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235,03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)#w5gau8hw
```

Both produce the same output script; neither is more canonical than the other. The same applies to the marker:

```
$ bitcoin-cli getdescriptorinfo "wpkh([f6bb4c63/0h/0h/30h]028429a37c3f09c8c5cc1fab58df32d1a7da7616c748a40eeb1aae1d64acb9c5cc)" | jq -r .descriptor
wpkh([f6bb4c63/0h/0h/30h]028429a37c3f09c8c5cc1fab58df32d1a7da7616c748a40eeb1aae1d64acb9c5cc)#vk9vfu0h

$ bitcoin-cli getdescriptorinfo "wpkh([f6bb4c63/0'/0'/30']028429a37c3f09c8c5cc1fab58df32d1a7da7616c748a40eeb1aae1d64acb9c5cc)" | jq -r .descriptor
wpkh([f6bb4c63/0'/0'/30']028429a37c3f09c8c5cc1fab58df32d1a7da7616c748a40eeb1aae1d64acb9c5cc)#5wdxpxcx
```

The wording dates from v0.18.0 (`src/rpc/misc.cpp:153`), where it did describe the behaviour, and has been carried forward unchanged since. Whether the RPC should canonicalise was settled in #15740 in favour of round-tripping what the caller supplied; this only brings the description into line with that outcome.

I have deliberately not replaced the phrase with "normal form" or "normalized". Those terms already denote a different transformation in this codebase — BIP 380's "Normalization of Key Expressions with Hardened Derivation", implemented as `Descriptor::ToNormalizedString()` ("Normalized descriptors have the xpub at the last hardened step", `src/script/descriptor.h:140`) — which `getdescriptorinfo` does not perform. Dropping the qualifier avoids the collision.

Documentation only; no behaviour change. The phrase occurs nowhere else in the repo.

```diff
-{RPCResult::Type::STR, "descriptor", "The descriptor in canonical form, without private keys. For a multipath descriptor, only the first will be returned."},
+{RPCResult::Type::STR, "descriptor", "The descriptor, without private keys. For a multipath descriptor, only the first will be returned."},
```

If reviewers would rather the help positively state what is preserved (hardened marker and key order as supplied, checksum recomputed), I am happy to expand it; I have kept the change minimal.

ACKs for top commit:
l0rinc:
ACK 1dad06eff3d564a56b72d35b7984ce868957daa7
Eunovo:
ACK https://github.com/bitcoin/bitcoin/pull/36136/commits/1dad06eff3d564a56b72d35b7984ce868957daa7:
rkrux:
lgtm ACK 1dad06eff3d564a56b72d35b7984ce868957daa7

Tree-SHA512: 7b03100fdbc71c867d26094eb3975dfe967875a977ef3c7264b8bb3b920db319d6f11dbde1d39bb70fff2b2288eca42aadffc215ab7503dcc7b3bf62fc2692e5

98/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
secret or key materialdefensive validationmerge-commit duplicate discount
AI analysis · Informational 15/100

This is a one-word documentation fix in the help text of a Bitcoin Core RPC command. It removes the claim that getdescriptorinfo returns a descriptor in 'canonical form', because the command actually preserves caller-specific formatting such as apostrophe versus 'h' hardened-derivation markers and key ordering. There is no code behavior change and no security impact.

AI review queuedMerge bitcoin/bitcoin#36127: wallet: remove unused codeby merge-script · 0c6f2af9 · Sep 7, 2026 · 9 filesMessage 81 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36127: wallet: remove unused code

9f0543d69a1357371017c8289d9addc457b6f132 wallet: remove unused DatabaseOptions members (jeanpablo)
bbed824a64f0a5335442261b3abd63db22453cd6 wallet: remove unused warnings parameter from CreateFromDump (jeanpablo)
2f6aa41d3d195b8a4413efd35d10fa6cbd6cf368 wallet: remove unused WalletDatabase::m_refcount (jeanpablo)
f64b3fa70f6a318a03cfadec240c40a2b478adf1 wallet: remove unused CHDChain keypool index members (jeanpablo)
4afc7bc40d4ff4dd8205c757e3e851d813e17ee5 wallet: remove unused COutput::ToString (jeanpablo)
a0e9aac42802f6e22c5a227abcd16784d94d881d wallet: remove unused DescriptorScriptPubKeyMan::AddDescriptorKey (jeanpablo)

Pull request description:

Six unused items in src/wallet, one per commit.

`DescriptorScriptPubKeyMan::AddDescriptorKey`, a private wrapper that
lost its caller in #28333.

`COutput::ToString`, no callers. It was used by `COutput::print()`,
which went away with the other `print()` methods in wallet.

The two `CHDChain` keypool index members, whose last uses went away with
`LegacySPKM` in #28710.

`WalletDatabase::m_refcount`. Only BDB ever maintained it, and BDB went
away in #28710.

The `warnings` parameter of `CreateFromDump`, never written, along with
the loop that printed it in wallet-tool. The `push_back` went away with
the `-format` option in #31250.

The two BDB-only members of `DatabaseOptions`, `use_shared_memory` and
`max_log_mb`. Their last readers went away with BDB in #28710, along
with the `-privdb` and `-dblogsize` options that set them.

ACKs for top commit:
pablomartin4btc:
ACK 9f0543d69a1357371017c8289d9addc457b6f132
vicjuma:
ACK 9f0543d69a1357371017c8289d9addc457b6f132

Tree-SHA512: 0996043a116ee2c653b8c3e2987fbe6d5c4573db1477dfc1b06a433334af160c44382bb1ed0fe234dcaeda09f15b07c7e5d2c2f81fce63c780ef4cac1c30fb29

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ 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 is a routine cleanup that removes six pieces of unused wallet code from Bitcoin Core. Nothing is added or changed in behavior; only dead code is deleted. There is no security issue here.

Lower-priorityMerge bitcoin/bitcoin#35949: miner: Enforce Murch-Zawy rule (BIP54)by merge-script · 35104a86 · Sep 7, 2026 · 2 filesMessage 100 · StrongTriage 0Details
Commit message · merge-script

Merge bitcoin/bitcoin#35949: miner: Enforce Murch-Zawy rule (BIP54)

e014e5bb61c117f0230a092439e4bbc98cd383f5 miner: Enforce murch-zawy rule (BIP54) (Fabian Jahr)

Pull request description:

Opened separate from #35793 as [requested by darosior](https://github.com/bitcoin/bitcoin/pull/35793#discussion_r3704817804). This makes the miner enforce the murch-zawy rule for which #35793 adds the validation part.

A node whose clock is behind the first block of the difficulty period currently reports a mintime below the consensus floor in getblocktemplate and fails to build a valid template for the last block of the period so it can't mine until its clock catches up. This is mostly a theoretical concern on mainnet because it would require a huge system clock misconfiguration. It might be a bigger concern on test networks with volatile hashrates. But generally, I think our miner should be able to create valid templates in any situation.

ACKs for top commit:
kevkevinpal:
crACK [e014e5b](https://github.com/bitcoin/bitcoin/pull/35949/commits/e014e5bb61c117f0230a092439e4bbc98cd383f5)
darosior:
ACK e014e5bb61c117f0230a092439e4bbc98cd383f5
sedited:
ACK e014e5bb61c117f0230a092439e4bbc98cd383f5

Tree-SHA512: 299f83459e92654e028ce1c27470e1dcaae4a58de10687659860cdb425d3af330d3b8da6d8ca8f727c9eaebb2f0a3f3af5185f9daa57e92133435cb80a9e365c

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
AI review queuedMerge bitcoin/bitcoin#36096: rpc: avoid quadratic JSON construction when keys are uniqueby merge-script · 51db0e76 · Sep 7, 2026 · 5 filesMessage 91 · StrongInformational 20Details
Commit message · merge-script

Merge bitcoin/bitcoin#36096: rpc: avoid quadratic JSON construction when keys are unique

74ddf1c0a0ef8447686f59044b2fc2ee8d78c0e4 refactor: use structured bindings for map entries (Lőrinc)
21d5d5cb739062d40182cab66abac8eaf87a3c25 rpc: append unique container keys directly (Lőrinc)
23e512a58e69e16ede660ea46d0f6e15408bb371 rpc: avoid quadratic prioritised transaction JSON (Lőrinc)

Pull request description:

**Problem:** `getprioritisedtransactions` lets node operators inspect fee adjustments.
While building the response, the RPC checks each transaction ID against all previous IDs, even though duplicates are impossible.
The same unnecessary search appears in a few other RPC responses built directly from `std::map` or `std::set` keys.

**Fix:** Each changed response key comes from a `std::map` or `std::set`, where keys are unique, so insertion can skip the linear `findKey()` call.

**Reproducer:** On a RPi 4, the test below took almost a minute before the fix and about half that time after.
The other changed map and set loops perform the same per-key search, so their response construction has the same quadratic-to-linear scaling as the number of entries grows.

<details>
<summary>Reproducer commands</summary>

```patch
diff --git a/test/functional/mining_prioritisetransaction.py b/test/functional/mining_prioritisetransaction.py
--- a/test/functional/mining_prioritisetransaction.py
+++ b/test/functional/mining_prioritisetransaction.py
@@ -11,6 +11,7 @@ from test_framework.blocktools import NORMAL_GBT_REQUEST_PARAMS
from test_framework.messages import (
COIN,
MAX_BLOCK_WEIGHT,
+ ser_uint256,
)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
@@ -215,4 +216,10 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
assert_raises_rpc_error(-1, "getprioritisedtransactions",
self.nodes[0].getprioritisedtransactions, True)

+ self.log.info("Test getprioritisedtransactions order")
+ txids = [ser_uint256(i).hex() for i in range(20_000, 0, -1)]
+ self.nodes[0].batch([self.nodes[0].prioritisetransaction.get_request(txid, 0, 1) for txid in txids])
+ assert_equal(list(self.nodes[0].getprioritisedtransactions()), txids[::-1])
+ self.clear_prioritisation(self.nodes[0])
+
# Test `prioritisetransaction` invalid `txid`
```
</details>

ACKs for top commit:
sedited:
ACK 74ddf1c0a0ef8447686f59044b2fc2ee8d78c0e4
hodlinator:
re-ACK 74ddf1c0a0ef8447686f59044b2fc2ee8d78c0e4

Tree-SHA512: 0e9204a3dab448f370c37f668dc877c689b6cfd273242ab72fc54551717f58fec00ff6f199b009d8980a5549f1cea1607f91c6afc1e06e6aa86c154d2a15cb0d

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

This change is a performance improvement, not a security fix. It replaces a slow method for building JSON responses in several Bitcoin RPC commands with a faster one. The old method could waste CPU time when returning very large responses because it unnecessarily checked for duplicate keys in containers that cannot have duplicates. The new method skips that check, making large responses faster to generate. There is no indication this change fixes a vulnerability or can be directly exploited.

Lower-priorityMerge bitcoin/bitcoin#35164: test: cover P2SH sigop counting in test_witness_sigopsby merge-script · 161a9add · Sep 7, 2026 · 1 fileMessage 91 · StrongTriage 0Details
Commit message · merge-script

Merge bitcoin/bitcoin#35164: test: cover P2SH sigop counting in test_witness_sigops

d180b891a2904fb787ac5fa1ed66f56c98496698 test: add mixed P2SH/witness sigop accounting (Lőrinc)
6e60c362bc1e373a284911381e2a513f57f5f26b test: add P2SH sigop counting coverage (Musa Haruna)

Pull request description:

Add test coverage for sigop counting in P2SH spends in `test_witness_sigops()`, addressing the existing TODO.

The new cases mirror the existing P2WSH sigop tests by constructing transactions that:

- remain below the block sigop limit (accepted),
- exceed the limit (rejected with bad-blk-sigops)

Since P2SH sigops are accounted as legacy sigops, the expected sigop cost accounts for the 4× legacy weighting applied during consensus validation.

The added coverage verifies the enforcement of the block sigop limit for both witness and P2SH spends, including mixed P2SH/witness transactions.

**Acknowledgement:** During review ([comment](https://github.com/bitcoin/bitcoin/pull/35164#pullrequestreview-4769420630)), **l0rinc** demonstrated, using mutation testing on his branch [here](https://github.com/l0rinc/bitcoin/pull/248), that the original test suite would not detect two consensus sigop undercounting bugs. Those experiments helped validate the coverage added by this PR and motivated the inclusion of the mixed P2SH/witness regression test.

ACKs for top commit:
l0rinc:
reACK d180b891a2904fb787ac5fa1ed66f56c98496698
Bicaru20:
ACK d180b891a2904fb787ac5fa1ed66f56c98496698
sedited:
ACK d180b891a2904fb787ac5fa1ed66f56c98496698

Tree-SHA512: 795923f56316c3cad4d02a572ed6486a0f3f62bd524fb162d2bcd884108485974e96f38c08b5ff0a8659feecfc208c8d7e93dde2b9e0517c70f6343c2063d9b5

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
defensive validationfuzzing or regression evidencemerge-commit duplicate discount