You’ve taken the first step (well, almost). Don’t you slack off now! Be smart. You wouldn’t want to get thrown out of a window now, would you?

III. Configuring the Network

The project requires using a private Ethereum blockchain. To do so, “nodes” need to be set up which will run the EVM and store the blockchain data. This is done with the help of the go-ethereum package that was installed earlier by using the geth keyword.

A genesis block is the first block of a blockchain. The genesis block is almost always hardcoded into the software. It is a special case in that it does not reference a previous block.

A customGenesis.json file defines various parameters for the genesis block of the Ethereum network that nodes will be a part of. Open customGenesis.json in an editor and type :

{

"nonce": "0x0000000000000042",

"timestamp": "0x0",

"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",

"extraData": "0x00",

"gasLimit": "0x8000000",

"difficulty": "0x400",

"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",

"coinbase": "0x3333333333333333333333333333333333333333",

"alloc": { },

"config": {

"chainId": 111,

"homesteadBlock": 0,

"eip155Block": 0,

"eip158Block": 0

}

}

Some important terms have been explained below. Detailed information can be found here under the section “Explanation of genesis file”.

gasLimit : Establishes an upper limit for executing smart contracts

difficulty : controls the complexity of the mining puzzle and a lower value enables quicker mining

alloc : allows allocation of Ethers to a specific address

chainId : A unique identifier of the new private blockchain

homesteadBlock : Homestead is the first production release of Ethereum and since the developers are already using this version the value of this parameter can be left as ‘0’

eip155Block/eip158Block : EIP stands for “Ethereum Improvement Proposals”, these were implemented to release Homestead. In a private blockchain development, hard forks aren’t needed, hence the parameter value should be left as ‘0’

This concludes section I-III of this tutorial. In the next article (part-2), I will cover section IV. Click on this link to continue BUIDL-ing : How to build a dapp on a private Ethereum network : Part — 2

P.S. — Clap 10 times if you liked the article! Comment below to let me know your thoughts or if you want to share some hacks.

I will be publishing more such interesting articles shortly. Follow me on Medium or stalk me on Twitter to stay tuned.