I am trying to create my private Ethereum blockchain with homesteadBlock value that I want to assign. As I understand default homesteadBlock value is 1500000.
[Q] How could I assign homesteadBlock value to 0? And inside geth is it possible to check its value that it has been updated to 0? or how could I check that the homesteadBlock value is updated?
and more importantly how could I create my private Ethereum blockchain? I know there is many resources about this problem, but I could not find one for geth 1.4.17 version.
I am not sure if my private blockchain's homesteadBlock value is updated. Here is the way I have followed to create my private Ethereum blockchain from scratch:
First empty previous setup data:
[$] rm -rf ~/.ethash/* && rm -rf ~/.ethereum/*
[$] sudo rm -rf /home/miner/MyEthereumEbloc/ && mkdir /home/miner/MyEthereumEbloc/
Create an new account:
[$] sudo geth --datadir="/home/miner/MyEthereumEbloc/" account new
account new Address: {eda8c89a68f059c1659272076e85e4373717b0d8}
This address will be added into CustomGenesis.json file.
Setup CustomGenesis.json: This file should be same for all nodes that are connecting into the private ethereum network:
{
"config": {
"homesteadBlock": 0
},
"nonce": "0",
"difficulty": "0x400",
"mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578",
"coinbase": "0x0000000000000000000000000000000000000000",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x",
"gasLimit": "0x3B4A1B44",
"alloc": {
"0xeda8c89a68f059c1659272076e85e4373717b0d8": //added line
{ "balance": "1000000000000000000000000000000" } //added line
}
}
Blockchain Initialisation:
[$] sudo geth --datadir="/home/miner/MyEthereumEbloc/" init /home/CustomGenesis.json
Note, I can see updated balance, when I run:
sudo geth --datadir="/home/miner/MyEthereumEbloc/" console
primaryAddress = eth.accounts[0]
> web3.fromWei(eth.getBalance(primaryAddress), "ether")
1000000000000000000000000000000
To mine:
$ sudo ./geth --port 3000 --networkid 23422 --identity node1 --verbosity 3
--nodiscover --nat none --datadir="/home/miner/MyEthereumEbloc" --mine
--ipcpath /home/miner/MyEthereumEbloc/geth.ipc console
Thank you for your valuable help and time.