[Ethereum] Getting “insufficient funds for gas * price + value” with geth on Ropsten no matter what

go-ethereumropstenweb3j

I'm having geth 1.7.3 (tried 1.8.x too) running in docker container:

–verbosity 4 -rpc –nousb –ipcdisable –rpcaddr "0.0.0.0" –rpccorsdomain "*" –syncmode "fast" –rpcapi="db,personal,eth,net,web3,admin" –cache=${CACHE_SIZE:-512} –testnet –networkid 3 –unlock "0x2fe90fe5e4f90cc07c00512888a4ced12015blabla" –password "/misc/key_password.txt"

I'm getting "insufficient funds for gas * price + value" no matter what gas price i set for transaction:

20:39:54.914 [main] DEBUG HttpLoggingInterceptor – {"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xf88a80874e28e2290f000082c35094b63550b69a502d579e5406e59f5e7b4079810b4480a4c3e190eb00000000000000000000000000000000000000000000000000000000000000051ba077b3aa0489b93c54bfbdec5a1ade540118b669ec7bfe1e2f46cf491ecc10abbda06819146122246134012781d9a1dbb3a818f555a8f88716ac7fec7604fa3a3bab"],"id":104}

20:39:54.924 [main] DEBUG HttpLoggingInterceptor – {"jsonrpc":"2.0","id":104,"error":{"code":-32000,"message":"insufficient funds for gas * price + value"}}

I've tried programmatically with java web3j and with Remix IDE connected to geth over http://127.0.0.1:8545.

I've tried to set average gas price 22 Gwei but getting this error. Tried 22 * 1000 Gwei but having the same.

Any geth arguments missing? Is it correct that i don't have to mine on my ethereum node to make it working (there are another miners on Ropsten)?

Best Answer

This error suggests that whatever account you are using to send the transaction from does not have enough ether in it. Though you don't have to post the answers to these, you need to know the answers to help debug this:

  1. Exactly what account is this being sent from?
  2. Exactly what is the balance of that account, on the network this transaction is being sent to?
  3. What gas limit am I sending with?
  4. What gas price am I sending with?
  5. How much ether am I including as part of this transaction?

(your answer for #3)*(your answer for #4) + (your answer for #5) needs to be less than (your answer for #2). Is it? The error indicates it is not, so figure out which of these values is not as you expect.

Most likely, it's #2 and you don't have enough ether in the account you're trying to send from.

Keep in mind that if you bought/acquired Ether on the main Ethereum chain, or used the faucet to get some on Rinkeby, it doesn't matter on Ropsten. You could try the Ropsten faucet here to boost your balance a bit. You can check your balance on Ropsten by searching the address here.