Kovan: getting transaction hash but nothing in mempool

I’m testing some code that replaces transactions.

I send a transaction with very low gas, and get a response back which gives me my transaction hash.

However, when I look for the hash on kovan, it’s not there.

When I then send another transaction, with the same nonce, and high gas, the transaction goes through as expected.

Does Infura hold back transactions, not broadcasting them to the mempool if they are low gas? If so, what is the threshold for this as I want to see my first transaction sitting in the pending state before I send my high gas transaction to replace it.

Hi Andy, we shouldn’t hold back any tx but it might be a propagation delay between the nodes. How exactly are you checking the mempool ?

I’m looking on https://kovan.etherscan.io/.

After further investigation, sometimes, if I’m quick, I do see the transaction very briefly as pending but then it disappears and never comes back.

If I hit my Infura endpoint with eth_getTransactionByHash, though, it’s there.

Do the testnets drop transactions from the mempool if the gas is too low? If so, how come it is still there when I do eth_getTransactionByHash? Shouldn’t Infura drop it too?

EDIT: Here’s an example of a transaction on Kovan that responds to eth_getTransactionByHash but is not on kovan.etherscan.io: 0xbbc262f26193f30f4d4138cc48286696f3cf96ff529d2f9d073ab70af4522a10

Do the testnets drop transactions from the mempool if the gas is too low?
Geth nodes do that when the mempool is full.

You are seeing it longer with Infura because of our infra, your eth_getTransactionByHash request might hit a node that still has that tx.

I hope it helps !

Thanks, that does help! If Infura is holding on to a transaction that many other nodes will have removed from the mempool, though, then I need to rethink how to handle that “stuck” transaction. Hopefully this won’t happen (often) on mainnet, at least!

Thanks again.

1 Like