# HPoC: A Lightweight Blockchain Consensus Design for the IoT
###### Abstract  
The research topics of this paper are the data security of the edge devices and terminals of the Internet of Things (IoT) and the consensus design of a lightweight blockchain for the Internet of Things. These devices have self-organization capabilities to overcome the bandwidth delay and service-congestion problems caused by excessive concentration in existing scenarios, but they face the challenges of limited computing, storage, and communication resources. As a result, a non- financial lightweight blockchain consensus design with low energy consumption, low latency, and greater stability should be investigated. We propose a hierarchical proof-of-capability (HPoC) consensus mechanism combined with the asynchronous proof-of-work (PoW) mechanism for improving the computing capacity, storage capacity, and communication capacity of IoT edge devices that can generate blocks with low latency, low power consumption, and strong stability in resource-constrained edge device nodes, while ensuring that the security of the edge devices is enhanced asynchronously. We simulated a smart-home scenario, with the number of device nodes ranging from 15 to 75, and conducted comparative experiments between HPoC and PoW based on different difficulty bits. The experimental results showed that HPoC is a consensus mechanism with scalability and stability that can flexibly adjust time consumption and accurately select nodes with strong capabilities to generate blocks in heterogeneous devices. blockchain consensus; lightweight blockchain; Internet of Things; proof of capability; asynchronous PoW +
Footnote †: journal: Applied Sciences  
IoT security and privacy issues are among the industry's most pressing concerns. Through the verification and consensus mechanisms of distributed nodes, blockchain technology [9], as the core technology of digital cryptocurrencies such as Bitcoin and Ethereum, can solve the problem of trust establishment between nodes of decentralized systems and realize decentralized, distributed trust-establishment mechanisms. Blockchain's transaction secrecy, security [10,11], data invariance, auditability [12,13], integrity, and fault tolerance [14] have led to its wide employment in many sectors outside of cryptocurrency. Blockchain is essentially a distributed data ledger that must maintain the global ledger's coherence, with the consensus mechanism of the blockchain constantly making this decision. For example, in PoW [15], the node with greater computational resources has a better chance of deciding the exact content of the next block, whereas in proof-of-stake (PoS) [16], the node with more tokens has a better chance of doing so. In a variety of proof-of-\(x\) consensuses, nodes throughout the network must demonstrate that they are more capable in some way in order to become the leader in a particular consensus round and, accordingly, generate the next block. Because most existing blockchain systems are geared toward finance, they inevitably run into issues such as high power consumption and the need to store tokens, which are not suitable for fixing the security issues that plague IoT edge devices. In addition, when there are too many nodes, the design concept of nodes competing for block-generating rights across the network will drastically impair efficiency and increase network latency. An essential study topic for bringing blockchain to the IoT environment is how to allocate jobs of varying difficulty to nodes of various ability classes in a set of resource-constrained edge devices. In this article, we propose a lightweight hierarchical proof-of-capability consensus mechanism for IoT scenarios, based on both traditional proof-based consensus, such as PoW/PoS/proof-of-pure-stake (PPoS) [17], and the classical distributed protocol Raft [18]. Below, the important contributions of this study are set out in further detail:  
1.