Ethereum Networks

The course is part of this learning path

Start course
1h 1m

This course covers Ethereum denominations, the ABI array, Ethereum networks, private/public key cryptography, and much more!


In this lecture, we're touching on networks. It's usually pretty confusing for people who are just starting with Ethereum development. But even if you are a seasoned developer, there might be the one or the other information that's interesting for you. Let's start with the networks. Ethereum is a blockchain that is running on the Ethereum protocol. That's known, but consider it as a reminder. But, nothing stops you from just opening your own Ethereum blockchain which adheres to this exact Ethereum protocol. So, you could have a couple of nodes running together, mining blocks, and doing exactly what the Ethereum protocol tells them to do. But, these nodes, in your own network, they are not mining blocks on the so-called Mainnet. They would operate on a separate network. The network, from a usage point of view, would be exactly the same as the Mainnet. You would have the same way of sending transactions. You would have the same way of interacting with smart contracts. You have the same way of getting the balance for one address, but the content of the blocks would be different. And with that, the amount of  Ether attached to addresses or the smart contracts running on these blockchains are probably very different. So, it all comes down to the blocks. Now, there are several ways to start your own Ethereum blockchain. One is to copy or clone what is already out there and then just have it running parallel to the Mainnet. That would be a typical fork. Ethereum Classic and Ethereum started like this. So, you have two almost identical blockchains running side by side which are differentiating themselves over time. The other way would be to start a brand new blockchain with Block 0. The very first block is also called the Genesis Block. This is where the test networks come in. I'm talking here about Rinkeby, Ropsten, or Kovan, for example. They are adhering to the Ethereum protocol. They are mining nodes, there are  Ether on there and smart contracts too. But, the  Ether there are not worth anything because it's a separate network, a separate blockchain, which is really good, because that way a larger audience can test the behavior of transactions or smart contracts. But, all of that is very unhandy for developers like us. If you just want to start to develop, then deploying to the Mainnet would be quite costly because the Ethers there cost money. You would need to spend  Ether for gas just to develop smart contracts. Directly developing on the Ethereum Testnet is also pretty unhandy because it's time-intensive to deploy and interact with a real blockchain. With every interaction, you would have to wait for the transaction to be mined. So, every time you call a function, you would need to wait a minute, give or take. There is another way, which is just perfect for developers. That is a simulation where the blockchain itself, it only runs in memory. It is so-called in memory simulation. That way, mining is only simulated. And you, as a developer, you don't have to wait for transactions. They are mined immediately and you saw this before in Remix. There is also the right way of doing things, like unit testing. And if you want to do it on a real blockchain then it will probably take a long time if you want to re-unit test and test your projects over and over again. Obviously, depending on the size of the project. If you run it against an in memory blockchain simulation, then you have your tests basically immediately. So, this is basically the difference between the Mainnet and the Testnet and developer networks which are the three large network categories that we are talking about. The Mainnet is persistent, it's a real blockchain, and it costs money. The Test Networks, they are here to test certain aspects of the protocol or of smart contracts. Maybe have a beta release. They are real blockchain. Your data is persistent there  but at some point, the test networks might cease operation and then your data can be deleted. And on the other hand, we have developer networks, like Ganache or the Remix, in memory blockchain simulation that we have used before. It's perfect for things like unit testing. It's extremely fast but the data there is not persistent.


About the Author

Tom is a CTO, senior back-end developer, and systems architect with over twenty years of hands-on development experience in a variety of languages and systems. He has a CS master's degree and has been working with Ethereum and blockchain technologies since 2016.

Covered Topics