Contract Deployment – Exceeds Gas Block Limit Error Near Block Gas Limit

contract-deployment

I'm trying to create a wallet contract using Geth 1.5 --light and Mist Wallet 0.8.7. Estimated gas cost for the contract creation is 1,962,239 while the gas limit is 1,998,227. So, everything should be fine, but Mist throws me an error Exceeds gas block limit. What might be the problem?

Best Answer

Possibility one: if it's that close, it's quite possible some small fee (uncounted by the estimator) is pushing it over. There's not much you can do in this situation, because it's up to the miners to set the gas limit.

Possibility two: you're giving the transaction too high of a gasLimit. If the transaction has a limit of 2,000,000, it'd stop you since it could theoretically go over the block gas limit, even if in practice it won't. If this is the case, see if you can reduce the transaction's gasLimit while remaining above the amount it actually needs--that might do the trick.

Related Topic