Is it possible to set a dynamic -minrelaytxfee?

1

When I start bitcoind, I like to set a -minrelaytxfee to save bandwidth on transactions that will likely never make it in to the blockchain (because their fees are too low).

However, when the network is under low load, I would be happy to reduce the -minrelaytxfee so that my node receives more of the transactions on the network.

Is there any way I can dynamically change the minrelaytxfee whilst my node is running?

inersha

Posted 2017-08-14T20:30:47.377

Reputation: 2 236

Answers

3

No, there is no way to do that.

However you could make your mempool smaller and that would have a similar effect. The mempool has its own minmempoolfee. The in-practice minrelayfee is the maximum of the -minrelaytxfee and the minmempoolfee. The minmempoolfee will change when the mempool becomes full, and decreases when it has space. So if you set your -maxmempool to be much smaller, you would get a similar effect to changing -minrelaytxfee dynamically.

Andrew Chow

Posted 2017-08-14T20:30:47.377

Reputation: 40 910

Thanks Andrew, this is interesting to learn. Do you know of any documentation on how -maxmempool adjusts the minmempoolfee?inersha 2017-08-14T22:31:53.973

@inersha When transactions are evicted from the mempool due to being at the bottom of a too-large mempool when sorted by feerate, the effective minrelayfee is raised to be the feerate of the evicted transactions.Pieter Wuille 2017-08-14T23:18:35.777

@PieterWuille Excellent, thanks Pieter. What causes minmempoolfee to return back to a lower value (i.e. back to -minrelaytxfee)? Is it when a transaction is received that does not have to evict another one?inersha 2017-08-14T23:22:09.740

It continuously goes down, very slowly, halving every 3 to 12 hours, until it has to be bumped again due to an eviction.Pieter Wuille 2017-08-14T23:43:38.267