I am modifying the file config.go in the geth project for a private blockchain.

Here are the config.go variables

// MainnetChainConfig is the chain parameters to run a node on the main network.
MainnetChainConfig = &ChainConfig{
    ChainId:        big.NewInt(1),
    HomesteadBlock: big.NewInt(1150000),
    DAOForkBlock:   big.NewInt(1920000),
    DAOForkSupport: true,
    EIP150Block:    big.NewInt(2463000),
    EIP150Hash:     common.HexToHash("0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0"),
    EIP155Block:    big.NewInt(2675000),
    EIP158Block:    big.NewInt(2675000),
    ByzantiumBlock: big.NewInt(math.MaxInt64), // Don't enable yet

    Ethash: new(EthashConfig),

If I give an example of my test network

"config": {
    "chainId": 87079082075,
    "homesteadBlock": 0,
    "eip155Block": 0,
    "eip158Block": 0
"nonce": "0x0000087079082075",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x00",
"gasLimit": "0x8000000",
"difficulty": "0x400",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333"

Some parameters / variables are straight forward to map.

Here is my attempt

ChainId big.NewInt(87079082075),
HomesteadBlock: big.NewInt(0),
DAOForkBlock:   big.NewInt(0),
DAOForkSupport: true,
EIP150Block:    big.NewInt(0),
EIP150Hash:     common.HexToHash("NotSureWhereToGetThisValue"),
EIP155Block:    big.NewInt(0),
EIP158Block:    big.NewInt(0),
ByzantiumBlock: big.NewInt(math.MaxInt64)

I then get confused with the values in util.go and will it overwrite these values in config.go.

I also do not see in config.go the values associated with the other genesis file parameters like difficulty and gaslimit. I think they are updated in protocol_params.go can someone confirm I am observing the code correctly and on the right track.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.