#35861 Testnet 5 (BIP95)
https://github.com/bitcoin/bitcoin/pull/35861 · · +6743/-129 in 59 files, 25 commits · labels: Needs rebase, CI failed · draft
Goal
- Add parameters and configuration for Testnet 5 to provide a reliable public test network
- Prevent hash rate manipulation and block storms seen on prior testnets by dropping the 20-minute rule
- Enable testing of modern consensus cleanup rules enforced from genesis
This PR implements BIP 95 to introduce Testnet 5. It establishes chain parameters that enforce BIP 54 (Consensus Cleanup) starting from block 1, eliminates the 20-minute minimum-difficulty exception present in previous testnets, and raises the minimum difficulty threshold.
Problem: Testnet 4 and prior testnets suffer from difficulty manipulation caused by the 20-minute minimum-difficulty rule, and lack a live test network running the proposed BIP 54 consensus cleanup rules from genesis.
Category: Validation (#32 of 48)
P3 · new feature
- P2 because it fixes recurring public testnet stability failures by removing exploitable difficulty resets
- Enables ecosystem-wide validation testing of consensus cleanup rules from genesis
P3 because providing a clean test network without the 20-minute difficulty loophole and enforcing BIP 54 rules offers clear ecosystem value, but is reasonably deferrable. The author explicitly notes that 'since BIP 95 activates BIP 54 from block 1, this depends on #35793 and won't make the v32 feature freeze', confirming the network launch can proceed at a deliberate pace once the underlying consensus cleanup implementation settles.
Membership: Defines consensus parameters for a new testnet network, activating BIP 54 rules from genesis and altering difficulty adjustment constraints.
Factors: security/stability 0, bug 0, performance 0, user value 2, leverage 1
Reviewability: Stale: Needs rebase
- Review #35793 first
- Branch has merge conflicts, failing CI, and awaits a mined genesis block
The branch has merge conflicts against master and CI is failing, although the author noted the top commits can be reviewed while waiting for #35793.
Author status: active; stated that review can proceed now even though finalization awaits #35793
Agreement: Crickets
- No reviews or concept feedback yet
No reviews or comments yet.
The PR has received no comments or reviews from other contributors since being opened.
Objections: none enumerated.
State derived from the lists: no substantive comment either way
Review verdicts (DrahtBot): 0
Dependencies
Depends on: #35793
Files
6481 lines under test/bench/ci.
- src/test/data/bip54_timestamps.json +4134/-0
- src/test/bip54_tests.cpp +1608/-0
- test/functional/feature_bip54.py +417/-0
- src/kernel/chainparams.cpp +142/-0
- src/test/data/bip54_coinbases.json +80/-0
- src/validation.cpp +54/-14
- src/test/fuzz/bip54.cpp +54/-0
- src/test/transaction_tests.cpp +26/-24
- src/policy/policy.cpp +1/-36
- src/consensus/tx_verify.cpp +31/-1
- test/functional/data/invalid_txs.py +17/-3
- src/consensus/consensus.h +16/-1
- test/functional/mempool_sigoplimit.py +8/-9
- src/test/util/transaction_utils.cpp +14/-0
- test/functional/rpc_blockchain.py +13/-0
- src/init.cpp +7/-5
- test/functional/feature_block.py +9/-1
- test/functional/mining_basic.py +5/-5
- src/consensus/tx_verify.h +7/-1
- test/functional/feature_taproot.py +5/-3
- doc/release-notes-testnet5.md +7/-0
- src/common/args.cpp +5/-2
- src/test/fuzz/coins_view.cpp +6/-1
- src/node/miner.cpp +3/-3
- test/functional/test_framework/blocktools.py +4/-2
- test/functional/wallet_migration.py +4/-2
- src/bitcoin-cli.cpp +4/-1
- src/chainparams.cpp +5/-0
- src/chainparamsbase.cpp +4/-1
- src/policy/policy.h +2/-3
- src/test/pow_tests.cpp +5/-0
- src/deploymentinfo.cpp +4/-0
- src/external_signer.h +2/-2
- src/util/chaintype.cpp +4/-0
- test/functional/test_framework/script_util.py +2/-2
- src/kernel/bitcoinkernel.cpp +3/-0
- src/test/CMakeLists.txt +3/-0
- src/test/util/transaction_utils.h +3/-0
- test/functional/rpc_getblockstats.py +3/-0
- doc/bips.md +2/-0
- src/CMakeLists.txt +1/-1
- src/chainparamsbase.h +1/-1
- src/common/args.h +1/-1
- src/kernel/chainparams.h +2/-0
- src/test/argsman_tests.cpp +1/-1
- src/test/versionbits_tests.cpp +1/-1
- src/txmempool.cpp +1/-1
- test/functional/mempool_accept.py +1/-1
- src/consensus/params.h +1/-0
- src/kernel/bitcoinkernel.h +1/-0
- src/kernel/bitcoinkernel_wrapper.h +1/-0
- src/qt/guiconstants.h +1/-0
- src/qt/guiutil.cpp +1/-0
- src/qt/networkstyle.cpp +1/-0
- src/rpc/blockchain.cpp +1/-0
- src/test/fuzz/CMakeLists.txt +1/-0
- src/util/chaintype.h +1/-0
- test/functional/test_framework/messages.py +1/-0
- test/functional/test_runner.py +1/-0
Card
PR #35861 implements BIP 95 to add Testnet 5, which eliminates the 20-minute minimum-difficulty exception seen in Testnet 4, raises minimum difficulty, and activates BIP 54 consensus cleanup rules from block 1. This provides developers and miners with a resilient testnet environment that also serves as a live proving ground for BIP 54. The PR rests on top of base PR #35793 and is currently in draft awaiting the merge of BIP 54, a mined genesis block, and seed infrastructure. It currently has no reviewer feedback, needs a rebase, and has failing CI.