2

I'm running a fullnode with electrumx on top for indexing. I've noticed that sometimes, due to low fee, a tx gets dropped from mempool after some hours/days. However, it stays for longer periods in my node. Here's bitcoind config.

daemon=1
server=1
txindex=1
listen=1
maxmempool=350
mempoolexpiry=48
mempoolfullrbf=1
maxconnections=42
minrelaytxfee=0.00001

Here mempoolexpiry is set as 48. Is this what's preventing that txn from getting dropped for two days even though it's already dropped from other mempools? What would be an ideal number for this parameter?

6
  • What mempool are you comparing to? Do you mean mempool.space? Nov 13, 2023 at 8:48
  • 1
    @VojtěchStrnad I checked in 3 explorers. mempool.space, blockstream, blockchair. They all say tx not found.
    – Ravi Ojha
    Nov 13, 2023 at 11:49
  • Okay, so purging txn below certain feerate is what seems to be causing this problem. Other nodes are probably purging aggressively. While my node keeps that txn for 2 days before dropping them.
    – Ravi Ojha
    Nov 21, 2023 at 18:45
  • As far as I know, mempool.space never purges transactions and has its mempool capped at 2 GB, so if it doesn't have your transaction it's more likely that it never propagated to it through the network. Nov 21, 2023 at 18:47
  • I see. Would you know what it means on their home page Purging < 9.85 sat/vB
    – Ravi Ojha
    Nov 21, 2023 at 18:54

1 Answer 1

0

Default value for mempoolexpiry is 336. That is two weeks. Your value is 48 so that means that a transaction in your mempool for more than 2 days will be dropped. I consider that value to be inappropriate (too low) given the current mempool size (+300 blocks). Is there any reason for that value in your node?

Also, any node do not (re)transmit txs that are already on the mempoool. That is a anti-spam measurement. It's possible that you received the transaction when you were starting your node (poorly connected) by another starting node also poorly connected, so that transaction got stuck in both mempools. Also the agent (maybe yourself) that send the transaction in first place has not re-transmitted the transaction since then.

There is no way to remove that tx from your mempool but you can rebroadcast it again by other means (i.e. https://bitaccelerate.com/pushtx/) and wait to be mined.

I've also found that my node (which feeds my webpage https://mempoolexplorer.com) sometimes has transactions that any other service have. Maybe for the same reason.

1
  • 2 days works for our specific usecase. If the txn is indeed mined after a week, it will be synced anyway as part of new block data. So this hasn't caused any problems. In fact, I'm looking at a way to drop (or purge) txns even before 2 days when they get purged by other nodes.
    – Ravi Ojha
    Nov 21, 2023 at 18:50

Your Answer

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

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