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

mining: add reason and debug output to submitSolution

Public commit record

What the developer wrote

Authored by w0xlt

73/100 · Adequate
mining: add reason and debug output to submitSolution

Add reason and debug output parameters to submitSolution, matching
submitBlock. This relays the specific failure reason (e.g.
"bad-version(...)", "bad-witness-nonce-size", "duplicate") to callers
instead of just a bool.

Use a new capnp ordinal for the updated method and keep the old @7 method
as a deprecated entry point returning an explicit error, so old clients do
not decode corrupt result fields and are directed to update.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit changes the internal mining interface so that when a miner submits a solved block through the IPC interface, the caller now receives a specific rejection reason (like 'bad-version', 'duplicate', or 'inconclusive') instead of just a true/false answer. It also keeps the old interface method as a deprecated stub that throws an explicit error telling old clients to update, preventing them from misinterpreting new return values. This is a defensive compatibility and observability improvement, not a fix for an active exploit.

Recommended action

No immediate security action required. Developers consuming the IPC mining interface should update to the new submitSolution ordinal (@10) and handle the new reason/debug fields. Old clients will receive an explicit error and must upgrade.

Security signals we found

01

Interface versioning change to prevent old IPC clients from decoding corrupt result fields

02

Deprecated stub throws explicit runtime error instead of silently returning incompatible data

03

Return value semantics changed: submitSolution now returns true only for accepted new blocks, not duplicates

04

Adds BIP22 rejection reason and debug output to mining IPC API

05

Functional tests verify rejection reasons for malformed and stale blocks

Risk score

Why this scored 32/100

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