AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 42 Bitcoin

wallet: Replace CWalletTx::SetTx with Update

Public commit record

What the developer wrote

Authored by Ava Chow

80/100 · Strong
wallet: Replace CWalletTx::SetTx with Update

Instead of replacing the tx when a witness alternative appears, add it
to the set of wtxid alternates.

In order to determine whether the added transaction is the canonical
transaction, Update also needs to know how the state is changing, so it
will also update the state if it is being changed.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This Bitcoin Core wallet commit changes how the wallet stores transactions that share the same transaction ID (txid) but have different witness data (wtxid). Previously, the wallet would overwrite the stored transaction when a version with witness data appeared. Now it keeps all known variants and picks a 'canonical' one based on rules: confirmed transactions win; otherwise, transactions with witness data are preferred, and lighter-weight transactions beat heavier ones. The change is a defensive refactor to support multiple transaction variants correctly, not a fix for a known active exploit.

Recommended action

Review as a normal code-quality and correctness change. No urgent security response is indicated by the commit itself. If deploying, include it as part of regular maintenance to ensure wallet canonicalization behaves correctly across reorgs and witness-variant updates.

Security signals we found

01

Defensive refactor of wallet transaction canonicalization logic

02

Prevents wallet from pinning to a downgraded/unconfirmed witness variant after a reorg or conflict

03

Adds invariant assertions (Assert/Assume) on transaction hash equality

04

Changes behavior from single stored tx to multiple wtxid variants

05

No explicit bug fix, CVE, or exploit described in commit message

Risk score

Why this scored 42/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 6/15
Affected reach 7/15
Confidence 6/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.