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

txgraph: clear cluster's chunk index in ~Ref (preparation)

Public commit record

What the developer wrote

Authored by Pieter Wuille

85/100 · Strong
txgraph: clear cluster's chunk index in ~Ref (preparation)

Whenever a TxGraph::Ref is destroyed, if it by then still appears inside
main-level clusters, wipe the chunk index entries for those clusters, to
prevent having lingering indexes for transactions without Ref.

This is preparation for enabling a callback being passed to MakeTxGraph
to define a fallback order on objects. Once the Ref for a transaction is
gone, it is not possible to invoke the callback anymore. To prevent the
index becoming inconsistent, we need to immediately get rid of the index
entries when the Ref disappears.

This is not a problem, because such destructions necessarily will
trigger a relinearization of the cluster (assuming there are
transactions in it left) before becoming acceptable again, and the chunk
ordering is not observable (through CompareMainOrder, or through the
BlockBuilder interface) until that point. However, the index itself
needs to remain consistent in the mean time, even if not meaningful.
✓ Specific, 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 is a small internal cleanup in Bitcoin Core's new transaction graph code. It makes sure that when a transaction reference object is destroyed, any cached 'chunk index' bookkeeping for its cluster is wiped out. The commit message explicitly says this is preparation for a future feature and is not currently a problem, because the index is not observable by outside code until the cluster is reprocessed anyway. There is no direct evidence this fixes an exploitable security bug.

Recommended action

Treat as routine defensive maintenance. Review the follow-up change that enables the MakeTxGraph callback to confirm the preparation is correctly used. No urgent action required based on this commit alone.

Security signals we found

01

Internal consistency hardening for transaction graph chunk index

02

Destructor-time cleanup of dangling references

03

Assertion relaxation tied to removal-in-progress state

04

Preparatory change for future callback ordering feature

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 2/15
Confidence 8/10
Evidence quality 4/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.