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

mining: add new getCoinbaseTx() returning a struct

Public commit record

What the developer wrote

Authored by Sjors Provoost

83/100 · Strong
mining: add new getCoinbaseTx() returning a struct

Introduce a new method intended to replace getCoinbaseRawTx(), which
provides a struct with everything clients need to construct a coinbase.
This is safer than providing a raw dummy coinbase that clients then have
to manipulate.

The CoinbaseTx data is populated during the dummy transaction generation
and stored in struct CBlockTemplate.

Expand the interface_ipc.py functional test to document its usage
and ensure equivalence.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit adds a new, safer way for external mining programs to ask Bitcoin Core for the pieces needed to build a coinbase transaction, instead of receiving a complete dummy transaction they must edit. It is a defensive API improvement, not a fix for an active bug or vulnerability. The old method is kept but marked deprecated.

Recommended action

No immediate security action required. Mining IPC clients may plan migration from getCoinbaseRawTx() to getCoinbaseTx(). Reviewers should verify that the new struct accurately captures all consensus-required coinbase fields and that the deprecated path remains behaviorally unchanged during the transition.

Security signals we found

01

API redesign to reduce client-side manipulation of raw coinbase transactions

02

Deprecation of getCoinbaseRawTx() and related commitment accessors

03

New struct populated during dummy coinbase generation in BlockAssembler::CreateNewBlock()

04

IPC schema addition for CoinbaseTx with explicit field typing

05

Functional test equivalence check between reconstructed and legacy dummy coinbase

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.