Some questions about XOR

Trying to get my head around the basics of Maidsafe. I’m not good at math, not a programmer, but David is helping in a very good way with this article:

Here are my questions.

  1. In the article it’s said that users connect to 16 nodes. On an ip-level I’m only directly connected to 1 hop, is that right?
  2. If I connect to on of the 4 closest nodes, the data goes through 1 or more hops, and these hops can’t see my request or communication with the other nodes. Is that true?
  3. If so, we can call the hops a sort of Proxies, they only see gibberish data coming in and out? Is that correct?
  4. Are Hops different from other users? Or am I a hop as well when I connect to the network?
  5. The more hops, the slower the data goes from node to node. Is that true?
  6. Why the use of a XOR-network? Are these networks used for other purposes as well? Is it done so the 4 closest nodes don’t know the ip-adresses of the other nodes they’re close to?
  7. As a normal Maidsafe user, how much ip-connections do I have? I know Bitcoin is something like 8.
  8. Is there any difference with XOR used for encryption?

Hope someone can help me out to get some more knowledge about Maidsafe. Really like the idea!

1 Like

Cheer hope this helps.

1: Yes you are right
2: Other nodes will see your anonymous ID but not know where it is (its anonymous and unpublished) but not your IP info.
3: Yes this is more accurate (not completely gibberish, but the point is well made)
4: Yes each id see’s a different network and different hops
5: Yes each hop slows down the data slightly, although we do a passthrough thing where data is transmitted as fast as we can. i.e. in send/ack we send the data then check it want through the chain OK, but send it first.
6: XOR is the basis of Kademlia like DHT’s and provides some nice features like increasing knowledge per hop etc.
7: A client will have 4/8 connections and a vault (farmer) 64 connections (all low resource udp type)
8: It’s the same operation but uses a different feature (the three way rule or triangle property)

Good questions, hope these answer for you.

2 Likes

Thank you so much! In another topic I asked about nodes sniffing data while they try to connect a chunck_request to an ip-adres. Now I finally understand why this would be very hard. The 4 closest nodes don’t have any idea of eachothers ip-adress. The hops prevent that. You need a corrupt node and a corrupt hop which are very close to eachother to do something like that. And even than it would be very hard for as far as I understand.

3 Likes

You are more than welcome, it is hard to explain for sure, I try and fail continually :blush:

1 Like

What I get from the Erick Lavoie video is the fact that the IP-network and the XOR adresses are logically completely disconnected from eachother. So, if we have x-ray view into the SAFE-network, we would see something linke this:

User ip-adress: 22.44.3.55.66.77
User XOR adress: 0xBjkejkBkjejkbJKEB

But how does this node knows which other XOR-adresses are out there? Does it get a list when it connects to an ip-adress? How big is this list? There must be a point where the node learns about other XOR-adresses to calculate it’s distances to them. And what’s the maximum number of steps (from ip-adress to ip-adres) it takes to my closest nodes?

2 Likes

That is right.

The good point of this network is you only need to know a node closer than you and send the message there. Routing helps as it has a routing table organised itself in an xor way (buckets), this way the number of hops should be close to logarithmic (ln of num nodes). So no need to find ip addresses just get close to the address (via the logarithmic hops) and these nodes know the ip address of the target node (and only they do).

3 Likes

Thanx. But how many XOR-adresses do I store in my Routing table when I first connect to teh SAFE-network? I get a list from the ip-adress I first connect to isn’t it?

Yes you connect to 64 nodes as a vault and perhaps 4 or less as a client (testing right now), So a vault first needs acceptance form a close group to connect, then it can get another few nodes.

Bootstrap (I think this is the part you mean) is done like this

1: A user supplied IP:port + (optional public key)
2: A cache files of previously known nodes IP;PORT and public key
3: Hard coded fall back nodes (maidsafe runs these, community should to) again IP:PORT public key

1: Allows a trusted friend in case of masssive network attack by pretty much anyone and users can fall back to trusted friends. It is a pretty good way of getting on in the first place for really paranoid users.

All should have public keys as well as IP:PORT, this means zero messages are not encrypted, even boostrap messages, so no keys passed in a plain connection, hence no man in the middle attacks.

There are options for the future as well, (every node attempts to create a port 5483 (“live” port)). The idea here is nodes can potentially locally discover other SAFE nodes. This port is not a normal use port but can be handy. It will be tcp and udp and will ultimately get rid of the need for cache node lists or hard coded lists and allow tiny SAFE networks to find each other and connect together, like a virus does. This is our Argentina ant approach (super colony). It is a really interesting area to play thought experiments in.

This is all good, but the hard coded nodes are not good, they should hardly ever be used past first connect (which is fine as its like where you download the software), but still a better approach is discovery.

This is one of the areas I spend a lot of time pontificating away from the crowd really. There are a lot of areas like this which will be invisible to users, but really important.

edit tl;dr
You need one nodes IP:PORT to bootstrap, then the correct IP:PORT is sent to you in secured messages and when the recipients decide they will securely connect (a node must meet certain requirements to be connected to anyone, the node ask and may or may not be accepted in many connections, for instance after 1 million nodes the next node to accept request will be after another 11 million nodes connect, but that is where testing is needed to show this as maths is weak at that part and too complex),

5 Likes