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

validation: In AcceptBlock, ignore flush result

Public commit record

What the developer wrote

Authored by optout

80/100 · Strong
validation: In AcceptBlock, ignore flush result

At the end of `ChainstateManager::AcceptBlock`, errors from
`FlushStateToDisk` (e.g. low disk space during pruning)
are ignored, so that callers can't mistreat a flush failure
as a block validation failure.
The internal fatal error notification still fires, so the node
will shut down on unrecoverable flush errors.
For state a dummy value is used, and the return value is ignored.
Previously the in-out `state` parameter was used, so it could
return a flush error message.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
✓ 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 change fixes a subtle bug in how Bitcoin Core reports disk flush errors during block acceptance. Previously, if writing block data to disk failed (for example, because the disk was full during pruning), the error could be misreported to callers as 'this block is invalid.' That could trick other parts of the program or external logic into permanently rejecting a perfectly valid block. Now the disk-flush error is handled separately, and the node still shuts down safely on serious disk problems. The fix is defensive and prevents a non-validation failure from being misclassified as a consensus failure.

Recommended action

Treat as a low-to-moderate severity hardening fix. Review whether any downstream callers of AcceptBlock rely on state after flush errors, and ensure the internal fatal-error notification reliably shuts down the node on unrecoverable disk errors. No emergency deployment is indicated, but include in normal release cycle.

Security signals we found

01

Error-state confusion between disk flush and block validation

02

Potential for valid blocks to be rejected due to misattributed flush failures

03

Defensive hardening of error propagation in consensus-critical code path

04

No change to consensus rules or block validity logic

Risk score

Why this scored 57/100

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