[bisq-network/bisq] Extend FeeRateService to support multiple API endpoints (#4247)

Chris Beams notifications at github.com
Mon May 11 10:25:57 UTC 2020

@cbeams approved this pull request.

ACK including my review commits. Please see each for details. I've tested this locally running against both the default mempool.space and mempool.emzy.de instances, and saw that everything works as expected. After starting up my pricenode locally and getting a couple successful polling results from both endpoints, I configured Little Snitch to deny connections to mempool.emzy.de, and saw the following error show up in the logs:

May-11 11:42:37.189 [Timer-0] ERROR b.p.m.p.MempoolFeeRateProvider$First: Error retrieving bitcoin mining fee estimation: I/O error on GET request for "https://mempool.space/api/v1/fees/recommended": Host is down (connect failed); nested exception is java.net.SocketException: Host is down (connect failed)

After removing the rule to deny connections, polling started working as per usual once again. So the implementation seems to tolerate intermittent failures of an individual endpoint well.

One thing that's not ideal about the implementation is that it doesn't log explicitly what the calculated average fee rate is. It only logs the result of each request against the individual mempool api endpoints. This makes sense, because the implementation only calculates the average on calls to `/getFees`, and it would create a lot of noise in the logs to log that each time. It's probably better to leave things as-is for now and if debugging errant fee rates becomes a problem in the future, we can add more sophistication to the logging.

Beyond what's mentioned above, I haven't done what I'd consider exhaustive testing of the implementation, but I have looked at everything closely and I think this is in good enough shape to merge and to give a careful trial deployment in production. @bisq-network/pricenode-operators should just be ready to roll back if something unexpected comes up.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200511/8af796f9/attachment-0001.html>

More information about the bisq-github mailing list