Ethereum Tutorials - Herong's Tutorial Examples - Version 1.02, by Dr. Herong Yang
Pre-Allocate Ether in Genesis Block
This section describes how to pre-allocate ether in the genesis block.
In previous tutorials, we have learned how to create a private Ethereum network, mine new blocks, and collect mining rewards.
By default, the total Ether value of the network starts with no pre-allocation Ethers. But the total Ether value will grow by 5 Ether each time a new block is created in its blockchain, because 5 Ether is awarded to miner who created the block.
The total Ether value of the private network can be calculated with the following formula:
Total_Value = Pre_Allocation + 5 * Number_of_Blocks
For example, if you have a private network with 1,000 blocks with no pre-allocation, the total Ether value of the network will be:
Total_Value = 0 + 5 * 1000 = 5000 Ether
If you want to create a new private Ethernet network with some pre-allocated Ether fund, you need use steps given below:
1. Decide a "datadir" folder and network ID for the new network.
2. Create the first Ethernet account in the "datadir" folder to hold the pre-allocated Ether fund.
3. Create a genesis block file in JSON format with some Ether fund allocated to the first Ethernet account and a reasonable mining difficulty level.
4. Initialize the blockchain with the genesis block file.
5. Start the Ethernet node.
6. Start the Ethernet miner with the second Ethernet account.
See the next tutorial on how create a new private network using these steps.
Last update: 2018.
Table of Contents