Home › Glossary › Testnet

Testnet

Also called: Bitcoin testnet, testnet3, Testnet 3, testnet4, Testnet 4, Testnet 5, tBTC, test bitcoin.

Testnet is a public Bitcoin test network whose coins are meant to have no value. Testnet 4 (BIP 94) replaced Testnet 3; BIP 95 proposes Testnet 5.

Testnet is a separate, public Bitcoin network for testing. It runs the same software and nearly the same rules as mainnet, but its coins (often written tBTC) are meant to have no value, so people can experiment without risking real money.

How it differs from mainnet

Testnet has its own genesis block, so its coins and UTXOs never mix with mainnet's. Its formats are marked so they can't be confused with real ones:

  • SegWit addresses start with tb1 instead of bc1 (BIP 173).
  • P2SH addresses start with 2 (BIP 13), and legacy addresses with m or n.
  • Extended keys start with tpub and tprv (BIP 32).
  • Derivation paths use coin type 1' (BIP 44).

The main rule difference is the 20-minute exception: if no block has been found for more than 20 minutes, the next one may be mined at minimum difficulty, so a CPU can keep the chain moving.

Testnet 3, 4 and 5

Testnet 3 ran for more than a decade, but the 20-minute rule could reset difficulty and trigger "block storms" (in one case, three years' worth of blocks in a few weeks), and its coins started being traded. BIP 94, by Fabian Jahr, defines Testnet 4: it keeps the 20-minute exception, bases each difficulty adjustment on the first block of the previous period to stop block storms, and adds a rule against time warp attacks.

BIP 95, by Pol Espinasa and Fabian Jahr, proposes Testnet 5 after the exception was persistently exploited on Testnet 4. It removes the exception entirely, raises the minimum difficulty to about 1,000,000 and enforces the BIP 54 consensus cleanup rules from block 1. Its message start bytes spell FIVE in ASCII.

For a more predictable shared network, see Signet (BIP 325); for private local testing, developers use regtest.

BIPs that define Testnet

  • BIP 94: Testnet 4: Deployed. Defines Testnet 4, a replacement for the long-running Testnet 3 practice network, where coins have no value and developers test software. It tightens a few rules to stop attackers from disrupting…
  • BIP 95: Testnet 5: Draft. 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 325: Signet: Complete. Defines Signet, a type of Bitcoin test network where new blocks must be signed by designated parties in addition to being mined. This gives developers a stable, predictable place to test software,…
  • BIP 173 (Bech32): Base32 address format for native v0-16 witness outputs: Deployed. Introduces Bech32, an address format for native SegWit outputs, recognizable by addresses starting with "bc1". It uses only lowercase letters and numbers and a strong checksum that catches typing…

Related terms

  • Signet: Signet is a Bitcoin test network, defined in BIP 325, where blocks must be signed by designated keys, making it far more predictable than testnet.
  • Node: A Bitcoin node is a computer running Bitcoin software that downloads, checks and relays blocks and transactions; a full node verifies every rule itself.
  • Consensus rules: Consensus rules are the checks every full node applies to decide whether a block or transaction is valid; a block that breaks one is rejected.
  • Bech32: Bech32 is the checksummed base32 address format from BIP 173, used for native SegWit version 0 addresses that start with bc1q.