0

I have created a private network and trying to deploy my contract using Remix IDE. Remix is connected to my private blockchain at port 8545, my coinbase account have 2 ethers and I have set my Gas limit to 21000 but whenever I try to deploy the contract I get an error :

Gas estimation failed
Gas estimation errored with the following message (see below). The 
transaction execution will likely fail. Do you want to force sending?gas 
required exceed allowance or always failing transaction

When I click on force sending then i get error :

Intrinsic gas too low

And when I increase the gas limit to 21001, I get the error:

exceeds block gas limit
  • 2
    Sounds like your private network would be configured to accept only (max) 21000 gas transactions but that's not enough for your tx. – Lauri Peltonen Oct 1 '18 at 9:50
0

You should restart your private network with a new genesis.json file which specifies a more reasonable gasLimit parameter.

In the Private network instructions on the go-ethereum wiki, they use a gasLimit of 2100000 which is 100x greater than yours is currently set to.

{
    "config": {
        "chainId": 15,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    },
    "difficulty": "200000000",
    "gasLimit": "2100000",      <-------------- Here
    "alloc": {
        "7df9a875a174b3bc565e6424a0050ebc1b2d1d82": { "balance": "300000" },
        "f41c74c9ae680c1aa78f42e5647a62f353b7bdde": { "balance": "400000" }
    }
}

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