Abstract
Blockchain has attracted tremendous attention in recent years due to its significant features including anonymity, security, immutability, and audibility. Blockchain technology has been used in several nonmonetary applications, including Internet-of-Things. Though blockchain has limited resources, and scalability is computationally expensive, resulting in delays and large bandwidth overhead that are unsuitable for many IoT devices. In this paper, we work on a lightweight blockchain approach that is suited for IoT needs and provides end-to-end security. Decentralization is achieved in our lightweight blockchain implementation by building a network with a lot of high-resource devices collaborate to maintain the blockchain. The nodes in the network is arranged in sorted order w.r.t execution time and count to reduce the mining overheads and is accountable for handling the public blockchain. We propose a distributed execution time-based consensus algorithm that decreases the delay and overhead of the mining process. We also propose a randomized node-selection algorithm for the selection of nodes to verify the mined blocks to eliminate the double-spend and 51% attack. The results are encouraging and significantly reduce the mining overhead and keep a check on the double-spending problem and 51% attack.
Introduction
In the last few years, Internet-of-Things (IoT), edge computing, cloud, mobile computing, and many innovative technologies have grown fast, various types of resource-constrained smart IoT sensors have entered people’s daily lives. Despite their limited resource capabilities, these IoT devices can easily execute a variety of functions through a corporation, communication with remote and edge servers, data sharing [1]. Though, as these resource-constrained devices function in a mutual distrust environment, they are unable to completely collaborate, resulting in a significant reduction in their job efficiency. In the application developments of limited-resource devices outlined above, blockchain [2] can effectively solve privacy and security problems. However, they are unable to meet the expense of the blockchain consensus mechanism and ledger storage due to the limited computational power, storage, and bandwidth resources. As a result, a lightweight blockchain for resource-constrained devices is developed, as well as many researchers research and examine how to reduce the computational load of the blockchain consensus algorithms.
Several consensus mechanisms, like as Proof-of-Work (PoW), Proof-of-elapsed time (PoET), Directed Acyclic Graph (DAG), Proof-of-Stake (PoS), and Practical Byzantine Fault Tolerance (PBFT) are used in blockchain. In this paper, we use the PoW consensus algorithm when creating a lightweight blockchain. The objective for this is because PoW is the most secured consensus algorithm, as proved by the Bitcoin system [3] for years. DaG-based blockchain is prone to double-spend attacks [4]; PBFT has low scalability and latency [5]; PoS is impacted by the Mathew effect, which causes the affluent to get richer phenomenon [6], and spam and denial-of-service attacks are a threat [7]. In the blockchain, the PoW consensus process requires participants (miners) to compete with one another to solve cryptographic puzzles, which are difficult to solve but simple to validate. The winner will receive a reward from the blockchain platform as well as get the permission to create a new block (the process is termed mining). However, PoW uses too much computational power, preventing IoT devices from directly linking the structure of the blockchain.
One of the most important properties of the blockchain platform is security. A more secure blockchain network will attract more IoT devices to join, increasing the number of transactions. Each transaction on the blockchain network is charged a certain transaction fee. As a result, the blockchain network’s security is intimately connected to its benefits. The more secure the platform is, the more benefits it receives. The security of a blockchain with a PoW consensus process is entirely defined by the network’s overall computing power. Bitcoin is a technique that eliminates the requirement for a trusted third party, instead of relying on the concept of PoW, which allows users to make payment by digitally signing transactions with hashes via distributed time-stamping services. Due to the reason that electronic data can be replicated and Bitcoin without a trusted third party that can verify if a digital coin has been spent, false transactions with users spending the same money at least twice are possible. Double-spend attacks are the term for these fraudulent schemes that have already occurred on the Bitcoin network. Chenhao Xu et al. [8] proposed a novel bidirectional-linked blockchain using chameleon hash function for IoT payment systems and also reduces long-range attacks, ellipse attacks and double spend while ensuring security and scalability. A comprehensive reviw on the countermeasures of both selfish mining and double-spend attack on a blockchain are showed [9]. In this paper authors explained the several strength and weaknesses of the different countermeasures and to be able to enhance blockchain to make it a robust network that will benefit the blockachain community.
Summary of Key Contributions
We propose a distributed execution time-based node selection consensus algorithm that is reasonable to lessen the number of operations performed per node. We will decrease the average number of mining operations per node to use computing power and energy consumption efficiently. The number of operations required to calculate nonce and hashes is known as the mining operations. The propose randomized node-selection algorithm is used for the selection of more than 51% node to verify the mined blocks, to eliminate the double-spend attack and 51% attack.
This paper is organized as follows: Section 2 outlines and summarizes the previous research and backgrounds. In Section 3 describe the proposed method and its working process. Section 4 evaluates its performance and analysis the solution of attacks, and Section 5 summarizes the conclusion.
Related work
Recently, there are a large number of research works that focus on lightweight blockchain. Hassan et al. [10] introduced blockchain integration in a smart energy system; their work will help with the development of adaptable blockchain platforms for smart energy systems. Xu et al. [11] present a blockchain-based fair non-repudiation network computing service provisioning strategy for the Internet-of-Things, in which the blockchain serves as a service publication proxy as well as an evidence recorder. The huge data generated by IoT applications can be kept on remote servers using network storage technologies, and ensuring data security and integrity is a major concern. Some research work discusses the challenge of blockchain technology. The authors of [12] described a blockchain-based deduplicate data auditing technique for network storage services. Their method could consider the security concerns of network storage services while also improving the system scalability.
Yu-Jia Chen et al. [13] proposed a stochastic blockchain-based data checking schema to defend data integrity in IoT. Also introduced is a lightweight mining mechanism, allowing only IoT edge nodes to compete for block generation, then sharing the block with other nodes. For improved security and enhanced performance J. Guruprakash et al. [14] used EC-EIGamal and Genetic mechanism-based key for SHA-384. In this paper author focused on improving transaction flow, encryption transaction transmission, hash rate, hash quality, block validation, and storage cost to improve performance and security. Sujit Biswas [15] proposed a lightweight consensus algorithm that is Proof-of-Block and Trade that decreases the computational time required by peers, less memory required at IoT nodes, reduces the amount of bandwidth required at the critical points of the network, and also allows for increased transaction rates for IoT devices with limited resources.
Ehara et al. [16] presented a transparent random number generation scheme using blockhain. But the drawback of this work is the performance and scalabilty of the proposed scheme. Jingyu Feng et al. [17] proposed a proof-of-Negation (PoN) consensus protocol in blockchain network. Random honest miners selection, parallel multi-blocks creation and distributed blocks storage are the main contribution of PoN. Thanh Nguyen-Ven et al. [18] proposed a generation of verifiable random numbers based on homomorphic encryption that generates immutable and impredictable random numbers with public access. Mingxiao Du et al. [19] proposed a blockchain-based random number generation algorithm that can provide a “true random number”. Riaan Bezuidenhout et al. [20] proposed a Proof-of-Publicly Verifiable Randomness (PoPVR) consensus algorithm for permissionless blockchain. In this paper the propsed consensus is a theoretical model and it requires more research to establish practical applicability. Table 1 shows the summary of this section that are based on the proposed methods and simulation environments for generating random sequences.
Relative comparison of the related work
Relative comparison of the related work
Double-spending, selfish mining, 51% attack, Sybil attack, blockchain forks, block withholding, and DoS attacks are all well-known attacks against blockchains. In this section, we look at some of the current research work on these threats and the security of blockchains [21].
A double-spending attack was detailed for the first time in Nakamotos’s well-known paper [3] where he also derived expressions for attack probability (which were not entirely accurate). A double-spend attack is as follows:
The attacker X is looking for a service/product from Y. X creates two transactions, one for Y and another for himself, both of the transactions use the same input. X broadcasts the “X to Y” payment and starts mining a block holding “X to X” payment in secret. It continues to add blocks once the later mining activity is succeeded. Y provides the product/service to X because the payment has been confirmed or Y has not waited long enough. The attacker X nodes broadcast blocks in the new chain and every nodes in the network agree that they are the valid chain as the chain is longer than the existing valid chain. Y provided the service to X without getting any payment. Since Y cannot find X because it has left or is anonymous.
The steps of a successful double-spend attack are depicted in Fig. 1. Step (i) displays the blockchain’s initial state. In step (ii), honest nodes add genuine blocks to the valid chain, while the attacker mines a fraudulent branch in the background secretly. The attacker succeeds in making the fraudulent chain longer than the honest chain in step (iii). Lastly, a branch of the attacker is broadcasted in step (iv) and is now regarded as valid.
“Now the question is which branch should be considered while mining the next block? The selection is made based on the “longest chain rule”. Nakamoto [3] showed that the higher computitional power used, the higher probability to make a double spend attack successful. Likewise a double spend attack is assured to succeed if the attacker uses more computational power than the network does. Such attacks are called the 51% attack.
Double-spend attack.
The most well-known is the 51% attack, which assumes that a cluster of miners controls more than 51% of the network’s computing load or mining hash rate. The attackers withhold confirmations of new transactions, preventing between merchants and users from making payments. Attackers are faster than honest miners at completing Proof-of-Work. As an outcome, their transactions will be added to the main chain. The quicker attacks occur in blockchain, the more mining hash rate they own. When attackers hold more than 51% of the network’s mining hash rate or computational power, they can use a 51% attack to reverse transactions.
Many researchers apply a variety of methodologies, mainly mathematical methods, to examine the impact attacks have on blockchain security. Heilman et al., for example, used a mathematical process to examine the effect of an eclipse attack in depth [22]. He also used a similar process to implement an attack and identify a Bitcoin double-spending [23]. They observed that any attack will have a variety of effects on the pools’ revenues, and may even cause a stroke in the entire network’s ecosystem. As a result, our network-harmless method is required so that adopters can maximize their benefits without causing the system to fail. Selfish mining is a type of attack in which miners choose not to broadcast their block after it has been computed to mine subsequent blocks and receive a higher reward. Eyal et al. [24], Heilman et al. [25] have both addressed the issue of selfish mining.
Proposed work
In this paper, we propose a lightweight blockchain approach to solve double-spend and 51% attacks on PoW. In section II we discussed that the consensus algorithm’s Proof-of-Work can affect blockchain network performance due to the complexity and high computational load in the block mining process. However, resource-constrained devices have limited resources such as small memory, low area, and less computing load and hence are affected due to the highly complex PoW mechanism of the consensus algorithm. We also discussed in section II about the double-spend attack.
For the blockchain network, security is one of the most important concerns. In this paper, we propose two algorithms
In a traditional blockchain, all the nodes in the network will participate in the mining and verification process. It causes significant computation and transmission overhead. So, in the proposed work, not all the nodes will be involved in the mining process. We select a miner node and generate a random sequence of a node for the verification process. Figure 2 shows the working of the proposed architecture.
Flow diagram of the proposed architecture.
Mining a block
In the mining process, a block performs two steps: mining table and consensus algorithm. Mining table are maintained by all the mining nodes in the network. By using the mining table, miner node is selected, broadcasted in the network, and then the miner node mine the block using the PoW consensus algorithm. In algorithm 1 source node create a mining table that consists of three parameters that are node_id, execution time, and count. The steps and output of the mining table are shown in section IV. Miner node is selected with minimum count and execution time and then the node is broadcasted in the network for the mining process. The selected miner node validated the transaction using the PoW consensus algorithm and after mining the block, the mining table is updated by increasing the count value.
Mining table.
Mining table
The mining table contains three parameters:
Node_id: Node number Execution time: Processing time of mining the block Count: Number of mining operations performed by each node
As shown in Fig. 3, a table is sorted according to count and execution time. In this table, N3 has minimum count and execution time, therefore N3 is selected as a miner node to mine the block. After mining the block its count is increased by 1. Then the table is sorted w.r.t count and execution time to remove starvation.
Some of the notations/symbols related to the proposed algorithm listen in Table 2 below.
List of symbols
Experimental parameter table
Randomized node selection
In algorithm 2 source node generates a random node id where in the range [1, n]. Then we apply random permutation on this generated random node id to produce
Simulation
The experimental parameters are shown in Table 3.
The execution time of the mining process is evaluated first, and the result is shown in Fig. 4. To evaluate the performance of mined nodes, the amount of mined blocks is set to 5. As shown in Fig. 4, when the number of nodes increases, the average time for generating the block decreases. This is because due to the increase of nodes, the high computational power system gets more nodes for mining the block.
Average execution time of DETCA.
The relationship between the execution time to verify the block and the number of nodes in the network is shown in Fig. 5. The verification time of a proposed algorithm decreases as compared to conventional blockchain. The conventional blockchain requires more computing time, and computational load as every node participates in the verification process which wastes resources, as well as chances of double-spend, 51% attacks occur and significantly affect the overall performance of the network. In RNSA only selected nodes to participate in the verification process. However, in summary, the RNSA algorithm has substantial advantages.
Comparison of verification time.
The research shows that the proposed work achieves better performance for the evaluated.
Metrics, and is well-suited to resource-constrained devices. The following are the main aspects of the proposed work:
CPU usage and Energy consumption are reduced by implementing Distributed Execution Time_based Consensus Algorithm (DETCA) based on the selection of miner node w.r.t count and execution time, and thus reducing the complexity, high computational load, and mining overhead delay of conventional PoW consensus. Eliminate double-spending problem and 51% attack by implementing Randomized Node-selection Algorithm (RNSA) based on the selection of verifier node. As in 51% attack and double spend all nodes are particiapting in the mining and verification process and more than 51% intruder nodes verifies the fake block and mine the block but in this propose algorithm miner are selected according to the mining table then mined block are verified by the random sequence of nodes as shown in algorithm 2, step 1 and step 2.
Table 4 shows the comparative analysis between the proposed work and existing work that is conventional blockchain. In a conventional blockchain, all nodes participate in the mining and verification process whereas, in the proposed algorithm only the selected node is performing the task.
Comparison between proposed work and Blockchain
Comparison between proposed work and Blockchain
In this paper, we proposed a lightweight blockchain framework that is designed for the IoT environment while ensuring end-to-end security. The proposed work reduces the level of energy consumption and CPU usage optimization by its DETCA method. We also implemented the RNSA algorithm to reduce the double-spend and 51% attacks. The simulation results showed the proposed algorithms decrease the mining time, network computational load, energy consumption and reduce the probability of data being stolen. The results are encouraging and significantly reduce the mining overhead and keep a check on the double-spending problem and 51% attack.
Footnotes
Ethical declaration
All the authors hereby certify that this research did not receive any funding and that they do not have any conflict of interest.
