0

geth --datadir ./ init customgenesis.json

Fatal: Failed to read genesis file: open customgenesis.json: no such file or directory

  • Do you have the customgenesis.json in same directory as your console directory? if not, provide proper path to it. – sp4c3 Jan 24 at 6:19
  • how to find customgenesis.json in ubuntu 16.04 – bhemeswararao ankireddy Jan 24 at 6:43
1

In order to start a network you need to have a genesis file. This genesis file will be having details about the accounts in the network, difficulty of the block, network id , chain id etc. Copy the below config and save it a file with ".json"

{
  "alloc": {
  "0xe2138366adc7bae0b41d205e7d0ba8fadadd8e33": {
  "balance": "99999999999999999"
   }
},
"config": {
  "chainId": 15,
  "homesteadBlock": 0,
  "eip155Block": 0,
  "eip158Block": 0
},
"coinbase": "0xe2138366adc7bae0b41d205e7d0ba8fadadd8e33",
"difficulty": "0x20000",
"extraData": "","gasLimit":"0x2fefd8",
"nonce":"0x000000000001fd4e",
"mixhash":
"0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash":
"0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp":"0x00"
}

then, use the following command in the directory you have saved that file and then initialize a network with that genesis file

geth --datadir="." init fileName
0

It looks like you don't have the file customgenesis.json.

You can create a custom genesis file using the wizard from the puppeth tool.

You can download it at https://geth.ethereum.org/downloads/ (Geth & Tools)

Your Answer

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

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