# A Comparison of Blockchain Recovery Time in Static and Mobile IoT-Blockchain Networks
## 1 Introduction  
Blockchain is a distributed database that is based on an encrypted chain block structure, consensus mechanisms, and peer-to-peer communication [1]. Blockchain's characteristics of decentralization, transparency, and immutability have been applied to cryptocurrency [2], mobile communications [3], logistics [4], insurance [5] and in other areas. Recently, there has been increased interest in applying blockchain to the Internet of Things (IoT) [6] since both can support each other. On the one hand, the traditional centralized management approach faces challenges in working effectively in the IoT (e.g., providing security, privacy, etc.). On the other hand, because of its decentralized nature, blockchain provides permanent data preservation and tamper-proof features, which can assist the IoT in solving various security problems. There are several popular blockchain platforms, including Ethereum [7], ConsenSys Quorum [8], IOTA [9], and IBM Blockchain [10]. Among them, Ethereum is open-source and supports smart contracts. Hence, more and more studies have focused on Ethereum to build IoT-blockchain systems. The two most popular types of Ethereum are public blockchain and private blockchain. The public blockchain is open to everyone--users can freely access the blockchain network. The private blockchain is only used within a group or a private organization and only internal personnel can participate. The private Ethereum blockchain is more suitable for building IoT-blockchain systems. Most existing IoT-blockchain systems are constructed on infrastructure-based underlying networks (e.g., Wi-Fi, LTE, LoRA), where a centralized node, such as an accesspoint and a base station, manages the communication between IoT devices. Once the control node collapses, the whole IoT-blockchain system inevitably breaks down (i.e., the single point of failure (SPoF) issue). In addition, the IoT-blockchain system faces another problem when considering mobility--if an IoT device moves out of the coverage of the central control node, it can no longer communicate with any node, making blockchain communication ineffective on the mobile node. These problems motivated us to develop an infrastructure-less network for IoT-blockchain systems. The infrastructure-less network (or ad hoc network) can decentralize the underlying network of the IoT-blockchain system and relax the dependence on the control node [11]. Moreover, when an IoT node moves out of its neighbor's communication range, it can still maintain communication in a multi-hop manner. In such networks, the IoT nodes find the intermediate node and forward the packets using ad hoc routing protocols. In previous work [12], we investigated the blockchain recovery time in a simple, static IoT-Ethereum blockchain system with optimized link state routing (OLSR) and \"better approach to mobile ad hoc network\" (BATMAN) protocols. The promising early results stimulated us to investigate the issue further. Unlike other studies, we investigate here IoT-blockchain systems with Ethereum and ad hoc routing protocols in static and mobile scenarios. We consider a small-scale system with real IoT devices and an emulated one of larger scale. Then, we evaluate the recovery performance of blockchain communication on the IoT-blockchain systems. In addition to OLSR and BATMAN, we investigate one more ad hoc protocol, named BABEL [13]. We choose BABEL first since it has been proposed more recently than OLSR and BATMAN. Moreover, it has several unique features, such as its design based on several older routing protocols (e.g., DSDV, AODV, HSDV), while still providing link cost estimation as with OLSR. In [14], the authors compared these three routing protocols in a mesh network and found that both BATMAN and BABEL outperformed OLSR in terms of multi-hop performance and route rediscovery latency. Moreover, in [15], the authors compared OLSR, BATMAN, and BABEL in several ad hoc networks considering different network parameters.