rusty-kaspa
rusty-kaspa copied to clipboard
implement rpc method that fetches fee per mass based on block template
handler builds block template and calculates max/min/median values closes #501
This API call should track the last request timestamp and return a cached value if this timestamp is within some threshold range (like 1 second). Due to the potential high frequency of this call invocation (easily a few thousand requests per second), we want to save compute and return the last calculated value.
The term used here is "Priority" fee, but the actual calculation is done over real fees in the mempool.
I renamed the method name. should be more clear now
- How does a developer use these figures? Create their TX, calculate its mass and then calculate their fee by multiplying the mass and the
min,mid,maxfigures they get here?
- mempool total mass represents network load. Based on it dev will pick min/mid/max/0 value. Multiply it by tx mass
- it's in sompi. Could be micro sompi if we want to not use floats or ratio: numerator and denominator