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

test: bad-cb-length for createNewBlock() at low heights

Public commit record

What the developer wrote

Authored by Sjors Provoost

95/100 · Strong
test: bad-cb-length for createNewBlock() at low heights

On new regtest / signet chains (heights <= 16), createBlock() fails
internally with bad-cb-length. Since mining.capnp does not expose
include_dummy_extranonce, IPC clients can't work around this.

Add a functional test to illustrate this issue and use RPC to
work around it. The next commit introduces a fix.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit only adds a new automated test that demonstrates an existing bug in Bitcoin Core's mining IPC interface. The bug causes block creation to fail on brand-new test chains for the first 16 blocks. The commit does not fix the bug; it documents it and works around it in the test by using an RPC call instead. There is no direct security risk to users here, but it highlights a reliability issue in an experimental IPC feature.

Recommended action

Review the subsequent commit that claims to fix the bad-cb-length issue. This commit is safe to merge as-is because it only adds tests and a helper refactor, but it should not be treated as a security patch. Consider whether the IPC mining interface should expose include_dummy_extranonce or handle BIP34 encoding internally for low-height chains.

Security signals we found

01

Functional test addition only; no production code change

02

Demonstrates a bug in experimental IPC mining interface

03

Failure is bad-cb-length / TestBlockValidity on low-height chains

04

Workaround uses trusted RPC instead of untrusted IPC path

05

No fix included; fix deferred to next commit

Risk score

Why this scored 19/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 2/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.