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
172commits · 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 1 minute 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.

Security candidateMerge bitcoin/bitcoin#36415: rpc: clarify preciousblock help textby merge-script · 66776840 · Oct 3, 2026 · 1 fileMessage 81 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36415: rpc: clarify preciousblock help text

15d092639957242d443a680d380f8df1def2bd4e rpc: clarify preciousblock help text (ViniciusCestarii)

Pull request description:

The preciousblock help says only "Treats a block as if it were received before others with the same work". This isn't wrong but could be clearer and it also leaves out cases that confuse users, including me (see discussion in #35300):

- The call has no effect when the block has less work than the current tip, and that includes any ancestor of the tip. A successful return doesn't mean the tip changed. ([code](https://github.com/bitcoin/bitcoin/blob/69142eacd1374925cc9e4ea736c21fcec16307d0/src/validation.cpp#L3504-L3507))
- It only breaks ties between equal-work chains and doesn't pin the chain. If another chain gains more work, the node switches to it as usual. ([code](https://github.com/bitcoin/bitcoin/blob/69142eacd1374925cc9e4ea736c21fcec16307d0/src/node/blockstorage.cpp#L174-L182))

This adds both points to the help text and doesn't change any behavior.

ACKs for top commit:
instagibbs:
ACK https://github.com/bitcoin/bitcoin/pull/36415/commits/15d092639957242d443a680d380f8df1def2bd4e
maflcko:
lgtm ACK 15d092639957242d443a680d380f8df1def2bd4e

Tree-SHA512: cc2bc740bb0e9ebc442b35b31b59b6f5ec56da23a555352e1491d98684d1722617e18072e05807e95be23b8a14ddd20aed01d67fae42c45cb2c788b1f999dc8a

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

This change only updates the help text shown by the preciousblock RPC command to explain more clearly when it has no effect and that it does not permanently lock the chain. No code behavior was changed.

Security candidateMerge bitcoin/bitcoin#36052: ci: Doc: Move all config comments right next to the option they explainby merge-script · 9f059527 · Oct 2, 2026 · 26 filesMessage 81 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36052: ci: Doc: Move all config comments right next to the option they explain

fa90a8a01318493d39bca924dbd51c72f0232e4c ci: [refactor] Use eval-based string-to-argv conversion for FUZZ_TESTS_ARGS (MarcoFalke)
fa18f9aeac8e22d1aeae78f9bceb4a9694ed1b2c ci: Doc: Move all config comments right next to the option they explain (MarcoFalke)
fa0e84ec53fcf9cc85af29e1a36983b0575e17d7 ci: refactor: Use printf %q quoting for BITCOIN_CONFIG (MarcoFalke)

Pull request description:

This is a CI doc-style-cleanup. `BITCOIN_CONFIG` is a single manually-formatted-and-quoted large string. This is fine, but shellcheck doesn't like when trailing comments are added: `SC2155 -- Declare and assign separately`.

Fix this style by using `printf` to format the single string. The second commit then moves the comments right into (or next to) the line that it concerns.

ACKs for top commit:
hebasto:
re-ACK fa90a8a01318493d39bca924dbd51c72f0232e4c.
willcl-ark:
ACK fa90a8a01318493d39bca924dbd51c72f0232e4c

Tree-SHA512: d683829b36469ab9c0c799a918a0d7b0be12389a01bc18f3bb43cff41049269d3ea398a478329bc5f7d2e1619642e2cf4aa991f5f5c299ab3acbfc64e27a6f8a

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
fuzzing or regression evidencesigning or wallet pathauthentication pathmerge-commit duplicate discount
AI analysis · Informational 15/100

This commit is a documentation and code-style cleanup for Bitcoin Core's continuous integration (CI) scripts. It changes how build configuration strings are formatted in shell scripts so comments can sit next to the options they describe, and it switches one fuzz-test argument handling pattern to use an array. There is no change to the Bitcoin protocol, wallet logic, networking, or any code that runs in production. It is purely a CI maintenance refactor.

Security candidateMerge bitcoin/bitcoin#36391: test: fix typo in rpc_psbtby merge-script · 4b612c6b · Sep 30, 2026 · 1 fileMessage 91 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36391: test: fix typo in rpc_psbt

0a8ffe9051ab6c6192c8ec8716bac74e625747c4 test: fix typo in rpc_psbt (Bruno Garcia)

Pull request description:

s/walletcreatepsbt/walletcreatefundedpsbt

ACKs for top commit:
maflcko:
lgtm ACK 0a8ffe9051ab6c6192c8ec8716bac74e625747c4

Tree-SHA512: fa227c6ac09469130555ff3253dce865b84d7c7001a39c84dc7863e88a178703729193aced70dc9f48b2870ae0d206c9b3734ea6e55048220b461d81b3ffb206

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 · Informational 15/100

This commit fixes a one-word typo in a comment inside a test file. The comment incorrectly referred to 'walletcreatepsbt' when the surrounding test code actually calls 'walletcreatefundedpsbt'. No code behavior changes, and there is no security impact.

Security candidatetest: fix typo in rpc_psbtby Bruno Garcia · 0a8ffe90 · Sep 30, 2026 · 1 fileMessage 82 · StrongInformational 15Details
Commit message · Bruno Garcia

test: fix typo in rpc_psbt

s/walletcreatepsbt/walletcreatefundedpsbt

82/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides an explanatory body✓ Mentions testing or verification
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 15/100

This commit fixes a typo in a comment within a test file. The comment incorrectly referred to 'walletcreatepsbt' when the surrounding test code actually exercises 'walletcreatefundedpsbt'. No code behavior changes, and there is no security impact.

Security candidateMerge bitcoin/bitcoin#36377: doc: add 461 (Deterministic ECDSA signatures with low-R grinding) to bips.mdby merge-script · e0f16ef9 · Sep 30, 2026 · 1 fileMessage 81 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36377: doc: add 461 (Deterministic ECDSA signatures with low-R grinding) to bips.md

d57346d682f17e6cf09f8acc5e7893ee16eec193 doc: add 461 (Deterministic ECDSA signatures with low-R grinding) to bips.md (Sebastian Falbesoner)

Pull request description:

Note that the mailing list discussion on the [BIP](https://github.com/bitcoin/bips/blob/master/bip-0461.md) mentions Bitcoin Core and the linked pull request #13666 (released in v0.17.0) explicitly: https://groups.google.com/g/bitcoindev/c/boEZRlqczvw/m/F4Bvid36CwAJ

ACKs for top commit:
achow101:
ACK d57346d682f17e6cf09f8acc5e7893ee16eec193
davidgumberg:
ACK https://github.com/bitcoin/bitcoin/commit/d57346d682f17e6cf09f8acc5e7893ee16eec193

Tree-SHA512: 6cf0c91ae8518d06a779aa91ee963341bc51cb941ecff0823a9a0e6a9d0ffb9e618f29336f7a4d8c72889d15fe59429623fe0f029c0f1b0f6b353da58e778fa2

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 boundarydocumentation-only discountmerge-commit duplicate discount
AI analysis · Informational 15/100

This commit is a documentation-only update. It adds a single line to Bitcoin Core's list of implemented BIPs, noting that BIP 461 (a technique for making ECDSA signatures smaller and deterministic) has been implemented since version 0.17.0. No code was changed, and there is no security fix or vulnerability.

Security candidateMerge bitcoin/bitcoin#36381: test: avoid testing at the exact `-maxfeerate` boundaryby Ava Chow · ba8fdb97 · Sep 29, 2026 · 1 fileMessage 100 · StrongInformational 15Details
Commit message · Ava Chow

Merge bitcoin/bitcoin#36381: test: avoid testing at the exact `-maxfeerate` boundary

025768fb37cefdffcfc47376055bedb103699565 test: avoid testing at the exact `-maxfeerate` boundary (ismaelsadeeq)

Pull request description:

Fixes #36363

`test_maxfeerate` configured `-maxfeerate=0.00001009` and then created a
transaction requesting the exact same fee rate. This is fragile because the
wallet sizes the fee from the estimated (maximum) signed vsize, while the
`-maxfeerate` limit is checked against the actual signed vsize.

When the actual signature is smaller than the estimate, the actual vsize is smaller than
estimated resulting in a higher feerate and the transaction is rejected, causing
intermittent CI failures.

Request a fee rate slightly below `-maxfeerate` so the transaction is accepted
regardless of the signature size, while still exercising the limit.

Can be reproduced with

```diff
--- a/test/functional/wallet_send.py
+++ b/test/functional/wallet_send.py
@@ -221,8 +221,17 @@ class WalletSendTest(BitcoinTestFramework):
self.nodes[0].sendtoaddress, address=self.nodes[0].getnewaddress(), amount=1, fee_rate=11)
self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), amount=1, fee_rate=9)

- self.restart_node(0, extra_args=['-maxfeerate=0.00001009'])
- self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), amount=1, fee_rate=Decimal("1.009"))
+ self.restart_node(0, extra_args=['-maxfeerate=0.00001009', '-changetype=bech32m'])
+ w = self.nodes[0].get_wallet_rpc(self.default_wallet_name)
+ tr_addr = w.getnewaddress(address_type="bech32m")
+ funding_txid = w.sendtoaddress(tr_addr, 5)
+ self.generate(self.nodes[0], 1)
+ vout = next(o["n"] for o in w.gettransaction(funding_txid, verbose=True)["decoded"]["vout"]
+ if o["scriptPubKey"]["address"] == tr_addr)
+ # Spend the taproot input at exactly maxfeerate. The tr() descriptor
+ # estimates a 65-byte sig but the key-path spend is 64 bytes, so the
+ # estimated vsize always exceeds the actual deterministic rejection.
+ w.send(outputs={w.getnewaddress(): 1}, fee_rate=Decimal("1.009"),
+ options={"inputs": [{"txid": funding_txid, "vout": vout}], "add_inputs": False})
```

The actual failure in #36363 is intermittent because legacy output signatures only sometimes result in a tx size smaller than estimated. It can be reproduced in master by running the test on the file from 100 to 200 times.

And running it again at the same time with this PR does not fail.

ACKs for top commit:
maflcko:
lgtm ACK 025768fb37cefdffcfc47376055bedb103699565
achow101:
ACK 025768fb37cefdffcfc47376055bedb103699565
furszy:
utACK 025768fb37cefdffcfc47376055bedb103699565

Tree-SHA512: 9e70b238f22e6d75108c1b10096008aad5f1bea7ddbb51a11fe722674adcd2dada3dabe577a6049b242fcf826ccd582c16a025b406742ad6b3195a0dae27b44f

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

This commit fixes a flaky automated test in Bitcoin Core. The test was checking the maximum transaction fee rate by creating a transaction at the exact boundary, which sometimes failed because the real transaction size could be slightly smaller than estimated. The fix simply lowers the requested fee rate in the test so it no longer sits exactly on the boundary. There is no change to production code or to any real security behavior.

Security candidateMerge bitcoin/bitcoin#36364: tools: Call SHA256AutoDetect in bitcoin-util, bitcoin-tx and bitcoin-walletby merge-script · dc2a9987 · Sep 29, 2026 · 3 filesMessage 81 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36364: tools: Call SHA256AutoDetect in bitcoin-util, bitcoin-tx and bitcoin-wallet

4048909a53422bf86b207a9b5c8650e8edd25737 tools: Call SHA256AutoDetect in bitcoin-util, bitcoin-tx and bitcoin-wallet (Torkel Rogstad)

Pull request description:

Only kernel::Context users selected a hardware SHA256 implementation, so these tools fell back to the generic one. On an M2 Max, grind is ~5x faster and signing 2000 P2PKH inputs with bitcoin-tx ~2.3x.

ACKs for top commit:
maflcko:
lgtm ACK 4048909a53422bf86b207a9b5c8650e8edd25737
furszy:
utACK 4048909a53422bf86b207a9b5c8650e8edd25737

Tree-SHA512: 0edc6b78efbf0c84c22bbe98bd1ab295accc9530e24cee8f0faed9f63515fe8b677e8c33d3b46e0f1c0a44b422374cd7395ce163468d98772ea72a8faa9a1cfa

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 change makes three Bitcoin command-line tools (bitcoin-tx, bitcoin-util, and bitcoin-wallet) automatically pick the fastest SHA-256 hashing implementation available on the computer, such as hardware-accelerated versions on modern CPUs. Previously, only some parts of Bitcoin Core did this, so these tools used a slower generic implementation. The result is a significant speedup for operations that do a lot of hashing, but there is no security bug being fixed here.

Security candidateMerge bitcoin/bitcoin#36321: net: cast vector size to avoid overflow, truncation, sign changeby merge-script · ced4c6e6 · Sep 29, 2026 · 1 fileMessage 98 · StrongInformational 23Details
Commit message · merge-script

Merge bitcoin/bitcoin#36321: net: cast vector size to avoid overflow, truncation, sign change

308cd670195d908fbd50caf76a8a215386121bd0 net: cast vector size to avoid overflow, truncation, sign change (Eugene Siegel)

Pull request description:

When running with `-fsanitize=integer` compiled, the following can error [here](https://github.com/bitcoin/bitcoin/blob/b3f846ec3e5c21b08779ac6c13475f3ab37e7d9c/src/net_processing.cpp#L3662):

```
SUMMARY: UndefinedBehaviorSanitizer: unsigned-integer-overflow /bitcoin/src/net_processing.cpp:3662:33
SUMMARY: UndefinedBehaviorSanitizer: implicit-signed-integer-truncation-or-sign-change /bitcoin/src/net_processing.cpp:3662:18
```

When `stop_index->nHeight` is less than `CFCHECKPT_INTERVAL`, the `headers` vector will be empty. This will just set the loop counter to -1 and never enter the loop, so this is harmless anyways. Fix this by casting `headers.size()` to `int`.

ACKs for top commit:
maflcko:
lgtm ACK 308cd670195d908fbd50caf76a8a215386121bd0
davidgumberg:
crACK https://github.com/bitcoin/bitcoin/commit/308cd670195d908fbd50caf76a8a215386121bd0

Tree-SHA512: 1074667b644e42507b32043e98a0541fff6de9a3711003a43b9874b31956a8e10efe65af89ed2b23322a7aa3df7d6a8606db5c1ab342f070a625b9e9650ae1fa

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
memory safetydefensive validationmerge-commit duplicate discount
AI analysis · Informational 23/100

This is a one-line fix in Bitcoin Core's network code. It changes how the size of a list of block headers is converted to a signed integer inside a loop. Previously, if the list was empty, the conversion could trigger undefined-behavior warnings under special compiler sanitizers because subtracting 1 from an unsigned zero produced a very large positive number, which then got squeezed into a signed integer. The code already did not enter the loop in that case, so there was no practical exploit path. The patch simply makes the conversion explicit and clean.

Security candidateMerge bitcoin/bitcoin#35984: sign: skip signing SIGHASH_SINGLE inputs with no corresponding outputby Ava Chow · e19f83e9 · Sep 25, 2026 · 2 filesMessage 86 · StrongModerate 64Details
Commit message · Ava Chow

Merge bitcoin/bitcoin#35984: sign: skip signing SIGHASH_SINGLE inputs with no corresponding output

8df006f233839736b6d7b856bcf8673526c7acef wallet: skip signing SIGHASH_SINGLE inputs with no corresponding output (furszy)

Pull request description:

`SIGHASH_SINGLE` only commits to the output at the input's index. If the output at such
position doesn't exist, it commits to no output at all (legacy uses a fixed sighash of 1, segwit
v0 zeroes `hashOutputs`), which means the signature stays valid even when outputs are
swapped, which is a footgun that lets funds be redirected without the owner's consent.

`SignTransaction()` already skipped these inputs, but `SignPSBTInput()` did not, so
`walletprocesspsbt` signed them. This moves the check into the `CreateSig` so both
paths, and any future one, skip producing the detached signature.

Note: if there is a valid use for the segwit v0 case, I would rather re-allow it through
an explicit opt-in arg than by default, so it is always a deliberate choice.

Fixes #35977

ACKs for top commit:
thomasbuilds:
ACK 8df006f
achow101:
ACK 8df006f233839736b6d7b856bcf8673526c7acef

Tree-SHA512: ac1c9659910eae889475c65b8dde68e711c4d85d0d520af06411728591e573bf027b41a9ac6dd0f6e93de425841ac6c7d9e6c9f07936b9d8ae390941fbe6f1f1

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

This Bitcoin Core update fixes a wallet-signing quirk. When a user chose the SIGHASH_SINGLE signature mode, an input that had no matching output index would sign essentially nothing meaningful. That signature could then stay valid even if someone later changed where the money goes, creating a risk of funds being redirected without the original owner's consent. The fix makes the signer refuse to create such signatures in the first place, closing the gap for both normal transaction signing and PSBT signing.

Security candidateMerge bitcoin/bitcoin#35696: i2p: update leaseset encryption typesby Ava Chow · 65e075f8 · Sep 25, 2026 · 1 fileMessage 86 · StrongLow 35Details
Commit message · Ava Chow

Merge bitcoin/bitcoin#35696: i2p: update leaseset encryption types

412540e18d877c4a34cf9c8fb43dfd34a603d5f5 i2p: update leaseset encryption types (jpk68)

Pull request description:

Updates the I2P SAM leaseset parameters to `6,4` (MLKEM-768/ECIES-X25519), as is [now recommended](https://i2p.net/en/docs/api/samv3/#signature-and-encryption-types) by the I2P project. ElGamal leasesets are now considered "legacy" and likely should not be used anymore.

ACKs for top commit:
kevkevinpal:
ACK [412540e](https://github.com/bitcoin/bitcoin/pull/35696/commits/412540e18d877c4a34cf9c8fb43dfd34a603d5f5)
davidgumberg:
ACK 412540e
achow101:
ACK 412540e18d877c4a34cf9c8fb43dfd34a603d5f5
jonatack:
ACK 412540e18d877c4a34cf9c8fb43dfd34a603d5f5
janb84:
ACK 412540e18d877c4a34cf9c8fb43dfd34a603d5f5

Tree-SHA512: 639f6c58700f0a6ec471652d31b62d36ee16226afc13267a2064c199fd7e6102d7ac1b146fecaaee611235f8463fb1572318d21aa774c0a7e06ea4be06062a8c

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

This change updates Bitcoin Core's I2P (Invisible Internet Project) privacy network settings to use newer, stronger encryption for the published 'leaseset' that describes how other peers can contact a node. The old setting included ElGamal encryption, which the I2P project now labels 'legacy' and no longer recommends. This is a hardening improvement rather than a fix for a known active attack, but it reduces future cryptographic risk for users who route Bitcoin traffic over I2P.

Security candidateMerge bitcoin/bitcoin#35948: init: correct first-run disk space estimateby Ava Chow · d26f19c7 · Sep 25, 2026 · 2 filesMessage 81 · StrongInformational 15Details
Commit message · Ava Chow

Merge bitcoin/bitcoin#35948: init: correct first-run disk space estimate

42215b85811a4950265fa2d02b22e83046ed95d5 init: correct first-run disk space estimate (Lőrinc)

Pull request description:

**Problem:** The assumed blockchain size is maintained in GiB, but the first-run disk-space warning labels it as GB.
For pruned nodes, the warning also displays the full-chain estimate even though the check uses the lower of the prune target and that estimate.
The chainparams API comments likewise describe both assumed sizes as GB.

**Fix:** Label the warning as GiB, display the same rounded-up GiB estimate that the disk-space check uses, and document both assumed sizes as GiB.

This PR revives the first-run warning fixes from #29678.

ACKs for top commit:
jeanpablojp:
tACK 42215b85811a4950265fa2d02b22e83046ed95d5
achow101:
ACK 42215b85811a4950265fa2d02b22e83046ed95d5
murchandamus:
ACK 42215b85811a4950265fa2d02b22e83046ed95d5

Tree-SHA512: fa8a0e1eeefd674a4344772fa5e8f63fc3af9c106057c34fef47817d41cf162ad21f0e06412ad5bebc1504c57bb720e1c0ca5392e6f3d4052d3f8c7c360bac69

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

This change fixes a labeling bug in Bitcoin Core's first-run disk-space warning. The estimate was stored in GiB (binary gigabytes, 1024-based) but displayed as GB (decimal gigabytes, 1000-based), and for pruned nodes it showed the full-chain size instead of the smaller pruned size. The patch corrects the label to GiB and shows the same rounded-up value that the actual disk-space check uses. There is no security vulnerability here.

Security candidateMerge bitcoin/bitcoin#35890: doc: use overwrite (>) instead of append (>>) for one-shot PSBT files in offline-signing-tutorial.mdby merge-script · bfdcd979 · Sep 24, 2026 · 1 fileMessage 81 · StrongInformational 18Details
Commit message · merge-script

Merge bitcoin/bitcoin#35890: doc: use overwrite (>) instead of append (>>) for one-shot PSBT files in offline-signing-tutorial.md

be30864ed1a63cad0e109ebc98fe17bd852bc8d0 doc: use overwrite (>) instead of append (>>) for one-shot PSBT files in offline-signing-tutorial.md (GuTS805)

Pull request description:

`funded_psbt.txt` and `final_psbt.txt` should only ever have one line in them, since later steps just do `$(cat ...)` to read them back. but the tutorial uses `>>` (append) instead of `>` (overwrite), so if you run the `send` or `walletprocesspsbt` step twice without deleting the file, it adds a second line instead of replacing the first one. then `$(cat ...)` picks up both lines as separate args and the next command fails with too many arguments.

Fixes #35862.

ACKs for top commit:
Sjors:
ACK be30864ed1a63cad0e109ebc98fe17bd852bc8d0
sedited:
ACK be30864ed1a63cad0e109ebc98fe17bd852bc8d0

Tree-SHA512: af388ffd3f0beb6e9d0e54e5e745d36380f11cdbea64c3563015aded882872401a4a3032c46493381a8b5eed510530a2c3f5a81701d7d3039c9c1c9741a8bd7b

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 pathdocumentation-only discountmerge-commit duplicate discount
AI analysis · Informational 18/100

This is a documentation-only fix in a tutorial file. It changes two shell examples from using '>>' (append to file) to '>' (overwrite file). If a user followed the old instructions and ran the same command twice, the file would contain two lines instead of one, and the next command would read both lines and fail with a 'too many arguments' error. There is no software vulnerability or security risk in the Bitcoin Core code itself.

Security candidateMerge bitcoin/bitcoin#35301: Silent Payments: Implement bip352 (take 2)by Ava Chow · be5d0b55 · Sep 23, 2026 · 10 filesMessage 91 · StrongInformational 12Details
Commit message · Ava Chow

Merge bitcoin/bitcoin#35301: Silent Payments: Implement bip352 (take 2)

e3ee0ebd89e9955da94c8d806cfa1793baba9860 tests: add BIP352 test vectors as unit tests (josibake)
f133d1373af6f58488f73fe3dc795d37c4796dd9 common: add bip352.{h,cpp} secp256k1 module (josibake)
44997c391afc1f3ae75d2331606e1261fd365801 Add "sp" HRP (josibake)
356c91f6ae51bd9e48db0920110ac9303f54f714 crypto: add KeyPair::GetSecpKeypair (josibake)

Pull request description:

This PR is part of integrating silent payments into Bitcoin Core. It is the second iteration of https://github.com/bitcoin/bitcoin/pull/28122, now based on https://github.com/bitcoin-core/secp256k1/pull/1765.

This project is tracked in https://github.com/bitcoin/bitcoin/issues/28536.

BIP352
This PR focuses strictly on the BIP logic and attempts to separate it from the wallet and transaction implementation details. This is accomplished by working directly with public and private keys, instead of needing a wallet backend and transactions for testing. Labels for the receiver are optional and thus deferred for a later PR.

Test vectors from the BIP are included as unit tests.

ACKs for top commit:
rustaceanrob:
reACK e3ee0ebd89e9955da94c8d806cfa1793baba9860
theStack:
re-ACK e3ee0ebd89e9955da94c8d806cfa1793baba9860
achow101:
ACK e3ee0ebd89e9955da94c8d806cfa1793baba9860

Tree-SHA512: 9b5706e35a49606ac53303c4be0c08f0a08ee273bd69855ff2c869ebcf63dc1e798f8295b8800a41a7094658ab17134366b1ebf2b79dbda5d4af377b05bb2854

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
secret or key materialfuzzing or regression evidencemerge-commit duplicate discount
AI analysis · Informational 12/100

This commit adds the first implementation of BIP352 (Silent Payments) to Bitcoin Core. Silent Payments are a new type of privacy-preserving Bitcoin address that lets someone receive payments without publicly revealing a fixed address. The change introduces new code for encoding/decoding silent payment addresses, deriving output public keys, and scanning transactions for outputs belonging to the recipient. It is a feature addition, not a fix for a known security bug. There is no evidence in the commit or supplied references that this introduces a vulnerability or that any security incident occurred.

Security candidateMerge bitcoin/bitcoin#35440: wallet: check descriptor cache xpub length before decodingby Ava Chow · b3f846ec · Sep 23, 2026 · 11 filesMessage 96 · StrongLow 45Details
Commit message · Ava Chow

Merge bitcoin/bitcoin#35440: wallet: check descriptor cache xpub length before decoding

db7ec4fb976284581ba2adc77218af8711375d91 refactor: (de)serialize CExtKey/CExtPubKey through streams (Alhuda Khan)
cb69853fc160d8a02c21510b8251b05913665672 wallet: check descriptor cache xpub length before decoding (alhudz)

Pull request description:

The descriptor cache records (`WALLETDESCRIPTORCACHE`/`WALLETDESCRIPTORLHCACHE`) deserialise their value into a vector whose length comes from the record itself, but `CExtPubKey::Decode` then reads a fixed `BIP32_EXTKEY_SIZE` bytes. A record encoding a shorter xpub makes `Decode` read past the vector (caught as a container-overflow under ASan).

The first commit rejects records whose serialised xpub isn't exactly `BIP32_EXTKEY_SIZE`, the same way the other malformed records in this loader return `DBErrors::CORRUPT`, with a unit test covering both cache types.

The second commit (per https://github.com/bitcoin/bitcoin/pull/35440#issuecomment-5050992564) replaces `CExtKey`/`CExtPubKey` `Encode`/`Decode` and `EncodeWithVersion`/`DecodeWithVersion`, the only (de)serialisation in the codebase that wrote into a caller-provided buffer, with `Serialize`/`Unserialize`, and routes the base58, PSBT and wallet cache code through them. The serialised bytes are unchanged, so base58 and PSBT encodings and the on-disk cache records are the same as before. The wallet loader now checks the record's CompactSize prefix and reads the xpub straight from the record stream.

ACKs for top commit:
molnard:
tACK db7ec4fb976284581ba2adc77218af8711375d91
achow101:
ACK db7ec4fb976284581ba2adc77218af8711375d91
winterrdog:
tACK db7ec4fb976284581ba2adc77218af8711375d91

Tree-SHA512: e315d1c0e0d542643dc286055fcbe7b1f98891c8dff844cc55888bb970c3147e2b35fc3c0103e9a55101c6820e8bb5817316a5048e3c4e2c548ce30345eaa3a0

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
secret or key materialsigning boundarymemory safetycryptography-sensitive pathsigning or wallet pathmerge-commit duplicate discount
AI analysis · Low 45/100

This update fixes a wallet database loading bug where a damaged or tampered Bitcoin wallet file could cause the program to read past the end of a stored extended public key (xpub). The patch makes the loader check the stored xpub length before decoding it, and also replaces the old fixed-size buffer encoding with safer stream-based serialization used throughout the rest of the code. It is primarily a hardening fix against corrupt wallet data rather than a remote attack vector.

Security candidateMerge bitcoin/bitcoin#35813: wallet, rpc: Add listrawtransactions RPCby Ava Chow · 2b95b45a · Sep 22, 2026 · 6 filesMessage 100 · StrongInformational 20Details
Commit message · Ava Chow

Merge bitcoin/bitcoin#35813: wallet, rpc: Add listrawtransactions RPC

7c311f5c6c3ea5a0d0cc4da35177e6977cda87d1 doc: Add release notes for listrawtransactions (pablomartin4btc)
b377786df14e4098cc2af2fa3a108b3371df9471 test: Add functional test for listrawtransactions (pablomartin4btc)
605c4fd3aee0cea04aef583e7ceeca2dd9a17718 wallet, rpc: Add listrawtransactions RPC (pablomartin4btc)
ba6c179ba07cafb3f7e8a0baf9c9a73992b36695 wallet, rpc: allow omitting parent_descs from TransactionDescriptionString (pablomartin4btc)
dc3e2bc6df6814f6b9b5ce1d5b24933e3f10ca8a wallet, rpc: extract PushTxAmountAndFee/PushTxDecoded helpers (pablomartin4btc)

Pull request description:

Add a new `listrawtransactions` RPC that returns wallet transactions without logical interpretation. Unlike `listtransactions`, which only lists transactions with an economic category (sends to external addresses, receives from outside), this RPC returns every transaction the wallet knows about — including consolidations and self-transfers that would otherwise be invisible.

Each transaction appears exactly once with its net wallet balance change (`amount`) and, when the wallet funded the transaction, the fee paid (`fee`). Pagination is supported via `count` and `skip` parameters, matching the interface of `listtransactions`.

Next possible follow-ups:
- A filter parameter (`"all"` / `"received"` / `"sent"` / `"self"`) once per-tx semantics are agreed on
- Some fields inherited from `TransactionDescriptionString()` carry references to `category` (e.g. `replaced_by_txid`, `parent_descs`) which don't apply here — could be cleaned up in a separate pass

Closes #34632.

Previous attempt: #35009 (by alfonsoromanz), closed in favour of a separate RPC as suggested by achow101.

ACKs for top commit:
Bicaru20:
reACK 7c311f5c6c
achow101:
ACK 7c311f5c6c3ea5a0d0cc4da35177e6977cda87d1
polespinasa:
ACK 7c311f5c6c3ea5a0d0cc4da35177e6977cda87d1

Tree-SHA512: c80f98844124d10b16a7f275107e22d4f5983329d93208e95b3e56ac7295c7265eebdb247a4fa7d70da8d38f4b453df17efaee29a4bd6bae8cb1da60b029c489

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

This commit adds a new wallet RPC called listrawtransactions to Bitcoin Core. It is a feature addition that lets users list every transaction their wallet knows about, including internal transfers and consolidations that the existing listtransactions RPC hides. The change is mostly a refactor of existing code into shared helpers plus a new RPC endpoint. There is no direct evidence in the commit of a security vulnerability, bug fix, or exploit.

Security candidateMerge bitcoin/bitcoin#35752: wallet: make encryption state updates atomicby Ava Chow · 7ee3d622 · Sep 22, 2026 · 18 filesMessage 91 · StrongModerate 68Details
Commit message · Ava Chow

Merge bitcoin/bitcoin#35752: wallet: make encryption state updates atomic

6d2414542b86ff7d6eae0f4c873e47bc4e57a57c wallet: reuse unlock and passphrase change errors (Ava Chow)
593554622e2ced30eb5c2b2fbc642e31c66b2bb8 wallet: return passphrase errors with Expected (Ava Chow)
f949b3ba2ad78eed70540a31564032ab3efefda6 wallet: publish descriptor keys after writes (Lőrinc)
e3712b7d492fc72a763c9e5c73a5a174be59dd21 test: characterize descriptor insertion failure (Lőrinc)
bd558107784cf1170482700a13904cfa5b6816a8 wallet: abort failed descriptor key erases (Lőrinc)
537e79191585ca5ea46c527287d311c9abdcabd0 test: cover encrypted descriptor key insertion (Lőrinc)
d8a6f5e48d6b007207ba00e70167affbff2900f9 wallet: abort failed descriptor key writes (Lőrinc)
14ce3fdb493ac1cbb8e8fb583c9c2e99d9d9fb65 test: characterize descriptor key failures (Lőrinc)
5bc0be16fe4d910d363b5cd8eeb11a9b9629e0b9 wallet: reject failed passphrase changes (Lőrinc)
ee6d45a07e3ae06e490e30c9d4a3f01d9917c740 test: characterize passphrase write failure (Lőrinc)
2daa2f94f4a2930c2f315cf9e50ffd027d4bc101 wallet: restore lock state before re-encryption (Ava Chow)
8b23fa47737a8e1deb23953b5e3b438454e10e73 wallet: abort failed encryption transactions (Lőrinc)
e6c374d302018f352d0583c38c5c4211f9b59a2f test: characterize encryption transaction failures (Lőrinc)
70381010c0af96db8b23e2af02599798b063c92b refactor/test: add wallet failure injection (Lőrinc)

Pull request description:

**Problem:** Wallet encryption and passphrase changes can leave database records and live key state out of sync when a database operation fails.
Encryption can report success without persisting the master key, and a passphrase change can activate the new passphrase only in memory.
Descriptor key write failures can publish keys that were not persisted, while erase failures can leave plaintext keys on disk.
A failed encryption transaction commit aborts the node, and a re-encryption failure during a passphrase change can leave a previously locked wallet unlocked.
Boolean results also force callers to duplicate error messages or report database and encryption failures as incorrect passphrases.

**Fix:** Publish wallet encryption state only after the database transaction commits, and publish newly inserted descriptor keys only after their database writes succeed.
For passphrase changes, restore the original lock state after validating the old passphrase and replace the live master key only after persisting its re-encrypted value.
These changes preserve the affected keys on failure and allow retries.
Return structured errors from wallet unlock and passphrase changes so callers can share messages and report the specific failure.
Fresh descriptor setup after the encryption transaction remains unchanged.

ACKs for top commit:
achow101:
ACK 6d2414542b86ff7d6eae0f4c873e47bc4e57a57c
w0xlt:
reACK 6d2414542b86ff7d6eae0f4c873e47bc4e57a57c

Tree-SHA512: 2d7293d9482ef259732cd0c3dd31eb2c376fc39e23a76141032b6e308b0e71c5d86b3f03995ef3f923cabbc431a139a39a4be02853f352f7103a7f9f52a95299

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
access controlsigning or wallet pathauthentication pathmerge-commit duplicate discount
AI analysis · Moderate 68/100

This Bitcoin Core update fixes several wallet bugs where a failed database write could leave a wallet in an inconsistent state. For example, encrypting a wallet or changing its passphrase could appear to succeed in memory while the change was not actually saved to disk, or could leave unencrypted private keys behind. The patch makes these operations atomic: in-memory state is only updated after the database transaction commits, and failures now return clear, structured error messages instead of crashing the program or giving misleading 'wrong passphrase' errors.

Security candidateMerge bitcoin/bitcoin#36261: test: cover PSBT unknown field mergingby merge-script · bbc40ede · Sep 22, 2026 · 1 fileMessage 91 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36261: test: cover PSBT unknown field merging

21e4ea8134d8ca95416e065490d99f82be66bd67 test: cover PSBT unknown field merging (w0xlt)

Pull request description:

Continuing the work from #35310 gere in agreement with w0xlt

This PR adds functional coverage for combinepsbt preserving unknown PSBT fields across global, input, and output maps, as suggested [here](https://github.com/bitcoin/bitcoin/pull/34893#issuecomment-4390043746).

The test covers both PSBTv0 and PSBTv2 by creating valid base PSBTs with `createpsbt`, injecting unknown key-value pairs into two copies, combining them, and asserting that all unknown fields are retained in the decoded result.

ACKs for top commit:
polespinasa:
ACK 21e4ea8134d8ca95416e065490d99f82be66bd67
nebula-21:
ACK 21e4ea8134d8ca95416e065490d99f82be66bd67
winterrdog:
tACK 21e4ea8134d8ca95416e065490d99f82be66bd67
w0xlt:
ACK 21e4ea8134d8ca95416e065490d99f82be66bd67

Tree-SHA512: 0f83ff2b9a519b613c6efaca3707bd8c6fdd00887370e16e927b19f059b751813737adc85ad81366f5c57b91226f56b3b0bdc996451f4d6bc9ec83aa4a189923

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 · Informational 15/100

This commit only adds a new automated test to Bitcoin Core. It checks that when two partially-signed Bitcoin transactions (PSBTs) are combined, any custom 'unknown' data fields attached to them are preserved correctly. There is no change to the actual Bitcoin Core software behavior—only test code was added.

Security candidateMerge bitcoin/bitcoin#36286: crypto: Fix MuHash3072 division by itselfby merge-script · d48e76e6 · Sep 18, 2026 · 3 filesMessage 91 · StrongInformational 24Details
Commit message · merge-script

Merge bitcoin/bitcoin#36286: crypto: Fix MuHash3072 division by itself

b388f9bd0d2bcc259d488638d479ba09a30ba040 crypto: Fix MuHash3072 division by itself (Fabian Jahr)

Pull request description:

`MuHash3072::operator/=` multiplies the numerator by the divisor's denominator and then the denominator by the divisor's numerator. But as it is currently implemented the divisor could be the MuHash object itself. When that is the case, the second step reads the numerator that the first step already updated, so `x /= x` actually leaves `1/D` instead of the empty set. This only goes unnoticed when the denominator is 1, which is the case in our existing fuzz target and benchmark. No code in the node/index divides MuHash objects by themselves, so runnings nodes are not affected.

Fixes the code by not using the potentially changed nominator, adds a test that reproduces the issue and updates the fuzz test to not always use denominator 1.

ACKs for top commit:
furszy:
utACK b388f9bd0d2bcc259d488638d479ba09a30ba040
sedited:
ACK b388f9bd0d2bcc259d488638d479ba09a30ba040
sipa:
utACK b388f9bd0d2bcc259d488638d479ba09a30ba040

Tree-SHA512: ae2eb845db07fb140e7946dfc7d084766e5f6d06060b91da6acc3434fdf6b59ad1eb050b4be79bc4644dea032d1ca0d01dd9e9b366bd04a545cf5224e57526df

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
fuzzing or regression evidencecryptography-sensitive pathmerge-commit duplicate discount
AI analysis · Informational 24/100

This commit fixes a bug in Bitcoin Core's MuHash3072 cryptographic code where dividing a MuHash object by itself (x /= x) produced the wrong mathematical result. The fix is straightforward: the code now saves the divisor's numerator before modifying it, so the second multiplication step uses the original value rather than the already-changed one. The bug only affects self-division, and the project maintainers state that no live node or index code actually performs this operation, so running Bitcoin nodes are not affected. Tests and fuzzing targets were updated to catch this case in the future.

Security candidateMerge bitcoin/bitcoin#36256: guix: Update osslsigncode to 2.14by Hennadii Stepanov · 7dedc454 · Sep 16, 2026 · 2 filesMessage 100 · StrongInformational 18Details
Commit message · Hennadii Stepanov

Merge bitcoin/bitcoin#36256: guix: Update osslsigncode to 2.14

59a465ce37829b2305319b378e8e85c9e653f29a guix: Validate codesigned windows binaries (Ava Chow)
66eeac216ad5b5b8d42a727aa730d7fc603f55fe guix: Use osslsigncode 2.14 (Ava Chow)

Pull request description:

#34550 mistakenly removed the package `nss-certs`. This results in an error during codesigining: `Use the "-CAfile" option to add one or more trusted CA certificates to verify the signature.`

However, introducing the package is not enough to make codesigning work. #34550 switched us to using osslsigncode 2.13 from upstream, but osslsigncode versions 2.6 through 2.13 all require network access as they validate CRLs. While the `verify` command has the ability to skip CRL validation, `attach-signature` does not.

osslsigncode 2.14 resolves both issues for us by removing signature validation, instead it only checks that the hash in the signature matches the hash of the binary. But we still want to do a belt-and-suspenders signature validation, and we can achieve this by calling `verify` afterwards with CRL validation disabled to avoid the network access issue, along with including the `nss-certs` package.

Lastly, guix upstream already has 2.14, so we could get it by bumping the time-machine commit. But it seems like bumping that is problematic for other packages, see #36233 and #35855. Instead, this PR copies in the package definition from upstream.

ACKs for top commit:
Sjors:
re-utACK 59a465ce37829b2305319b378e8e85c9e653f29a
hebasto:
re-ACK 59a465ce37829b2305319b378e8e85c9e653f29a, tested the signed installer on Windows:

Tree-SHA512: 4c5915aa23b5a9ace37003b72ce94a1b1711c39503e4793d4145fb99d96180329056902f94c29094986a4ea57217cffef6deb51e4f4bb4e9a7fcdc9bae38568a

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

This change updates the Windows code-signing tool used in Bitcoin Core's reproducible build process. It fixes a build-time failure where signature verification could not complete because a certificate package was missing and the old tool version required internet access. The patch adds the missing certificates package, upgrades the signing tool to version 2.14, and changes the verification step so it no longer needs network access. This is a build-infrastructure reliability fix, not a vulnerability in the Bitcoin software users run.

Security candidateMerge bitcoin/bitcoin#34566: feature: Use different datadirs for different signetsby merge-script · d32a515f · Sep 16, 2026 · 12 filesMessage 96 · StrongInformational 19Details
Commit message · merge-script

Merge bitcoin/bitcoin#34566: feature: Use different datadirs for different signets

feeb00af8cf361ba9d2f7de0334abf875b3103d9 cli: Add -signetchallenge info on RPC auth error (ekzyis)
c47ea370dc9f7a878e8269884b25204b8e6a3ec6 doc: Update documentation for signet datadir (ekzyis)
6f8c43f9efc601b26ae221e53bb3c354ea64b618 test: Add signet datadir tests (ekzyis)
9b37d42b23be096cc4cfb457f1022e443102b650 Use different datadirs for different signets (ekzyis)
6bdcae3f768b9e8da958ecbf46fa88b42df338f5 refactor: Import signet constant and helper from kernel/signet.h (ekzyis)

Pull request description:

closes #27494

This adds support for syncing multiple signets.

Each custom signet is stored in a different datadir, using the network magic (message start) as the suffix.

The default signet is always stored without a suffix for backward compatibility, even if the default challenge is provided explicitly via `-signetchallenge`.

This builds upon #29838.

For those already familiar with #29838, here are the differences between #29838 and this that are visible to the user:

* The suffix does not use the first 4 bytes of hash160(challenge), but rather the network magic (message start) as mentioned in [#29838 (comment)](https://github.com/bitcoin/bitcoin/pull/29838#discussion_r1557976175) and [#34566 (comment)](https://github.com/bitcoin/bitcoin/pull/34566#issuecomment-4207665792).
* If the default challenge is provided to `-signetchallenge`, [#29838](https://github.com/bitcoin/bitcoin/pull/29838) added a suffix to the datadir, whereas this PR does not. This includes backward compatibility when the default signet is used explicitly, not only implicitly, even though [the default signet consensus parameters aren't used in the explicit case](https://github.com/bitcoin/bitcoin/pull/29838#issuecomment-2742830552).[^1] A test was added for this case.

[^1]: could be something for a follow-up PR, or maybe it's intentional to not mix explicit with implicit options?

Unlike #29838, this PR does not update tests that didn't break (`rpc_bind.py`, `interface_bitcoin_cli.py`). I have found other tests where `datadir_path` is used in combination with `self.chain` (regexp: `datadir_path.*chain`). I considered it inconsistent to update some tests but not all of them. I've decided to not update all of them to keep the scope of this PR low until feedback. I can go through all tests in a follow-up PR to make sure they don't break when they are ever used with (custom) signet, however unlikely that might be.

I have done some manual testing like this:

<details>
<summary>manual testing</summary>

1. 'signet' directory is used, IBD:

```
$ bitcoind -signet
```

2. 'signet' directory is used, no IBD without `-addnode` (see [#29838 (comment)](https://github.com/bitcoin/bitcoin/pull/29838#issuecomment-2742830552)) or existing peers.dat:

```
$ bitcoind -signet -signetchallenge=512103ad5e0edad18cb1f0fc0d28a3d4f1f3e445640337489abb10404f2d1e086be430210359ef5021964fe22d6f8e05b2463c9540ce96883fe3b278760f048f5189f2e6c452ae
```

3. 'signet' directory is used

```
$ bitcoind -conf="signet_default.conf"
```

```
# signet_default.conf
signet=1
[signet]
signetchallenge=512103ad5e0edad18cb1f0fc0d28a3d4f1f3e445640337489abb10404f2d1e086be430210359ef5021964fe22d6f8e05b2463c9540ce96883fe3b278760f048f5189f2e6c452ae
```

4. 'signet_f6ac8550' directory is used:

```
$ bitcoind -conf="signet_custom.conf"
```

```
# signet_custom.conf
signet=1
[signet]
signetchallenge=0014d4528367459d54e1545b0d0a677d2a7d71d648e0
```

Tested RPC with `bitcoin-cli getblockchaininfo` with the same options (`-signet`, `-conf`, or `-signet -signetchallenge`)

</details>

I'm new to contributing to Bitcoin Core so it's entirely possible that I've missed something obvious.

ACKs for top commit:
pinheadmz:
ACK feeb00af8cf361ba9d2f7de0334abf875b3103d9
ViniciusCestarii:
Re-ACK feeb00af8cf361ba9d2f7de0334abf875b3103d9
sedited:
ACK feeb00af8cf361ba9d2f7de0334abf875b3103d9

Tree-SHA512: e06e5ad4f967f1c1b2d7cdfe3ad34ff4e09435012668889ea4fd817fec0fda153a3221c28846c06026dd573cbe0eec3872d569ed99614446528c5af890af2bbd

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
consensus or confidential-proof validationsigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 19/100

This change lets Bitcoin Core store different custom signet blockchains in separate data folders, using a unique suffix derived from each signet's network identifier. It also adds a friendlier error hint in bitcoin-cli when an RPC authentication failure might be due to using the wrong custom signet. There is no direct security vulnerability being fixed; it is a usability and data-isolation feature.

Security candidateMerge bitcoin/bitcoin#36251: rest: add `generated` and `height` to spenttxouts JSONby merge-script · dadca55f · Sep 15, 2026 · 4 filesMessage 81 · StrongInformational 19Details
Commit message · merge-script

Merge bitcoin/bitcoin#36251: rest: add `generated` and `height` to spenttxouts JSON

1566a4767afd3865ee466d1aa2ce8237cb5c27c1 rest: add generated and height to spenttxouts JSON (0xb10c)

Pull request description:

This adds the `generated` and `height` fields to the JSON REST endpoint `/rest/spenttxouts/BLOCKHASH.json` to match the prevout output of the getblock RPC with verbosity 3. The information for these fields is already available, but just was not exposed.

The binary and hex formats aren't changed (here) to not break backwards compatibility with consumers of these endpoints. See the discussion in https://github.com/bitcoin/bitcoin/pull/32540#issuecomment-5665279713

ACKs for top commit:
nervana21:
tACK 1566a4767afd3865ee466d1aa2ce8237cb5c27c1
willcl-ark:
ACK 1566a4767afd3865ee466d1aa2ce8237cb5c27c1
sedited:
ACK 1566a4767afd3865ee466d1aa2ce8237cb5c27c1

Tree-SHA512: e0f57baa75d9b5e941fdf87179f293209af2fab16a151011a788b7f459d10ce50cf8b8ee2acc4d352e032aa5c76cf0a32dfb959c860938b988645844a2e75675

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 controlmerge-commit duplicate discount
AI analysis · Informational 19/100

This change adds two extra pieces of information—whether a spent output came from a coinbase transaction and the block height at which it was created—to a Bitcoin Core REST API endpoint. It is a feature/parity improvement to make the REST output match an existing RPC output. There is no indication it fixes a security bug or introduces a vulnerability.

Security candidateMerge bitcoin/bitcoin#34743: p2p: don't disconnect manual peers for block stallingby merge-script · cff00c54 · Sep 14, 2026 · 8 filesMessage 91 · StrongLow 33Details
Commit message · merge-script

Merge bitcoin/bitcoin#34743: p2p: don't disconnect manual peers for block stalling

5551d39b202bf0386fb40589817cd92f8afdaf59 doc: document manual peer stalling behavior (will)
24628d3ae7dce6f2188065a63567db3d030de3bb test: cover manual peer block download cooldown (will)
4c79f3a34d003bd97824b032383ac816a4147d68 test: support manual connections in addconnection (will)
698b5bbf3a0a0a52d97ae6acce2752769f14a208 p2p: pause stalling manual block downloads (will)

Pull request description:

Ref: #5097

Manual peers added via `-addnode`, `-connect`, or the `addnode` RPC represent explicit operator intent to keep those connections around.

During IBD, a manual peer can currently be disconnected if it triggers block-stalling logic. This can be surprising in `-connect` or `-addnode`-based setups, where the operator may prefer (and probably expect) to keep the peer connected even if it is not a useful block download peer at that moment.

This PR changes only the block-stalling path. Instead of disconnecting a stalling manual peer, it releases that peer's in-flight block requests so other peers can request them and IBD can continue.

After releasing the requests, the manual peer is temporarily skipped for block downloads. This avoids immediately assigning scarce IBD block download slots back to the peer that just stalled, while still allowing the peer to become eligible again after the cooldown.

This intentionally does not change block download timeout or headers sync timeout behavior.

ACKs for top commit:
sedited:
Re-ACK 5551d39b202bf0386fb40589817cd92f8afdaf59

Tree-SHA512: 0fb914c56df14ccd38b0edd1269ea705968dad4e9d732004538408fe7c06f3afb29aad65e83c7503b8c66dc45c123d2367d286c04ad6a22a2d17052d4ba759cd

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 boundarymerge-commit duplicate discount
AI analysis · Low 33/100

This change makes Bitcoin Core treat manually-added peers (from -addnode, -connect, or the addnode RPC) more gently during Initial Block Download (IBD). Previously, if such a peer was slow or stalled at sending blocks, the node would disconnect it. Now it releases the pending block requests to other peers so IBD can continue, pauses asking that peer for blocks for two minutes, and keeps the connection open. This matches operator intent that manual peers should stay connected, but it is a behavior change, not a fix for an exploitable vulnerability.

Security candidateMerge bitcoin/bitcoin#36186: test: return False for a too-short ECDSA signatureby merge-script · 76343a09 · Sep 14, 2026 · 1 fileMessage 96 · StrongInformational 20Details
Commit message · merge-script

Merge bitcoin/bitcoin#36186: test: return False for a too-short ECDSA signature

00d0c5107b92c8972ab106c680579e06fd4fb100 test: return False for a too-short ECDSA signature (Ferdinando Ametrano)

Pull request description:

`verify_ecdsa` reads `sig[1]` before it checks `len(sig) < 4`, so a 0- or 1-byte signature raises `IndexError` instead of returning `False`, which the comment promises for any DER encoding error.

Move the length check ahead of the byte access, and add a regression test.

ACKs for top commit:
optout21:
reACK 00d0c5107b92c8972ab106c680579e06fd4fb100
sedited:
ACK 00d0c5107b92c8972ab106c680579e06fd4fb100

Tree-SHA512: 01b8cfee145c539c7338f8edfaae455119585026ec7d4464e27255160b741504f0d2542c4c264d40cc2e8583404d353276b8e15c23bc6a96b42262257e8c7f05

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 boundaryfuzzing or regression evidencemerge-commit duplicate discount
AI analysis · Informational 20/100

This is a small fix in Bitcoin Core's own test helper code. A helper function used only in tests could crash with an IndexError when given an extremely short fake signature, instead of cleanly returning False. The change moves a length check earlier so the function behaves as documented. It does not affect live Bitcoin network code, wallet signing, or transaction validation.

Security candidateMerge bitcoin/bitcoin#34681: wallet: move rescan logic into ChainScanner and wallet/scanby merge-script · d9d05784 · Sep 14, 2026 · 15 filesMessage 91 · StrongInformational 19Details
Commit message · merge-script

Merge bitcoin/bitcoin#34681: wallet: move rescan logic into ChainScanner and wallet/scan

e67f75cf7d3e5a8f161d1525695c8653d225a01f wallet/scan: extract progress tracking helpers from `ChainScanner::Scan` (Novo)
062aa3ce56d72c03569743aa4142bcec2400bf8f wallet/scan: extract QueueNextBlock (Novo)
3655beb8f1531f780fffcbf2f1018d893b87e98e wallet/scan: extract block scanning logic to ScanBlock (Novo)
4535dc0c7885ad678074699627b363f382f29906 wallet/scan: extract block filter matching to ShouldFetchBlock (Novo)
72a37031d325e9f50bc95ef7496fc495b755962e wallet/scan: move WalletRescanReserver to scan files (Novo)
0274e80130af2cc58847b5d8f3628fa97a6f4b79 wallet/scan: move RescanFromTime to ChainScanner as ScanFromTime (Novo)
db9185a44464b241dec7a20fdedd7142bc728b1e wallet: introduce ChainScanner as a CWallet member (Novo)
525163c2413ed595a6b9adbc682cc182339c0600 wallet/tests: pin rescan behavior (Novo)

Pull request description:

Part of https://github.com/bitcoin/bitcoin/pull/34400

This PR refactors the wallet rescan logic for improved readability and maintainability, and prepares the rescan logic for the changes in https://github.com/bitcoin/bitcoin/pull/34400.

CWallet previously owned all rescan-related concerns: atomic state variables, the WalletRescanReserver RAII type, RescanFromTime, and the entire block-scanning loop (ScanForWalletTransactions) as a single large member function.

This PR separates those concerns into a dedicated ChainScanner class, introduced in wallet/scan.h and wallet/scan.cpp:

- Scan state (fAbortRescan, fScanningWallet, progress, start time, passphrase flag) moves into ChainScanner atomics, exposed through Scanner().
- WalletRescanReserver
- RescanFromTime becomes ChainScanner::ScanFromTime, keeping all scan entry points in one place.
- ScanForWalletTransactions is replaced by ChainScanner::Scan and decomposed into focused helpers: ShouldFetchBlock, ScanBlock, ReadNextBlock, UpdateProgress, UpdateTipIfChanged, and ProcessBlock.

CWallet retains only a ChainScanner member and a Scanner() accessor. Callers that previously reached into CWallet for scan state now go through Scanner().

One slight behaviour change is introduced in this PR and is documented in the associated commit message. We previously attempted to read the block to scan before checking that it is active; now we check that it is active before the read attempt. It has no significant effect, but the change is documented.

This PR should be reviewed with the `--color-moved=dimmed-zebra` git option to aid review.

ACKs for top commit:
achow101:
ACK e67f75cf7d3e5a8f161d1525695c8653d225a01f
polespinasa:
re-ACK e67f75cf7d3e5a8f161d1525695c8653d225a01f
pablomartin4btc:
ACK e67f75cf7d3e5a8f161d1525695c8653d225a01f
rkrux:
lgtm ACK e67f75cf7d3e5a8f161d1525695c8653d225a01f

Tree-SHA512: 7c59bcf71ca94365bfceccdeb0aa187434405dc24ddde327b645d59a7e9d036d28fa0858bb093810ce70d67162f463f5cd4020392dda3da3a88ae2393b235211

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
access controlsigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 19/100

This is a code cleanup change in Bitcoin Core's wallet. It moves the wallet's blockchain rescan logic out of the main CWallet class into a new dedicated ChainScanner class, without changing what the rescan does. The only intentional behavior change is the order of two internal checks: the code now verifies a block is still on the active chain before trying to read it, rather than after. The change is documented and tested, and appears to reduce risk rather than introduce it.

Security candidateMerge bitcoin/bitcoin#35975: wallet: Fix `CWalletTx` malleated transaction metadata syncby merge-script · d25470d9 · Sep 14, 2026 · 13 filesMessage 100 · StrongModerate 60Details
Commit message · merge-script

Merge bitcoin/bitcoin#35975: wallet: Fix `CWalletTx` malleated transaction metadata sync

2c6047df8746a1d5333d17ad999dd32c40aba90e test: Bumping a transaction prevents bumping malleations (Ava Chow)
a44f9ad35058f0aa45a1cada9460f89f650ab261 test: Test rbf metadata sync of malleated tx (Ava Chow)
752fd437c7cf79f8987c556a43990c23f9a48756 wallet: persist synced metadata and do not sync on load (furszy)
31eedfc6fc8b4dbf75b9aa2b66255732c19f478b wallet: simplify wtx metadata sync (furszy)
6c16d76f790c169a6cb032b60594228c9f7af878 wallet: sync tx replacement metadata to malleated txs (furszy)
34533d5d22b635eb7529a6e457a4a62069e27909 wallet: Clarify IsEquivalentTo is actually checking malleation (Ava Chow)
b973a355c4ebd94cfa8cef61b68ac6da92fad787 Replace CTransaction::operator== with Equals that has options (Ava Chow)
2efaa6763bd210b367f4e67f67093156ef83da94 wallet: simplify and restrict SyncMetaData to malleated txs (furszy)
fc718ade4fce8003a9460e7f79a4b2a21a4dc702 test: Test that metadata is synced to malleated transactions (Ava Chow)

Pull request description:

`SyncMetaData` is intended to handle the case of malleated transactions by copying the metadata from a presumed original transaction to all of the malleations of that transaction. However, it did not do this correctly, leading to both a crash that can be reached during `bumpfee`, and failing to actually copy the metadata to some malleated transactions.

The crash was reachable by having both the original transaction and a malleation of it in the wallet, then calling `bumpfee` on the original, and then calling `bumpfee` on the malleation. Calling `bumpfee` on the malleation would result in an assertion failure in `MarkReplaced`, hitting `Assert(!wtx.m_replaced_by_txid);`. This is reached since adding the RBF to the wallet causes a metadata sync between the original and the malleation, which copies `m_replaced_by_txid`. `MarkReplaced` is called soon afterwards, resulting in the crash. This is fixed by syncing the metadata after `MarkReplaced` sets `replaced_by_txid` during the RBF of the original transaction so that `bumpfee` refuses to bump the malleation in the first place as it will check `m_replaced_by_txid` before bumping.

The other issue is that if a RBF transaction is malleated, `SyncMetaData` was not copying the metadata from the original RBF transaction to the malleation.

These are fixed by changing `SyncMetaData` to find all of the malleations of a transaction rather than all of the conflicts and simplifying how it is called. Additionally, `CWalletTx::IsEquivalentTo` is used by `SyncMetaData` to determine whether a transaction is a malleation, and this PR pulls in https://github.com/bitcoin/bitcoin/pull/32723#issuecomment-3028112892 to make it explicitly clear which fields it is actually checking to determine the equivalence. Lastly, `SyncMetaData` is renamed to `SyncMalleatedTxMetadata` and `IsEquivalntTo` renamed to `IsMalleation` to clarify that these functions are for handling malleated txs.

The last 2 commits of this PR adds tests for these cases, and the first commit a test for basic `SyncMalleatedTxMetadata` functionality that should not change here.

ACKs for top commit:
furszy:
utACK 2c6047df8746a1d5333d17ad999dd32c40aba90e
sedited:
utACK 2c6047df8746a1d5333d17ad999dd32c40aba90e

Tree-SHA512: b39e7a5804833fb43b07be1088670d5c3ff4bce6811df83a47119208789ac98f7d190053f1b5a58a4d46b877fd17f3c0c7e25e5fa7915647f340081b53700721

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

This update fixes a bug in Bitcoin Core's wallet that could crash the program when a user tried to speed up (bump) a transaction that had a slightly altered copy (a 'malleated' version) in the wallet. It also ensures that notes, replacement links, and other metadata are correctly copied between the original transaction and its malleated copies. The crash was a denial-of-service-style failure for the wallet process, not a way to steal coins, and it required the user to already have both the original and malleated transactions in their wallet.