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

For privacy concern, an option to prevent Electrumx from using the default peers should be provided along with the PEER_DISCOVERY environment variable #199

Closed
Thireus opened this issue Jul 2, 2017 · 11 comments

Comments

@Thireus
Copy link

Thireus commented Jul 2, 2017

The ./server/peers.py file contains default servers for several coin networks. These peer servers are being used even if the PEER_DISCOVERY option is set to nil.

In /etc/electrumx.conf:

[...]
PEER_DISCOVERY=

journalctl -u electrumx -f:

[...]
INFO:PeerManager:accepted new peer 4/14 electrum.vom-stausee.de from coins.py
INFO:PeerManager:accepted new peer 5/14 electrum3.hachre.de from coins.py
INFO:PeerManager:accepted new peer 6/14 electrum.hsmiths.com from coins.py
INFO:PeerManager:accepted new peer 7/14 erbium1.sytes.net from coins.py
INFO:PeerManager:accepted new peer 8/14 fdkbwjykvl2f3hup.onion from coins.py
INFO:PeerManager:accepted new peer 9/14 h.1209k.com from coins.py
INFO:PeerManager:accepted new peer 10/14 helicarrier.bauerj.eu from coins.py
INFO:PeerManager:accepted new peer 11/14 hsmiths4fyqlw5xw.onion from coins.py
INFO:PeerManager:accepted new peer 12/14 ozahtqwp25chjdjd.onion from coins.py
INFO:PeerManager:accepted new peer 13/14 us11.einfachmalnettsein.de from coins.py
INFO:PeerManager:accepted new peer 14/14 ELEX01.blackpole.online from coins.py

For users concerned about their privacy, disabling peer discovery should also disable these servers from being used. Or alternatively an option to disable default peer servers should be present in the environment variables.

@kyuupichan
Copy link
Owner

What do you mean used? What evidence do you have?

@bauerj
Copy link
Contributor

bauerj commented Jul 2, 2017

That doesn't mean those servers are being queried.

@Thireus
Copy link
Author

Thireus commented Jul 2, 2017

The .onion peers are forwarded to the electrum client.

@kyuupichan
Copy link
Owner

That's because it asked for peers, so it gets the default list, or whatever you had previously. It doesn't mean peer discovery is happening.

@Thireus
Copy link
Author

Thireus commented Jul 2, 2017

proofclient
proofserver

Ok, the title of this issue should be renamed then. Should I create a new issue?

@Thireus Thireus changed the title Disabling peer discovery doesn't disable the default servers present in peers.py from being used For privacy concern, an option to prevent Electrumx from using the default peers should be provided along with the PEER_DISCOVERY environment variable Jul 2, 2017
@kyuupichan
Copy link
Owner

kyuupichan commented Jul 2, 2017 via email

@Thireus
Copy link
Author

Thireus commented Jul 2, 2017

I've changed the title, you can mark it as enhancement instead of issue.

The concern is a privacy concern. For users who wish to run electrumx as a server that doesn't communicate with anyone/anything but only their own bitcoind. (and ultimately for their Electrum client to only connect to their own electrumx server)

@bauerj
Copy link
Contributor

bauerj commented Jul 2, 2017

That should be done on client level and not on the server. For example, recent clients will always try to connect to servers from the default list.

@Thireus
Copy link
Author

Thireus commented Jul 2, 2017

I understand you do not wish to make the necessary changes to provide users with an option to segregate their Electrumx server from the rest of the world. I just wanted to point this out in case you'd like to provide this option in the future or if users wish to make the necessary changes to make this happen on their server.

@kyuupichan
Copy link
Owner

I don't understand your privacy concerns as you are not being specific enough.

If you turn off peer discovery your server cannot be discovered unless it was already known. If you want to prevent people connecting to you, you have a firewall. If you don't want to be known, turn off peer discovery. If you're already known, well that's too bad, nothing local can help you. The network will forget you within a week anyway.

@Thireus
Copy link
Author

Thireus commented Jul 2, 2017

Peer discovery is one thing. Enforcing both the client and the server to only refer to a specific whitelisted list of peers is another.

What I'm saying is that while it's true that peer discovery enforces some privacy by preventing the server to discover other peers and leaks its identity, another identity leak can happen when the client attempts to connect to the peers provided by the server. By deactivating the peer discovery feature users may think that no peer will be provided to their Electrum client, but this isn't true as there is a default list of peers hardcoded in the Electrumx code.

So my point is actually to allow users to enforce their privacy by providing an option on the server side to prevent the server from providing any peer list to the connected clients. That way if the client is misconfigured (which is something that can happen upon update and/or fresh install) the Electrum client will not automatically connect to untrusted servers (the ones provided in that default Electrumx hardcoded list).

Does it make more sense?

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

3 participants