BC
← All projectsBitcoin Core

Bitcoin Core

The Bitcoin network's reference node and wallet implementation.

BitcoinSupply chainNormal
Repository coverage

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

314security candidates664second-pass queue2998AI analyses
154commits · 30 days
331commits · 60 days
1302commits · 180 days
2859commits · 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.

71/100 average clarity
1161Strong · 80–100
1206Adequate · 60–79
701Thin · 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-script1964487389
Antoine Poinsot22422170
Ava Chow19165185068
MarcoFalke41421408074
fanquake23121228058
Lőrinc18121177081
Hennadii Stepanov22316211064
rkrux57957074
Sjors Provoost89889074
Sebastian Falbesoner33733073
David Gumberg55655072
Pieter Wuille95595066
Analysis record

Published AI watches

Last scanned 0 minutes ago

Informational 12 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

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

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 …

New cryptographic feature implementation (BIP352 Silent Payments)Extensive use of secp256k1 silentpayments moduleInput public key extraction from P2PKH, P2WPKH, P2SH-P2WPKH, and P2TR inputs
be5d0b55by Ava Chow+6951−010 files
No security note in commit
Low 45 AI analysisMessage 96 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

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

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 be…

Out-of-bounds read in wallet descriptor cache deserializationASan container-overflow triggered by malformed on-disk recordMissing length validation between record size prefix and fixed-size decoder
b3f846ecby Ava Chow+225−8511 files
Vendor flagged security relevance
Informational 20 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

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

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 listt…

No security-relevant bug fix or vulnerability patch is present in the diff.New RPC exposes additional wallet transaction metadata, but only to callers already authorized for wallet RPCs.Code is a refactor of existing gettransaction logic into shared helpers; no new cryptographic, network, or consensus code.
2b95b45aby Ava Chow+334−276 files
No security note in commit
Moderate 68 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

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

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 …

Atomicity fix for encryption state and descriptor key persistenceFailure to persist master key during encryption previously reported success in memoryPassphrase change could activate new passphrase only in memory
7ee3d622by Ava Chow+379−16418 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#35619: test: ExtendedPrivateKey follow-ups

This commit only changes Bitcoin Core's internal functional test code. It replaces hard-coded test keys and addresses with ones generated from a new test helper class, and unifies how tests tell nodes not to create a default wallet. There …

248ce46fby merge-script+18−244 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

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

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 t…

bbc40edeby merge-script+130−01 file
No security note in commit
Informational 18 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36230: wallet: Improve `HasWalletDescriptor` performance and other canonical descriptor string followups

This is a Bitcoin Core wallet maintenance patch. It speeds up a wallet function that checks whether a descriptor already exists by caching a hash of the descriptor's canonical text, instead of rebuilding that text every time. It also tidie…

No security-relevant signal in commit message or diffChange is described as performance improvement and code cleanupBackwards-compatibility test notes a known miniscript wallet loading incompatibility between v31.0/v31.1 and other versions, but this is a documented compatibility quirk, not a vulnerability
4a583f38by merge-script+97−429 files
No security note in commit
Informational 21 AI analysisMessage 81 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36297: rpc: Correct invalid OpenRPC defaults

This is a documentation-only fix for Bitcoin Core's machine-readable RPC help data. It changes several default values from literal strings to 'hint' labels (because the real default depends on context) and corrects one boolean default from…

OpenRPC schema/default mismatch correctionRPC help metadata type correction (string 'false' to boolean false)No executable code path changes
5f05d8c5by merge-script+6−63 files
No security note in commit
Informational 20 AI analysisMessage 68 · Adequate
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

rpc: Correct OpenRPC default metadata

This commit fixes documentation metadata for six Bitcoin Core RPC arguments. It changes how default values are described so that automatically generated API docs and schemas are accurate. The actual behavior of the software when running is…

No runtime code changesOnly RPC help/schema metadata modifiedVendor explicitly states runtime behavior is unchanged
b7f740c5by will+6−63 files
No security note in commit
Informational 24 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

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

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…

Cryptographic correctness bug in MuHash3072 division operatorSelf-aliasing in operator/= produces incorrect 1/D result instead of empty setNo production code path identified that triggers self-division
d48e76e6by merge-script+11−13 files
No security note in commit
Informational 18 AI analysisMessage 93 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36285: refactor: Use static const over inline const to work around ld64 bug

This is a build-compatibility fix, not a security patch. It changes how some constant data is stored internally so that Apple's macOS linker (ld64) can build Bitcoin Core correctly. The change avoids a linker bug that caused build failures…

No security-relevant code logic changedChange is a linker bug workaround, not a vulnerability fixConstants remain read-only; no new attack surface introduced
ad97933aby merge-script+8−82 files
No security note in commit
Informational 23 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#34861: wallet: Add importdescriptors interface

This commit refactors Bitcoin Core's wallet descriptor import feature so the same logic can be used by both the RPC command and a new GUI-facing interface. It also tightens one input rule: negative timestamps are now rejected, and the mini…

Refactor of security-sensitive wallet import code into shared CWallet pathNew input validation: negative timestamps rejected for importdescriptorsCentralization of descriptor range bound checks in CheckDescriptorRangeBounds
2bbbeaa6by Ava Chow+619−26415 files
No security note in commit
Low 30 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36260: torcontrol: Use reconnect backoff after dropped connections

This change fixes a bug in how Bitcoin Core reconnects to the Tor control port. A previous update accidentally removed the wait time between reconnect attempts when an already-established Tor control connection was dropped. Without the wai…

Uncontrolled retry loop causing resource exhaustion and log floodingLocal-only Tor control port interaction; no remote attacker path by defaultRegression introduced by prior refactor (#34158) and restored here
fb68c270by merge-script+32−332 files
No security note in commit
Informational 18 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

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

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 v…

Tooling update in release signing pipelineRestores CA certificate store for signature verificationDisables CRL/CDP network lookups during verification
7dedc454by Hennadii Stepanov+22−22 files
No security note in commit
Informational 19 AI analysisMessage 96 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

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

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 authenti…

Data isolation between distinct custom signets reduces risk of cross-network state corruption or accidental mainnet/testnet confusionNo memory-safety, cryptographic, or consensus changes observedNo privilege escalation, remote code execution, or denial-of-service vectors introduced in the diff
d32a515fby merge-script+211−4412 files
No security note in commit
Informational 19 AI analysisMessage 81 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

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

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 …

dadca55fby merge-script+13−54 files
No security note in commit
Low 33 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

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

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 disco…

Behavior change in peer disconnection logic during IBDManual peers exempted from block-stalling disconnectionNew per-peer cooldown state m_block_download_paused_until introduced
cff00c54by merge-script+148−168 files
No security note in commit
Informational 20 AI analysisMessage 96 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

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

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 che…

Out-of-order bounds check leading to IndexError in test helperRegression test added for malformed short DER signaturesTest-only code path, no production validation logic changed
76343a09by merge-script+11−21 file
No security note in commit
Informational 15 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36083: test: cover getrawtransaction on a stale block via txindex

This commit only adds a new functional test to Bitcoin Core. It checks that the getrawtransaction RPC can retrieve a stale block's coinbase transaction via the optional txindex, and that the response correctly shows the block is no longer …

dd3c62c5by merge-script+41−341 file
No security note in commit
Informational 15 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#35472: test: add coverage for feebumper uncomputable cluster error path

This commit only adds a new automated test to Bitcoin Core. It does not change any production wallet, mempool, or node code. The test verifies that when a user tries to bump the fee of a transaction whose unconfirmed inputs depend on too m…

Adds regression test for previously fixed crash path (bad optional_access in CheckFeeRate)No production code changes; no new attack surface introducedTest exercises DoS-limit error handling in fee bumping
36c1b149by merge-script+74−01 file
Vendor flagged security relevance
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#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.

Security candidateMerge bitcoin/bitcoin#34914: contrib: replace deprecated --deep codesign flag, fix accidental --verify skip on ciby merge-script · 8c64ff02 · Sep 11, 2026 · 2 filesMessage 100 · StrongLow 35Details
Commit message · merge-script

Merge bitcoin/bitcoin#34914: contrib: replace deprecated --deep codesign flag, fix accidental --verify skip on ci

da7d7dbc7c0040d5e91fe21e19fdc1cb3b8ea7b2 contrib: remove deprecated --deep codesign flag (Sjors Provoost)
ad4eeaf859c447894e83c855bcff63bb70f58be4 ci: avoid modifying GOAL in 03_test_script.sh (Sjors Provoost)

Pull request description:

Replace the deprecated `codesign --deep` with explicit, and minimal, per-component signing of Frameworks, Plugins and the top-level bundle.

The CI signature check introduced in #34787 is updated to use `--strict`.

Can be tested with:

```sh
cmake -B build -DBUILD_GUI=ON
# delete artifacts before rebuilding the `deploy` target
rm -rf build/Bitcoin-Qt.app build/bitcoin-macos-app.zip
cmake --build build -t deploy
codesign --verify --deep --strict --verbose=4 build/dist/Bitcoin-Qt.app
```

Fixes #32486, supersedes #33592 (this is a condensed version)

Additionally this PR modifies `03_test_script.sh` to avoid modifying `GOAL` in place. That was causing the `codesign --verify` step to get skipped entirely.

ACKs for top commit:
fanquake:
ACK da7d7dbc7c0040d5e91fe21e19fdc1cb3b8ea7b2 - I think we should try and cleanup `macdeployqtplus` somewhat, but that can happen in future.
willcl-ark:
Light ACK da7d7dbc7c0040d5e91fe21e19fdc1cb3b8ea7b2

Tree-SHA512: 54e6d38a327a9a241d842728390770e7819d45180c69c288f1e26c5706aff8ebedbb4f608c4a45b2b186e3369181b116aa82134a38fcaabf3af3711be14b9863

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

This change fixes how Bitcoin Core's macOS app bundle is digitally signed during automated builds. It replaces an outdated 'deep' signing method with explicit signing of each framework, plugin, and the main app bundle. It also fixes a CI script bug that was accidentally skipping the signature verification step entirely, and makes that verification stricter. The practical security effect is that macOS is more likely to detect tampered or improperly signed release binaries, and the build pipeline now actually performs that check.

Security candidateMerge bitcoin/bitcoin#36196: contrib, kernel: fixed seeds, chainparams, headerssync params, and assumeutxo updates pre-32.0by merge-script · 501ba4ca · Sep 11, 2026 · 8 filesMessage 81 · StrongInformational 22Details
Commit message · merge-script

Merge bitcoin/bitcoin#36196: contrib, kernel: fixed seeds, chainparams, headerssync params, and assumeutxo updates pre-32.0

fed50258f8f07d5549f2b53689671ca1412b2d63 kernel: add recent assumeutxo snapshot (Ava Chow)
7eb4cec1a983e199bf2b0f3986f50b56a2d30ccb kernel: Update headerssync params (Ava Chow)
42d93d40de3586e0e482de70320b4993b8a06317 kernel: update chainTxData (Ava Chow)
a25511dfbcd3412526e18e639e3df2aa4b751c08 kernel: update defaultAssumeValid and minimumChainWork (Ava Chow)
67726a63a41f7f9d89e0c8d7772b17eb1f7113b4 kernel: update assumed blockchain and chainstate sizes (Ava Chow)
fcfc1df041b8cecbc2bb4bf6836f5ba643f298a5 contrib: Update fixed seeds (Ava Chow)
6385aa1df8ab413c66c9b2f83df4eed4e9c03417 contrib: Update makeseeds for 30.3 and 31.x (Ava Chow)

Pull request description:

All the updates per the release process, except asmap.

Assumeutxo snapshots are available at https://achow101.com/files/utxo-snapshots/

ACKs for top commit:
fanquake:
ACK fed50258f8f07d5549f2b53689671ca1412b2d63
sedited:
Reproduced ACK fed50258f8f07d5549f2b53689671ca1412b2d63

Tree-SHA512: ae6d79a5216fe6a919376aa36da9afd1b0ae81d8aba96ab88fa85f3c5c0b5fe13d91ead66103ca7ba54b05a638363145c31d40c2050ec79bf3dab4fb1b4da666

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
seed or entropy pathsigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 22/100

This is a routine Bitcoin Core release-maintenance commit. It refreshes the list of network seed nodes, updates the built-in checkpoints that tell the software how much blockchain history to trust by default, adds newer 'assumeutxo' snapshots for faster initial setup, and adjusts header-sync tuning parameters. None of these changes fix a known bug or vulnerability; they are standard pre-release housekeeping to keep the client in sync with the live network.

Security candidateMerge bitcoin/bitcoin#36201: Update embedded asmap to 1788801420by merge-script · 5a5b1ed7 · Sep 10, 2026 · 2 filesMessage 81 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36201: Update embedded asmap to 1788801420

3c91db262b74f001a30bc5834daf322eadc19c46 net: Update embedded asmap to 1788801420 (Fabian Jahr)

Pull request description:

Depends on #36199 and https://github.com/bitcoin-core/asmap-data/pull/70 getting merged and receiving enough attestations. The run just happened so I hope we'll get these ACKs before the end of the week.

ACKs for top commit:
hodlinator:
ACK 3c91db262b74f001a30bc5834daf322eadc19c46

Tree-SHA512: a93aa1e25a7484e79eb7f8fa1d4871ee5a1356c2d9638a503729e31e629ae9448d4c0b82d8016cf8b0c1f7ec2d86ee03a9b14b27a5c3e12b39fb7cff4232086b

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

This commit simply swaps in a newer version of an external routing data file (the 'asmap') that Bitcoin Core embeds to help peers connect across different internet networks. The change is a routine data refresh with no code modifications, no bug fixes, and no security-related behavior changes visible in the commit.

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.

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.

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.

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.

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.