1

I have set up a private blockchain on my computer with this configuration in genesis.json:

{
  "config": {
        "chainId": 0,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    },
  "alloc" : {
        "0x0000000000000000000000000000000000000001": {"balance": "111111111"},
        "0x0000000000000000000000000000000000000002": {"balance": "222222222"}
  },
  "coinbase"   : "0x0000000000000000000000000000000000000000",
  "difficulty" : "0x20000",
  "extraData"  : "",
  "gasLimit"   : "0x8000000",
  "nonce"      : "0x0000000000000042",
  "mixhash"    : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp"  : "0x00"
}

After initializing blockchain, creating a node, attaching geth console and creating first account with miner everything works fine. The miner is mining and ethereum ballance on the account is rising.

However if I connect ethereumwallet to this private network, I am unable to create any transactions or contracts. I have tried changing the maximum fee but I only get one of these errors:

Insufficient funds for gas*price+value.
Exceeds block gas limit.

Why is this happening and how is it possible to resolve these problems?

Edit: I should have enough ethereum - on my first account there is 5,740.00 ether and I am trying to send only 50.00 ether to other account with 0.00 ether on it.

  • Are you sure you've connected to/unlocked the account you want to send from? Have you tried to send the transaction using geth console (e.g, web3.eth.sendTransaction) to see if you can successfully send transactions to the blockchain and allow you to confirm if error is on the client side? – carlolm Nov 1 '17 at 18:43
  • Resolved it was caused by chainId being set to zero. – Kostrahb Nov 2 '17 at 20:46
  • note that you have setup the balance of accounts in Weis, not in Ethers. – Nulik Dec 4 '17 at 12:14
0

It looks like you have set zero in your genesis config file.

{
"config": {
    "chainId": 0,
0

Changing the chainId to something other than 0 worked for me. I was stuck on this for a few hours. Thanks Kostrahb!

-1

I don't see why, but the error was indeed in genesis.json.

The problem was caused by chainId being set to zero. I changed it to some arbitrary integer and my private blockchain now works as expected.

{
  "config": {
        "chainId": 8888,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    },
  "alloc" : {
        "0x0000000000000000000000000000000000000001": {"balance": "111111111"},
        "0x0000000000000000000000000000000000000002": {"balance": "222222222"}
  },
  "coinbase"   : "0x0000000000000000000000000000000000000000",
  "difficulty" : "0x20000",
  "extraData"  : "",
  "gasLimit"   : "0x8000000",
  "nonce"      : "0x0000000000000042",
  "mixhash"    : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp"  : "0x00"
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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