-
Notifications
You must be signed in to change notification settings - Fork 111
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
Broadcasting transactions with Electrum and EPS over Tor #52
Comments
EPS just uses Adding the option for broadcasting transactions via Tor in the works. It's been in the plan since the beginning. Hopefully my PR would be added to Bitcoin Core soon bitcoin/bitcoin#13152 so that Electrum Personal Server could broadcast transactions without relying on centralized DNS seeds. More reviewers would be helpful. Right now, for private transaction broadcasting I would recommend using Tor Browser and a blockchain explorer website that allows broadcasting transactions. For example here or here. When sending a payment in Electrum, don't click Broadcast but instead click Copy which copies the transaction hex string to your clipboard from which you can paste into the web form for broadcasting over Tor. |
Understood. Thank you |
Sorry I keep closing. You prob want to keep this open since you are working on it. |
Hi Thank you |
In the case of the bitcoin node connecting to the internet only over Tor, then using That has the downside that when synchronizing you need to download the entire blockchain over tor, which would be very slow. Downloading the blocks over Tor doesn't improve privacy because every full node will download all the blocks anyway. However it would help in a situation where you don't want your ISP or VPN provider to even know that you're using bitcoin (but they'd still know you were using tor). The attractive thing about broadcasting over Tor but downloading over clearnet is that you can use the fast clearnet connections without costing too much privacy, and still have privacy when you broadcast. |
Thanks for your explanation chris-belcher all very clear. That will be a great improvement. |
My GUI fixes this by broadcasting with an instance of electrum with TOR proxy. Want a PR, guys? (not easily compatible with windows, however. I'm working on porting my script to windows.) |
yes. timing correlation is still an issue, but if you only connect your full node to hidden service peers, i hear it's a bit better. Once dandelion is ready, broadcasting transactions over TOR will be obsolete. |
Hi, I iam sorry to say that I gnore the meaning of PR. I am using ubuntu to run the fullnode and I would love to hear more about that please. Thank you |
I made a GUI specifically for Ubuntu, but it will probably work on other linux that has grep and wget. I'd need an expert to look at it before I'd recommend anyone broadcast transactions with it, and I'd appreciate if someone could review it. Edited: I don't know Markdown formatting, so it's lines 603-639 of https://github.com/robust-cuttlefish/electrum-personal-server-GUI/blob/master/electrum-personal-server-gui.py https://github.com/robust-cuttlefish/electrum-personal-server-GUI The patch was based on the electrum documentation. |
This is not actually true according to the authors of the dandelion paper (https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-June/016071.html)
There's good discussion on this thread too https://www.reddit.com/r/Bitcoin/comments/6gsy4b/new_bip_called_dandelion_is_a_way_to_protect/ |
My mistake. would it be better to then torify a full node, and use both dandelion and tor? or is electrum over tor better? |
Broadcasting over tor with dandelion deployed would be the best possible way in terms of broadcasting privacy. Torifying a full node is needed only if you want to hide the fact that you're even using bitcoin. |
Now that bitcoin/bitcoin#13152 is merged, can we move forward with broadcasting over Tor? |
Sure why not. Is there something stopping us? |
Well, How should it work exactly? If tor is running, pick a random onion address and broadcast? Or a set of random nodes? |
Just wondering if you're working on this, since it was your issue and PR to have |
I probably won't be working on it for the next few weeks/months, so if you're interested that would be great(!) One way I imagine it working is that if Electrum sends the method There don't have to be exactly 4 connections, I just came up with that number now. The purpose of the multiple connections is to reduce the chances of one node blackholing the transaction. The code has to be able to connect to tor hidden services too. The
These fields are used to tell EPS where to connect to tor. Also the existing The code would have to implement the socks5 proxy protocol and the bitcoin p2p protocol. The old version JoinMarket has some python2 code implementing the p2p network, so that may be useful, although this code connects only to one node at a time and so has the black hole problem. https://github.com/JoinMarket-Org/joinmarket/blob/master/joinmarket/peertopeer.py (Note that this code has a bug where it will crash/go wrong if the newly connected peer doesn't send In later work EPS can be updated to allow connections from more than one wallet at a time, by recoding it to use asyncio or select(). When that happens then creating a whole other thread for tor broadcasting won't be necessary, so therefore it would be nice if any tor broadcasting code is easy to modify to use with asyncio or select() for when that gets added. |
I merged PR #124 (thanks again for that @andrewtoth) and played around with it myself, and edited the code a little bit. We can carry on discussion here since the PR is closed. Occasionally I get a few errors like this which come from the
That happens because the RPC call returns an error. There are 8 active threads yet only 4 error messages appear, so I wonder if the cause is some concurrency issue of 8 threads trying to use the RPC instance all at the same time. I wonder if theres a way to have the debug messages print which thread they're being called from, that might help with reading the debug log around tor broadcasting. I'll work on this more later. |
Yes, it's a concurrency issue. That is why I have a sleep between starting the threads. Perhaps increasing the |
This latest commit dd96954 moves all the I've tested it a bit and I'm fairly happy with how it works. The INFO level logging looks like this:
Transactions to test with can be obtained by using I wonder if its useful to include the thread ID in the debug log messages too. |
Very nice! I see from those logs you managed to broadcast to an ipv6 node... I recall from testing that it wouldn't work for ipv6, so not sure how that worked for you. If there's anything else you need for this let me know I'm happy to help. |
No idea about the ipv6. I didn't change anything around that. |
I've made a new issue (#130) asking people to help test. I've publicized it on all the social media so hopefully we'll get some users trying it out in real life conditions. Edit: https://twitter.com/chris_belcher_/status/1143180966451695617 |
A feature I missed is that EPS could detect whether Tor is already running on the local host and then switch to that automatically. Users should still configure |
For credit and history sake, the above tor-detecting feature was suggested to me by ghost43 in the #electrum IRC channel |
This feature is now in the new release 0.2.0, closing |
Hi, can this please be explained to me. I can just broadcast transaction with electrum when connected to eps? The transaction then goes into my bitcoind node? And then, how do I ensure it mixes with other transactions that are broadcast by my node?
Or basically how do I broadcast a transaction without revealing my ip?
The text was updated successfully, but these errors were encountered: