Definition: Mainnet

Bybit Glossary

Every blockchain protocol has a mainnet. This is a component of the blockchain where the transactions of a cryptocurrency with an actual monetary value take place. This is in contrast to a testnet, which is used for testing purposes, and where the transactions that take place do not have an actual monetary value. 

On the mainnet, all the functionalities of a product or feature have already been tried and tested and are available for public use. Any potential bugs have been flagged and dealt with at the testnet phase. All transactions that take place between the sender and receiver can be verified and traced on the distributed ledger (the main blockchain). 

If something is live on a mainnet, then it can be assumed that it has the confidence of the developers of its workings, and that it is ready for use. If the project is an ICO, then it is actually rare for a mainnet to be launched beforehand. This is because in many cases, a large proportion of these funds are taken up developing the testnet and mainnet.

Testnet

The testnet is effectively the dress rehearsal for the mainnet, and will have only limited availability. Sometimes, individuals are specially invited to try out functions on a testnet before they are launched to the wider public. 

The testnet is used to test functionalities, and to ensure they function properly, before they are launched on the mainnet. It has the same features as the testnet, and all to intents and purposes is exactly the same as the mainnet. 

By using a testnet, software developers can experiment in a safe environment, without needing to worry about breaking the main blockchain. Basically, the only difference is that it isn’t real – it is a prototype. 

Thus, any cryptocurrencies that operate on a testnet are not real either – they are testcoins. Any transactions that take place are not legitimate. Therefore, it is important to remember not to send any real cryptocurrency to a testnet address, as they may be very difficult to retrieve. 

The Importance of Proper Testing

There are some real-life examples from the world of crypto that illustrate the importance of proper testing being conducted at the testnet phase. 

  1. EOS mainnet launch (2018)

The EOS platform mainnet launched in 2018, amid much fanfare in the crypto community. Touted as a potential ‘Ethereum killer’ (at launch it could handle over at least 1,000 transactions per second compared to 15 transactions per second for Ethereum) over $4 billion were raised in funds during the ICO phase. However, a series of issues cast a cloud over the launch.

Just days before the scheduled launch of the mainnet, Chinese internet security company Qihoo 360 found issues within the EOS network which would have enabled hackers to take control of the nodes on the blockchain. 

Block.one, the company behind EOS, then launched a bug bounty program. One hacker made $120,000 in one week by finding bugs on the blockchain. This was evidence alone that the testnet phase had been rushed along by the developers, possibly because of pressure to meet the mainnet launch deadline.

  1.  Failure of the Ethereum 2.0 testnet Spadina (2020)

Ethereum 2.0 testnet Spadina was launched in September 2020, intended to be a short-term testnet running in parallel with the already existing testnet Medalla, and before the eventual launch of the mainnet. It was created to test deposit and genesis functions. However, it did not go as planned. 

Within hours of its launch, it was denounced as a failure by developers. According to core researcher Danny Ryan,  “critical peering issues” meant that it had to be abandoned almost immediately. Another testnet, named Zinken, was then launched, and was successful. In contrast to the EOS launch, the proper procedures put in place meant that issues were found in the blockchain quickly and effectively. What they both show, however, is the importance of thorough testing in the testnet phase.