Networks are Ethereum environments which are used either for actual transactions or for testing purposes, depending on what kind of network would get chosen. In purpose of making any of that happen, user has to have an account within virtual wallet. Yes, that applies to developers and testers as well. Networks subdivides into two main category: Public and Private.
Public networks could be used by anyone in the world, assuming having an internet connection. Anyone can read and create transactions and also validate executing ones. Validation comes in a spirit of compliances, reached by consensus of nodes. Public networks subdivides into Mainnet and Testnet.
MainNet is being used in purpose of making actual transactions occur on the distributed ledger. Real exchanges of tokens are happening here. Within MainNet any user of any node connected to the network can read all contract code and data. The only limitation that is implemented on MainNet is permission check in contract code, determining which accounts can update the state of a contract.
Testnet, as name suggests, are networks used to test functionalities and monitor the blockchain network performance. They are public, but currency used in transactions is supposed to be valueless. This allows to test functionality the way they supposed to work, but without any risk of losing money or breaking the main blockchain network. It brings to mind usage of staging server. Possibility of reusing same test files allows to accurate comparison between test runs and catching potential errors and network failures. Also having tested out whole project makes MainNet deployments much faster. Even some blockchains provide testing methodologies, tools, and certifications to accurately test complex networks at scale to help increase productivity and infallibility. In case of creating a dapp integrating with existing smart contracts, there is a very convenient way of testing it since most projects working on a MainNet have copies deployed to testnets. And it’s important to remember that testing any contract code before deploying to the MainNet is crucial.
Types of testnets:
A proof-of-authority testnet that works across clients.
A proof-of-authority testnet for those running OpenEthereum clients.
A proof-of-authority testnet for running Geth client.
A proof-of-work testnet. This means it’s the best like-for-like representation of Ethereum.
As mentioned before, currency in testnets has no real value, so there is no market for testnet currency. To get some currency needed for testing purpose, the easiest way is to use one of the testnet network faucet. Most faucets are webapp where after putting virtual wallet address, request for some test currency is being send.
Private networks are isolated networks since its nodes are not connected to any public network (either MainNet nor testnet).
Development networks may be described as local blockchain instance to test dapp. It’s similar to creating a local server on a computer for web development. Thanks to that, iteration may be much faster than a public testnet. Within our project we use dedicated tool to assist with this. We chose to use Ganache CLI along with truffle development environment.
Consortium networks are known as well as semi-private networks, federated or permissioned networks. The consensus process is controlled by a pre-defined set of nodes that are trusted. For example there could be a consortium of 10 different individual institutions(each of them operates one node) and of those 10 nodes 6 must sign every block to validate it. To even better understanding, we may think of a public network as the public internet and of consortium network as a private intranet.
Is it possible to send tokens between networks?¶
How does networks sync?¶