ElectrumX should accept local incoming connections even if it has not fully caught up with the bitcoin daemon
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 568
- Forks
- 447
- PR merge metrics
- No merged PRs in 30d
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:
ElectrumX accepts local incoming connection.
Actual result:
ElectrumX does not accept local incoming3 connection.
Issue
Quote https://electrumx-spesmilo.readthedocs.io/en/latest/environment.html
ElectrumX will not serve any incoming connections until it has fully caught up with your bitcoin daemon.
I am arguing that this shouldn't be the case. Should be changed. This seems to be a bug at least in context of using electrum with one's own self-hosted, local ElectrumX server.
ElectrumX should be supporting a local rcp connection when not synced to the tip of the blockchain, at least if some option (environment variable) is configured.
Why is that an issue?
Unexpected and very difficult to figure out what's wrong.
It is highly unusual to open/close a server/service (local) port depending on some internal state (progress of blockchain synchronization). This is the first server application which I've ever seen which is doing this. For example, if nginx is configured but there is an issue with PHP, nginx will show an error message. It won't just close the server listening port.
Suggested Solution
Could you please add an environment variable TRUSTEDSERVER (or better name)? If enabled, always allow local incoming connections.
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
Start with the readiness behavior described in the ElectrumX environment documentation and the related Electrum issue, then trace how incoming connections are gated while the bitcoin daemon is syncing and how environment settings are handled. Done means a configured local connection is accepted before synchronization completes, while the existing behavior remains unchanged when that setting is not enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100