Create a relay fee that adjusts to floods which cause the memory pool to grow too large (and thus crash the node). A periodic memory pool janitor runs, scanning the memory pool total byte size.
If the memory pool is below a “low water” byte size limit, the -minrelaytxfee minimum relay fee setting is used.
If the memory pool is above a “high water” byte size limit, the minimum relay fee setting is increased according to the following algorithm:
- take the top half of the mempool in terms of fee/kb - fee rate
- take the lowest fee rate as the minimum relay fee
The memory pool may continue to grow beyond the high water mark, though fees to further fill memory pools become increasingly more expensive, until new blocks reduce the pressure.
The newly increased relay fee remains intact until the memory pool size falls below the “low water” limit.
The default “low water” limit is 1/2 of the supplied “high water” limit.