1

Like it seems almost everyone else recently, I've sent transactions with too low a gas price, and they're currently spinning pending after a day.

Is there a time-out after which the transaction will die? Is this determined by the gas I provided with the transaction, a time limit, or some other factor? If not, I need to try and cancel/resend the transactions (but I'm OK with waiting a day or two so long as I know that waiting is adequate).

As is described in this question, transactions only currenly show pending for up to about an hour, before they disappear from etherscan, only to re-appear with a new timestamp a while later. The question here has no answer about any livelock prevention, which is what I'm asking here.

Edit: The assumption here is that my transaction like all other transactions, and not being deliberately avoided.

5
  • It would be a duplicate, except the accepted answer to the linked question doesn't answer this - it just talks about the memory overflow. Jan 16, 2018 at 13:07
  • 1
    Quick correction: it's not too little gas, it's too low a gas price. Jan 16, 2018 at 13:24
  • @SeanHoulihane It is up to the miners. If there are lots of transactions it is likely the transactions with low gas price will be removed, but there's no obligation to drop them.
    – Ismael
    Jan 16, 2018 at 21:12
  • @Ismael I fail to see how these transactions drop off the network completely since any node seems to re-broadcast them. Jan 16, 2018 at 22:51
  • @SeanHoulihane There's no guarantee that they will be dropped they may remain forever in the network as pending or until they are replaced by new transaction with the same nonce with higher fee.
    – Ismael
    Jan 17, 2018 at 15:32

3 Answers 3

1

Have you read the Ethereum whitepaper? My understanding was that changes would revert, minus ETH spent on gas, if there was insufficient gas to complete the transaction (including executable code for a smart contract, the smart contract's changes also being reverted if insufficient gas).

So I thought, unlike Bitcoin where you 'bury' your transaction deep and you're ruined until a miner digs it back out, Ethereum simply returns your funds to you. I suppose you might have the same problem if you set too low a gas price, though. I don't think the whitepaper touches on the question of low gas price.

1
  • Sorry, I did mean 'too low a gas price'. Finding this terminology a bit tricky (probably a consequence of not yet reading the white paper...) Jan 16, 2018 at 13:45
0

Technically yes it can.

If you create an exactly same transaction with different gas price and sent it to the network (like your resend link), there's a possibility that other nodes mine that transaction faster, thus making the old transaction invalid at the same time.

5
  • 1
    Is there a reference for this information? Jan 16, 2018 at 12:16
  • @SeanHoulihane Couldn't find any documentation that transactions can hang forever, but this tiny Reddit comment. reddit.com/r/ethereum/comments/271qdz/… Technically any transaction, even the ones with enough gas price, can hang forever because that's what miners decide. If somehow all the miners reject to mine one particular transaction, it won't be mined forever. Jan 16, 2018 at 12:49
  • Hmm, that's not really the 'right' answer. Assuming the network is treating my transactions fairly, what then? Jan 16, 2018 at 12:57
  • @SeanHoulihane That's why I put the word "technically" there. And you're facing that "fair" network you're talking about now. Maybe you can refer from the sites like this? ethgasstation.info (Though I'm pretty sure you already know one.) Jan 16, 2018 at 13:00
  • Yes, I just started looking at that one. Seems there is no good way to track transactions older than an hour or so since the pending time gets reset after currently about an hour. Jan 16, 2018 at 13:05
0

Supported by this bitcoin answer, and this one even if a transaction does leave the mempool of a node, there seems to be nothing to stop them being re-broadcast. Only if work is done by a miner will gas be consumed, giving the transaction an opportunity to fail (or so I infer from the whitepaper).

Given this, there seems to be no mechanism to automatically terminate a transaction which was started with such a low gas price that no miners ever chose to work on it (assuming a high enough level of network activity that sufficient more attractive transactions are always visible).

There doesn't seem to be a DoS risk here, since miners are not doing work, and mempool eviction favours transactions which are less likely to be selected for mining (so the distributed pool becomes leaky, but only for low gas transactions).

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