bitmask-core icon indicating copy to clipboard operation
bitmask-core copied to clipboard

Fallback Esplora Servers

Open cryptoquick opened this issue 2 years ago • 4 comments

  • [ ] Fallback Esplora servers can be specified
  • [ ] If failure is detected, the wallet can switch to another automatically and retry
  • [ ] Retries will never exceed the number of Esplora servers available

cryptoquick avatar Jun 14 '23 17:06 cryptoquick

Does make sense we try solve that by "infra" approach?

We can make an "explorer proxy/load balance" and if request failed or server does not response, we can try request again and the load balancer will be forward the requests to another instance.

This way we avoid unnecessary deploys to change explorer urls, for example.

crisdut avatar Jul 13 '23 02:07 crisdut

That might not be a bad idea, but that still centralizes clients, making them depend on our infrastructure. Ideally the switch is done clientside, because it can be configured by the client, instead of routing all requests through our infra, which is also bad for privacy.

cryptoquick avatar Jul 13 '23 15:07 cryptoquick

Also, Esplora is just an index, not a mempool frontend. I'm fine defaulting to mempool.space for now, but that's up to the wallet UI.

cryptoquick avatar Jul 13 '23 16:07 cryptoquick

I have some code for this written, but I've come to discover it's impossible to support this in a good way without using BDK 1.0, which is tracked by #201.

The code so far is here: https://github.com/diba-io/bitmask-core/commit/bd51103bdfc4df5a189b71f363e6e4d3f1b1668e#diff-d377bdd21e7b4b331728509dd55e4ae8cfeba0672e20be4a8b63dbeae042aaeaR212-R246

I'll bump this to milestone 0.7.

cryptoquick avatar Jul 19 '23 04:07 cryptoquick