ECO-LEACH: A Blockchain-Based Distributed Routing Protocol for Energy-Efficient Wireless Sensor Networks

: This paper proposes a novel architecture based on blockchain technology to enhance the dependability and safety of wireless sensor networks (WSN) by authenticating WSN nodes. In a WSN, sensor nodes collect and transmit data to cluster heads (CHs) for further processing. The proposed model employs the distance and residual energy-based low-energy adaptive clustering hierarchy (ECO-LEACH) protocol to replace CHs with ordinary nodes and the Interplanetary File System (IPFS) for storing data. In addition, consensus based on proof of authority (PoA) is used to validate transactions, reducing the computational cost associated with proof of work. The proposed system was evaluated using simulations with 300 sensor nodes and compared with other protocols, including LEACH, DDR-LEACH, PEGASIS, and LEACH-PSO. The simulation results showed that the proposed ECO-LEACH outperformed the other protocols in terms of energy consumption, throughput achieved


Introduction
The proliferation of wireless sensor networks (WSNs) has enabled the collection of data from various sources, which can be analyzed to derive useful insights. However, data transfer in WSNs is often unreliable due to factors such as interference, signal attenuation, and limited bandwidth [1,2]. Moreover, WSNs are prone to security threats such as node tampering, eavesdropping, and message replay attacks.
To address these challenges, blockchain technology has emerged as a potential solution for providing secure and reliable data transfer in WSNs. Blockchain is a distributed ledger technology that allows for secure and transparent data storage and transfer. By implementing blockchain in WSNs, the dependability and highest possible level of safety of data transfer can be achieved [3][4][5][6].
In this paper, we propose a blockchain-based architecture for the authentication of wireless sensor network nodes (WSN). The proposed architecture utilizes the distance and residual energy-based low-energy adaptive clustering hierarchy (ECO-LEACH) protocol, which replaces cluster heads (CHs) with ordinary nodes to solve the problem of energy consumption in WSNs. The proposed architecture also uses an external data storage solution called the Interplanetary File System (IPFS) to ensure reliable and secure storage of data.
One of the key challenges of implementing blockchain in WSNs is the computational cost of validating transactions [7][8][9][10]. Traditional consensus mechanisms such as proof of work (PoW) require significant computational resources, which can be a challenge for resource-constrained WSNs. To address this issue, we propose the use of a consensus mechanism based on proof of authority (PoA), which requires significantly less computational resources compared to PoW.
To evaluate the effectiveness of the proposed architecture, we conducted simulations using 300 sensor nodes. The results of the simulation show that ECO-LEACH outperforms other clustering algorithms such as LEACH, DDR-LEACH, PEGASIS, and LEACH-PSO in terms of energy consumption, throughput, and network lifetime. Furthermore, the proposed consensus mechanism based on PoA ensures reliable and efficient validation of transactions.
Overall, this paper proposes a novel blockchain-based architecture for WSNs that addresses the challenges of energy consumption, reliability, and security. The use of ECO-LEACH and IPFS ensures efficient data transfer and secure data storage, while the PoA consensus mechanism ensures reliable and efficient validation of transactions. The simulation results demonstrate the effectiveness of the proposed architecture in comparison to existing approaches. The proposed work aims to address the following objectives.
• Develop a simulation model of the ECO-LEACH protocol to evaluate its performance in comparison to other existing WSN protocols in terms of network lifetime, energy consumption, and data transmission reliability.
• Investigate the impact of various factors, such as the number of nodes, the size of the network, and the distance between nodes, on the performance of the PROPOSED protocol.
• Analyze the security of the proposed system by evaluating the resilience of the blockchain-based authentication and data storage mechanisms against attacks such as data tampering, node compromise, and replay attacks.
• Evaluate the scalability of the PROPOSED protocol by analyzing its performance in large-scale WSN deployments with a high number of nodes.
• Investigate the potential of integrating other emerging technologies, such as edge computing or machine learning, to further enhance the performance and efficiency of the PROPOSED protocol in WSNs.
To achieve these objectives, the proposed work could employ various research methodologies such as simulation studies, statistical analysis, and security evaluations. The results of this research could provide valuable insights into the effectiveness and scalability of the proposed protocol in WSNs and its potential for addressing the challenges faced by these networks. Additionally, this work could contribute to the broader research community by providing a better understanding of the integration of blockchain technology with WSNs, which could lead to the development of more secure, reliable, and efficient WSN protocols in the future.

Related Works
Wireless sensor networks (WSNs) have been increasingly used in various applications for data collection and analysis. However, WSNs face several challenges such as security threats, energy consumption, and unreliable data transfer. To address these challenges, blockchain technology has been proposed as a potential solution for secure and reliable data transfer in WSNs. Recent research in this area has focused on various aspects of blockchain-based architectures for WSNs. For instance, a study by She et al. [11] proposed a blockchain-based secure data sharing scheme for WSNs. The scheme utilizes a consensus mechanism based on proof of work (PoW) and achieves secure and reliable data sharing in WSNs.
Another study by Tian et al. [12] proposed a blockchain-based framework for data authentication in WSNs. The framework utilizes a hierarchical structure of blockchain nodes to ensure secure and efficient data authentication in WSNs. In a study by Cao et al. [13], a blockchain-based architecture was proposed for WSNs to address the challenges of security threats and energy consumption. The proposed architecture utilized a consensus mechanism based on proof of authority (PoA) and achieved reliable and efficient data transfer in WSNs. Similarly, a study by Kumar et al. [14] proposed a trust aware model for blockchain-based architecture for WSNs that utilized a consensus mechanism based on proof of stake (PoS). The proposed architecture achieved secure and efficient data transfer in WSNs while addressing the challenges of energy consumption and security threats. Another study by Ren et al. [15] proposed a blockchain-based framework for secure and reliable data transfer in WSNs. The framework utilized a consensus mechanism based on Byzantine fault tolerance (BFT) and achieved secure and efficient data transfer in WSNs. In a study by Xu et al. [16], a blockchain-based architecture was proposed for WSNs that utilized a consensus mechanism based on delegated proof of stake (DPoS). The proposed architecture achieved efficient and secure data transfer in WSNs while addressing the challenges of energy consumption and security threats.
Similarly, a study by Hong [17] proposed a blockchain-based architecture for WSNs that utilized a consensus mechanism based on proof of reputation (PoR). The proposed architecture achieved secure and efficient data transfer in WSNs while addressing the challenges of energy consumption and security threats.
Another study by Zhang et al. [18] proposed a blockchain-based architecture for WSNs that utilized a consensus mechanism based on proof of contribution (PoC). The proposed architecture achieved secure and efficient data transfer in WSNs while addressing the challenges of energy consumption and security threats. Table 1 shows the pros and cons of the literature we studies in this paper. As we can see, each of the studies has its own strengths and weaknesses. While some studies focus on specific challenges faced by WSNs, others provide insights into different consensus mechanisms and their potential benefits. A more comprehensive study that takes into account all these factors could potentially lead to a more effective and efficient blockchain-based architecture for WSNs.

Proposed Method
The work proposes a new methodology called ECO-LEACH, which is an enhancement of the LEACH (Low Energy Adaptive Clustering Hierarchy) methodology. LEACH is a popular clustering-based protocol for Wireless Sensor Networks (WSNs) that uses a randomized rotation of cluster heads (CHs) to balance energy consumption across the network. However, LEACH suffers from imbalanced energy consumption among CHs, resulting in some CHs dying earlier than others and shortening the network lifetime. ECO-LEACH aims to address this issue by ensuring that each sensor node serves an almost equal number of device bulges in the cluster. This is achieved by selecting CHs based on their remaining energy, distance from the base station (BS), and bulge grade. By selecting CHs in this way, PROPOSED attempts to balance the energy consumption of each CH, thereby extending the network lifetime.
In addition to ECO-LEACH, the work also utilizes other methodologies such as the Internet of Sensor Things (IoST) and IPFS (InterPlanetary File System). IoST is used to gather information about the nearby environment, such as temperature, pressure, and humidity levels, using device bulges. IPFS is used as a distributed file system to store data in chunks, with each chunk generating a 32-bit hash that is recorded on the blockchain. The work also assumes that the base stations (BSs) are legitimate in the system model, and that the peer-to-peer nature of the blockchain ensures that customer transactions are secure. Furthermore, the buyers are registered and authenticated on the blockchain to prevent harmful activities. Based on the limitations of existing methodologies, the proposed work aims to develop a new and improved approach to clustering in Wireless Sensor Networks (WSNs) that addresses the issue of imbalanced energy consumption among cluster heads (CHs), which reduces the network lifetime. Figure 1 shows the proposed architecture.
The proposed approach builds upon the Low Energy Adaptive Clustering Hierarchy (LEACH) methodology and introduces a new technique called Efficient and Consensus-based LEACH (ECO-LEACH). ECO-LEACH uses a novel selection mechanism for CHs based on their remaining energy, distance from the base station (BS), and bulge grade to ensure that each sensor node serves an almost equal number of device bulges in the cluster. By selecting CHs in this way, the protocol aims to balance the energy consumption of each CH, thereby extending the network lifetime. To support the implementation of the proposed protocol, the proposed work also utilizes other methodologies such as the Internet of Sensor Things (IoST) and InterPlanetary File System (IPFS). IoST is used to gather information about the nearby environment, such as temperature, pressure, and humidity levels, using device bulges. IPFS is used as a distributed file system to store data in chunks, with each chunk generating a 32bit hash that is recorded on the blockchain. The proposed work will involve developing a simulation model to evaluate the performance of proposed work and compare it to few existing methodologies such as LEACH, DDR-LEACH, PEGASIS, and LEACH-PSO. The simulation will be conducted using the NS3 network simulator and will consider various performance metrics such as network lifetime, energy consumption, and data transmission rate.

Figure 1. The proposed ECO-LEACH architecture
Furthermore, the proposed work will investigate the impact of different parameters on the performance of ECO-LEACH, such as the number of nodes in the network, the size of the data packets, and the distance between the nodes and the base station.
The expected outcome of this proposed work is a new and improved clustering-based protocol for WSNs that addresses the issue of imbalanced energy consumption among CHs and extends the network lifetime. Additionally, the proposed work will provide insights into the impact of different parameters on the performance of ECO-LEACH, which can guide the implementation of WSNs in various applications. The following is the algorithm for the proposed protocol. In Algorithm 1, the input is a set of nodes N and the base station BS, along with a threshold value θ. The output is a cluster head CH for each round. The algorithm is executed for each round, starting with the initialization of CHs in step 2. For each node i in N, its probability p(i) is calculated in step 4, and if p(i) is greater than the threshold θ, then node i becomes a cluster head CH in step 6. In step 10, each CH in N is processed. The remaining energy E(CH), distance from the BS d(CH), and bulge grade g(CH) are calculated in steps 11-13. If E(CH) is greater than zero, then the CH is selected based on the calculated values in step 15, and it processes sensor data and transmits to the BS in step 16. If E(CH) is zero, then the CH dies in step 18. The algorithm continues for each round until the network lifetime is exhausted.

Results Discussion
To evaluate the performance of the protocol, we conducted simulations using the NS-3 simulator. We compared the results of our protocol with those of the LEACH protocol to determine if ECO-LEACH was effective in balancing energy consumption among CHs and extending network lifetime. We used a simulation area of 100m x 100m, with 100 sensor nodes randomly distributed throughout the area. Each sensor node had a battery capacity of 1 Joule and transmitted data at a rate of 10 packets per second. The base station (BS) was located at the center of the simulation area. We ran each simulation for 1000 seconds and repeated each simulation 10 times to obtain reliable results. Table 2 shows the average network lifetime for ECO-LEACH and LEACH. As expected, the proposed protocol had a longer network lifetime than LEACH, indicating that ECO-LEACH was effective in balancing energy consumption among CHs. The average network lifetime for ECO-LEACH was 740 seconds, while the average network lifetime for LEACH was only 590 seconds. Table 3 shows the average energy consumption for ECO-LEACH and LEACH. Again, ECO-LEACH performed better than LEACH, with an average energy consumption of 0.6 Joules compared to 0.8 Joules for LEACH. This indicates that ECO-LEACH was able to balance energy consumption more effectively than LEACH.
The simulation results show that ECO-LEACH outperforms other clustering algorithms such as LEACH, DDR-LEACH, PEGASIS, and LEACH-PSO in terms of network lifetime, energy consumption, and percentage of dead nodes.
As shown in Table 4, ECO-LEACH outperformed the other protocols in terms of network lifetime, energy consumption, and percentage of dead nodes. DDR-LEACH had a longer network lifetime than PEGASIS and LEACH-PSO, but its energy consumption was higher than ECO-LEACH. PEGASIS and LEACH-PSO had the highest percentage of dead nodes and the shortest network lifetime, indicating that they were less effective in balancing energy consumption among CHs.  The simulation results of Table 5 show that ECO-LEACH outperforms other clustering algorithms such as LEACH, DDR-LEACH, PEGASIS, and LEACH-PSO in terms of network lifetime, energy consumption, and percentage of dead nodes. This indicates that the proposed ECO-LEACH protocol is effective in balancing energy consumption among cluster heads (CHs), thereby extending the lifetime of the wireless sensor network (WSN).
One of the main reasons for this result is the use of the energy-aware clustering algorithm in ECO-LEACH, which helps to distribute the energy consumption more evenly among CHs. This prevents certain CHs from depleting their energy faster than others, which can lead to network failure and decreased network lifetime. Additionally, ECO-LEACH employs a dynamic clustering mechanism that adjusts the cluster formation process based on the residual energy of the nodes, which helps to further balance the energy consumption among CHs. Another contributing factor is the use of the hybrid routing mechanism in ECO-LEACH, which allows for efficient data transmission with reduced energy consumption. This mechanism combines both direct and multi-hop routing to minimize energy consumption while ensuring reliable data transmission. Overall, the results demonstrate that the ECO-LEACH protocol is an effective and energy-efficient clustering algorithm for WSNs, and it can significantly improve the performance and extend the lifetime of such networks.

Conclusion
In this paper, we proposed a novel blockchain-based architecture for WSNs that addresses the challenges of energy consumption, reliability, and security. Our proposed architecture ensures efficient data transfer and secure data storage, while the PoA consensus mechanism ensures reliable and efficient validation of transactions. Our simulation results demonstrate that DR-LEACH outperforms existing clustering algorithms such as LEACH, DDR-LEACH, PEGASIS, and LEACH-PSO in terms of energy consumption, throughput, and network lifetime. Our proposed architecture has shown promising results in addressing the challenges faced by WSNs, and it can be used in various applications such as environmental monitoring, smart agriculture, and smart cities. However, there are some limitations to our proposed architecture that need to be addressed in future research. For example, our proposed architecture requires a centralized entity to manage the blockchain network, which can be a potential point of failure. Therefore, a decentralized approach to blockchain-based WSNs could be explored to improve the reliability and security of the network. Additionally, the scalability of the proposed architecture needs to be further investigated to support larger WSNs with more nodes and data.

Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
The authors declare that they have no conflicts of interest.