Part 2: The Blockchain Theory - Ethereum testnets

in #blockchain7 years ago

In contrast to bitcoin, Ethereum lets you publish all kinds of contracts that do not have to be related to cryptocurrency at all.

You could, for example, write a voting app where you give users the possibility to vote for a certain candidate. You find that idea acting as the basis for this tutorial: Full Stack Hello World Voting Ethereum Dapp Tutorial. It is easy to follow the tutorial and it starts to give you a feeling for writing contracts. Moreover, it introduces a developing framework and different ways to connect to a testnet. Now that we are talking about it, the amount of possible ethereum testnets were a bit confusing to me in the beginning. That's why I want to give an overview of those before I advice you to go on with the tutorials. 

Testing your application on the testrpc testnet is one of the fastest and easiest ways to test the functionality of your smart contracts.  Testrpc simulates an Ethereum client and is based on node.js. This network is only meant for testing and development purposes and it comes with ready-made accounts that you can use. I would recommend to use this testnet in the beginning.

Then we have the official Ethereum test networks. Those are very similar to the Ethereum network with the only exception that the ether used in those networks does not have any buying power. But it is perfect to test your contracts. However, just as in the ethereum network you need to pay gas (network fee) to the miners in order to perform actions on the network such as transactions. But don't worry, you do not have to buy it! It is indeed quite simple to get free ether for testing purposes in these testnets, just follow the instructions on the testnet website (e.g. for Rinkeby) and you will have some test ether on your account in no time. You can find a very good and still relatively up-to-date explanations of all the official Ethereum networks in this stackoverflow thread. But for completeness you will find an overview of the most important once here too.

Rinkeby - the latest Ethereum testnet. It was designed as a Proof-of-Authority network in order to reduce vulnerability to certain attacks.

  • Ropsten - this testnet replaced Morden in 2016. It was attacked in the beginning of 2017 but revived shortly afterwards.
  • Morden - this Ethereum testnet was officially launched together with Ethereum in 2015. It replaced Olympic.
  • Olympic - the pre-release network.

Fun fact: I don't know about the others but I have been in both Ropsten and Rinkeby already. I wonder why the people behind the Ethereum blockchain decided to name some of the testnets after Stockholm metro stations. 

 

Tutorials 

As I already mentioned I strongly recommend the tutorial Full Stack Hello World Voting Ethereum Dapp Tutorial, both part one and two are very useful.The second part of the blog post A 101 noob intro to programming smart contracts on ethereum also serves as a good tutorial. Another one that I liked was the Pet Shop example which uses the truffle framework.Unfortunately, I was not successful in finding more tutorials that were as detailed and well explained as those here. After you finished those, the only thing I can suggest is to go ahead and just experiment!

What's next?

I hope that - as you followed the tutorials - you got an idea of how and where to start. But a tutorial can only get you that far, I find that you really begin to understand how everything works when you give it a go yourself. Think about a simple blockchain application and try implementing it. If you need a bit of inspiration about what you could create with smart contracts, then the last part of this series might help you find a starting point. 


------------------

Thanks to Lisa for this awesome post on zauberware.com

Sort:  

hey folks ! Would love start a discussion or at least get a bit of feedback for our contribution ;)