I used to initialise a private blockchain in this way:
geth --identity "Prashant" --fast --cache=1024 --jitvm --rpc --rpcport "8013" --rpccorsdomain "*" --datadir "myPrivateNetwork2" --port "30312" --ipcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" --rpcapi "db,eth,net,web3,admin,debug,miner,personal,web3" --autodag --networkid 1902 --nat "any" init customGenesis.json console
I tried that again after a long time and I am getting an error message stating that --jitvm, --ipcapi, --autodag
flags are provided but no defined.
Are these flags completely deprecated, or are there alternatives? How can I specify whatipc apis
I need to expose?
I am also getting this issue:
Fatal: invalid genesis file: hex string has odd length
My genesis.json
is this:
{
"nonce": "0x0000000000000042",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x0",
"gasLimit": "0x8000000",
"difficulty": "0x400",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333",
"alloc":{}
}
I have read other threads on the Genesis issue, all suggesting to use the latest version of geth, but I am already using it.
Edit:
The genesis issue was resolved by making extraData
value an even length (0x00), as well as I needed to add a config to the customGenesiss.json
,
"extraData": "0x00",
"config": {
"chainId": 15,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
}
extraData
value an even length? (e.g.0x00
.)failed to write genesis block: genesis has no chain configuration
. And if you could explain why I need to make it even.