electrum unwanted disconnect from own ElectrumX server
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.6k
- Forks
- 3.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 61
Description
Steps to reproduce:
- Setup ElectrumX.
- Setup electrum with
oneserverconnecting one's own ElectrumX server that was just set up and is not fully blockchain synced yet.
Expected result:
electrum shows status "in progress" (yellow light), "not all transactions may display, electrum server behind bitcoin blockchain" or something equivalent, waits for one's own ElectrumX server to catch up with the Bitcoin blockchain download and notifies about that in its GUI
Actual result:
electrum shows status "disconnected" (red light). It is difficult to figure out what's wrong.
Electrum in verbose mode (-v) on the command line reports:
I/i | interface.[localhost:5000] | connection established. version: ['ElectrumX 1.16.0', '1.4']
I/i | interface.[localhost:5000] | disconnecting due to GracefulDisconnect('server tip below max checkpoint')
Why is that an issue?
Unexpected and very difficult to figure out what's wrong. One starts debugging.... "Does Bitcoin Core have an issue downloading the blockchain? No. Bitcoin RPC connection reachable? Yes. ElectrumX connecting to Bitcoin Core RPC? Yes. ElectrumX local server TCP port open and reachable? Yes. Electrum configured to connect to the right server (localhost)? Yes." So why does it not connect? Check electrum on command line in verbose mode.
This seems to be a bug at least in context of using electrum with one's own self-hosted, local ElectrumX server.
This might make sense when using electrum with public third party servers but it's very confusing when using electrum oneserver + own ElectrumX.
(Setting up one's own ElectrumX server and to connect to it with electrum is very difficult because upstream documentation for electrum and ElectrumX is lacking / more like developer documentation than an actionable guide that users can follow. Whonix or otherwise, would be equally difficult in other Linux distributions such as Debian. Therefore, how to use ElectrumX in Whonix has just been documented by me. I am a developer of Whonix. Mentioning just in case you'd like to see full instructions for reproduction.)
Suggested Solution
- Could you please add an (command line configuration) option
trustedserver(or better name)? If enabled, do not disconnect from the server. - If using option electrum with option
trustedserver, and ElectrumX is not fully synced yet, electrum shows status "in progress" (yellow light), "not all transactions may display, electrum server behind bitcoin blockchain" or something equivalent, waits for one's own ElectrumX server to catch up with the Bitcoin blockchain download and notifies about that in its GUI
Related
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with oneserver pointed at a local ElectrumX instance that is still syncing, then inspect the connection handling around the reported GracefulDisconnect('server tip below max checkpoint') message. Determine how a self-hosted server should be distinguished from public servers, and verify that the interface reports syncing progress rather than appearing disconnected while the server catches up.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100