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 access point 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. They found that BABEL performed best in terms of throughput whilst having the smallest overhead. Therefore, BABEL may have the potential to restore blockchain communication quickly. The contributions of the paper include the following:
We built a real IoT-blockchain system using the private Ethereum blockchain, four Raspberry Pis, and three ad hoc routing protocols. Furthermore, we used the emulator Mininet-WiFi [
16] to construct a bigger system with nine more IoT devices than the real one.
We thoroughly compared the blockchain recovery time of OLSR, BATMAN, and BABEL in static and mobile scenarios.
The evaluation results show that BATMAN achieved the best performance for blockchain recovery in our system—at least 69% and 59.8% better than OLSR and BABEL, respectively.
The remainder of this paper is organized as follows.
Section 2 describes related work.
Section 3 presents the background to IoT-blockchains and ad hoc routing protocols. In
Section 4, we describe the methodology. In
Section 5, the evaluation results are presented. Finally,
Section 6 concludes the paper.
2. Related Work
There is increasing interest in applying blockchain to IoT. In [
17], the authors introduced a repeatable and testable IoT blockchain application platform named PlaTIBART. They showed how PlaTIBART can be used to develop and analyze fault-tolerant IoT blockchain applications. In [
18], the authors first illustrated how a combination of blockchain and IoT can simplify and bring benefits to modern supply chains. They then derived six research propositions and described how blockchain technology affects the scalability, security, information flow, traceability, and interoperability of IoT. The authors of [
19] proposed a blockchain-based decentralized IoT self-counting voting system framework to solve fairness problems in the self-counting voting system, such as adaptability and abortion problems caused by malicious voters. In [
20], the authors focused on introducing blockchain as a decentralized technology into the transportation systems in smart cities. The vehicles can work together without the permission of a central control node. The data transfer between vehicles uses a peer-to-peer network where each node communicates directly with every other node and is verified by its associated endpoint node. Blockchain is also applied in the healthcare IoT. For example, remote patient monitoring technology faces severe privacy and security risks when transmitting data and recording data transactions. The security and privacy issues associated with these medical data may lead to delays in progressing patients’ treatment. To solve this problem, the authors of [
21] proposed the use of blockchain to provide secure management and analysis of medical data. However, blockchain is computationally expensive and requires high bandwidth and additional computing power. Therefore, the authors proposed a new framework for a revised blockchain model suitable for IoT devices.
When researchers have explored the combination of blockchain and IoT, they have paid little attention to the underlying network. Research has been primarily based on the most common underlying networks, such as infrastructure-based networks, which are prone to single point of failure problems. Utilizing an ad hoc network (i.e., using ad hoc routing) for the IoT-blockchain system can prevent this risk. Ad hoc routing protocols have previously been thoroughly investigated. However, they have rarely been studied with the blockchain. In [
22], the authors provided an overview of ad hoc routing protocols that have been proposed in the literature. They presented performance comparison results for all routing protocols. The authors of [
23] investigated and compared the performance of several routing protocols, including AODV, PAODV, CBRP, DSR and DSDV. They simulated various workloads and scenarios and showed that, although CBRP helps to reduce routing request packets, its overhead is higher than DSR due to its periodic hello messages. Compared with DSR and CBRP, AODV had the shortest end-to-end packet delay. PAODV showed a slight improvement over AODV. In [
24], the authors implemented and analysed a testbed considering OLSR and BATMAN’s link quality window size (LQWS) parameters. They evaluated the influence of mobility on a mobile ad hoc network’s throughput. The authors also evaluated the performance of the testbed in terms of throughput, round-trip time (RTT), jitter, and packet loss. They found that TCP throughput improved when LQWS was reduced. In [
25], the authors studied vehicular networks, where MANET routing protocols are typically designed and analyzed with 2-D scenarios. Since there is no guarantee of how these will support a 3-D topology, the authors evaluated and compared MANET routing protocols, including AODV, DSDV, and DSR and location-based routing. They found that topology-based protocols achieved acceptable transmission rates and path expansion performance, while location-based protocols achieved higher data rates. In our work, we choose OLSR, BATMAN, and BABEL because OLSR and BATMAN have been investigated and compared in different scenarios and networks. For example, the authors of [
26] evaluated OLSR and BATMAN when low-power nodes transmitted VoIP data streams. In [
27], the authors assessed the performance of OLSR and BATMAN by moving devices up and down different floors in a school building. As a novel routing protocol of the same type as OLSR and BATMAN, BABEL continues to demonstrate characteristics of some old routing protocols.
Most closely related studies have not researched blockchain communication recovery in the ad hoc IoT-Blockchain system. In [
28], the authors focused on combining IoT and blockchain for smart home applications. However, they only investigated an infrastructure-based network and considered static scenarios. In [
29], combining IoT and blockchain for UAVs in a real deploymentwas investigated and a key management mechanism based on blockchain technology was proposed. Although the authors of [
11] investigated the recovery time in an ad hoc IoT-blockchain system, they only focused on a single ad hoc routing protocol: OLSR. Moreover, the evaluation was conducted on a small-scale network. To highlight the differences between previous studies and ours, we summarize them in
Table 1. An earlier version of this study was published in [
12], which only considered the evaluation of two routing protocols (i.e., OLSR and BATMAN) in a static four-node emulated network. Here, we first extend the assessment with the new routing protocol, BABEL. Second, we deploy IoT-blockchain systems on actual IoT nodes with real blockchain and routing protocols. In addition, we investigate the performance in a larger network size for emulation. Finally, compared to the previous investigation, we also evaluate mobile scenarios that may occur in several IoT-blockchain applications.
6. Conclusions
This study investigates the recovery time of IoT-blockchain systems with infrastructure-less underlying networks that can avoid SPoF. We first create emulated and real IoT-blockchain networks with the private Ethereum blockchain and three ad hoc routing protocols, OLSR, BATMAN, and BABEL. We then extensively evaluate the recovery time of the systems in static and mobile scenarios. The experimental results show that BATMAN has the best ability to recover the blockchain communication in a real IoT-blockchain system. More specifically, it recovers 74.9% faster than OLSR and 59.8% faster than BABEL in the static scenario and 73.9% faster than OLSR and 61.8% faster than BABEL in the mobile one. In the emulated IoT-blockchain system with more nodes, BATMAN still maintains its outstanding features. In the static scenario, BATMAN achieves 69% and 60% faster recovery than OLSR and BABEL, respectively. BABEL, in turn, restores faster than OLSR, which has the second-lowest recovery time. In a bigger network with node mobility, BATMAN outperforms the others and can recover the blockchain in 6.22 s, 5.92 s, and 5.95 s, following the different stages, respectively.