Peer Discovery and Overlay



Summary:

In an email conversation about mapping and analyzing the bitcoin P2P network, Jeremy Spilman questions the recommended practice of returning up to 2500 addresses from 'getaddr'. He wonders whether clients are expected to probe the address space in order to select far-apart peers or how much such a process would even attempt to achieve. The response suggests that it is not necessary to make any specific attempt at connecting to "far-apart" peers since connecting to peers at random helps keep the network structure randomized. There is also a discussion on the importance of being able to discover the entire network of peers fast or slow, and the pros and cons of both. The conversation then moves onto the topic of existing bitcoin node relations and the ease at which peers can be discovered becoming a service in itself or possibly a vulnerability. It is suggested that better knowledge of the network could be a vulnerability as the number of full nodes is small enough for a DoS attack on all of them to be feasible. Another vulnerability is that getaddr data is best effort and there is currently no mechanism to ensure that nodes are operated by separate individuals. Someone could easily set up a relatively small number of nodes that only advertise themselves in the getaddr information and over time, they would get proportionally more incoming connections than is "fair". Finally, the discussion touches upon node addresses being a service wherein the DNS seeds are used to provide this service. Bitcoinj clients heavily depend on these seeds and can be easily compromised in various ways by them.


Updated on: 2023-06-07T22:59:12.400745+00:00