-
Notifications
You must be signed in to change notification settings - Fork 252
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
A couple of questions about the protocol #500
Comments
|
im also new to this...
Nah, that one certainty not. Maybe the pubkey of the node (that then is used for the encryption) (but im just guessing).
Yes, that's the main use case for the DHT.
I think this is only used to built/organize the tree then the tree is used for the actual routing.
I think this is how it's done. + if there's a direct peer on that path that has a shorter path to the destination then it takes that shortcut. What are the consequences of the root node going offline? Does it involve re-organization of the whole network to a new root? Does it make the whole network vulnerable to a DDoS on the root node? |
|
Good questions, let me see if I can provide some clarification:
It's actually the highest ID, but that's otherwise the right idea. A node doesn't need to store the whole tree. At the tree level (in
There's no bandwidth measurement happening to build the tree. It's based on latency, and then bandwidth comes in when we make forwarding decision later (question 4). But that's otherwise basically the right idea: the root sends a beacon to each peer letting them know that the root is still alive and what the path from the root to them is. The peers update their own local state with that info and then forward this message to each of their peers, and in each case they append a little info about how to get from themself to that peer, so now the next generation of nodes has a path from the root to their parent and then to themself, and this keep going until the whole network gets an update from each of their peers.
That's pretty much right. Without going into too much detail about how things are implemented internally, the DHT basically lets you look up an IPv6 address and get back 2 things: a public key and "coords". Your node then checks that the public key matches the IPv6 address (the address is a specially truncated sha512sum of the public key), and the are a path from the root to that destination node (encoded in the format the network uses to forward packets).
So you're very close. The coords are a vector of next-hop info from the root to the destination. Coords that look like In the real world, we can find shortcuts. In the above example, lets suppose that You'll note that I said if "the network isn't congested" -- when a packet arrives at The intent with load balancing as we forward is that, when traffic is low, things tend to follow the lowest hop count (often lowest latency) path available, and then tend to settle onto higher latency (or at least higher hop count) but higher bandwidth paths for large downloads.
Each node independently selects the root as "the best node that's sent a new announcement out recently". If the root is idle for too long (1 minute), then everyone tries to make themself the root instead, and the next best node wins (almost immediately). But yes, a malicious node could do things like repeatedly connect and disconnect to "flap" the network, or use the same key on two different (and disconnected) nodes to confuse the network. In that 2nd case, I'm pretty sure they'd just split the network in 2, with nodes joining whichever one has a closer root, although there'd be some weirdness for nodes at the boundary between trees. The intent is that, if the root is unreliable (either because they're evil or they're just malfunctioning), then there are at least 2 obvious fixes:
|
|
Closing this due to inactivity. |
Hi there!
I learned about the Yggdrasil project only recently (I've used cjdns, Zeronet, I2P in the past). I've tried it out, and it works very well — if someone's interested, I get sub-200 ms latency for most sites and highest bandwidth I've seen was ~30 Mbits/s, which is very good in my eyes.
So, right now I'm trying to learn a bit more about its architecture and how it actually works. I've read the whitepaper, some old Readme and a couple of articles on other websites, and while they provided me with a good initial overview, some things remain unclear to me:
privatepublic keys — and it's also used to look up node's network coordinates... is this correct or not?Assuming that I got the above parts right, node's network coordinates are essentially a N-length vector of bandwidth measurements directed towards the root node - how is this information useful for routing? Or does the forwarding follow the tree topology, sending traffic first to the nearest common ancestor and then back down?
Thanks in advance for your patience, I know that such stuff is a pain to explain.
The text was updated successfully, but these errors were encountered: