36

Sending Address has over 1 Eth in current Balance.

Using the Geth console, I can send many transactions of any amount less than .033

eth.sendTransaction({to:'0x8B9da75fda99bAd680154050Ba386523CA3AD112', 
from:'0x62396567241bC92Ee3D082AC3C4144511Ec6c773',
value:web3.toWei(.033,'ether'),gas:30000})

"0x113dd5b9c8bb6d48fe2b3ef16576905f6e46aa4ed6cd080120a2aaf54113e7b4"

If I try to send .034 ETH or greater, then I always get this error.

eth.sendTransaction({to:'0x8B9da75fda99bAd680154050Ba386523CA3AD112',
from:'0x62396567241bC92Ee3D082AC3C4144511Ec6c773',value:web3.toWei(.034
,'ether'),gas:30000}) Insufficient funds for gas * price + value
at web3.js:3119:20
at web3.js:6023:15
at web3.js:4995:36
at :1:1

5
  • are you using that in a private chain or in the public one?
    – Badr Bellaj
    Oct 5, 2016 at 17:26
  • default geth setup on public chain. Here is .sh #!/usr/bin/env bash echo "Starting geth" screen -dmS geth /usr/bin/geth --rpc --rpcapi="db,eth,net,web3,personal,web3" --verbosity 3 Oct 5, 2016 at 17:27
  • what is the balance of 0x62396567241bC92Ee3D082AC3C4144511Ec6c773
    – Badr Bellaj
    Oct 5, 2016 at 17:29
  • 0.7 ETH and I had 1.5 ETH in the account with the same problem. I can send many small transactions, but nothing larger than .33 Oct 5, 2016 at 17:34
  • yeah me too , private chain ;networkId 1108; seems all right, when i invoke a contract ,then error
    – leung yves
    Aug 7, 2019 at 6:59

8 Answers 8

19

It seems to be a bug in geth, try the solution presented here : https://github.com/ethereum/go-ethereum/issues/2173

they assume that the solution is :

Convert all values to hex (with bc if you use bash)

Make sure to specify both gas and gasPrice! Enclose all values in single quotes eth.sendTransaction({from:'0x123456', to:'0x123456', value: '0x8AC4270ACC4B7FF7', gas: '0x5208', gasPrice: '0x4A817C800'});"

2
  • 2
    Thanks for the suggestion. I was able to solve my issue by upgrading geth to: Geth/v1.4.16-stable/linux/go1.6.2 Oct 7, 2016 at 1:09
  • 3
    hex value fixed my issue Aug 4, 2019 at 15:15
12

I wanted to add an important information:

gas * price + value really means MAXGas * price.

In my case transactions failed from time to time when gas price increased because gas limit was set too high! Even if you know that it won't be that expensive you should use a reasonable amount.

1
6

I was able to solve my issue by upgrading geth to: Geth/v1.4.16-stable/linux/go1.6.2

5
  • 2
    This error is common if you don't have enough eth in your account, if your node isn't in sync with the network, or if you don't specify a gas price or something else is slightly wrong with the command. In this case, I'm guessing it was the attacks on the network causing your node not to be 100% in line with reality or timing out or something similar, which is why upgrading fixed it.
    – tayvano
    Oct 7, 2016 at 5:16
  • 1
    After upgrading I was able to send 40 valid transactions. But after I sent the transactions I found that my node was stuck on one block for 30 minutes. I then stopped Geth and ran the geth upgradedb command. Waiting for this command to finish. Hopefully everything will be resolved now. Oct 7, 2016 at 7:16
  • 1
    I should manually specify gas price? Oct 7, 2016 at 7:17
  • 1
    I would recommend it. Usually I do 21000000000 but I've been using 25000000000 lately. Not sure if it actually makes a difference.
    – tayvano
    Oct 7, 2016 at 10:26
  • 1
    Also had this issue when accidentally upgraded t0 Geth/v1.5 beta Nov 13, 2016 at 13:11
5

i solved this by reducing my gas

2
  • 1
    Where did you reduce the gas? Apr 3, 2019 at 8:10
  • 2
    The example of @manas-agrawal show how to set a reasonalbe gas value for a private chain.
    – pringi
    Sep 30, 2019 at 10:28
3
gas:4.7M, gasPrice:101 GWei => error: insufficient funds.
gas:3.7M, gasPrice:101 GWei => it works ok.
gas:4.7M, gasPrice:100 GWei => error: insufficient funds.
gas:4.7M, gasPrice:90 GWei  => error: insufficient funds.
gas:4.7M, gasPrice:70 GWei  => it works ok.
gas:4.7M, gasPrice:80 GWei  => it works ok.
gas:4.7M, gasPrice:85 GWei  => error: insufficient funds.
gas:4.7M, gasPrice:82 GWei  => it works ok.
...
gas:1.0M, gasPrice:10 GWei  => it works ok.

So, there is a (variable?) limit for gas*gasPrice that throws the error. Using gas and prices lower and far from this limit is probably the safer approach.

2

In my private Ethereum Blockchain network, I resolved the issue by changing the chainId variable in my genesis block code to any random number except 0.

Please find the code for my genesis block below:

{
"config":{
        "chainId": 45,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0,
        "byzantiumBlock": 12
    },
  "alloc"      : {},
  "coinbase"   : "0x0000000000000000000000000000000000000000",
  "difficulty" : "0x20000",
  "extraData"  : "",
  "gasLimit"   : "0x2fefd8",
  "nonce"      : "0x0000000000000042",
  "mixhash"    : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp"  : "0x00"
}

I hope it might be helpful for you.

3
  • 1
    Does not work. It is already 2019 in my case. Still facing this issue. Apr 3, 2019 at 8:09
  • (I'd write a full answer, but haven't the reputation). The reason for this answer is that if the tx signer is misconfigured, the error cited will awkwardly and unhelpfully be thrown. Check if the chain you're using has Homestead (EIP2) and/or EIP155 configured for its current block number. Transaction configuration (what fields need to be filled or omitted) will depend on the interface you're using and your chain's protocol current upgrades. See github.com/etclabscore/core-geth/blob/master/core/types/… for code reference.
    – irbanana
    Jun 27, 2020 at 21:31
  • Chain id is just a number to recognize your network among others. It should not cause such issue, the real cause somewhere else.
    – Gleichmut
    Apr 17, 2023 at 15:56
0

I was having the same issue using Sepolia Test Network. In the truffle-config.js file I copied and pasted another network setting to create one for Sepolia. This configuration came with default gas and gasPrice parameter values. I removed them and let Sepolia dictate the default values for those parameters.

At the end my Sepolia config section was:

sepolia: {
  provider: () => new HDWalletProvider(mnemonic,url_to_infuria_service),
  network_id: 11155111,
}

}

Error was gone, and truffle log showed the the total cost for the transactions.

0

This error message Get an error: insufficient funds for gas * price + value might be caused by chain misconfiguration. I faced it with my own private chain.

In my case I had a working private chain and have to deploy a new one which should act as testnet. This new requirements lead to some refactoring on the client side and after this I start getting Get an error: insufficient funds for gas * price + value error one both new testnet and previously working private chain. The root cause was I passed an account address instead of its private key when execute operation from the mobile client.

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