Blockchain technologies have been emerging with the potential to disrupt many fields (e.g., cryptocurrencies replacing the traditional ones, enabling trustworthy voting, etc.). The Internet of Things (IoT) has been predictably strengthened when integrating to the private blockchain, such as Ethereum. In an IoT deployment with private Ethereum, a thorough understanding of the latency is a critical issue that has not been adequately understood in the literature. Motivated by that, this work aims to comprehend the latency performance in the IoT Ethereum with two popular consensus algorithms: Proof of Work (PoW) and Proof of Authority (PoA). Initially, we clarify different latency segments from transaction submission to execution, namely, the transaction lifecycle in a private blockchain. We then consider the three related latency metrics: 1) transaction-oriented latency; 2) mining time; and 3) block-oriented latency in the PoW case. With PoA, the mining time’s consideration is omitted since the mining process is not necessary. After that, we construct a realistic private Ethereum IoT network (i.e., using a laptop and seven Raspberry Pi 3b+ nodes) and a large-scale emulated one with 30 nodes. We write and deploy a smart contract to read and write data to the blockchain and measure the latencies in various scenarios. The measurement results reveal the values of transaction-oriented and block-oriented latency with PoW and PoA in both the actual and emulated networks. Moreover, we derive the expected value for the PoW’s mining time by fitting the probabilities to an exponential curve.
12 May 2021 in Peer-to-Peer Networking and Applications
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.