Explaining the Ethereum Test Networks.
None of the developers deploys the applications without reviewing the codes.
There are many tools available for reviewing the codes for normal applications.
But for blockchain applications( DApps), developers have to pay special attention because the immutable nature of blockchain makes it impossible to rewrite once an application is deployed. That’s why many test networks arose to solve the issue of developers.
Especially for Ethereum, one of the famous blockchain to build DApps, there are many test networks available.
What Is the Ethereum Test Network?
Simply Ethereum Test Network is a simulation of Ethereum, with the same environment and conditions found on the Ethereum network.
On this network as a developer, you can test new projects and changes on this project before deploying them to the real Ethereum network. And because it works the same way as the real one, you can correct any errors or mistakes here. The system also allows you to see firsthand how the project works and reacts, so you can modify or improve it before it goes live. This process saves money because no gas is required and time to come up with a bug free project.
Different Types Of Ethereum Test Networks.
There are three different types of Ethereum test networks: Public, Private and GanacheCLI.
Public Test Networks.
As the name states, these networks are open to public access means anyone can access them via the popular wallet interface.
From the many public testnets, the three most popular are Ropsten, Kovan, and Rinkeby.
Ropsten.
Named after the famous subway station in Sweden, Ropsten started to operate in 2016.
This test network uses the Proof-of-Work (PoW) consensus mechanism and allows you to mine or demand Ether through the Ropsten faucet — a website created for the sole purpose of giving away free Ether for test projects.
For helping developers to test different angles of the project, Ropsten supports Geth and Parity two types of Ethereum node software.
By allowing mine or demand Ether, the network opened the door to susceptible to spam attacks, such as the one that happened in February 2017. After a month after the attack, a fully fixed and better secured Ropsten re-entered the Ethereum world.
Kovan.
During the Ropsten attack, Parity team developed the test net Kovan. Given that Team Parity developed Kovan, it’s not surprising that it runs on the Parity node.
The main reason to develop the Kovan is to solve the spam attacks by implementing Proof-of-Authority (PoA) consensus. In this consensus, only selected nodes are authorized to create a new block and confirm the transactions, so all ethers already mined, and retrieval is done via a faucet.
Kovan doesn’t fully reproduce the current production environment since it uses PoA. However; that does not mean that it is not a reliable testing platform. It is stable and immune to attacks because only authorized parties can control Ether.
Rinkeby.
Created by the Ethereum team and named after the metro station in Stockholm.
Rinkeby made debut after the month Kovan release and both using the PoA consensus.
But the difference is Rinkeby works on the Geth node and users cannot mine Ether on the network but must request it from a faucet.
Goerli.
Another PoA based test net launched in 2019 developed by Chainsafe Systems and Afri Schoedon from Parity but there are dozens of more contributors that helped in making Goerli a reality.
Goerli is a first cross-client testnet which means you can pick from various clients including geth, parity, nethermind and pantheon to sync a node for the goerli testnet.
Like the other PoA testnet, everyone relies on the faucet for Ether.
In the latest developments, Goeril also made available for Ethereum 2.0.
Private Test Networks.
Contrary to Public Networks Private Networks not allow access to anyone it’s like having your own blockchain network, your own Ethereum. From that network, you can mine or pre-generate your own Ethereum.
A private test net needs four components: Custom Genesis Block, Data Directory, custom NetworkID, and Disable Node Discovery.
Custom Genesis Block.
AKA zero block or the first block having no preceding blocks.
This Genesis block is a primary foundation to your private testnet and is hardcoded into the clients, but on Ethereum, it’s easy using Geth.
Custom Data Recovery.
After creating the Genesis block, you have the Data Recovery directory. It is the place where you can store your private chain data. Make sure to store it separately from the Ethereum chain folder you are using.
Custom Network ID.
To start mining on the Private network you have to specify Network ID, a random number of your choice that marks the identity of your Ethereum network.
Disable Node Directory.
This is a command line so people who do not add you manually will not discover your node. If you don’t apply this, other developers can accidentally add your node to another node which has the same network ID and genesis block.
Ganache CLI.
Ganache is a blockchain emulator for Ethereum and comes as a part of the comprehensive Ethereum development tool Truffle Suite.
The best part is Ganache is available in major operating systems such as Mac, Windows, Linux and also as a command line tool. If you’re interested in using this simulator, you can install it via NPM, a package manager for Node.js modules.
Here are some features of Ganache that help you to test your project easily.
- It has a GUI where you can monitor test chain events.
- It does not need a faucet or mining because you can recycle or reset accounts instantly with a fixed amount of Ether.
- Transactions are free.
- You can instantly mine transactions.
- You can modify the gas price and mining speed.
Conclusion.
Ethereum test networks help to deploy bug free projects by providing a safe environment for testing and experimenting on their projects before launching them on the Mainnet.
And the listed testnets on the post have their own advantages and disadvantages. They are an indispensable tool that will continue to evolve and change.
Originally published at https://ccoingossip.com on November 26, 2020.