-
Notifications
You must be signed in to change notification settings - Fork 119
Moving away from IRC as a messaging channel #248
Comments
I may be interested in implementing this one. How would a one-to-many broadcast work in Subspace? Two connections, a standard one for private messages and a shared key for the group channel? Also what about flooding? Centralized systems solve flooding by having privileged users, Bitmessage solves it by making people do proof of work before they can broadcast. Finally there's traversing routers, be it home or Tor. |
I barely know anything about subspace. Can't help you much. |
Now it's quite difficult to find IRC networks that accept tor without too many other conditions. There are networks which require you to register with NickServ, or to have had an account for a number of days. What would be the effects of going on IRC networks with no tor support, as well as going on tor-only networks? It would mean the liquidity would be split up, and market makers who wanted the most coverage would have to run tor all the time. It wouldn't be good to slowly exclude tor users from the fast and big clearnet-only liquidity, and it wouldn't be good to only have tor users joining with each other. We want the widest variety of users with all kind of motivations and circumstances to use JoinMarket. Hopefully simple incentives would solve this, that yield generators want to sell to as many bots as possible so they'll have to get on the tor networks too. |
I really wish Tor was developed primarily as a library, with the actual application being a thin wrapper around the core library. That would make it easier for developers to to build applications that connect to Tor without requiring their users to install and maintain additional pieces of software. That would make "running tor all the time" no more or less complicated than running the maker bot all the time. |
Why don't we use PeX or DHT just like bittorrent clients do? PeX: https://en.wikipedia.org/wiki/Peer_exchange |
So thats a p2p network just like bitcoin itself. |
Other ideas are telegram. Also SIP looks like another widely deployed decentralized communication protocol, if only one can send text messages over it |
I don't know if you saw this or not: https://github.com/equalitie/np1sec. TorMessenger will use it for multiparty comms in the future: https://blog.torproject.org/blog/tor-messenger-beta-chat-over-tor-easily. |
Could something like http://matrix.org/ help? |
i actually overlooked matrix.org when thinking about this issue... it seems quite straightforward to change from IRC to matrix. end-to-end encryption is still in the works, but we could probably start using it without that. |
@riclas has just been telling me about this on IRC and from the sounds of it it could be good. |
I took a quick look, it seems at least worthy of further investigation (matrix.org). One could argue whether it would have a meaningful benefit over private IRC servers (possibly easier to set up, with multiple federated, not sure yet) |
If you were thinking about going for a multi-server irc setup as the next step, this should be much easier to setup as such. |
From what I've read, matrix is one single network that's connected together a little bit like SMTP. So it's already a maximally federated network of servers, unlike IRC which is more of a protocol that has many of its own little islands of IRC instances. The maximally federated network is a good model for being resistant to censorship I think. Better than a pure p2p model where the market makers and relay peers are the same entity, because market makers have a direct incentive not to relay messages from other makers who compete with them. |
Yes, but otoh there's a distinction between the broadcast element of our protocol (basically, the orderbook) and the p2p section; note that we already have a "private" part (in the sense of not using the messagechannel) - the bitcoin transaction broadcast; it would be strictly superior to make the transaction negotiation p2p after peer discovery via the orderbook (one minor example, it would remove snooping concerns like encrypted message length leakage). More importantly I guess is the fact that making that part p2p would remove a scalability bottleneck that we have at the moment (the N-way broadcast of the encoded transaction). Not to overcomplicate things, but I think it's worth considering that distinction. |
Yes so a hybrid option. Matrix or another federated server network for broadcasting offers, p2p for exchanging bitcoin transaction information. OTOH the p2p method involves users having to open ports on their routers. I remember that being difficult and annoying to teach people (although I last wrote software like that more than 5 years ago so maybe things changed) Perhaps only the maker could have open ports (although noobs should be able to user makers too, e.g. patientsendpayment.py) |
A conversation I had with someone from #matrix on freenode. Matrix looks like a good solution with a few small caveats that need to be ironed out. The caveats are that the client might need to trust a server not to censor (depending on whether the client can download the hash-linked-list of messages), otherwise the client can run their own server and be trust-free but that requires the server to be reachable from the outside internet (so cant be behind a NAT)
|
Result of a quick look through setup today: synapse (seems to be a stable implementation using Python): Install as per instructions here seems to work fine here on ubuntu 15.04. The initial config requires a domain name; if you don't have DNS you can just set your IP address (and port forward as required for remote). On IRC they mentioned this is not the intended way, but works for testing. This (setting up a server) is presumably something we won't need to do much, albeit we're obviously interested in running our own homeservers. The install automatically creates an ssl cert and keys. They note there that you can enable registration with a setting in the config yaml file. I did that. Client: this repo seems to fit the bill quite well. Here's a quick run of the snippet client code that seemed to work OK from a remote client:
Once this is setup I can see the messages on localhost at port 8448 (there's a default web client that comes with synapse, a simple chat interface). The valid_cert_check=False - obviously this is no good for non-testing but we'll have to look into how to work with the ssl cert issue if we want our own homeservers. |
Another conversation. I think matrix looks pretty good. Soon I'll write a short post about matrix and it's properties and post it around on bitcointalk and reddit to get ideas and comments from more people interested in the project.
|
I use Matrix daily, FWIW, and may be able to contribute development experience, if not a homeserver itself |
I think I may have come up with a part of a solution to this problem. An issue is that a relaying p2p node may be a maker and can see the message they're relaying. So if they see an offer that is more attractive than theirs, they simply don't relay it. The solution may be to use encryption. When the taker requests the orderbook, they also include an encryption pubkey. Each maker encrypts their offer and only that taker can decrypt it. And maker p2p nodes can't read what the offer is, or even that it's an offer at all. This encrypted packet would be indistinguishable from an encrypted packet between takers and makers when creating a coinjoin, so if a maker p2p node blocks all packets then they might just stop coinjoins happening. |
|
Also how about this: each maker runs a tor HS, and maybe 5-10 volunteers run HS http servers (which we can call seeder servers) which makers can connect to and register their own .onion address on, and those same http servers will hand out the list of .onions to any taker who asks. Takers then connect to the maker's onions over Tor to download their offers and communicate the joinmarket protocol. The onion addresses of the seeder nodes are included by default into JoinMarket (perhaps in the cfg file, or a separate file) This idea requires fidelity bonds for makers, because otherwise the volunteer seeder servers can be easily flooded with spam onions. The seeder servers shouldnt require much bandwidth, the system can tolerate temporary downtimes so they don't need to be too reliable either. So it's easy to imagine that volunteers would run them, perhaps from an always-on raspberry pi in their own home. |
If anyone in that scenario needs a significant fidelity bond, wouldn't that be the operators of directory servers? |
Fidelity bonds are a solution to sybil attacks. Sybil attacks can happen when its cheap to anonymously join a certain group. Directory servers / seeder servers are a very hard group to join, because that would require editing the config file and most users just leave the default unchanged. By contrast makers are an easy group to join (which is desired, as its good for privacy) and so it's possible to sybil attack by running many makers. Fidelity bonds therefore make sense as a way to raise the cost of sybil attacking. Also, each additional maker in the seeder server costs that server extra disk space and bandwidth, so fidelity bonds are useful to rate-limit the adding of new makers. That way it's not easy to exhaust the resources of the seeder servers. |
IRC was only ever intended as a starting point, eventually another messaging channel will be found because ultimately IRC will always been inferior. There are a few ideas for which p2p network to use, the most promising being https://github.com/cpacia/Subspace still in development which is explicitly designed for coinjoin. That will surely allow Tor too.
The JoinMarket codebase allows for easy separation of messaging channel code from the rest. To extend it to use subspace or something else, only a new subclass of MessagingChannel has to be written.
The text was updated successfully, but these errors were encountered: