Ethereum Asked by Leon Africa on November 15, 2021
I am attempting to launch a private geth chain with the following command:
geth --datadir=./test-private-blockchain/ init genesis.json
I am receiving the following error:
Fatal: Failed to write genesis block: unsupported fork ordering: eip150Block not enabled, but eip155Block enabled at 0 genesis block
{
"config": {
"chainId": 4777,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"alloc" : {},
"difficulty" : "0x400",
"extraData" : "",
"gasLimit" : "0x7A1200",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp" : "0x00"
}
I would like to add that, when reinitializing, if you only delete the chainData folder inside the geth folder of your datadir, you will retain any previous accounts, although they lose all their ether. For me that is a convenience because I store the account numbers in a param file for my Dapps. And of course the Dapps folder is inside your datadir too, so if you want to keep that, but still reinitialize the blockchain itself, this has worked for me.
Answered by islandBilly on November 15, 2021
Answer is to update genesis.json to include eip150Block:
{
"config": {
"chainId": 4777,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0
},
"alloc" : {},
"difficulty" : "0x400",
"extraData" : "",
"gasLimit" : "0x7A1200",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp" : "0x00"
}
delete the data dir :
rm -rf "your data dir"
Then reinitialize.
geth --datadir=./test-private-blockchain/ init genesis.json
Answered by Leon Africa on November 15, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP