Question: How can I get some ether in Ethereum testnet/dev or even private blockchain?
I'm totally confused. If I use a customized genesis block like this:
{
"config": {
"chainId":123 ,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"nonce": "0x0000000000000042", "timestamp": "0x0",
"parentHash":
"0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x00", "gasLimit": "0x8000000", "difficulty":
"0x400",
"mixhash":
"0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333",
"alloc":{"0x17e6672b3a917b7543d44e07846358aaa22a4379":{
"balance":"8000000000000000000"
}}
}
Then if I do
geth --datadir ~/.ethereum_private init ~/CustomGenesis.json
this error appears:
Fatal: Failed to write genesis block: database already contains an
incompatible genesis block (have 6650a0ac6c5e8054, new
644f9b97e5f57df7)
If I leave the "alloc" field empty the error would not show up anymore (but I don't have any ether).
The other option to get some ether is to mine:
miner.start(1)
But if I do that, null appears. So, I cannot get any ether again.
We don't have this kind of problems when we're using truffle + testrpc. As it allocates ether to all the accounts we create.
So I don't know how I can get some ether in Ethereum testnet/dev or even private blockchain.