-1

I am trying to create a Genesis block for an Ethereum Blockchain but the Windows Command Prompt is showing a Fatal error.

enter image description here

The code for the Genesis file is mentioned below-

{

 “config”:{

    “chainId”:777,

    “homesteadBlock”:0,

    “eip155Block”:0,

    “eip158Block”:0

},

“difficulty”:”0x400″,

“gasLimit”:”0x8000000″,

“alloc”:{}

}

What does 'need genesis.json file as the only argument' mean?

2 Answers2

0
  1. Rename the file to genesis.json
  2. There is a space in your file path. Put the entire file path in double-quotes or rename the folder to json_file or something without spaces.
Exile79
  • 166
  • 2
0

I'm probably following the same tutorial as you and here's how I did it:

  1. @Exile79 answer is a correct start: when you have spaces in your path, it must be surrounded by quotes "C:\path with spaces\file.json"
  2. There can only be one argument after init, so place the other flag in front.

Your result should look like this:

geth --identity "MyBlockchain" --datadir C:\Users\hodit\Downloads\Ethereum\MyPrivateChain \
init "D:\json file\CustomGenesis.json"

Please note that it also work with relative paths.

SteeveDroz
  • 6,006
  • 6
  • 33
  • 65