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

mining: add interrupt()

Public commit record

What the developer wrote

Authored by Sjors Provoost

59/100 · Thin
mining: add interrupt()

Both waitTipChanged() and createNewBlock() can take a long time to
return. Add a way for clients to interrupt them.

The new m_interrupt_mining is safely accessed with a lock on
m_tip_block_mutex, but it has no guard annotation. A more thorough
solution is discussed here:
https://github.com/bitcoin/bitcoin/pull/34184#discussion_r2743566474
✓ Subject identifies a change✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit adds a new 'interrupt()' button to Bitcoin Core's mining interface so outside callers can stop two long-running mining operations (waiting for a new chain tip and creating a new block) instead of waiting for them to finish on their own. It is a feature/refactoring change, not a fix for an active security bug. The only security-relevant note is that the new interrupt flag is accessed under a lock but is not formally marked as guarded by that lock, which the commit message itself flags as a known imperfection.

Recommended action

Treat as a routine feature commit. If reviewing for hardening, verify that the un-annotated m_interrupt_mining access is always performed under m_tip_block_mutex as claimed, and consider completing the follow-up discussed in PR #34184 to add the missing guard annotation. No emergency action is warranted.

Security signals we found

01

New interruptible control path added to long-running mining operations

02

Shared boolean flag (m_interrupt_mining) used without a Clang thread-safety guard annotation

03

Commit message self-discloses the guard-annotation gap and references follow-up discussion

04

No input validation changes, no privilege changes, no cryptographic changes

Risk score

Why this scored 19/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 3/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.