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

cd2357 notifications at github.com
Sat May 9 16:21:06 UTC 2020


Extend `FeeRateService` and related classes to allow querying multiple fee estimation API endpoints, instead of just one.

The API endpoints are queried independently and in parallel. Each will recover gracefully from any connection issues or timeouts, not influencing the others.

The `FeeRateService` exposes the average of the retrieved fee rates to the Bisq clients. Alternatively, if no fee estimate could be queried, it will return `BitcoinFeeRateProvider.MIN_FEE_RATE`.

Up to 5 API endpoints are supported. They can be configured in the file `application.properties`.

When no configured API endpoint is reachable, or none is configured, the logic falls back to asking the https://mempool.space endpoint. By default, 2 endpoints are configured.

Fixes bisq-network/projects#27

You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/4247

-- Commit Summary --

  * Add unit test for Version controller
  * Extend unit tests for ExchangeRateService
  * Add ExchangeRateService test for N>1 providers
  * Add support for N>1 providers in FeeRateService
  * Scale number of fee providers using config
  * Update README.md

-- File Changes --

    M build.gradle (7)
    M pricenode/README.md (9)
    M pricenode/src/main/java/bisq/price/mining/FeeRateService.java (47)
    M pricenode/src/main/java/bisq/price/mining/providers/BitcoinFeeRateProvider.java (129)
    M pricenode/src/main/resources/application.properties (8)
    A pricenode/src/test/java/bisq/price/TestBase.java (35)
    A pricenode/src/test/java/bisq/price/mining/FeeRateServiceTest.java (152)
    M pricenode/src/test/java/bisq/price/mining/providers/BitcoinFeeRateProviderTest.java (9)
    M pricenode/src/test/java/bisq/price/spot/ExchangeRateServiceTest.java (171)
    A pricenode/src/test/java/bisq/price/util/VersionControllerTest.java (24)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/4247.patch
https://github.com/bisq-network/bisq/pull/4247.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4247
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200509/14bae9c6/attachment.html>


More information about the bisq-github mailing list