litecoin-project/litecoin

estimatesmartfee returns a feerate that's below the min relay fee

kajoseph opened this issue · 1 comments

Litecoin Core's estimatesmartfee has what appears to be a rounding issue where it returns a fee lower than the minimum relay fee. It seems reminiscent of bitcoin#12450 but the fix for that was implemented a long time ago.

Expected behavior

$ litecoin-0.21.2.2/bin/litecoin-cli estimatesmartfee 1008
{
  "feerate": 0.00001000,
  "blocks": 74
}

Actual behavior

$ litecoin-0.21.2.2/bin/litecoin-cli estimatesmartfee 1008
{
  "feerate": 0.00000999,
  "blocks": 74
}

To reproduce

Sync your node as normal. Once synced and there's enough data to show a fee estimate, at first it'll show the correct feerate but after a few hours it starts showing the above. Sometimes it happens for higher block estimates (e.g. 25+), sometimes for all block estimates.

I have 3 nodes on 3 separate machines and they all have this problem. EDIT: now 4. I tried an x86-64 machine and the same thing happened.

System information

Version: 0.21.2.2 - pre-compiled from the Release page
OS: Ubuntu 20.04
CPU: aarch64 (Neoverse-N1 and Cortex-A72 cpus) EDIT: and x86-64
Disks: nvme drives