# Efficient Load Balancing for Blockchain-Based Healthcare System in Smart Cities
## 1 Introduction
A consortium blockchain is a permissioned blockchain technology and is governed by a group of organizations rather than a single entity. A consortium blockchain is more decentralized  
Figure 1: The structure of blockchain blocks. as compared to a private blockchain, resulting in a higher level of security. The healthcare systems can use the consortium blockchain to store and transfer data of the patients among different hospitals. The evolution of wireless body area networks since the last decade has increased the delivery of patient data to health physicians in smart cities. Critical patients require emergency treatment, and their health parameters data are required to be transmitted to healthcare systems for immediate medical action. In addition, the vulnerability in wireless communication causes erroneous data delivery, which results in serious cybersecurity challenges. For proper data delivery and to avoid misleading information, a blockchain-based mechanism is proposed that allows only legitimate patients' data to be forwarded to medical advisors for timely decisions to avoid any causalities. Blockchain supports the recording and tracking of resources. In a blockchain, a valid data block is generated by a mining computing node. The mining node computes a unique number called nonce against each SHA-256-based valid hash value for each data block. The fog computing node in smart cities acting as a mining node provides trustfulness of the data. Moreover, due to its proximity to patients' data, it provides quick data delivery to its mining node. However, computing a nonce for hashing key within a specific range consumes heavy computation and may result in delays that are not required in transferring sensitive patient data in healthcare systems. To efficiently compute the nonce, special mining nodes with high computing capacity can be installed in the network. A major challenge in such a blockchain system is to design efficient algorithms for offloading the nonce computing tasks to the mining nodes. The offloading algorithms should not overburden a particular mining node. Thus, load balancing among the mining nodes must be ensured. In this work, an efficient algorithm for offloading nonce computing tasks for a data block of delay sensitive patients' data for smart cities healthcare system \((DSP_{SHS})\) is proposed. \(DSP_{SHS}\) offers a load balancing mechanism along with two algorithms, one for the load balancing node to efficiently distribute the data blocks to mining nodes and the second for the mining nodes to prioritize the nonce computation task for high-priority patients. The major features of \(DSP_{SHS}\) are described as follows:  
1. The proposed scheme reduces the delay in nonce computation tasks by offering a load balancing mechanism and thus computes more nonce calculation tasks in a specific time. This is achieved by optimally distributing the data blocks to different mining nodes to compute their respective SHA-256-based hash values. 2. \(DSP_{SHS}\) proposes an algorithm for the load balancer to optimally distribute the nonce requesting data blocks on different mining nodes. 3. \(DSP_{SHS}\) proposes another algorithm for mining nodes to prioritize the highest-priority patient data blocks over comparatively low-priority data blocks. The rest of the paper is organized as follows: Section 2 describes the previous research work in the blockchain and smart cities. The system model and our proposed scheme are discussed in Sections 3 and 4, respectively. Comparative analysis with the simulation results is discussed in Section 5. Section 6 concludes the manuscript.