I do know that we need a new genesis and initialize it but there are few parameters I didn't understand for example MainnetGenesisHash I don't know how to generate one and boot node needs a key to add an ip address and what's the command to generate it. However, eth codebase supports allocation of coins so how do i create that address. I do know some changes to be made like changing genesis, chain id, block reward. Further help would be appreciated.

1 Answer 1


To create a new Ethereum blockchain, you will need to create a new genesis file. This is a JSON file that specifies the initial state of your blockchain, including the initial validators and their stakes, the block reward, and other parameters. You will also need to initialize your blockchain using the geth command-line interface.

The MainnetGenesisHash is the hash of the genesis file for the Ethereum mainnet. This is a fixed value and cannot be changed. If you are creating a new blockchain, you will need to specify a different genesis hash for your chain.

To create a new key for your bootnode, you can use the geth command-line interface. The command to generate a new key is geth account new. This will create a new Ethereum keypair and store the private key in a file on your computer.

To allocate coins to an address on your blockchain, you will need to specify the allocation in your genesis file. You can do this by adding an entry to the alloc section of the genesis file. For example, to allocate 10 ETH to the address 0x123456..., you would add the following entry:

"0x123456...": { "balance": "10000000000000000000" }

This will allocate 10 ETH to the address 0x123456... when the blockchain is initialized.

  • Hey thanks much for sparing your time to answer my question. But can i still know how do i generate that random genesis hash. Thanks in advance
    – shub
    Dec 5, 2022 at 16:48
  • To create a new Ethereum network, you will need to create a new genesis block and initialize the network with it. This can be done by using the geth init command and providing a custom genesis file as an argument. The genesis file should contain the parameters of the network, such as the chain ID, the block reward, and the initial allocation of coins to addresses.
    – Yakitori
    Dec 5, 2022 at 19:44
  • yeah, I have initialized genesis but I'm bit confused should I change this too MainnetGenesisHash = common.HexToHash("0x52e7d832d8b4f172d2ddb9fd92727350026ffb25c488ec5da06266141ec55644") for a public chain
    – shub
    Dec 7, 2022 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.