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

bcli: return "not found" on any `getblockhash` exit status

Public commit record

What the developer wrote

Authored by dovgopoly

73/100 · Adequate
bcli: return "not found" on any `getblockhash` exit status

Return "not found" on any `getblockhash` exit status. Previously, only exit code 8 (block height doesn't exist) returned "not found", while other exit codes returned an error. Now any non-zero exit status returns "not found" since any failure means the block is unavailable.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This change alters how Core Lightning's bitcoin backend plugin reacts when the connected Bitcoin node cannot find a requested block by height. Previously, only one specific error code (8) was treated as 'block not found,' while any other failure caused Core Lightning to report a hard error and stop. Now, any non-zero failure from the 'getblockhash' command is treated as 'not found.' This makes the plugin more tolerant of Bitcoin node behavior differences, but could mask real backend problems such as network errors, authentication failures, or node crashes by silently treating them as missing blocks.

Recommended action

Review whether silently treating all getblockhash failures as 'not found' is safe for every failure mode. Consider logging the original exit status and error output for diagnostics, and ensure that transient backend errors (network, authentication, resource exhaustion) are retried or escalated rather than permanently treated as missing blocks. If this is a defensive hardening change, verify that downstream callers handle repeated 'not found' responses safely.

Security signals we found

01

Error-handling broadening masks non-missing-block failures

02

Any getblockhash non-zero exit status now treated as missing block

03

Potential for denial of service or synchronization stall if backend errors are silently swallowed

04

No explicit bounds, input, or cryptographic changes

Risk score

Why this scored 45/100

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