Creating a private network
After Geth is installed, it can be configured to run locally without connecting to any network on the internet. Every chain and network has a genesis block or the first block. This block does not have any parent and is the first block of the chain. A genesis.json
file is required to create this first block. A sample genesis.json
file is shown in the following code snippet:
{ "config": { "chainId": 15, "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0 }, "nonce": "0x0000000000000042", "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", "difficulty": "0x200", "alloc": {}, "coinbase": "0x0000000000000000000000000000000000000000", "timestamp": "0x00", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "gasLimit": "0xffffffff", "alloc": { } }
Let's take a look at the following steps to create a private network:
- The
genesis.json
file should be passed to Geth to initialize the private network. The Geth...