Reader small image

You're reading from  Mastering Ethereum

Product typeBook
Published inApr 2019
Reading LevelExpert
PublisherPackt
ISBN-139781789531374
Edition1st Edition
Languages
Concepts
Right arrow
Author (1)
Merunas Grincalaitis
Merunas Grincalaitis
author image
Merunas Grincalaitis

Merunas Grincalaitis, born in Lithuania and based in Spain since he was 4, has worked with blockchain companies all around the world, helping them create ICOs, dApps, MVPs, technical whitepapers, web apps, and audits so that they improve the Ethereum ecosystem with decentralized solutions that return people's trust in themselves. He created one of the first books about Ethereum development, named Ethereum Developer - Learn Solidity From Scratch, which sold a lot of copies worldwide, as a quick guide to provide a bridge for programmers interested in the world of Ethereum and smart contract programming. Currently, he's working on providing free learning resources through his Medium blog to all developers looking for expert guidance.
Read more about Merunas Grincalaitis

Right arrow

Deployment on Testnet

Developing smart contracts is a complex task in which you have to move between different environments to efficiently test the quality of your applications. That's why there are many different testnets in which you can deploy your code, to experiment with how your contracts behave with different rules and mining algorithms for improving their quality. In this chapter, you'll discover the differences between the main Ethereum networks by understanding where Ropsten, Rinkeby, Kovan, and the Mainnet fit into the world of securing smart contracts.

You'll learn about the core mining algorithm changes that each network provides so that you can become aware of how your application behaves in different environments. You'll also see how to get Ether for each of those networks so that you can start developing right away with a free testnet.

In this...

Using Ropsten for smart contract development

Each Ethereum network has a unique identifier that numerically represents the network chosen so that Ethereum clients and frameworks such as Truffle can quickly select a new testnet network. Ropsten, identified by the ID 3, is the name of the most used test network in Ethereum, because it provides the most similar technology stack to the real Mainnet, which is used by real-world dApps.

Notice that each testnet is a separate blockchain with its own set of rules and limitations to help people decide on the place to test their dApps, simulating real-world situations.

Initially, the Ropsten blockchain was named Morden and it was deployed right when Ethereum launched in 2015. After a year, the core Ethereum team decided to rename Morden to Ropsten to indicate that it was an upgraded version with better security features and faster performing...

Understanding Rinkeby with proof-of-authority

Rinkeby is one of the most secure networks for testing your applications because it uses proof-of-authority (PoA) to securely generate blocks. In fact, it is so secure and stable that many use this network for prototypes, MVPs, and demos because developers know that their dApps will continue running without a problem on this chain.

It is identified by the ID 4 and it was created in 2017 by the Ethereum team to provide an alternative solution to developers that want to experiment with a different mining algorithm. This testnet is lightning fast: it generates blocks every 15 seconds consistently. The supply of Ether is controlled by puppeth so that people don't generate Ether with abusive mining practices.

The only supported client is Geth, although you can use it for most applications with MetaMask and Truffle.

...

Using Kovan for smart contract development

Kovan is a testnet that was created by the guys at Parity, who wanted a new type of PoA network where developers could deploy their smart contracts, knowing that they will stay running endlessly given that this network is highly secure. This network is the fastest of them all because it has a 4-second block time, which makes testing a breeze, since you don't have to wait for long confirmation times.

It was born because of the attack conducted on Ropsten in 2017 when Parity realized that developers were losing an important tool in their arsenal, given that they need to test their smart contracts on the most realistic scenarios possible to emulate blockchain limitations.

Kovan is one of the most active networks, since they provide Kovan Improvement Proposals, known as KIPs, where users can submit GitHub issues on the repository (https...

Introducing the Mainnet

The Ethereum Main Network is the key component in which all the technologies meet for creating a platform in which you can deploy smart contracts and run decentralized applications. Although it's the main network, some developers prefer to leave their dApps running on testnets to avoid expensive costs. In any case, it's better to deploy your final application in the Mainnet, where more users will be able to use your decentralized applications with real Ether and the latest updates.

Mainnet is also known as Homestead, and it was released in 2015 with the creation of Ethereum as the production release where all the real-world use cases are deployed. It features a 15-second block generation that varies depending on miners, and it runs PoW, which depends on having a strong network of nodes sustaining the network with their mining efforts, otherwise...

Summary

In this chapter, you have learned to understand testnets. First, you went through the history of Ropsten, how it started, and the unique characteristics that make it the most used testnet for Ethereum developers. Then, you discovered how strong and secure the Rinkeby testnet is for projects that want to depend on a testnet for the long term. You saw how to deploy your contracts by making simply modifications to the Truffle configuration file for every testnet. After that, you learned how fast the Kovan network is for those developers that need quick confirmations for user-intensive application, and it's actually one of the best solutions for fast development, although you already know that getting Ether for Kovan is a bit more complicated than in other networks. Finally, you explored how the Homestead network works with valuable Ether that can only be received after...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Mastering Ethereum
Published in: Apr 2019Publisher: PacktISBN-13: 9781789531374
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Merunas Grincalaitis

Merunas Grincalaitis, born in Lithuania and based in Spain since he was 4, has worked with blockchain companies all around the world, helping them create ICOs, dApps, MVPs, technical whitepapers, web apps, and audits so that they improve the Ethereum ecosystem with decentralized solutions that return people's trust in themselves. He created one of the first books about Ethereum development, named Ethereum Developer - Learn Solidity From Scratch, which sold a lot of copies worldwide, as a quick guide to provide a bridge for programmers interested in the world of Ethereum and smart contract programming. Currently, he's working on providing free learning resources through his Medium blog to all developers looking for expert guidance.
Read more about Merunas Grincalaitis