This question already has an answer here:

I'm trying to start an ethereum test net on windows 7, but I'm having trouble pointing geth at the genesis block.

This is the command I'm trying:

geth --identity "Anon" --genesis CustomGenesis.json --rpc --rpcport "8080" --rpccorsdomain "*" --datadir "G:\EthTest" --port "30303" --nodiscover --rpcapi "db,eth,net,web3" --networkid 1999 console

The genesis file I'm using is:

{ "alloc": { }, "nonce": "0x000000000000002a", "difficulty": "0x020000", "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", "coinbase": "0x0000000000000000000000000000000000000000",
"timestamp": "0x00", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "extraData": "0x", "gasLimit": "0x2fefd8" }

And it is in the folder I'm trying to launch geth from - it tab completes.

When I run geth with all the above commands except the genesis flag it appears to start and

{"jsonrpc":"2.0","error":{"code":-32600,"message":"EOF"}}

is visible at localhost:8080 but it doesn't appear to be mining any test ether

marked as duplicate by galahad, Roland Kofler, Community Jul 19 '16 at 19:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Use init instead of --genesis and mention the path for genesis file. – galahad Jul 19 '16 at 18:03

Like galahad suggested. Use init. It used to be --genesis originally but that was deprecated, now its init.

Example:

./geth init /path/to/genesis.json

Then exit

From that point forward, your geth node will start with your genesis.

  • Thanks! When I use init, Geth itself doesn't give me any errors, but it also doesn't appear to be mining, and localhost:8080 still gives the same error as above? – Sawyer Jul 19 '16 at 18:33
  • You need to start the miner manually. Type miner.start(1) in the JavaScript console. 1 can be replaced with the # of mining threads you want. – galahad Jul 19 '16 at 18:54

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