{"number":95,"title":"Testnet 5","authors":["Pol Espinasa","Fabian Jahr"],"status":"Draft","type":"Specification","layer":"Applications","created":"2026-06-22","license":"CC0-1.0","version":"0.1.0","requires":[54],"replaces":[94],"replacedBy":[],"discussion":["https://groups.google.com/g/bitcoindev/c/kGUMTxOvdJA"],"abstract":"Testnet 5 is a new test network intended to replace Testnet 4. Testnet 5 removes the difficulty exception defined in Testnet 4. Sustained exploitation of this exception has made the network difficult to use for testing. Additionally, Testnet 5 raises the minimum difficulty and enforces the consensus rules specified in BIP 54 from block 1.","eli5":"Proposes Testnet 5 to replace Testnet 4, removing a special rule that let blocks be mined at minimum difficulty, which had been heavily abused. It also raises the minimum difficulty and applies the BIP 54 consensus cleanup rules from the start, aiming for a more stable test network.","categories":["consensus"],"filename":"bip-0095.md","githubUrl":"https://github.com/bitcoin/bips/blob/master/bip-0095.md","format":"markdown","readingMinutes":5,"inbound":0,"revisions":1,"impact":0,"core":false,"references":[30,94],"lastModified":"2026-05-08","html":"<h2 id=\"abstract\">Abstract</h2>\n<p>Testnet 5 is a new test network intended to replace <a href=\"/bip/94\">Testnet 4</a>. Testnet 5 removes the difficulty\nexception defined in Testnet 4. Sustained exploitation of this exception has made the network difficult\nto use for testing. Additionally, Testnet 5 raises the minimum difficulty and enforces the consensus\nrules specified in <a href=\"/bip/54\">BIP 54</a> from block 1.</p>\n<h2 id=\"motivation\">Motivation</h2>\n<p>Testnet 4 included mitigations for an issue known as the <a href=\"https://blog.lopp.net/the-block-storms-of-bitcoins-testnet/\">block storm attack</a> which could render the\nwhole network unusable. Block storm attacks led to a depletion of block subsidies, which made it hard to acquire\ncoins for testing. However, Testnet 4 still retained a modified version of the difficulty exception rule.\nThe difficulty exception permits a block to be mined at the minimum difficulty when more than 20 minutes\nhave passed since the previous block. Testnet 4 kept this exception with the aim of allowing CPU users a\nlimited path to acquire coins for testing, to mine non-standard transactions that other miners would not\nrelay, and to keep the chain moving if a large source of hash power were to leave the network. Shortly\nafter Testnet 4&#39;s introduction, the exception had been systematically and persistently exploited, which\nprevented the exception from achieving the intended\ngoals. While block storms were prevented, the network suffered from constant re-orgs of small\nnumbers of blocks due to multiple difficulty-exception blocks competing for the tip. This led\nto discussion about changing Testnet 4 to mitigate this issue (see <a href=\"https://bitcointalk.org/index.php?topic=5569103.0\">Bitcointalk</a>\nfor analysis and discussion).</p>\n<p>In Testnet 5 there is no exception to the PoW rules. This appears to be the logical conclusion,\nsince any such exception could be exploited by a motivated attacker. The lack of exception\nensures the network’s behavior matches mainnet as closely as possible.</p>\n<p>BIP 54 is already enforced on signet through <a href=\"https://delvingbitcoin.org/t/bitcoin-inqusition-29-2/2236\">Bitcoin Inquisition</a> as of this BIP&#39;s creation.\nHowever, signet does not allow miners to test that their software reliably follows the rules of\nBIP 54. Testnet 5 provides a testing environment for this.</p>\n<h2 id=\"specification\">Specification</h2>\n<p>Testnet 5 follows the same consensus rules as mainnet, except for the following two changes.</p>\n<h3 id=\"bip-54-activation\">BIP 54 activation</h3>\n<p>The rules specified in <a href=\"/bip/54\">BIP 54 version 1.0.0</a> are active on Testnet 5 from block 1.</p>\n<h4 id=\"problem-statement\">Problem Statement</h4>\n<p>BIP 54 proposes new consensus rules in order to fix several potential attack vectors. Namely \nit prevents the timewarp attack, reduces the worst-case block validation time, mitigates Merkle\ntree weaknesses, and avoids duplicate transactions without <a href=\"/bip/30\">bip-0030</a> validation.</p>\n<h4 id=\"rule-specification\">Rule Specification</h4>\n<p>See specification in <a href=\"/bip/54\">bip-0054</a>.</p>\n<h3 id=\"minimum-difficulty\">Minimum Difficulty</h3>\n<p>The proof-of-work limit (the maximum target) is <code>0x1a0fffff</code> in compact encoding (nBits),\ncorresponding to a minimum difficulty of approximately 1,000,000.</p>\n<h3 id=\"consensus-rules\">Consensus Rules</h3>\n<p>All consensus rules active on mainnet as of May 2026 are enforced from block 1, the most\nrecent of these being the Taproot softfork. Additionally, the rules of BIP 54 are enforced\nfrom block 1, as specified above.</p>\n<h3 id=\"genesis-block\">Genesis Block</h3>\n<p>TODO: Mine the block. The values below are placeholders inherited from Testnet 4. They are\nthe genesis block&#39;s header fields together with the <code>Message</code> and <code>Pubkey</code> of its coinbase\ntransaction. Notes for the miner:</p>\n<ul>\n<li><code>Pubkey</code> is the public key in the coinbase transaction&#39;s pay-to-public-key (P2PK) output. Use a\nrecent Bitcoin mainnet block hash.[^pubkey-methodology]</li>\n<li><code>Message</code> is an arbitrary string in the coinbase input script, like the newspaper headline in\nBitcoin&#39;s mainnet genesis block. Testnet 4 used it to carry the anti-pre-mine commitment, but\nTestnet 5 places that in the <code>Pubkey</code> instead, so the <code>Message</code> should be left empty, which also\navoids bike shedding over its content.</li>\n<li><code>Time stamp</code> time of mining or that of the block which hash is used in <code>Pubkey</code></li>\n<li><code>nBits</code>: <code>0x1a0fffff</code>, per the raised minimum difficulty.</li>\n<li><code>Version: 1</code></li>\n</ul>\n<p>Testnet 4 placeholders:</p>\n<blockquote>\n<ul>\n<li>Message: <code>03/May/2024 000000000000000000001ebd58c244970b3aa9d783bb001011fbe8ea8e98e00e</code></li>\n<li>Pubkey: <code>000000000000000000000000000000000000000000000000000000000000000000</code></li>\n<li>Time stamp: 1714777860</li>\n<li>Nonce: 393743547</li>\n<li>Difficulty: <code>0x1d00ffff</code></li>\n<li>Version: 1</li>\n</ul>\n<p>The resulting Genesis block hash is <code>00000000da84f2bafbbc53dee25a72ae507ff4914b867c565be350b0da8bf043</code>, and the block hex is <code>0100000000000000000000000000000000000000000000000000000000000000000000004e7b2b9128fe0291db0693af2ae418b767e657cd407e80cb1434221eaea7a07a046f3566ffff001dbb0c78170101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5504ffff001d01044c4c30332f4d61792f323032342030303030303030303030303030303030303030303165626435386332343439373062336161396437383362623030313031316662653865613865393865303065ffffffff0100f2052a010000002321000000000000000000000000000000000000000000000000000000000000000000ac00000000</code>.</p>\n</blockquote>\n<h3 id=\"message-start\">Message Start</h3>\n<p>The message start (also known as the network magic) is defined as <code>0x46495645</code>. These four bytes spell <code>FIVE</code> when\ninterpreted as ASCII.</p>\n<h3 id=\"p2p-port\">P2P Port</h3>\n<p>The default p2p port for Testnet 5 is <code>18335</code>.</p>\n<h2 id=\"rationale\">Rationale</h2>\n<p>Instead of starting a new Testnet, changing the rules of Testnet 4 <a href=\"https://github.com/bitcoin/bitcoin/pull/31117\">was considered</a> as well. The decision\nfor a new network had two main reasons:</p>\n<ol>\n<li>Deploying network changes is hard and typically takes a long time. This effort doesn&#39;t seem to be\nworth it for a Testnet that has the alternative option to start fresh, especially considering that\nthe attackers exploiting Testnet 4&#39;s rules may use them to prevent a smooth deployment of new rules,\nincluding those of BIP 54.</li>\n<li>Any fix to Testnet 4 that goes beyond a band-aid would require a hard fork, which brings its own\nimplementation cost: adding hard-fork support to clients, handling the p2p layer correctly, etc.\nFor a test network this isn&#39;t worth taking on, especially since a band-aid would only make\nTestnet 4 diverge further from mainnet.</li>\n</ol>\n<p>Raising the minimum difficulty was dismissed for Testnet 4 because it would have prevented CPU\nminers from utilizing the difficulty exception. With the exception removed in Testnet 5, this\nargument no longer applies. A minimum difficulty of approximately 1,000,000 strikes a balance\nbetween dampening the quick mining of large numbers of blocks shortly after launch, before the\ndifficulty has adjusted to the available hash power, and keeping a low barrier so that a handful\nof at-home miners or a single ASIC can keep the network usable.</p>\n<h2 id=\"backward-compatibility\">Backward Compatibility</h2>\n<p>Testnet 5&#39;s consensus rules are not compatible with those of Testnet 3 and Testnet 4. The\nconsensus rules differ in both directions: Testnet 5 enforces the BIP 54 consensus rules from\nblock 1, which is not the case for Testnet 3 or Testnet 4. Testnet 5 also does not apply the\ndifficulty exception rule that Testnet 3 or Testnet 4 requires.</p>\n<p>Because each network has its own genesis block, their UTXO sets are disjoint and transactions\ncan never be replayed across them. Address formats are shared, however, so the same address may\nbe reused on different networks.</p>\n<p>Any implementation that intends to follow Testnet 5 must add the new network parameters and\nadditionally enforce the BIP 54 rules while not permitting any of the difficulty exception rules.</p>\n<h2 id=\"reference-implementation\">Reference Implementation</h2>\n<p>Pull request at ?</p>\n<h2 id=\"references\">References</h2>\n<ul>\n<li><a href=\"/bip/30\">BIP 30</a>: Duplicate transactions</li>\n<li><a href=\"/bip/54\">BIP 54</a>: Consensus Cleanup</li>\n<li><a href=\"/bip/94\">BIP 94</a>: Testnet 4</li>\n<li><a href=\"https://blog.lopp.net/the-block-storms-of-bitcoins-testnet/\">The block storms of Bitcoin&#39;s Testnet</a></li>\n<li><a href=\"https://bitcointalk.org/index.php?topic=5569103.0\">Testnet 4 difficulty exception analysis and discussion (Bitcointalk)</a></li>\n<li><a href=\"https://delvingbitcoin.org/t/bitcoin-inqusition-29-2/2236\">BIP 54 enforcement on signet via Bitcoin Inquisition</a></li>\n<li><a href=\"https://github.com/bitcoin/bitcoin/pull/31117\">Discussion on changing the Testnet 4 rules (Bitcoin Core PR #31117)</a></li>\n</ul>\n<h2 id=\"copyright\">Copyright</h2>\n<p>This document is licensed under the Creative Commons CC0 1.0 Universal license.</p>\n<h2 id=\"changelog\">Changelog</h2>\n<ul>\n<li><strong>0.1.0</strong> (2026-06-02):<ul>\n<li>Initial draft</li>\n</ul>\n</li>\n</ul>\n<p>[^pubkey-methodology]: The <code>Pubkey</code> field is the public key placed in the coinbase transaction&#39;s\n  output as a pay-to-public-key (P2PK) script. Setting it to a recent Bitcoin mainnet block hash\n  serves two purposes: the resulting output is provably unspendable, and the referenced block hash\n  acts as an anti-pre-mine commitment, since the genesis block cannot have been created before that\n  mainnet block existed.</p>\n","toc":[{"id":"abstract","title":"Abstract","level":2},{"id":"motivation","title":"Motivation","level":2},{"id":"specification","title":"Specification","level":2},{"id":"bip-54-activation","title":"BIP 54 activation","level":3},{"id":"problem-statement","title":"Problem Statement","level":4},{"id":"rule-specification","title":"Rule Specification","level":4},{"id":"minimum-difficulty","title":"Minimum Difficulty","level":3},{"id":"consensus-rules","title":"Consensus Rules","level":3},{"id":"genesis-block","title":"Genesis Block","level":3},{"id":"message-start","title":"Message Start","level":3},{"id":"p2p-port","title":"P2P Port","level":3},{"id":"rationale","title":"Rationale","level":2},{"id":"backward-compatibility","title":"Backward Compatibility","level":2},{"id":"reference-implementation","title":"Reference Implementation","level":2},{"id":"references","title":"References","level":2},{"id":"copyright","title":"Copyright","level":2},{"id":"changelog","title":"Changelog","level":2}],"history":{"totalCommits":1,"firstCommit":"2026-05-08T10:49:03+02:00","lastUpdated":"2026-05-08T10:49:03+02:00","events":[{"sha":"c134c7db552d26801ba2ef86e00c50febe843718","date":"2026-05-08T10:49:03+02:00","author":"Fabian Jahr","message":"BIP95: Testnet 5","url":"https://github.com/bitcoin/bips/commit/c134c7db552d26801ba2ef86e00c50febe843718","kind":"edit"}]}}