I am running a private blockchain using Geth, after upgrading the servers- I had stopped the miner and restarted it after upgrading the specs. Now I am getting all sorts of errors, the main one being not being able to HTTP for unlocking wallets; it is a private network. I have to use --allow-insecure and this issue is recent on the git repo as well. And now I am getting

Error: Node error: {"code":-32000,"message":"gas required exceeds allowance(8000000) or always failing transaction"}

Anyone face anything similar or have any pointers to give? Thank you in advance.

  • Ok what happened? All answers were deleted . I needed them – test1234 Sep 9 '19 at 13:56
  • I deleted my answer because I thought it was confusing you and it wasn't helpful. Will undelete if you need something from there. But I think I'm unable to further help you. – Ismael Sep 9 '19 at 14:06
  • Thanks, no I will up my gas Limit my point is since it is a private blockchain I cant modify the genesis.json. I know it is in deployment phase so I can modify but how to increase it?Thank you in advance – test1234 Sep 9 '19 at 14:51
  • To change the network block gas limit to XXX you have to launch geth with --miner.gastarget XXX and --miner.gaslimit XXX in miner nodes. The change is not instantaneous (at most in every block it can change 0.1% approx ) so to reach the desired value you might have to mine a lot of blocks. – Ismael Sep 9 '19 at 15:54
  • yes But I am running geth in a TMUX session, if I change the limit with geth will that render the previous blocks and transactions invalid? and when adding --miner.gastarget I am getting that geth is running – test1234 Sep 11 '19 at 8:31

It seems the block gas limit in your network has fallen bellow 8M, and your transaction gas is above 8M. Transactions with gas above the network gas limit are not processed until the limit rises.

You can check gasLimit of the latest block in your network executing eth.getBlock('latest') from geth's console.

Possible options:

  • Send transaction with less gas to execute it successfully
  • Rise the network gas limit. Pass the option --miner.gaslimit value to geth and mine blocks until the limit is reached.
  • Hello,But I am mining so I should be having more gas thus be able to "afford" such a transaction – test1234 Aug 28 '19 at 13:51
  • What is the gas limit in the latest block? Mining is needed to change the gas limit but you can configure it to go down or up. – Ismael Aug 28 '19 at 16:37
  • it is 8000000 according to eth.getBlock('latest') – test1234 Aug 29 '19 at 11:07
  • Why/how could I configure it to go down though? Isn't it counterproductive?If it gets to 0 it would be theoretically possible but no one would verifiy- this is the case of MainNet. On my private network should I just use gas price thus cost to 0? Since I am the only miner – test1234 Aug 29 '19 at 11:13
  • You can configure gas limit to go up/down using the geth command line option in my answer. It indicates how many transactions you can include in a block (minimum per transaction is 21K, contracts require more). – Ismael Aug 29 '19 at 13:04

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.