4 ms·
Thanks for this. Any idea how to build a simple p2p network though (over the internet not local host) and make it decentralized? That’s the hardest part :p
by kexari 9y ago
Thanks for this. Any idea how to build a simple p2p network though (over the internet not local host) and make it decentralized? That’s the hardest part :p
- zeroxfe 9y agoIt's actually not that hard. Most blockchains use a variation of Gossip, which is quite trivial to implement. On startup, your nodes get a list of seed nodes, recursively ask for peer lists until they can connect to some "max peer count." When they receive transactions (from a client, or a peer), they simply forward them to all other peers (if it's the first time they've seen them.) That's basically it. :-)