Testnet, the testing network for Bitcoin – Bitcoin Bit2Me Guide

Lto network Testnet without a doubt it is a very useful creation for cryptocurrency developers like Bitcoin. This thanks to the fact that it is a space in which you can make any type of modification without running the risk that everything will fail.

In Bitcoin the testnet network is very useful but you will surely ask yourself: How did it start? What other uses does it have? Well, all that and much more we will answer below.

The beginnings of the Bitcoin Testnet

The beginnings of the testnet network in Bitcoin date back to 2010, to be more exact to October 19, 2010. At that time, Gavin Andresen send a patch to enable this functionality which was accepted by Satoshi Nakamoto. The patch in question we can see here!, and with it starts the first Bitcoin testnet.

With the creation of the first test network, the ability for developers to test software changes without touching the main network was enabled. The benefits of this were immense, starting with the fact that software development could be accelerated and its evidence base expanded.

However, on February 3 the Testnet1 network would be restarted. This at the request of the developer David François who would raise a patch to the Bitcoin Core code. This new testnet was known as Testnet2. The Testnet2 on the other hand presented two serious problems:

  1. The network began to have a high difficulty.
  2. Due to the high difficulty many users took advantage to sell the Testnet coins as real bitcoins.

In this situation, on April 12, 2012, Andresen would restart the network and start the new Bitcoin testnet, the current Testnet3. With this change, Bitcoin developers would ensure that crashes like those of Testnet1 and Testnet2 would not reoccur. Something that in fact they have achieved, since Testnet3 is still active under its own consensus rules.

Mainnet and Testnet What are their differences?

Two networks are associated with Bitcoin, although they are totally separate networks:

  • Mainnet: Main network
  • Testnet (or Testnet3): Test network

While in the Mainnet network live the bitcoins that we know, in the Testnet network “lives” a cryptocurrency identical to bitcoin but with its own type of addresses and its own accounting record or blockchain. We put the word live in quotes, because the only thing that exists is an accounting. For you to have a better idea look at the following example:

In Testnet the addresses do not start with “1” or “3” as in Bitcoin, but with “m” or “2“. Examples:

mvN7z3C3GNwTkeEY2tvAQzragtDoiQZ5CF
2NEPMeQcRF7j3uZvQYqsEQxxdCqEnNgDyXd

This difference seems small, but it ensures that it is impossible to send bitcoin from the mainnet to the testnet. This is because testnet coins are worthless. The reason for this is very simple, mining coins on the testnet is very simple, so simple that a computer can do it. This obviously does not compare to the difficulty and investment that must be made to achieve the same goal on the Mainnet network. But if you want to know more about how Bitcoin takes its value, we recommend you read this other article.

Other differences between mainnet and testnet are as follows:

  1. Testnet uses a different value in the parameter ADDRESS VERSION. This parameter is the one that ends up creating different addresses and that’s why no Testnet address works in Bitcoin. While Bitcoin uses 0x00 in Testnet it is used 0x6F. It is key so that they can be visually identified.
  2. The Testnet network uses a different Genesis block than the main Bitcoin network. The Genesis block is the seed from which the ledger, the blockchain, begins to be created. Only by changing the Genesis block you start a new cryptocurrency, because you start a new ledger.
  3. Checking IsStandard () written in the Bitcoin code is disabled on Testnet, allowing a perfect setting to experiment with transactions and new ideas.
  4. In Testnet startup use different seeds of DNS.
  5. The header of the protocol messages is 0x0B110907 instead of 0xF9BEB4D9 which is used in Bitcoin.
  6. The Bitcoin program is a node of a P2P network and you need to communicate with other nodes on the network. Normally use the port 8333 from the computer, but in Testnet mode use the port 18333 to be able to operate both modes at the same time on the same computer. A port are points of entry and exit of information that all computers have.
  7. The Bitcoin program also allows you to communicate with other programs, for example those that you can create as a developer. This is the port used for the protocol RPC. Testnet uses 18332 while Bitcoin uses 8332.
  8. If a block has not been found within 20 minutes, the difficulty automatically restarts.

Why was it created and is it so integrated?

Surely the name “Testnet” gives you clues as to why it was created, if not then we leave you the two keys to understanding it:

  • To improve Bitcoin: It is the perfect setting to analyze the operation of new improvements. It offers a network very similar to Bitcoin, with the same rules and the same way of operating. Before deploying a change in the Mainet version, it is implemented in this network and the result is observed without great consequences.
  • To integrate Bitcoin: If you want to create any tool that uses Bitcoin you need to be able to test its transactions and capabilities working with your code, but that code must be fully functional when working with bitcoins.

The main difference between the Bitcoin testing network and the main network is that its coins have no value, since mining them does not entail any considerable cost.

Let’s imagine that someone proposes an upgrade for Bitcoin. Once this improvement is developed, it must be tested, as it could break Bitcoin, but it cannot be tested on a site that works under a different logic. This enhancement can be run on the Testnet network or even a new “Testnet”.

A case of use of the Testnet network we see in SegWit. Without testnet, SegWit testing would have been virtually impossible within the core network without causing chaos due to the changes that such implementation needed to make.

Testnet coins have no value

Despite being a cryptocurrency almost identical to Bitcoin, as we have explained above (it has 21 million, the block is mined every 10 minutes, …), this currency It does not have value. It doesn’t matter that you have thousands.

This is so because this currency is very easy to get, it has been created so that developers have an environment where they can test things without economic damage.

Tip: Beware of scams! They could try to sell you coins from the Testnet network. You should be very clueless and very new to falling for something like this, but it can happen. Remember how Testnet network addresses start. There you can never receive bitcoins.

Testnet to learn how to use Bitcoin

Testnet is the novice’s Bitcoin. For what reason?. Well, there is a cryptocurrency that does not cost any money and that they give it for free but that works with the same Bitcoin rules. This makes it perfect for the novice who wants to test how Bitcoin works without the need to buy bitcoins. In it, the purses, send and receive transactions, all the operations are the same. Visually you will only see the direction change.

Many Bitcoin wallets can operate with this network at the push of a button and there are websites (commonly called faucets) that give away the coins.

Imagine that you are a teacher and you want your students to experiment or that you want to have your first experience. Although you could jump in the mud and do it with real money, you can also do it on Testnet.

You should just follow these steps:

  1. Go to the purse Bit2Me Wallet, which has support for the Bitcoin testing network.
  2. Once opened press the button “+” for “Create new wallet”.
  3. Give a name to the wallet in this case “Bitcoin Testnet” and select the network “Bitcoin Testnet”.
  4. Press the button “Create wallet”.
  5. Once created you can click on the “Receive” button and copy the address that it shows you.
  6. You access a Testnet faucet, for example this, and enter the copied address (At the end of the post you have a few more faucets).
  7. In a few seconds or minutes you will receive your Testnet coins in your wallet.
  8. Once you have them you can send them to other Testnet addresses.

This can be a great experience, which does not take more than 15 minutes, to have direct contact without the need for bitcoins with the technology and potential of Bitcoin.

Funds in Bitcoin TestnetFondos en Bitcoin Testnet

Mining

As we have said, the coins of the test network are given away, that is: the complexity of mining on the Bitcoin testnet is ridiculous. With an old computer you can mine per CPU non-stop, with an extra cost of almost zero light.

Testnet is designed to have a very low complexity, however, in each block and as it happens in Bitcoin, it is increasing.

This means that the complexity could rise so much that no one mined, since they are currencies that have no value. To solve this, and it is a difference from Bitcoin that with Testnet3 it was added, Testnet is designed so that when a block cannot be mined due to its complexity, it automatically goes to very low levels: complexity is “reset”.

Blockchain size

As we have stated, Testnet has its own accounting record, blockchain. But this record doesn’t have the frenzy of Bitcoin’s activity. While Bitcoin Blockchain now exceeds 260 GBThat of Testnet barely exceeds 23 GB.

Bitcoin Testnet dataData de Bitcoin Testnet

And what happens when the chain takes up a lot? Well, a blockchain with many gigabytes could also make its maintenance intangible if there are no incentives. The funny thing is that before taking a relevant size, the coins to be issued are finished. As you can see, the 21 million limit is about to be issued, something that is expected in Bitcoin by the year 2140.

Almost 21 million coins issued in just 4 or 5 years? It seems somewhat strange, because if for each block a number of coins are released under the same Bitcoin rules and we said that the Bitcoin testnet has the same mining logic as the mainnet, it should also take about 120 years, 10 minutes on average per block.

The reason for this is due to Testnet3’s previously discussed functionality: When complexity increases it restarts, and allows many blocks to be mined in less time, reducing the average time per block by much.

That is, while in Bitcoin it can take around 1000 minutes to mine 100 blocks, Testnet takes much less, maybe between 100 and 200 minutes (it is only an estimate looking at the charts)

And what happens if all 21 million are issued? Possibly a new Testnet, 4, will be agreed. The objective is to have no value so that coins are constantly being generated that allow testing to improve Bitcoin and its ecosystem.