Repository navigation
Conversation
Liquid369
force-pushed
the
2024_explorer_customization
branch
4 times, most recently
from
July 23, 2024 20:03
9b2d787 to
158474c
Compare
Liquid369
force-pushed
the
2024_explorer_customization
branch
from
June 16, 2026 00:46
e6f2e30 to
b8a7b54
Compare
This was referenced Oct 5, 2026
Member
Author
|
This should be finally good sorry for slacking with it. |
Liquid369
force-pushed
the
2024_explorer_customization
branch
from
October 7, 2026 03:23
159b973 to
ef9e899
Compare
Introduce an EXPLORER_SERVERS table with add/edit/remove/get helpers and seed the default explorers: explorer.duddino.com, testnet.duddino.com and zkbitcoin.com as a mainnet fallback. Defaults are seeded by URL so an upgrade never collides with the ids of explorers a user added previously, and NULL network metadata left behind by an older schema is backfilled. Remember the selected explorer per network (keyed by URL) in the settings cache so switching networks never remaps to an unrelated server.
BlockBookClient now resolves its URL from the active explorer selection. When the primary explorer fails, the request is retried against the other explorers configured for the active network (e.g. zkbitcoin) before the error propagates. ApiClient exposes updateExplorerUrl() to switch the active explorer at runtime.
Add an Explorer dropdown to the header, filtered to the active network, and an 'Explorer Servers config...' dialog to add, edit and remove custom explorers, mirroring the RPC servers UI. The selection is remembered per network and applied to the API client, and the dropdown refreshes when the RPC network changes.
Cover the explorer fallback retry, per-network selection persistence, network filtering of the dropdown, and the database seeding and upgrade migration. Ignore __pycache__ directories anywhere in the tree.
Explorer switching silently fell back to wrong or dead entries for three independent reasons. The client called Blockbook's v1 path. explorer.pivx.org answers that with the web UI's HTML, which only surfaced later as a JSON decode error. Use v2, and remap its field shapes: utxo amount arrives as 'value', balance as a satoshi string. EXPLORER_SERVERS had no UNIQUE constraint, so INSERT OR IGNORE appended a new row on every add and trailing-slash variants became separate entries. Older databases also carry a legacy 'is_custom' column, which SELECT * read positionally as isTestnet, shifting every flag. Migrate on startup: carry is_custom over, normalise URLs, merge flags before collapsing duplicates, prune unshipped defaults while keeping user entries, then add the index. Select columns by name from here on. explorer.duddino.com and zkbitcoin.com sit behind a Cloudflare challenge that answers every API request with 403. Mainnet default is now explorer.pivx.org. A stale selection falls back to the network default, never to whatever sorts first. time.clock() was removed in Python 3.8; use perf_counter. timeThis now logs the exception it used to swallow, which once hid a working RPC server reporting itself as unreachable.
The previous commit dropped the duddino mainnet host as unreachable but kept testnet.duddino.com as the testnet default. It fails the TLS handshake under the app's own stack (requests, OpenSSL 3.6.3, SSLError), so testnet users were left on a dead default. Use the testnet6 rusty-blox instance, which answers /api/v2. Tests now reference DEFAULT_TESTNET_EXPLORER instead of a literal, so they track the constant rather than break whenever the default moves. Cost: they no longer pin the URL itself; reachability was checked live, not in the suite.
CI lint selects E306; a nested def needs a blank line after the import.
Liquid369
force-pushed
the
2024_explorer_customization
branch
from
October 7, 2026 03:30
ef9e899 to
c589033
Compare
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.
This pull requests adds to the GUI a dropdown menu for explorer selection and allows for custom URL's.
We have updated the two hardcoded ones with https://explorer.duddino.com and https://testnet.duddino.com starters and it should retry zkbitcoin if the main one fails.
I have set this up so that we can save these in the DB like the RPC Servers so a user can therefore not rely on single sources for their PET4L or Ledger.
Update Screenshot:

Rockdev instances are done for now.