Support Multiple Electrs Backends with Failover#3270
Open
adamkrellenstein wants to merge 2 commits intodevelopfrom
Open
Support Multiple Electrs Backends with Failover#3270adamkrellenstein wants to merge 2 commits intodevelopfrom
adamkrellenstein wants to merge 2 commits intodevelopfrom
Conversation
Replace single config.ELECTRS_URL with config.ELECTRS_URLS list. On request failure (connection, timeout, or HTTP error), the next backend is tried automatically. Default mainnet to both blockstream.info and mempool.space. --electrs-url can now be specified multiple times. Print a startup warning when using default URLs.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3270 +/- ##
============================================
- Coverage 88.13% 57.85% -30.28%
============================================
Files 108 106 -2
Lines 14584 14550 -34
============================================
- Hits 12853 8418 -4435
- Misses 1731 6132 +4401 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Cover welcome_message warning, initialise_config URL handling, add_config_arguments append action, and argparse edge cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The service previously relied on a single Blockstream API endpoint for UTXO lookups and pubkey searches, which is unreliable. This changes
config.ELECTRS_URL(single string) toconfig.ELECTRS_URLS(list) with automatic failover on connection, timeout, or HTTP errors.--electrs-urlcan now be specified multiple times for failoverblockstream.info/apiandmempool.space/apiif/ifbug ininitialise.pyfor testnet/testnet4 network selectionChecklist
release-notes-v11.0.5.md)