0xB10C/memo

Feature: Include (current) fee needed to make it into next block.

overcookedpanda opened this issue · 3 comments

With the data that you currently have, would it be possible to add to the API to show the current fee needed to make it into the next block. I realize this changes with every new tx coming in, but wasn't sure if it were possible with the current data, similar to the megabyteMarkers, but give the lowest fee that is included in those markers?

If I understand your question correctly, then I think what you are asking for is provided by the megabyteMarkers. The first maker marks where the next full block would end (i.e. lowest feerate in that block) and the next would start. Keep in mind that the makers are only a rough estimate. The calculation does not consider e.g. CPFP.

Are you querying the https://mempool.observer/api API? Would be interesting to know for me. Otherwise I might change the API as I'd like while breaking existing applications.

Little correction: I re-read your question and had a quick look at the code. I was wrong. The megabyteMarkers are the position (in tx count) from the top where a block end and a new begins.

It's possible to calculate the lowest feerate using the megabyteMarkers and the feerateMap. I though I was doing that on the server side. So everything you would need is there. Could be made a litte bit more easily accessible, but I don't think that's a priority, given that the current site does not explicitly need that info.

Ah yes, my first assumption was that it was providing the fee needed but then I noticed it was the transaction count as well. Right now I am looking to modify an app that is using a different api but my goal would be to run the app locally for efficiency and to avoid it breaking with future updates unknowingly.

I’m not very familiar with Go unfortunately or I would be happy to do a PR.