Rosenblattl, J. (2023). Topology discovery within the bitcoin network [Diploma Thesis, Technische Universität Wien]. reposiTUm. https://doi.org/10.34726/hss.2024.87425
Bitcoin is the first decentralised digital currency, which to this day has a significant impact on the body of scientific literature, the global economy and to a certain extent even climate change. The topology of its underlying network is largely hidden; however, knowledge of it could on the one hand provide valuable insights into the state of the system and on the other hand aid in attacks against the network. Previous research on topology inference is either no longer applicable due to countermeasures implemented in the reference client or is otherwise impractical. In this thesis we present a method for finding the degree of a target Bitcoin node as well as the network addresses of a subset of its peers. Our technique exploits the gossip protocol around ADDR messages and consists of (1) connecting monitor nodes to as much of the Bitcoin network as possible, (2) sending ADDR messages containing unique marker addresses to target nodes, (3) recording the recurrence of each marker address at any monitor node, and (4) analysing the recorded samples. We estimate node degrees from the fraction of recurred marker addresses and calculate the probability of connection between two nodes from the delays between sending markers to one and receiving the same markers from the other node. We validated our techniques against simulated traffic data. Our degree estimation method was nearly unbiased and produced errors showing a standard deviation of 1.5 in an idealised model and errors showing a standard deviation of 3.6 in a more realistic one, although in both models the standard deviation of relative errors amounted to only 5 %. Using conservative classifier sensitivities, our connection inference method performed with a precision of 40 % and a recall of 99.8 % in the idealised model and both precision and recall of 56 % in the more realistic one. Using optimal sensitivities at the risk of overfitting, precision and recall come out to be 94 % and 98 % in the former model and 83 % and 47 % in the latter model. These findings suggest that cheap and moderately successful topology inference may be possible in the real Bitcoin network. More research is required to assess the effectiveness of our approach in greater detail. Nonetheless, Bitcoin developers are advised to consider adapting current countermeasures or implementing new ones if they want to ensure that the Bitcoin network topology remains obscured.