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?