If you have ever looked inside a blockchain genesis file, typically called genesis.json or in the case of a private network, privateNetworkGenesis.json, you will have seen lots of configuration parameters. Some are obvious but others a little more mysterious.
Take for example this genesis file for a private network:
{
"config": {
"constantinoplefixblock": 0,
"ethash": {
"fixeddifficulty": 1000
},
"chainID": 1981
},
"nonce": "0x42",
"gasLimit": "0x1000000",
"difficulty": "0x10000",
"alloc": {
"fe3b557e8fb62b89f4916b721be55ceb828dbd73": {
"privateKey": "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63",
"comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",
"balance": "0xad78ebc5ac6200000"
},
"f17f52151EbEF6C7334FAD080c5704D77216b732": {
"privateKey": "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f",
"comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",
"balance": "90000000000000000000000"
}
}
}
Have you ever wondered what constantinoplefixblock is? It turns out that these are called “Milestone Blocks”. In a public network, these specifies the block at which the network changed protocols. For example,
"homesteadBlock": 1150000,
"daoForkBlock": 1920000,
"daoForkSupport": true,
"eip150Block": 2463000,
"eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0",
"eip155Block": 2675000,
"eip158Block": 2675000,
"byzantiumBlock": 4370000,
"constantinopleBlock": 7280000,
"constantinopleFixBlock": 7280000,
In a private network though, the milestone block defines the protocol version for the network so it is normally set to 0 (zero) meaning version 0 of the Constantinople protocol.
In other words, your chain won’t be hard-forking for these changes, so leave as 0 (zero).
Another interesting note in the private genesis file is fixeddifficulty which is used to specify a fixed difficulty in private networks using Ethash which overrides the difficulty field.