A libP2P Implementation of the Bitcoin Block Exchange Protocol

The progressive decentralization of web services brought a need for new instruments to support the development of P2P protocols and applications. The only tools available are network or event simulators, which help the development in artificial or extremely controlled environments. They usually provide low-level support with completely unstructured networks. LibP2P is a library that tries to solve all such problems, letting the users easily deploy nodes on the Internet. It also comes with a set of functionalities, to solve the most important problems of P2P networks, such as NAT traversal, peer and content discovery and routing, and much more. In this paper, we employ LibP2P to implement min-bitcoin, a minimal version of the protocol used by the Bitcoin network to exchange the blocks. We evaluate our implementation to assess the applicability of LibP2P in a real-life blockchain scenario. The evaluation uncovers that setting up communication channels is time-consuming, but data transfers are fast. Additionally, LibP2P efficiently manages cases in which nodes are behind a NAT, under VPN, or in geographically distant places.

[1]  Mansoor Ebrahim,et al.  Peer-to-Peer Network Simulators: an Analytical Review , 2014, ArXiv.

[2]  Kevin R. Fall,et al.  The NS Manual (Formerly NS Notes and Documentation , 2002 .

[3]  Kevin Koidl,et al.  A multilayer social overlay for new generation DOSNs , 2019, GOODTECHS.

[4]  Yang Zhang,et al.  NDP2PSim: A NS2-Based Platform for Peer-to-Peer Network Simulations , 2005, ISPA Workshops.

[5]  Laura Ricci,et al.  HELIOS CJ App: The decentralization of the Citizen Journalism , 2021, GoodIT.

[6]  Klaus Wehrle,et al.  Modeling and Tools for Network Simulation , 2010, Modeling and Tools for Network Simulation.

[7]  Pedro Garcia-Lopez,et al.  PlanetSim: An extensible simulation tool for peer-to-peer networks and services , 2009, 2009 IEEE Ninth International Conference on Peer-to-Peer Computing.

[8]  David Dias,et al.  The InterPlanetary File System and the Filecoin Network , 2020, 2020 50th Annual IEEE-IFIP International Conference on Dependable Systems and Networks-Supplemental Volume (DSN-S).

[9]  Kevin Koidl,et al.  The Contextual Ego Network P2P Overlay for the Next Generation Social Networks , 2020, Mob. Networks Appl..

[10]  Laura Ricci,et al.  Data Persistence in Decentralized Social Applications: The IPFS approach , 2021, 2021 IEEE 18th Annual Consumer Communications & Networking Conference (CCNC).

[11]  S. Krause,et al.  OverSim: A Flexible Overlay Network Simulation Framework , 2007, 2007 IEEE Global Internet Symposium.

[12]  Márk Jelasity,et al.  PeerSim: A scalable P2P simulator , 2009, 2009 IEEE Ninth International Conference on Peer-to-Peer Computing.