3

I sent 115 transactions with geth, and they are stuck in pending for over an hour. Etherscan doesn't recognize them. I try to resend, and get a confusing error. Some details from geth console:

> eth.pendingTransactions.length
115

> eth.resend(eth.pendingTransactions[0], web3.toWei(20, 'gwei'))
Error: Transaction a075b95c7242178330ae22373a1138e9ec22cbd9dd54964980fc1a36182acdbe not found
    at web3.js:3104:20
    at web3.js:6191:15
    at web3.js:5004:36
    at <anonymous>:1:1

> eth.pendingTransactions[0].hash == "0xa075b95c7242178330ae22373a1138e9ec22cbd9dd54964980fc1a36182acdbe"
false

The eth.resend docs don't offer much more help.

This might be a duplicate of: geth: can not resend transaction - transaction not found


*Edit: fixed code typo in the writeup (but typo was not in the console).

Interestingly, the pool did eventually clear out on its own, after 24 hours, and all the transactions were successfully sent. But the question about why eth.resend() was failing still stands. (or perhaps clarification on the purpose of the function)

5
  • You have a stray ) in your second line. Other then that, how did you create the transaction? Can you post the entire tx? Which version of geth? May 29, 2017 at 16:12
  • geth 1.6.1-stable -- The transactions did eventually clear out, they just took much longer than I expected. I was using a 2 Gwei gas price, and it took 24 hours for the transactions to send. There was 0 progress for hours at a time, then a few would go through. I would love to learn more about how peers handle big transaction pools, but for now, I'm just rate-limiting myself to only a handful of pending transactions at a time.
    – carver
    May 30, 2017 at 0:45
  • For posterity: the network had a spike of transactions. Search discussions around 2017-05-30 -- 2017-06-01, relating to the BAT ICO, Poloniex per-user accounts, etc.. Jun 2, 2017 at 15:50
  • The issue was reproducible on other dates, when transaction count was low.
    – carver
    Aug 3, 2017 at 19:45
  • This returns Error: intrinsic gas too low. I was not able to fix it :( @carver
    – alper
    Mar 7, 2018 at 12:47

1 Answer 1

6

I still don't know why eth.resend was failing (and continues to fail as of geth 1.6.5), but this compatible patch works for me:

eth.resend = function (tx, gasPrice, gas) {
  if (gasPrice) {
    tx.gasPrice = gasPrice;
  }
  if (gas) {
    tx.gas = gas;
  }
  tx.data = tx.input;
  return eth.sendTransaction(tx);
};

I prefer to also add this convenience version:

eth.resendgwei = function (tx, gasPriceInGwei, gas) {
  if (gasPriceInGwei) {
    return eth.resend(tx, web3.toWei(gasPriceInGwei, 'gwei'), gas);
  }
  else {
    return eth.resend(tx, null, gas);
  }
};

Now, if your pending transaction is stuck because the gas price is too low, you can speed it up with:

eth.resendgwei(eth.pendingTransactions[0], 27);
3
  • I am having Error: intrinsic gas too low or Error: replacement transaction underpriced error. @carver
    – alper
    Mar 7, 2018 at 12:31
  • It means your gas price is too low.
    – carver
    Mar 21, 2018 at 17:03
  • 1
    I know that gasPrice is too low! There was a small issue on geth side, its fixed as follows: github.com/ethereum/go-ethereum/issues/16284 @carver
    – alper
    Mar 21, 2018 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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