7
5
I am researching Bitcoin; what I can't find much information on though is how the P2P network itself operates. For example, BitTorrent uses a DHT protocol that allows for node discovery and calculating distances between nodes etc.
So if a Bitcoin client wants to do a transaction, how does it know which IP address to connect to in order to announce it?
And how does the node that the transaction gets sent to know which other nodes it needs to connect to, and so on?
1Not really a duplicate: the question is mostly about how data moves through the network, not actually about how peers are found (I think). – Pieter Wuille – 2013-05-28T06:35:56.423
1The question is based on the false premise that nodes decide which other nodes to connect to based on what they need to do. That's just not how Bitcoin works. – David Schwartz – 2013-05-28T14:19:19.530