I've tried to run contract function in Mist, which required 10,900,000 of gas, but get 'Exceeds gas limit' error.

How can I call this function? Maybe some ways to increase gas limit inside Mist...

Also, if I provide less gas than required (e.g. 3,000,000), what will happen ?


1 Answer 1


The limit on the total amount of gas that can be used in a block (the Block Gas Limit), by all transactions, is currently ~6.7M, so this transaction will currently never succeed.

You can't increase this total limit on the amount of gas used in a block, only the miners can agree on what this should be.

If you were somehow able to get around Mist preventing you from sending this transaction and you set the gas limit on the transaction (the total amount that of gas that you are willing to pay for) to 3M then it would run out of gas before it completes, the transaction will fail and you would have effectively have burnt the Ether / given the miner the Ether for nothing.

I recommend you rethink about what you are trying to do with Ethereum; try to remove storage of data that does not need to be on the blockchain, break the code into smaller functions etc.

  • And if I call a function like for (uint k = 0; k < 3000; k++ ){ new_value = k; } and my gas was enough for 2000 steps, which value will I have in new_value ? Default value or 1999 ?
    – sp41mer
    Oct 4, 2017 at 19:39
  • I'm afraid that once gas is over the transaction fails and it is like the computation never happened
    – Davide C
    Nov 6, 2017 at 15:31

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