circle-wifiPeer Discovery & Connection

Peers must have a way to connect to multiple peers. How peers connect to join the subnet is the only required understanding because once peers have joined, they will automatically discover one another because of the distributed hash table (DHT) as peers come and go.

Connecting

Peers (or nodes) connect to the AI network through bootnodes. Bootnodes are peers whose only use case is to be a permanent peer for other peers to connect to the network.

All peers, including bootnode peers, run a proof-of-stake mechanism. This means that only subnet stakeholder participants can join the subnet. Further, all communication from then on also serves as proof of stake.

Peer Discovery

circle-info

All peer discovery logic is handled by the ServerBase. This is what the subnet's application logic is built on top of. Therefore, peer discovery is handled by the template itself.

Peers discover one another using a DHT (distributed hash table), which is a distributed system that provides a lookup service similar to a hash table. In short, it uses math and logic to trustlessly connect peers around the world, rather than relying on a central database, API, or trusted node.

Last updated