Review of Ethereum Developer Chain Options

Note

For a comprehensive coverage of blockchain development in Ethereum or mastering Solidity programming, taking our below self paced courses is highly recommended:

 

Recap

In our previous article (Review of Ethereum Options for Development and Testing), we discussed what Ethereum Options are for application development and testing.

In this article, we learn what Ethereum Chain Options are and how to use them.

 

Developer chain options

Developer chain options are the ones facing developers. There are two useful developer chain options:

  • –dev
  • –dev.period

 

By running –dev, a proof-of-authority network will be established. Notice that a prefunded account will be created and mining will be enabled automatically. The default block period will be 0, meaning mining is only enabled when the transaction is in a pending status. Sometimes, developers will save the trouble of creating their own local private chain from scratch by using the one developer mode provides. You can challenge yourself by setting up a private blockchain using the –dev flag. It will deepen your understanding of all the kinds of options supported by geth.
Let’s quickly check the fund in the predefined account using the following steps:

  • You must be very familiar with the console by now. We will bring up the console with the following command:

 

One-to-One Live Blockchain Classes

Coding Bootcamps school offers One-to-One Live Blockchain Classes for Beginners.

 

$ geth -dev console
  • Then, we will double-check if this is the account we are interested in with the help of the following command:

 

eth.accounts ["0xcbb8c6537505837c43cc54f1440bcf988111ad91"]
  • If we query interactively using the following command, we will find out the amount of ether

the 0xcbb8c6537505837c43cc54f1440bcf988111ad91 account is holding:

web3.fromWei(eth.getBalance(eth.coinbase),  "ether") 1.15792089237316195423570985008687907853269984665640564039457584007913129639927e+59

From the result, we know that the account has been funded with
1.1579208923731619542357098500868790785326998466564056403945758
4007913129639927e+59 ether.

 

Next Article

In our next article (Review of Ethereum API and Console Options), we discuss Ethereum API and its console options.

This article is written in collaboration with Brian Wu who is a leading author of “Learn Ethereum: Build your own decentralized applications with Ethereum and smart contracts” book. He has written 7 books on blockchain development.

 

Resources

coming soon