# Decentralizing Private Blockchain-IoT Network with OLSR
###### Abstract  
With data transparency and immutability, the blockchain can provide trustless and decentralized services for Internet of Things (IoT) applications. However, most blockchain-IoT networks, especially those with a private blockchain, are built on top of an infrastructure-based wireless network (i.e., using Wi-Fi access points or cellular base stations). Hence, they are still under the risk of Single-Point-of-Failure (SPoF) on the network layer, hindering the decentralization merit, for example, when the access points or base stations get failures. This paper presents an Optimized Link State Routing (OLSR) protocol-based solution for that issue in a private blockchain-IoT application. By decentralizing the underlying network with OLSR, the private blockchain network can avoid SPoF and automatically recover after a failure. Single blockchain connections can be extended to multiple ad hoc hops. Services over blockchain become flexible to fit various IoT scenarios. We show the effectiveness of our solution by constructing a private Ethereum blockchain network running on IoT devices (i.e., Raspberry Pi model 4) with environmental data sensing (i.e., Particular Matter (PM)). The IoT devices use OLSR to form an ad hoc network. The environment data are collected and propagated in transactions to a pre-loaded smart contract periodically. We then evaluate the IoT blockchain network's recovery time when facing a link error. The evaluation results show that OLSR can automatically recover after the failure. We also evaluate the transaction-oriented latency and block-oriented latency, which indicates the blocks have a high transmission quality, while transactions are transferred individually. blockchain; IoT; ad hoc; OLSR; decentralization; recovery +
Footnote †: journal:  
or Proof of Authority (PoA)). After that, a complete copy of historical blocks is shared among all participating nodes. Ultimately, IoT devices communicate and cooperate over the Ethereum blockchain platform without a centralized authority. For example, the smart home in [9] uses Ethereum in a home-area IoT devices management system. In [10], the authors proposed an Ethereum-based smart edge contract, which is a computational power trading system for edge computing. However, although not discussed in detail, most of the previous blockchain-IoT systems normally run on a wireless infrastructure network using Wi-Fi [11], cellular [12], LoRa [13], or other wireless technologies. As a result, all IoT devices in a particular area utilize blockchain services over wireless communication through a centralized node, such as Wi-Fi access points or cellular base stations. Moreover, in the previous works, the blockchains are carried out to assume that the underlying infrastructure-based transmission is reliable. The assumption may not hold since the IoT network infrastructure is vulnerable and at high risks of failure [14]. Most likely, the blockchain with all decentralization merit in the application layer still incurs the Single Point of Failure (SPoF) at the network level, bringing the whole blockchain-IoT system disfunction. Therefore, it is necessary to improve the underlying network of blockchain-IoT to avoid SPoF. The ad hoc routing protocols show a lot of potential to bypass the issue. The nodes with ad hoc routing can flexibly communicate with others to form a network, enhancing resilience compared to the infrastructure ones. This work proposes and implements a decentralized private blockchain-IoT system over an ad hoc network [15] with the Optimized Link State Routing (OLSR) protocol [16]. With OLSR, IoT devices in the blockchain application can directly communicate with others without wireless infrastructures. In other words, the blockchain-IoT systems thoroughly perform in a decentralized method in the application and network layers. We show the effectiveness of our proposal in an environmental monitoring application with four Raspberry Pi model 4 (RPi4) nodes as IoT devices and a PM sensor.