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

rpc: fix getblock(header) returns target for tip

Public commit record

What the developer wrote

Authored by Sjors Provoost

98/100 · Strong
rpc: fix getblock(header) returns target for tip

A target field was added to the getblock and getblockheader RPC calls in bitcoin#31583, but it mistakingly always used the tip value.

Because regtest does not have difficulty adjustment, a test is added for mainnet instead.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in Bitcoin Core's RPC (remote procedure call) responses. When users asked for data about an older block via getblock or getblockheader, the newly added 'target' field was incorrectly showing the current chain tip's target instead of that older block's actual target. The fix simply uses the correct block's data. It is a data accuracy bug, not a security vulnerability that allows theft, denial of service, or code execution.

Recommended action

No urgent security action required. Treat as a normal bug-fix release item. Users or services relying on the 'target' field for historical blocks should upgrade or verify values against other sources until patched.

Security signals we found

01

Incorrect RPC field value (wrong block target returned)

02

Data integrity issue in public API output

03

No memory safety, authentication, or consensus code changed

Risk score

Why this scored 21/100

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