Hacker News new | ask | show | jobs
by thelucky41 1869 days ago
Peer-to-peer routing is challenging because you aren't sure where to send your data to reach your peer, even if you know their cryptographic public key and address. It's hard because the network physically is splayed out in a big hub-and-spoke tree. A node might know who it's physical neighbors are, but does not necessarily know much about there locations of any of its peers.

If a router receives a peer-to-peer packet, where should it send this packet? With pinecone, this is answered by looking at a cheatsheet, where each node is assigned a specific virtual neighbor that they are in charge of finding among the physical routing tree. This cheatsheet is generated by connecting neighbors who are ordered by their cryptographic public keys.

As peers find routes to their neighbors, they are also discovering routes to other nodes along the chain, helping speed up the entire process of deciding where to send packets.

2 comments

This is a great explanation. The only missing bit is that the nodes also find routes based on the spanning tree calculated over the network as well as hunting their neighbours on the snake.
Matrix desparately needs a superstabilising server-to-server link establishment and breakup algorithm.
Thanks, very helpful!