Ethereum Tutorials - Herong's Tutorial Examples - v1.06, by Herong Yang
Build Genesis Block Manually
This section describes how to build the genesis block manually to start a new private Ethereum network.
In order to create a private Ethereum network with a lower difficult level, I need to do the following:
1. Stop the running "geth" node from the JavaScript console:
> exit
2. Tear down the current blockchain on my private network:
C:\>"\program files\geth\geth.exe" removedb --datadir \herong\Ethereum\personal 2>> ether-personal.log C:\herong\Ethereum\personal\geth\chaindata Remove this database? [y/N] y
3. Create the genesis block file in JSON format:
C:\>type \herong\ethereum\personal\genesis.json { "config": { "chainId": 314, "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0 }, "difficulty": "1000000", "gasLimit": "1000000", "alloc": {} }
3. Initialize the private network with this genesis block file:
C:\>"\Program Files\geth\geth" init \herong\ethereum\personal\genesis.json --datadir \herong\Ethereum\personal 2>> ether-personal.log
4. Start the "geth" node:
C:\>"\Program Files\geth\geth" console --datadir \herong\Ethereum\personal 2>> ether-personal.log >eth.blockNumber 0
5. Verify the genesis block:
> eth.getBlock(0).difficulty 1000000 > eth.getBlock(0).transactions []
Excellent! The difficult level of the genesis block is much smaller now.
Table of Contents
Deprecated: Testnet - Ropsten Network
64-Bit "geth" for Private Ethereum Network
►Private Network with Custom Genesis Block
Run "miner" with Lower Difficulty
Check Mining Rewards on My Account
Pre-Allocate Ether in Genesis Block
Build Ethereum Private Network Properly
Blockchain Difficulty Level and Growth Rate
"Head State Missing" Error on Restarting "geth"
Download and Install "geth" 1.8.2
Run and Restart with "geth" 1.8.2
Transferring Funds between Ether Accounts
MetaMask - Browser Based Ethereum Wallet
Getting Free Ether on Test Networks