When can a non-replacement transaction received a "transaction underpriced" error?

I attempted to send a transaction to Mainnet that was rejected with, Error processing transaction request: transaction underpriced.

It was not a replacement transaction, so I assume it was rejected because the price was below the node’s txpool.priceLimit. What is the priceLimit? And does it change (i.e., based on network activity)?

Is there another reason I could have received that error?

Hi @jasonklein, and welcome to the Infura community! From the error message, you need to send it again with a higher gas price. If you want to see an estimated gas price for your transaction to get mined, you can use the eth_estimateGas method and base your gas price off that.

Thank you for the welcome and the swift response, @Leiya_Kenney!

Yes, I resent the transaction with a higher gas price and that went through. But my expectation was that the original transaction would sit in the mempool if it was priced too low to be of interest to miners—which is the behavior I’ve seen at other times—and not that it would be explicitly rejected.

What I am trying to understand is when will a transaction that is not a replacement transaction be explicitly rejected because of price? The only thing I know of is if the txpool.priceLimit is higher than the transaction’s gas price. The geth docs say the default for that is 1 and my transaction was priced higher than that. So either the txpool.priceLimit for the Infura nodes is higher than the default or there is some other reason.

Is there any additional information you (or others :pray:) can provide to help me to understand?

Got it! There are a lot of potential causes for this - one of them is that you’re including a nonce number when you don’t need to, or you’re trying to use an incorrect nonce number (this doesn’t seem to be the case for you, however, since using a higher gas price pushed the transaction through). Alternatively, you may need to include gas, gasPrice, and value in your request (sometimes it’s finicky).

A transaction that’s not a replacement transaction can be rejected for a few reasons, but most of the situations end up being a misunderstanding where the address you’re sending from doesn’t have the balance you expect, or perhaps you’re using a helper function that returns Wei (such as estimateGas), whereas others like getGasPrice return Gwei - that has caused confusion more than once! I would definitely suggest looking into those as easy initial checks for a fix.

Lastly, there have been bugs with geth previously that was causing nodes to be rejected even with high gas prices, so I would also advise checking the geth GitHub page to see if others are running into this issue if you’re not getting anywhere with the above options.

@Leiya_Kenney: cool, I will check geth’s GitHub. In terms of the other possibilities, I do not think they are the issue because this transaction is one that my app sends automatically everyday. From one day to the next, the only thing that changes are the values in the arguments and the gas price.

In case the issue is related to the txpool.priceLimit, can you tell me what that is on the Infura nodes? Or is there a way for me to access that information?

Our system automatically sends a transaction everyday at approximately 2am UTC. Yesterday and today, the transactions received “transaction underpriced” errors. In each case, the transaction was the first and only transaction for the given nonce and therefore should not have received a “transaction underpriced” error because the transaction could not be “underpriced” in relation to anything.

@Leiya_Kenney, can you or any of your colleagues help to shed light on what might have caused these errors?

Update: looking at the latest changes in Geth, I think these errors could be due to https://github.com/ethereum/go-ethereum/pull/23855. Please confirm if that seems like a possible cause. It is worth noting that we are sending legacy transactions and so are still setting the gasPrice field.

hi @jasonklein yes, we’ve rolled back this change for now so the “transaction underpriced” should be gone.

1 Like

Has this change to rollback the issue been deployed. We have some tests that go against ropsten (https://ropsten.infura.io/v3/) and are still seeing some “transaction underpriced” errors.

hi @bflood66 can you send us an email to support@infura.io with details about the most recent failure (time, methods call and data) and we’ll look into it.

Thanks,
Traian