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

[miner] omit dummy extraNonce via IPC

Public commit record

What the developer wrote

Authored by Sjors Provoost

98/100 · Strong
[miner] omit dummy extraNonce via IPC

Previously the coinbase transaction generated by our miner code was
not used downstream, because the getblocktemplate RPC excludes it.

Since the Mining IPC interface was introduced in #30200 we do expose
this dummy coinbase transaction. In Stratum v2 several parts of it
are communicated downstream, including the scriptSig.

This commit removes the dummy extraNonce from the coinbase scriptSig
in block templates requested via IPC. This limits the scriptSig
to what is essential for consensus (BIP34) and removes the need for
external mining software to remove the dummy, or even ignore
the scriptSig we provide and generate it some other way. This
could cause problems if a future soft fork requires additional
data to be committed here.

A test is added to verify the new IPC behavior.

It achieves this by introducing an include_dummy_extranonce
option which defaults to false with all test code updated to
set it to true. Because this option is not exposed via IPC,
callers will no longer see it.

The caller needs to ensure that for blocks 1 through 16
they pad the scriptSig in order to avoid bad-cb-length.

Co-authored-by: Anthony Towns <aj@erisian.com.au>
✓ 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 Bitcoin Core change tweaks the coinbase transaction—the special first transaction in a newly mined block—that is handed to external mining software through the new Mining IPC interface. Previously the template included an unnecessary dummy byte (OP_0) after the block height. The commit removes that dummy byte for IPC callers so downstream miners get only the consensus-required data. This is a cleanup and future-proofing measure, not a fix for an active exploit, but it reduces the chance that external mining software would mishandle or ignore the provided scriptSig if future consensus rules add more data there.

Recommended action

Treat as a hardening/miner-interface correctness change rather than an urgent security patch. Reviewers and operators using the Mining IPC interface should ensure their downstream mining software appends its own extraNonce/scriptSig data and pads appropriately for blocks at heights 1–16 to avoid bad-cb-length. No immediate network-wide action is required.

Security signals we found

01

Change to coinbase scriptSig generation in miner code

02

New boolean option include_dummy_extranonce with default false

03

IPC-exposed block template no longer includes dummy OP_0 extraNonce

04

All RPC and test paths opt back into legacy dummy byte

05

Added functional test asserting absence of dummy extraNonce in IPC template

06

Comment notes bad-cb-length risk for blocks 1–16 when dummy is omitted

Risk score

Why this scored 32/100

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