Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

number of connections to eps #50

Open
3ntranced opened this issue Sep 3, 2018 · 10 comments
Open

number of connections to eps #50

3ntranced opened this issue Sep 3, 2018 · 10 comments

Comments

@3ntranced
Copy link

How many connections can eps handle? When I tried connecting with desktop it disconnected my smartphone.

@chris-belcher
Copy link
Owner

Only one at a time, as it's a single threaded application.

@3ntranced
Copy link
Author

Understood.

@3ntranced
Copy link
Author

Thank you

@chris-belcher
Copy link
Owner

Reopening because one day this could be fixed. It's possible to handle multiple connections at once, this thread gives a concrete example of that being useful.

@chris-belcher chris-belcher reopened this Sep 6, 2018
@chris-belcher
Copy link
Owner

Another concrete example is people setting up one server that multiple mutually-trusting people use; for example one family in a household (although then there can be no surprise birthday gifts, as all the spending will be visible to the server operator).

@ziggamon
Copy link

ziggamon commented Aug 9, 2019

Would much appreciate this. Electrum is often used for multisig, read-only wallets etc. Having only one user be able to connect at a time limits the functionality of this.

@diegogurpegui
Copy link

+1 to this feature.
Another scenario would be to have a block explorer running (like btc-rpc-explorer which uses Electrum Server) and also wanting to connect a wallet.

@shesek
Copy link

shesek commented Nov 17, 2020

You can try bwt, an alternative personal electrum server implementation written in Rust that supports multiple simultaneous clients.

@w0000000t
Copy link

I would rather keep using EPS, so I came from the future to further push this feature request, I realized the hard way that EPS only supports one client connection, and this is inconvenient when for example you are moving funds between two wallets you own.

@chris-belcher
Copy link
Owner

chris-belcher commented Jan 7, 2022

I'm afraid this issue isn't a priority for me right now. I'm working a lot on coinswap these days. Also I personally only use Electrum/EPS with one connection at a time. If someone else codes this I can help with review. If not then maybe I can do it in about a year.

Here are some of my thoughts for coding:

  • To help test it's possible to run multiple electrum instances with different data directories, which then create multiple connections to a server. $ electrum --dir /tmp/alice and $ electrum --dir /tmp/bob.
  • Spawning a new thread for each connection is a tempting way to do this, but you'd have to be really careful with concurrency issues. it might not be worth it.
  • Ideally I'd like to avoid requiring any new dependencies or the latest versions of python, because I hear about people running full nodes on old laptops they have lying around which cant always easily get the latest python (though maybe this isn't even worth aiming for, since those old laptops pretty soon wont be able to run Bitcoin Core either). If so then using asyncio maybe isnt worth it.
  • Having the server use a select loop is then probably the best way of doing this.
  • Right now in transactionmonitor.py the dict address_history has a field called subscribed which is a boolean. That wont work in the multi-client server because different clients can subscribe to different addresses, so that field should become a list I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants