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

jrbedard
  • 524
  • 1
  • 6
  • 15
John Heeter
  • 521
  • 1
  • 4
  • 5

8 Answers8

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'});"

Badr Bellaj
  • 18,780
  • 4
  • 58
  • 75
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.

CodingYourLife
  • 729
  • 1
  • 6
  • 18
6

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

John Heeter
  • 521
  • 1
  • 4
  • 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 07 '16 at 05: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. – John Heeter Oct 07 '16 at 07:16
  • 1
    I should manually specify gas price? – John Heeter Oct 07 '16 at 07: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 07 '16 at 10:26
  • 1
    Also had this issue when accidentally upgraded t0 Geth/v1.5 beta – Mikko Ohtamaa Nov 13 '16 at 13:11
5

i solved this by reducing my gas

Ali
  • 231
  • 3
  • 3
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.

  • 1
    Does not work. It is already 2019 in my case. Still facing this issue. – Ahmed Numaan Apr 03 '19 at 08: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 https://github.com/etclabscore/core-geth/blob/master/core/types/transaction_signing.go#L42 for code reference. – irbanana Jun 27 '20 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 '23 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.

yaach
  • 121
  • 1
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.

Gleichmut
  • 472
  • 4
  • 12