mintlayer-core icon indicating copy to clipboard operation
mintlayer-core copied to clipboard

Improve feerate points RPC node call

Open OBorce opened this issue 1 year ago • 0 comments

I am not convinced the number of points is a good way to parameterise this. Tn that case, the resolution depends on the number of transactions in the mempool. E.g. if the user asks for 10 points, in a mempool with a 200B transaction, you get a sample every 20B (needless accuracy) whereas in a mempool with 100MB worth of transactions, you get a sample every 10MB (way too inaccurate).

Maybe a more interesting would be to specify the sampling interval and a max limit. E.g. sample every 200kB and max 50 samples to cover top 10 blocks. Probably more intuitive that way.

As a bit more out there idea (not for this PR), maybe the sampling should not be uniform but logarithmic. I can imagine the feerate distribution close to the top of the mempool is more interesting than 10s or 100s of MB down the line.

This will not be a breaking change it will only change the number of points being retuned to better capture the mempool's feerate curve

OBorce avatar Dec 18 '23 12:12 OBorce