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

regtest: align activations with Bitcoin Core

Public commit record

What the developer wrote

Authored by Boris Nagaev

90/100 · Strong
regtest: align activations with Bitcoin Core

Set regtest buried heights to match Core: BIP34/65/66 at height 1 and make
CSV/SegWit/Taproot always active. Added regtest coverage for header version
floors, coinbase height enforcement, and deployment state to ensure we now
reject the blocks Core rejects and accept the ones Core accepts.

Updated package fullblocktests to generate BIP34-compliant blocks.

Test helpers now set prev block height to 0 (not the default -1) so generated
blocks start at height 1 and satisfy coinbase height rules.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit changes btcd's regression test network (regtest) rules so they match Bitcoin Core's behavior. It makes several Bitcoin protocol upgrades active from block 1 instead of being delayed or inactive. The change is primarily about test-network compatibility and does not appear to be a security fix for main Bitcoin production networks. It adds tests to confirm regtest now rejects old-style blocks and accepts modern ones, just like Core does.

Recommended action

Treat this as a compatibility and test-coverage change rather than an urgent security patch. Reviewers should verify that the regtest parameter changes do not accidentally affect mainnet or testnet3 parameters, and that the new tests correctly exercise the intended Core-aligned behavior. No immediate deployment action is required for production nodes.

Security signals we found

01

Consensus parameter change for regtest: BIP34/65/66 activation heights moved to 1

02

Deployment definitions updated with AlwaysActiveHeight=1 for CSV, SegWit, Taproot on regtest

03

Test block version changed from 1 to 4 in test helpers

04

Coinbase signature scripts padded to max length instead of replaced, preserving serialized height

05

New contextual validation tests for block versions, buried deployments, and coinbase height

06

Fullblocktests updated to trigger BIP30 duplicate-txid rejection via a duplicated non-coinbase transaction

Risk score

Why this scored 28/100

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