0

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)?

1

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.

  • 1. i know exact address (coinbase) 2. enough (few ethers) 3. 200.000 (much more than required (about 29K)) 4. i know it (22 gwei) 5. 0 as it's smart contract call. In general i've calculated that i'm able to send more than it requires (did it with metamask, see ropsten.etherscan.io/tx/… but can't with geth) – 4ntoine Jul 13 '18 at 21:27
  • I think you're wrong on #1. What account are you actually unlocking and sending from "with geth?" Unless you're Coinbase, you shouldn't have their private key or be able to sign transactions coming from Coinbase's address. Having bought mainnet ETH on Coinbase does NOT mean you have ETH on the Ropsten test network (which has no cash value and can be obtained for free in limited quantity for testing purposes from the faucet). If you want to reduce (#3)*(#4) and make it more likely < #2, you can reduce #3 to a gas limit closer to what the transaction actually needs. Same for gas price. – WBT Jul 13 '18 at 23:55
  • see --unlock "0x2fe90fe5e4f90cc07c00512888a4ced12015blabla" --password "/misc/key_password.txt" in my question. i have it in keystore and i do unlock it before sending transaction. Address is on Ropsten and geth is connected to Ropsten. I've tried with gas limit 50.000 instead of 200.000 (tx requires 29000) – 4ntoine Jul 14 '18 at 5:24
  • What do you get when you try geth attach to get a console on that instance followed by eth.blockNumber, eth.syncing, and web3.fromWei(eth.getBalance("0x2fe90fe5e4f90cc07c00512888a4ced12015blabla")) (with appropriate substitution at the end), or web3.fromWei(eth.getBalance(eth.accounts[0])), from that console? Your local node might not be synced up enough to know your current balance. – WBT Jul 14 '18 at 13:30
  • i'm getting 0, but in etherscan i can see positive value. blockchain is fast synced. sync issue? – 4ntoine Jul 14 '18 at 13:52

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.