bitmask-core
bitmask-core copied to clipboard
Fallback Esplora Servers
- [ ] 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
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.
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.
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.
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.