The smart city is a technological framework that connects the city’s different components to create new opportunities. This connection is possible with the help of the Internet of Things (IoT), which provides a digital personality to physical objects. Some studies have proposed integrating Blockchain technology with IoT in different use cases as access, orchestration, or replicated storage layer. The majority of connected objects’ capacity limitation makes the use of Blockchain inadequate due to its redundancy and its conventional processing-intensive consensus like PoW. This paper addresses these challenges by proposing a NOVEL model of a lightweight Blockchain framework (IoT-SmartChain), with a lightweight consensus and a lightweight structure. The framework architecture presents a role hierarchy of connected objects according to their computational and storage capacity. This organization allows all things to be linked even indirectly via different interfaces and to benefit from the power of high-capacity objects such as Fog and Edge computing nodes. Data is validated and added to the blockchain ledger by running a lightweight consensus called Proof of Random Participation (PoRP), which reduces the blockchain nodes’ high computing power requirement. The TOPIC subscription-based data storage strategy called Assisted Selected Relevant Data in Local Ledger (ASRDLL) reduces the data size of a node’s local ledger and the entire network’s data size. This strategy is assisted by a centralized algorithm that optimizes the overall network size by adjusting the choice of TOPICS. The storage capacity, computational power, and energy consumption have been evaluated by a proof of concept implementation under NodeJS.
The smart city is a technological framework used by the different city stakeholders to achieve different goals such as better governance, improving daily living conditions, optimizing the resources use, or creating new business opportunities. The contributors of the smart city, whether they are technology providers, managers, or researchers, have carried out several designs, standardization, and improvement studies to respond to the challenges of smart city development in terms of scalability, heterogeneity, security, or connectivity [
The main challenges of integrating Blockchain with IoT are:
The consensus algorithm needs large computational capacity, increasing the size of the peer-to-peer blockchain network. With its replication and exponential evolution, the linear structure of the ledger needs large storage capacity, either for a single node or for the whole smart city network. Not all IoT components can participate in the peer-to-peer network to replicate the ledger or the consensus algorithm.
To overcome these problems, several studies have explored the field of lightweight Blockchain structure [
This research work is mainly motivated by the existing problems in IoT at a smart city scale. Indeed, most of the Blockchain techniques focus on lightweight consensus algorithms. Simultaneously, the conventional structure does not follow the scalability at the IoT size, which increases the solution complexity and its size in the network due to the replication aspect in all Blockchain nodes. Although some studies have taken resource consumption optimization to a considerable level, they have put the Blockchain’s trust at risk by the involvement of a decisive central body in the validation of transactions. This work’s main objective is to minimize the complexity and consumption of the existing Blockchain technology to make it suitable for the IoT context while keeping the Blockchain features: decentralization, disintermediation, security, and traceability. This research work focuses on a lightweight Blockchain algorithm and a smaller ledger structure to achieve this goal.
The design of a novel Blockchain framework for the IoT environment in a smart city (IoT-SmartChain) is the major contribution. The following items decline it:
An architecture presents a roles hierarchy of the connected objects according to their computation and storage capacity. This design allows to link all things, even indirectly via different interfaces, and to capitalize on the power of high capacity objects such as Fog and Edge computing nodes. A lightweight consensus called Proof of Random Participation to validate Blockchain data in a random and non-predictive way, without giving control power to a node privileged by its computing capacity or reputation. This way reduces the need to hold large amounts of computational capacity by nodes in the Blockchain network. A data storage strategy based on a TOPIC subscription called Assisted Selected Relevant Data in Local Ledger (ASRDLL) reduces the data size of the node’s local ledger and then the whole network data size. This strategy is assisted by a centralized algorithm that optimizes the global size of the network by adjusting the choice of TOPICS.
The rest of this content paper is organized as follows: Section 2 presents the related works and their summary. Section 3 explains in detail the proposed work of the research. Section 4 presents the simulation framework and performance analysis. Section 5 to conclude the contribution.
In this section, we discuss a review and summary (
Paper | Contribution | Limitation | |
---|---|---|---|
[ |
Designing blockchain integration model with IoT with reduced overhead on IoT devices | Using PoW increases complexity and resource consumption | |
[ |
Maintien du réseau de la Blockchain avec l’incitation à la collaboration et à moindre effort. | Maintaining the Blockchain network with the incentive of collaboration and less effort. | |
[ |
Applying a network flow management strategy | The reduction of block creation iterations impacts the data validation time and the block size | |
[ |
Securing network access and data through Blockchain. | The use of Pow increases complexity and resource consumption | |
[ |
Designing scalable Blockchain by network layers | Using Pow increases complexity and resource consumption |
For the industrial internet of things (IIoT), the author proposes integrating a Blockchain system (LightChain), efficient in resource consumption and suitable for IIoT with limited resources [
A lightweight blockchain model (ELIB) has been proposed for IoT privacy and security [
Blockchain and Fog computing structure has been proposed for the Internet of Everything (IoE) applications [
A scalable, lightweight blockchain (LSB) is proposed for the IoT network [
The present framework has been designed to take advantage of all the Blockchain benefits, whether it is public or permissioned, and to meet the constraints of all connected objects. That said, the Blockchain integrated into our IoT network interconnects the different devices via the most used interface protocols and allows these network devices to participate following their capabilities.
The proposed framework is an IoT network whose components define three logical levels, according to their computational and storage capacities, which we cite, Low Capability Level (LCL), Medium Capability level (MCL), and High Capability level (HCL). In these logical levels, the objects of the network can choose one of these three roles according to their capacities, which we note Perception Activity (PA), Passive Blockchain Activity (PBA), Validation Blockchain Activity (VBA).
Logical levels | LCL | MCL | HCL |
---|---|---|---|
Roles | |||
PA | V | – | – |
PBA | V | V | – |
VBA | V | V | V |
The Perception Activity role is adopted by connected objects whose mission results in a final action at the physical object level. It does not participate at any time in maintaining the Blockchain network. The Passive Blockchain Activity role is adopted by connected objects whose capacity allows authentication to the Blockchain, transaction creation, transaction signature to be submitted to the Blockchain, and optionally the local storage of the ledger. It does not participate in the validation consensus of new blocks. When the connected object has sufficient computational capacity, it can then participate in the validation consensus of the Blockchain, that what defines the role Validation Blockchain Activity. Authentication of nodes in the Blockchain network is performed in the same way as in conventional Blockchain models, via private and public keys. The nodes whose roles are PBA and VBA, are equipped with MQTT, CoAP, and REST type connection interfaces, which positions them as gateways to the objects whose role is PA, in other words, to expose the Blockchain services directly to them. In the context of smart city, the use of Fog and Edge Computing components has been proposed for network traffic reduction. The different levels of the model architecture are presented in
The nodes whose roles are PBA and VBA are composed of the following modules and illustrated in
The proposed framework ensures its objectives through the following processes:
Blockchain nodes apply a lightweight consensus called Proof of Random Participation (PoRP) The storage of data in the local lightweight ledger, which follows the optimization strategy called Assisted Selection Relevant Data in Local Ledger (ASRDLL).
Conventional PoW consensus operates by launching the challenge computation effort by all the Blockchain nodes, followed by the new block creation from the node that first completes the challenge. The cost of validating the new block is accompanied by a waste of energy and time and limits the consensus participation only to machines with very high computational capacity. As an alternative, we propose a new consensus that involves a larger set of machines with a lower computational capacity to validate the new blocks. This participation is performed randomly via an election step of the next validator. The algorithm of this election is not predictable, and all the blockchain nodes participate decisively. The block structure has been modified to add the information of the future validator, as illustrated in
In a Blockchain network (NBC) composed of n nodes (N1, N2, N3, …, Nn) whose role is VBA, and which contains a Ledger composed of m Blocks (B1, B2, B3, …, Bm), with n and m are greater than 1, the validation of the Block Bm+ 1 according to the PoRP consensus is explained by the following steps, and by the
The data storage model in conventional Blockchain is based on replicating all transaction history across all nodes, which gives it the character of robustness against tampering. This way is advantageous in an asset transfer context such as crypto-currency, but in the IoT framework where the use cases are not limited only to monetization but also to other contexts such as data collection, sharing, and processing, a storage optimization strategy is needed. The approach proposed in the IoT-SmartChain framework aims to reduce data storage in the node’s local ledger and also throughout the network. This strategy offers two possible levels of optimization.
The first level is a behavioral solution that lets the node choose whether to store the ledger locally or not, using the Design and Architecture section’s role model.
The second level is a solution based on the subscription to TOPICS (Ti), which lets the nodes choose to store only the data they are interested in. In this way, the data is no longer present in the network in a redundant way proportional to the number of nodes but reproduced at the limit of the usage expressed through the TOPICS. To avoid the worst-case scenario where all nodes subscribe to all TOPICS, which will result in total data redundancy, and under the motivation of optimizing the overall storage size in the whole network, the IoT-SmartChain Framework introduces the Topics Balancer Assistant (TBA), a brick whose mission is to assist nodes in the choice of storage TOPICS, intending to ensure a Reduction Level (RL) of the global storage size in the network concerning a chosen Optimization Objective (OO) and to ensure a minimum of data redundancy in the network.
A new piece of information is added to the transaction structure, called TOPICS, and contains the list of topics defining the context of the transaction creation written in the ledger. A node can then save its interesting context in the configuration module, i.e., the topics to which it wishes to subscribe. When the validator receives a new block containing a set of validated transactions (TRX1, TRX2, TRX3, …, TRXn), each node cleans up the data in this block before adding it to its local chain. According to its configuration topics, the node keeps the complete content of the corresponding transactions and replaces the other transactions’ content with "Filtred data" and keeping only their transaction ids. The transaction id allows the transaction content to be retrieved from other nodes if needed. The logic of the relevant data selection is structured by the
Two main objectives are to be ensured by the TBA. The first one is to keep a minimum of redundancy of the transactions of a given Topic in the network, to maintain the data history availability. The TBA will consider the total number of nodes in the blockchain network (Nb), the number of existing Topics (Nt), and the number of Topics already subscribed by the nodes (NTs). Other parameters can be considered such as the relevance of the topic (TW) or the volume of transactions of a topic compared to all the transactions of the network (TR). The second objective is to ensure that the total storage size of the network remains below the optimization target threshold defined at the beginning. The TBA is consulted each time a node wants to initialize or modify its topic subscription configuration, to get the optimization index (IO) which must be lower than the network optimization objective (OO). The concept of this processing is illustrated by the sequence diagram in
In this way, the IoT-SmartChain framework mainly differs from the conventional Blockchain model in the points listed in
Property | Conventionnal Blockchain | IoT-SmartChain |
---|---|---|
Consensus algorithm | PoW | PoRP |
Block creation speed | Takes from minutes to hours | Takes a few seconds |
Mining time | Slow | Fast |
Block validation | Hash verification | Hash verification |
Chain size | Redundant | Optimized |
The proposed IoT-SmartChain framework has been applied in a case example related to the smart city context. The simulation goal is to federate all smart city components in an IoT system accelerated by a Blockchain layer that brings orchestration, security, and trust. This integration should eventually create new business opportunities between stakeholders. The imagined smart city is composed of ten main entities including University (E1), Transit Company (E2), Railway Station (E3), Public Administration (E4), Sports Center (E5), Fuel Station (E6), Surveillance and Security Company (E7), Manufacturing Plant (E8), Residential Housing Cluster (E9), and Hospital Center (E10). Each entity has a set of IoT sensors (Oi), a node participating in the Blockchain with the VBA role (NODi), and its own information system (the entities’ IS is not covered or instantiated in this simulation). The number of IoT sensors is 49, and they are of two different categories. The first category gathers objects that only serve as state change sensors such as speed (O1), affluence (O2), temperature (O3), liquid level (O4), gas level (O5), weight (O6), and humidity (O7). The second category includes objects with both a sensor capability and a processing capability, such as local video processing (O8), human voice interaction (O9), and scheduling actions of several other connected objects (O10). The objects in this category are considered nodes of Edge Computing.
Entities | IoT Objects | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Sensors | Edge | Fog | |||||||||
O1 | O2 | O3 | O4 | O5 | O6 | O7 | O8 | O9 | O10 | NODi | |
E1 | X | X | X | X | |||||||
E2 | X | X | X | X | X | X | |||||
E3 | X | X | X | X | X | ||||||
E4 | X | X | X | ||||||||
E5 | X | X | X | X | X | X | |||||
E6 | X | X | X | X | X | X | |||||
E7 | X | X | X | X | |||||||
E8 | X | X | X | X | X | X | X | X | X | X | |
E9 | X | X | |||||||||
E10 | X | X | X | X | X | X | X | X |
The simulation was run in two scenarios. The first scenario aims at evaluating the CPU/RAM utilization, the evolution of local storage, and the energy consumption over time. In this experiment, the smart city starts with all nodes and will be running for 3 hours. The sensors have been simulated with Shell scripts that send random messages to the Blockchain at a frequency of 3 messages per minute. The second scenario aims at evaluating the global storage evolution of the network along with the evolution of the number of nodes. Different from the first experiment, this scenario starts with two entities and then activates two new entities every 3 hours until the ten entities of the simulation are completed. The Fog Computing nodes and the TBA were instantiated on t2. micro machines from AWS with the configuration of 1 GB of RAM and 1 CPU. The Edge Computing nodes were instantiated on t2. nano machines of the AWS service with the configuration of 0.5 GB of RAM and 1 CPU. The Blockchain was configured to validate the Block every 2 minutes. We set the network storage optimization objective (OO) to 70%, where 100% corresponds to zero optimization. The IoT-SmartChain framework was developed from scratch with the NodeJS framework, based on the Bitcoin Blockchain model, and using NPM modules including mainly ‘crypto-js’ for the SHA256 algorithm, ‘elliptic’ for the secp256k1 algorithm, ‘coap’ for the CoAP interface, and ‘mqtt’ for the MQTT interface, ‘ws’ for the Peer-to-Peer interface, and ‘systeminformation’ for recording certain evaluation metrics such as CPU and RAM usage.
CPU utilization, storage cost, and energy consumption were evaluated to serve as an analysis of the proposed work. The observed results are compared with the existing models ELIB [
Axis | IoT-SmartChain | BFAN | ELIB | |
---|---|---|---|---|
Objective | Modeling and development of lightweight Blockchain solution for IoT in the smart city | Development of IoT environment security through Blockchain | Design of a lightweight blockchain for the smart home | |
Network levels | Blockchain, Fog, Edge, IoT | Blockchain, Fog, IoT | Blockchain, IoT | |
Consensus algorithm | Lightweight PoRP | PoW | Lightweight consensus by DTM | |
Redundancy | Optimized by ASRDLL | Not optimized | Not optimized | |
Outlines | - Improves scalability |
- The complexity is high |
- Increases energy consumption |
The measured resource consumption is the power and CPU consumption by the network components that participate in the Blockchain Consensus. To facilitate the measurement of energy consumption, a unit weight W is mapped to the approximate value of Watts consumed for a type of processing function, such as arithmetic, hashing, encryption, or network broadcast operations. The unit weight W increases proportionally with the power consumption.
In
The storage cost is defined by the amount of data generated for storage in the blockchain ledger. In our work, we analyze two levels of storage. The first one is the local storage of a Blockchain node, and the second one is the storage of all the Blockchain nodes. For the first level, we compare the size evolution of the local ledger throughout the simulation. For the second level, we compare the storage size evolution in the whole network, with a check at each step of node number increase during the simulation. The comparison is made against the ELIB and BFAN models.
In
In
The average of the results obtained in our experiment for our model and existing works is summarized in
Metrics | IoT-SmartChain | BFAN | ELIB | |
---|---|---|---|---|
Required CPU (%) | 0.7 | 312 | 283 | |
Energy consumption (W) | 119 | 935 | 912 | |
Storage (MB) | Number of blocks | 24 | 61 | 58 |
Number of nodes | 65 | 125 | 115 |
The analysis shows that the model of the proposed work achieves better performance for the evaluated metrics, and it is well suited for the IoT environment at smart city scale. The main aspects of the present work are:
Energy consumption and CPU usage are reduced by implementing lightweight Blockchain consensus, Proof of Random Participation (PoRP), based on the secure participation of all nodes in the validator node election, and thus eliminating the large computational effort and complexity of conventional PoW consensus. Storage capacity is optimized at the node’s local ledger level by TOPICS subscription and at the network-wide level by TOPIC selection assistance that controls the level of data redundancy to not exceed the defined storage optimization target. The requirements for computing.
A In this paper, we proposed a novel lightweight Blockchain framework called IoT-SmartChain for the IoT environment and its resource-constrained objects at the Smart city scale. The proposed model achieves a high level of CPU usage and energy consumption optimization by its lightweight consensus and brings the possibility of data storage cost optimization across the network by TOPICS subscription strategy and data redundancy level checking. The proposed model has been modeled, implemented, evaluated, and verified in a smart city use case. In the future, we plan to improve the TOPICS selection strategy by adopting a machine learning mechanism that can improve these decisions over the life of the smart city and share its knowledge with other smart cities of the same size.