Page MenuHomePhabricator

[chronik] Electrum: implement the mempool.get_fee_histogram() endpoint
ClosedPublic

Authored by Fabien on Jun 12 2025, 12:49.

Details

Summary

https://electrum-cash-protocol.readthedocs.io/en/latest/protocol-methods.html#mempool-get-fee-histogram

We simply use powers of 2 as a fee rate interval, which seems to be what fulcrum does. Note that the unit is sat/vB.

Test Plan
./test/functional/test_runner.py chronik_electrum_blockchain

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Jun 12 2025, 12:49
PiRK added a subscriber: PiRK.

Looks good.

Putting holes in the histogram is debatable and may require some documentation (vs just putting the value vsize = 0 explicitly in the output, which would make the fee-ranges a bit more self-explanatory). But I don't plan to use this for now, so not blocking on it. And we need some doc anyway to inform users that the fee value is the max value of the range.

This revision is now accepted and ready to land.Jun 12 2025, 14:49
In D18246#415951, @PiRK wrote:

Looks good.

Putting holes in the histogram is debatable and may require some documentation (vs just putting the value vsize = 0 explicitly in the output, which would make the fee-ranges a bit more self-explanatory). But I don't plan to use this for now, so not blocking on it. And we need some doc anyway to inform users that the fee value is the max value of the range.

You can see it as merging intervals rather than a "hole"...
This mimics the behavior of fulcrum afaict