IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023 18111
A Cooperative PoW and Incentive Mechanism
for Blockchain in Edge Computing
Liuling Qi , Junfeng Tian , Mengjia Chai, and Hongyun Cai
Abstract—More and more works use blockchain to improve
the data security of integrated edge computing and Internet of
Things (IoT) system. However, there are some problems of Proof-
of-Work (PoW) that hinder the application, such as high energy
consumption, low resource utilization efficiency, and insufficient
incentive. In this article, we present a cooperative PoW named
relay mining-based PoW (Relay-PoW) to reduce energy consump-
tion and improve resource utilization efficiency, where the nodes
can mine blocks together under the management of edge server.
We further propose parallel relay mining method to increase
the throughput, where the nodes can mine blocks with multiple
heights in a pipeline manner. In addition, we design supervision
group mechanism to ensure the security, where the edge server
evaluates the trust values of the nodes according to the capabil-
ity and quality, and eliminates abnormal nodes timely. Finally,
we propose a Shapley-based reward allocation strategy (SRAS)
to encourage node to participate in Relay-PoW. Experimental
results show that Relay-PoW can effectively decrease the energy
consumption, improve the throughput and resource utilization
efficiency, SRAS can motivate nodes to cooperate, and they all
have a better performance than other methods.
Index Terms—Blockchain, edge computing, energy consump-
tion, incentive, resource utilization.
I. INTRODUCTION
WITH the development of 5G and the large-scale deploy-
ment of mobile devices, some Internet of Things (IoT)
applications [1], [2], [3] will generate a large number of
delay-sensitive and computation-intensive businesses, the inte-
grated edge computing and IoT (EC-IoT) system has been a
natural trend [4], [5], [6]. Edge computing distributes com-
puting and storage resources to the edge of network, provides
lower delay and more intelligent service for end users, and
improves Quality of Service (QoS) of the IoT applications
effectively.
Compared with cloud servers, a single-edge server has lim-
ited computing and storage resources, so it usually requires
Manuscript received 9 August 2022; revised 26 January 2023 and 6 April
2023; accepted 15 May 2023. Date of publication 22 May 2023; date of
current version 9 October 2023. This work was supported in part by the
Natural Science Foundation of Hebei Province under Grant F2021201049 and
Grant F2020201023; and in part by the Social Science Foundation of Hebei
Province under Grant HB18SH002. (Corresponding author: Junfeng Tian.)
Liuling Qi is with the Key Laboratory on High Trusted Information System,
School of Cyber Security and Computer, and the School of Management,
Hebei University, Baoding 071000, China (e-mail: qiliuling@hbu.edu.cn).
Junfeng Tian, Mengjia Chai, and Hongyun Cai are with the Key Laboratory
on High Trusted Information System, School of Cyber Security and
Computer, Hebei University, Baoding 071000, China (e-mail: tjf@hbu.edu.cn;
cmghbu@163.com; chy_hbu@126.com).
Digital Object Identifier 10.1109/JIOT.2023.3278314
multiple edge servers to process service requests cooperatively.
However, the security of intensive data is a vital challenge for
service migration and sharing in EC-IoT system [7], [8], [9].
Blockchain has been regarded as a promising technology to
solve the above problem, which can be integrated into the EC-
IoT system (BC-EC-IoT) [10]. As a distributed ledger tech-
nology, blockchain has decentralization, transparency, security,
immutability, and anonymity properties, and provides a good
technical support for solving the data security problem in edge
computing.
Since the node scale in IoT is large and dynamic, most
existing works build public blockchain [11]. As a public
chain consensus, Proof-of-Work (PoW) has been widely used
in traditional blockchain applications, such as Bitcoin and
Ethereum [12], [13]. However, there are still some critical
flaws that prevent us from deploying PoW in BC-EC-IoT.
1) The energy consumption of PoW is huge, which is
not suitable for power-constrained IoT devices and will
decrease the system security.
2) Even though the IoT devices can rent computing
resources from edge servers, they still need to mine
blocks in a competitive manner, which results in low
resource utilization efficiency and throughput.
3) There is a lack of effective incentive mechanism
to encourage nodes to participate in consensus, the
high cost of computing hinders the enthusiasm of
nodes.
Some works focus on lightweight PoW for IoT [22], [23],
[24], [25], [26], the main idea of these works is to change
the mining difficulty based on trust value or other index to
reduce the energy consumption of PoW. However, the man-
ner of mining blocks is still competitive, which results in low
resource utilization efficiency. On the other hand, there is a
lack of incentive mechanism to encourage nodes to participate
in consensus in these works.
In this article, we propose several mechanisms in BC-EC-
IoT aiming to make PoW more suitable, the main contributions
are summarized as follows.
1) We propose a cooperative PoW named relay mining-
based PoW (Relay-PoW) to promote nodes from compe-
tition to cooperation, decrease the energy consumption,
and increase the resource utilization efficiency, where
the nodes mine blocks together in a cooperative manner
under the management of edge server.
2) We design a parallel relay mining method based on
Relay-PoW to increase the throughput, where the system
sets dynamic parallel degree according to the network
2327-4662 c
 2023 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See https://www.ieee.org/publications/rights/index.html for more information.
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
18112 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023
load and the nodes mine blocks with multiple heights in
a pipeline manner.
3) We propose a supervision group mechanism to increase
the security, where edge servers supervise the consensus
behavior of IoT devices in their local networks, evalu-
ate the trust values from two aspects of capability and
quality, and eliminate abnormal nodes timely.
4) We propose a Shapley-based reward allocation strategy
(SRAS) to encourage node to participate in Relay-PoW,
where we formulate the mining process in Relay-PoW as
a coalitional game and fairly reward the nodes according
to their marginal contributions.
5) We analyze the security and performance of Relay-PoW,
and the experimental results show that Relay-PoW can
effectively decrease the energy consumption, increase
the resource utilization efficiency and throughput, SRAS
can effectively improve the participation enthusiasm of
nodes.
The remainder of this article is organized as follows. In
Section II, we describe the related work. Section III focuses
on the system overview. In Section IV, we describe the details
of Relay-PoW, parallel relay mining method, and supervi-
sion group mechanism. In Section V, we design SRAS. In
Section VI, we analyze the performance and security of Relay-
PoW. In Section VII, we describe the experimental results in
detail. Finally, we conclude this article in Section VIII.
II. RELATED WORK
In recent years, the BC-EC-IoT system has been a natural
trend. On the one hand, edge computing can provide com-
puting services with lower delay for IoT. On the other hand,
blockchain can provide more secure data storage and access
control services for distributed EC-IoT nodes [14].
Xu et al. [15] presented a novel blockchain-based edge
caching scheme for mobile users, where they supervised
the caching transactions by blockchain to tackle the data
security problem. Baranwal et al. [16] proposed a resource
allocation mechanism based on blockchain, where they took
various quality parameters into consideration to make the
resource allocation more reasonable. Luo et al. [17] intro-
duced a novel task offloading architecture for mobile edge
computing (MEC), where they stored the data in MEC servers
who run private blockchain to ensure the audit trail of data
processer. Yuan et al. [18] developed a novel decentralized
platform based on blockchain, they recorded the performance
of task execution by consensus to tackle the trust and incen-
tive problems between the edge servers. Ming et al. [19]
proposed a dynamic cross-domain deduplication scheme based
on blockchain, they used smart contract to assist cross-domain
deduplication to reduce the storage cost of edge nodes.
The consensus protocol is the key component to deter-
mine the security of blockchain. Some works used Delegated
Proof of Stake (DPoS) [20]. However, DPoS selects a fixed
number of agents to generate block in turn, which cannot
quickly adapt to the dynamic changes of node scale in IoT.
Some works used practical Byzantine fault tolerance (PBFT)
which has a high consensus efficiency with a small node
scale [21]. However, the high communication cost hinders its
application in IoT. Since the node scale in IoT is large and
dynamic, it is more appropriate to build public blockchain.
Nonetheless, PoW has a high energy consumption, some works
focused on lightweight PoW in IoT. Huang et al. [22] proposed
Credit-based PoW based on the trust mechanism, where they
changed the mining difficulty according to the trust value
to reduce the energy consumption and improve the security
of PoW. Liu et al. [23] presented a green consensus mech-
anism named synergistic multiple proof (SMP), where the
mining difficulty was changed based on the cooperation index
(CI). In addition, in order to maintain the decentralization of
blockchain, they set two rules to restrict the holding time
of CI and the priority of mining blocks. Wang et al. [24]
introduced a reputation-based consensus Proof-of-X-Repute
(PoXR). In addition to dynamically adjusting the mining dif-
ficulty, the reward and punishment functions of trust value
were also considered, which further improved the security
of consensus. Liu et al. [25] proposed a high-performance
blockchain system based on a space-structured ledger, where
they designed Collaborative Proof of Work (Co-PoW) to over-
come the heterogeneity of IoT devices. In Co-PoW, the devices
were divided into wimpy and brawny devices, and they mined
Macroblocks and Microblocks, respectively. Xu et al. [26]
extended the idea of [25] to the edge computing, they designed
an integrated blockchain and MEC framework based on a
space-structured ledger, where a novel consensus mechanism
named Re-PoW was proposed. The edge servers mined MEC
block and devices mined MD block, the mining difficulty of
MD block was adjusted by MEC server according to the trust
value.
Most works change the mining difficulty according to trust
value or other index to reduce the energy consumption of PoW,
we summarize these works as dynamic mining difficulty PoW
(DMD-PoW). Although DMD-PoW reduces the energy con-
sumption, it does not change the competition state between
nodes, which wastes the workload of most nodes and reduces
the resource utilization efficiency.
IoT users can rent a certain number of computational
resources (such as CPU and GPU) from edge servers to par-
ticipate in the consensus. In this case, the interaction between
edge service providers and users can be modeled as resource
allocation and service pricing problems. Some works studied
the incentive mechanism of blockchain from the aspect of auc-
tion or game theory. Xiong et al. [27] modeled the interaction
between edge server and users as two-stage Stackelberg game
in MEC, where they used backward induction to find the
optimal pricing strategy. Sun et al. [28] considered the cross-
server resource allocation problem in blockchain-based MEC,
they modeled the interaction between edge servers and mobile
devices as a double auction model, which can find the optimal
resource allocation strategy according to the service request
of the user. Du et al. [29] further considered the service pric-
ing problem when there was a data service operator (DSO) in
blockchain-aided edge computing. They used smart contract to
establish the renting association between the DSO and edge
computing node, and proposed a social welfare improved dou-
ble auction mechanism to find the renting price of the winner.
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
QI et al.: COOPERATIVE PoW AND INCENTIVE MECHANISM FOR BLOCKCHAIN IN EDGE COMPUTING 18113
Fig. 1. System overview.
Zhang et al. [30] considered the resource allocation and service
pricing problems in integrated blockchain and edge comput-
ing Internet of Vehicles (IoV), they proposed two auction
mechanisms to maximize the social welfare. Ding et al. [31]
considered the relationship between the blockchain security
and profits of the platform, modeled the interaction between
users and platform as a two-stage Stackelberg game, and
designed an incentive mechanism to motivate users to purchase
more computing resource to increase the platform security.
Most works considered resource allocation and service pric-
ing problems between users and edge computing servers.
However, they ignored how to allocate the block revenue fairly
among the nodes participating in the consensus, and how to
promote cooperation between nodes.
III. SYSTEM OVERVIEW
In this section, we will describe the overview of our system.
We consider a BC-EC-IoT system in Industrial IoT (IIoT). The
system architecture is shown in Fig. 1.
There are three layers in the system, i.e., the device layer,
the edge layer, and the cloud layer. The device layer is com-
posed of IoT devices, such as sensors, actuators, etc. IoT
devices connect to the nearest edge server, and can offload
delay-sensitive and computation-intensive tasks to the edge
server. The edge layer is composed of multiple edge servers,
which have richer resources than IoT devices, and can provide
low-latency computing and storage services. The cloud layer
is composed of cloud server, which is controlled and managed
by the administrator. We suppose the nodes in the system have
private and public key pair SK, PK, and messages should
be signed with private key by sender to ensure the integrity
and nonrepudiation.
The system adopts a hierarchical management mechanism.
The cloud server directly manages the edge servers, and then
the edge servers manage the IoT devices within its connec-
tion range. Each edge server and its connected IoT devices
can be regarded as a local network. The IoT devices in each
local network can choose to participate in solo mining or
relay mining under the management of the edge server (Relay
mining will be described in Section IV). Each IoT device
can be regarded as a node in our system. Considering the
system security, we divide nodes into consensus nodes and
ordinary nodes. The nodes whose trust values are higher than
the trust threshold θ are consensus nodes, they can mine and
validate blocks. The others are ordinary nodes, they cannot
mine blocks, but they can forward transactions and validate
blocks. Due to limited resources, IoT devices only store par-
tial blockchain for mining and transaction verification. Edge
servers can store local blockchain of local networks, and cloud
server stores the entire blockchain of system.
We divide the running time of our system into sequen-
tial epochs. When the communication is in good condition,
the transactions in the node transaction pool should be the
same [23]. Therefore, in order to reduce the repeated workload,
only one local network is selected in each epoch to implement
the consensus. Edge server can generate the same number of
tokens for each block, which can be seen as block reward R.
The winner node in solo mining can get the whole R, and
the node which participates in relay mining can get a part
of R according to SRAS. When a node rents resources from
edge server, it can pay some tokens for a discount, the specific
exchange rules can be made by the edge service provider.
There are four types of transactions in the system, i.e.,
asset movements, important instructions between devices, task
offloading, and resource scheduling. The information of asset
movements and important instructions between devices is
captured and constructed as transactions by IoT devices, trans-
mitted to other devices in the local network through wireless
communication, and transmitted to other local networks by
edge servers until all nodes in the system receive transactions.
The information of task offloading, and resource scheduling is
captured and constructed as transactions by edge servers. The
structure of transaction is: [Type, From, To, Content]. Type
represents the transaction type, we use 00, 01, 10, and 11
to represent asset movements, important instructions between
devices, task offloading and resource scheduling transac-
tions, respectively; From represents the transaction sender;
To represents the transaction receiver; Content represents the
transaction details, which can be filled with instruction type,
and the number of transferred assets, offloading tasks, and
scheduling resources.
IV. COOPERATIVE POW: RELAY MINING-BASED POW
In this section, we will describe the detail of Relay-PoW.
Relay-PoW adopts relay mining strategy, which is an improved
cooperative mining consensus different from traditional PoW.
In traditional PoW, miners continuously fill in new nonce val-
ues by performing nonce increment operations to find valid
blocks. We design Relay-PoW based on the above character-
istic of the mining process, where the nodes in each local
network participate in relay mining under the management of
edge server.
Fig. 2 describes the process of Relay-PoW carried out by
three nodes. Each node works successively for the same time
t based on the nonce workload of the previous node, and node
3 successfully mines the block.
We define each round of relay mining as a round, and nodes
can mine a block together in each round. The work turn of
each node is defined as turn, the work time of each turn is t.
The steps of Relay-PoW are as follows.
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
18114 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023
Algorithm 1 Generation Algorithm of Relay Queue
Input: Edge server private key SK, cycle σ, public key set of consen-
sus nodes in local network PK = {PK1, PK2, . . . , PKn}, the nonce
workloads of the nodes in previous epoch, relay queue Q = [ ].
Output: Relay queue Q.
1: for each PKi in PK:
2: if σ = 1:
3: set nonce=0.
4: end if
5: calculate Hi = H(SK|σ|PKi|nonce).
6: end for
7: Add the node has the lowest Hi into Q.
8: if multiple nodes have the lowest Hi:
9: Add the node has the lowest PK value into Q.
10: end if
11: Remove PKi from PK set.
12: Repeat 1-11 until PK is empty.
13: Return Q.
Fig. 2. Relay-PoW.
Step 1: The edge server constructs a pending block (see
in Section IV-A), generates a relay queue according to
Algorithm 1 (see in Section IV-B), and forwards the pending
block to the first node in the relay queue.
Step 2: Each node works successively in its turn for t time
(the detail of t is in Section IV-B) according to the order in
the relay queue. If a node mines successfully, it will notify all
nodes in the local network and all edge servers. Otherwise, it
will fill its nonce workload into the block (NonceList in the
pending block) and send the block to the next node. The next
relay node will continue to mine the block based on the nonce
workload of the predecessor node.
Step 3: Repeat step 2 until the block is mined successfully,
the edge server monitors the performance of all nodes in the
local network (see in Section IV-D), updates the trust values
according to the work performance of the nodes, and starts
the next round of relay mining.
In Relay-PoW, the mining time of the node is limited, so
the energy consumption of the node is reduced. Furtherly,
the workload of nodes will not be wasted, which improves
the resource utilization efficiency. Next, we will describe the
details of Relay-PoW.
A. Block Structure
We define two kinds of blocks. One is pending block, which
refers to a block that has no valid nonce. The other is regular
block, which refers to the block with valid nonce. The pend-
ing block and regular block of block i can be represented as
Fig. 3. Block structure.
PBi and RBi, respectively. We can know that all transactions
need to be forwarded by the edge server from Section III, so
the edge server can collect transactions and construct pending
blocks.
There is no difference between pending block and regu-
lar block in terms of block structure, the block structure is
shown in Fig. 3. Specifically, PrevHash is the hash value of
the previous block, LeaderNode is the PK of the edge server
who constructs the block, NodeList is the PK list of the nodes
in the local network, t is the work time of each turn, Body
contains the transactions. The meanings of Height, Difficulty,
TimeStamp, Merkle Root, and Nonce are the same as those
in the traditional PoW. Specially, we use NonceList to record
the nonce workload of each node. If a node fails to mine a
block in its turn, it will record its nonce workload into the
NonceList, the successor nodes continue mining according to
NonceList until a node mines a block successfully. The struc-
ture of NonceList is: {cycle | PK | nonce}, cycle is used to
record the cycle number, the initial value is 1. The mining
interval from the first node to the last node in the relay queue
is called a cycle. To mine a block, there may be multiple
cycles. In one cycle, each node only has one turn. When all
nodes fail to mine a block in a cycle, the edge server will
start a new cycle (the cycle number will add 1) and generate a
new relay queue according to Algorithm 1. Since NonceList is
dynamic, it is not included in the mining. The mining function
is given in the following:
H(H(PrevHash|LeaderNode|NodeList|Height|Difficulty|t|
TimeStamp|MerkleRoot|Nonce)) Target.
For the pending blocks, we need to focus on validating the
NonceList: 1) whether there are some nodes mine more than
one time in a cycle and 2) whether all the nodes in the local
network have participated in Relay-PoW in old cycles when
there is more than one cycle. For regular blocks, the validation
is the same as that in traditional PoW.
B. Relay Queue and Work Time
In order to ensure the randomness and unpredictability
of the relay order, the edge server generates a relay queue
according to Algorithm 1 before relay mining. The edge server
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
QI et al.: COOPERATIVE PoW AND INCENTIVE MECHANISM FOR BLOCKCHAIN IN EDGE COMPUTING 18115
uses the nonce workload of the node in a previous cycle as a
random source, calculates the value of H(SK|σ|PKi|nonce) by
the hash function, and adds the node with the minimum hash
value into relay queue. If there are multiple nodes with the
same minimum hash value, the edge server will compare the
PK values of these nodes and add the node with the smallest
PK value into relay queue.
Considering the security, the edge server will not forward
the whole relay queue to the nodes in the local network, it
only forwards the PK value of successor node to the node.
For the following reasons, we set the same work time in a
turn for each node.
1) The convenience of the management, the edge server
only needs to fill one t value in the pending block.
2) Each node can participate in Relay-PoW theoretically;
in order to make t reasonable, it is necessary to analyze
the node mining time in PoW.
The mining time of a single node is subject to exponential
distribution with parameters λ [32], the expected mining time
Ts of node with hash power hi is calculated as follows:
Ts =
1
λ
=
1
hip
=
D
hi
. (1)
p is the mining probability of a single hash operation, which
is inversely proportional to the mining difficulty D. By calcu-
lating the average hash power, the expected mining time Tt of
all nodes in the network can be calculated as follows:
Tt =
nD

hi
. (2)
n is the total node number that can participate in Relay-
PoW in the local network. In order to ensure that each node
has the opportunity to participate in Relay-PoW theoretically,
the work time t is calculated by dividing Tt equally
t =
D

hi
. (3)
Additionally, the node may do not respond to the message
for a long time for the following reasons, which will hinder
the process of relay mining: 1) the network fluctuation in the
wireless environment; 2) the damage of the device; and 3) the
attack from malicious nodes. We set the longest waiting time
tr = ωt, where ω  1 and ω can be adjusted by edge server.
When node i starts to mine a block, it will send a starting
message to its successor node, and the successor node will
start a waiting clock. If the successor node does not receive
a message (i.e., pending block or mined block) from node i
after tr time, it will notify the edge server, and take over the
work of node i with the coordination of the edge server.
C. Parallel Relay Mining Method
In Relay-PoW, only one node is working in each turn, the
other nodes need to wait their turns to continue mining. In
order to improve the throughput of Relay-PoW, we further
propose a parallel relay mining method.
Fig. 4 shows the mining process of the parallel relay min-
ing method, where nodes mine blocks with multiple heights
(Block 1 to Block 5) in a pipeline manner. In the first t, node
Fig. 4. Parallel relay mining.
1 mines block 1. In the second t, node 2 mines block 1 and
node 1 mines block 2, and so on. We propose parallel degree
τ to represent the number of blocks that can be processed
continuously by a node, and τ is 5 in Fig. 4. It can be seen
that the higher the τ is, the higher the throughput the system
has. Limited by the resource owned by IoT devices, τ cannot
grow indefinitely. The edge server can dynamically adjust τ by
monitoring the transaction sending rate in the network. When
the transaction sending rate is high, the edge server can set a
higher τ to cope with the heavy workload. Otherwise, the edge
server can set a lower τ to reduce the energy consumption of
IoT devices.
In parallel relay mining, when a node needs to mine block i,
its parent block i − 1 may not be valid. We will take block
i−1 and block i as an example to describe the detail in parallel
relay mining. We suppose the parent block i−2 of block i−1
is valid.
Step 1: The edge server constructs PBi−1 and PBi for block
i−1 and block i. The edge server fills the hash value of Block
i−2 (HSi−2) into the PrevHash of PBi−1. Since block i−1 has
not been mined, the edge server fills NULL into the PrevHash
of PBi.
Step 2: The nodes start parallel relay mining for block i−1
and block i. For block i − 1, the nodes implement the min-
ing operation mentioned in Section IV-A. For block i, since
the PrevHash of PBi is NULL, the PrevHash of PBi is not
included in the mining operation, the nodes implement the
mining operation as follows:
H(H(LeaderNode|NodeList|Height|Difficulty|t|TimeStamp
|MerkleRoot|Nonce)) Target.
Step 3: When block i−1 is mined (PBi−1 becomes RBi−1),
it will be verified by the nodes, and the edge server will cal-
culate the hash value HSi−1 of valid block i−1. When block i
is mined (PBi becomes RBi), the edger server will fill HSi−1
into the PrevHash of block i. In order to prevent the edge
server from changing the content of the block i maliciously,
the consistency of the completed block i should be validated
by other edge servers and the nodes in the local network (e.g.,
they can validate the hash value of each field in block i, if the
hash value is not changed, it means that the edge server does
not change the content of the block).
D. Supervision Group Mechanism
In order to ensure the normal operation of the system,
we design a supervision group mechanism. The supervision
group is composed of the edge servers of each local network,
they supervise the consensus behavior of the IoT devices in
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
18116 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023
their local networks, and then calculate the corresponding
trust values. The supervision group can timely intervene the
IoT devices with abnormal behavior and maintain the system
security.
Considering the resource heterogeneity of IoT devices, the
edge servers evaluate the trust values from two aspects of capa-
bility and quality, the trust value of node i in epoch j can be
calculated as follows:
T
j
i = α1C
j
i + α2Q
j
i. (4)
α1 + α2 = 1, 0  α1, α2  1, 0 ≤ T
j
i , C
j
i, Q
j
i ≤ 1.
C
j
i and Q
j
i are the capability and quality values of node i
in epoch j, respectively. The capability value of IoT devices
can be measured from the following three aspects: 1) comput-
ing capability (CC); 2) communication capability (CMC); and
3) storage capability (SC), the capability value of node i in
epoch j can be calculated as follows:
C
j
i = β1CC
j
i + β2CMC
j
i + β3SC
j
i. (5)
β1 + β2 + β3 = 1, 0  β1, β2, β3  1. CC
j
i, CMC
j
i, and
SC
j
i are the CC, CMC, and SC values of node i in epoch
j, respectively. We use the ratio of CPU computing power
(MH/s), bandwidth (Mb/s), and available storage space (MB)
to the current highest standard to represent the CC, CMC, and
SC, respectively. For example, if the general highest standard
of computing power is 2 MH/s and the computing power of
the device is 1.2 MH/s, its CC value is 0.6.
The quality value is obtained by monitoring the consensus
behavior of nodes, the quality value of node i in epoch j can
be calculated as follows:
Q
j
i = γ1NP
j
i + γ2BP
j
i. (6)
γ1 + γ2 = 1, 0  γ1, γ2  1. The consensus behavior of
a node can be quantified by workload. Furtherly, we calculate
the quality value of a node by observing whether the node
has stably completed the workload matching its capability. In
Relay-PoW, nodes have two kinds of behavior in their turns.
1) If a node fails to mine a block, it needs to forward the
pending block to the next node. In this case, we can
measure the nonce workload through the NonceList field
in the block, and calculate the nonce performance value
of a node.
2) If a node mines a block successfully, it needs to report
the block to other nodes. In this case, we can mea-
sure the block number workload, and calculate the block
performance value of a node.
We use NP
j
i and BP
j
i to represent the nonce performance and
block performance value of node i in epoch j, respectively,
and take NP
j
i as an example to show how to calculate it step
by step.
In parallel relay mining, a node may mine different blocks
in different turns, so there may be multiple nonce workloads
in an epoch. We calculate NP
j
i by measuring the average nonce
workload, the average nonce workload NW
j
i of node i in epoch
j can be calculated as follows:
NW
j
i =
n
j
i
m=1 nm
n
j
i
(7)
where n
j
i is the number of the blocks that node i participates
in epoch j,
n
j
i
m=1 nm is the total nonce workload of node i
in n
j
i blocks. In order to measure whether the node has stably
completed the workload matching its capability, we compare
the NW
j
i and NW
j−1
i , and calculate the deviation value DNW
j
i
DNW
j
i =



 NW
j
i − NW
j−1
i




NW
j−1
i
(8)
where NW
j−1
i is the average nonce workload of node i in
previous epoch. DNW
j
i can reflect the workload deviation of a
node in two adjacent epochs, furtherly, we can calculate NP
j
i
through DNW
j
i
NP
j
i =
⎧
⎪
⎪
⎪
⎨
⎪
⎪
⎪
⎩
1, 0  DNW
j
i ≤ x1
y1, x1  DNW
j
i ≤ x2
y2, x2  DNW
j
i ≤ x3
0, DNW
j
i  x3.
(9)
0  y2  y1  1, x1  x2  x3. The smaller the value
of DNW
j
i is, the closer the value of NP
j
i is to 1, which means
that the node behavior is stable. For the new node, we set
NP
j
i = 1. Similarly, we can calculate BP
j
i by measuring the
block number workload. The calculation process is the same
as NP
j
i, we do not repeat it again.
The final trust value of node i can be calculated by com-
bining the trust value of the current epoch and the previous
epoch together
Ti = ρT
j−1
i + (1 − ρ)T
j
i . (10)
0  ρ  1, 0 ≤ Ti ≤ 1. The final trust value is the basis
for evaluating the credibility of nodes.
V. SHAPLEY-BASED REWARD ALLOCATION STRATEGY
In this section, we will describe SRAS. Relay mining can be
regarded as a cooperative mining strategy, which can improve
the resource utilization efficiency of IoT device. The IoT
devices can choose solo mining or relay mining. In order to
attract IoT devices to participate in Relay-PoW, a fair reward
allocation strategy is needed to allocate the block reward.
Shapley value is a revenue allocation strategy in a cooperative
game, which can fairly allocate the overall revenue accord-
ing to the average marginal contribution of participants [33].
Inspired by the Shapley value, we propose SRAS.
First, we formulate the Relay-PoW as a coalitional game.
Let set S = {1, 2, 3, . . . , |S|} be a grand coalition that collects
all the nodes in the local network, |S| is the total number of
S. A coalition K is defined as a subset of S, which contains
all nodes that participate in Relay-PoW from the beginning
to the present. According to the rules of Relay-PoW, we can
know that the order of nodes joining K is random and K is a
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
QI et al.: COOPERATIVE PoW AND INCENTIVE MECHANISM FOR BLOCKCHAIN IN EDGE COMPUTING 18117
nonempty subset of S. If the newly added node successfully
mines a block in its turn, we define coalition K as the winning
coalition, and the utility is v(K).
Now, we can define a coalitional game according to
(S, v(K))
v(K) =

R, if K is winning coalition
0, otherwise.
(11)
R is the block reward when a node mines a new block, the
nodes in winning coalition K earn the reward R for all nodes
in S. Each node in S is rewarded according to its marginal con-
tribution, the Shapley value of the nodes in S can be calculated
as follows:
φ(S, s) =
1
|S|!
K∈S{s}
|K|!(|S| − |K| − 1)![v(K ∪ {s}) − v(K)]
(12)
The Shapley value is calculated according to the average
marginal contribution of members in all forms of coalitions. K
can be any coalition in S and |K| denotes the number of nodes
in coalition K. K can be regarded as a coalition that member
s waiting to join, (1/|S|!)|K|!(|S|−|K|−1)! is the probability
that member s joins coalition K, [v(K ∪ {s}) − v(K)] is the
marginal contribution of member s in coalition K. Finally, we
can allocate the block reward according to the Shapley value.
VI. PERFORMANCE AND SECURITY ANALYSIS
A. Mining Probability Analysis
In this section, we will analyze the success probability that
a node mines a block in its turn.
Theorem 1: In Relay-PoW, the success probability that a
node mines a block in its turn depends on the hash power
proportion of a set, which includes this node and all its
predecessor nodes in the relay queue.
Proof: We suppose that N nodes can participate in Relay-
PoW in the local network, node i is the nth relay node in the
relay queue with hash power hi. Since node i mines blocks
according to the nonce workloads of its predecessor nodes, we
should discuss them together when we calculate the success
probability that node i mines a block in its turn. We treat node
i and all its predecessor nodes as a logic node η, let X be a
random variable that represents the time required for node η
to mine a block successfully, X is subject to the exponential
distribution with parameter λ.
In this case, the success probability that node i mines a
block in its turn is equal to the probability that node η mines
a block when (n − 1)t ≤ X ≤ nt (the transmission delay is
ignored). P((n − 1)t ≤ X ≤ nt) can be calculated by
P((n − 1)t ≤ X ≤ nt) =
nt
(n−1)t
λe−λx
dx
= e−(n−1)λt
− e−nλt
(13)
where λ = ([
n
i=1 hi]/n)p, ([
n
i=1 hi]/n) is the average
hash power of η, p is the mining probability of single
hash operation. According to the definition of t, λt can be
expressed by
λt =
n
i=1 hi
n
N
i=1 hi
(14)
where ([
n
i=1 hi]/[
N
i=1 hi]) is the hash power proportion of
η in the local network, we denote it as ξ, ξ ∈ (0, 1]. So
P((n − 1)t ≤ X ≤ nt) = e− n−1
n ξ
− e−ξ
. (15)
We denote e−([n−1]/n)ξ −e−ξ as f(ξ), furtherly, we can know
f(0)  0 and f(ξ)  0, Theorem 1 is proved.
From Theorem 1, we can know that when we discuss the
success probability that node i mines a block in its turn, we
should treat node i and its predecessor nodes as a whole, the
higher hash power proportion this whole has, the higher the
success probability node i has in its turn.
In parallel relay mining, as time goes on, nodes mine
multiple blocks parallelly in the form of pipeline, which
greatly improves mining efficiency. In a single turn, a node
still only mines a single block based on the nonce workloads
of its predecessor nodes, so Theorem 1 still works in parallel
relay mining.
B. Energy Consumption Analysis
In this section, we will analyze the energy consumption of
Relay-PoW and PoW.
Theorem 2: The energy consumption of Relay-PoW is lower
than that of PoW.
Proof: We suppose that N nodes can participate in mining,
the hash power of node i is hi, which denotes the number of
hash operations that node i can implement per second. The
block is mined by a node with hash power hw, the mining
time is Tw, the communication delay between the nodes is not
considered.
In PoW, all N nodes need to mine blocks in a competitive
manner. When a node wins the mining, it will forward the
mined block to other nodes, and the remaining nodes will
stop mining operations. In this case, the mining time for all
nodes is also Tw, the workload of a single node i WP−S can
be calculated as follows:
WP−S = hiTw. (16)
The workload of all N nodes WP−A can be calculated as
follows:
WP−A =
N
i=1
hiTw. (17)
In Relay-PoW, all N nodes mine a block in a cooperative
manner, which can be seen as allocating the workload of the
winner node in PoW (hwTw) to all N nodes. Each node only
needs to mine a short time in its turn (the time length of a
turn is t), and nodes can continue mining based on the work-
load of other nodes until the block is mined. In this case, the
workload of a single node i is related to the number of the
turns it participates in, which is denoted as WR−S and can be
calculated as follows:
WR−S = hirit (18)
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
18118 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023
where ri is the number of the turns that node i participates in,
ri can be calculated as follows:
ri =
⎧
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎨
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎩
0 or 1, when hwTw 
N
i=1 hit
1, when hwTw =
N
i=1 hit
hwTw
N
i=1 hit
, when it does not mine in the last cycle
hwTw
N
i=1 hit

, when it mines in the last cycle
(19)
where hwTw is the workload of the winner node,
N
i=1 hit is the total workload of N nodes in a cycle
in Relay-PoW, (hwTw)/(
N
i=1 hit) denotes the largest
integer which is smaller than ([hwTw]/[
N
i=1 hit]), and
(hwTw)/(
N
i=1 hit) denotes the smallest integer which is
larger than ([hwTw]/[
N
i=1 hit]). In Section IV-A, we defined
cycle (i.e., the mining interval from the first node to the
last node in the relay queue). When hwTw 
N
i=1 hit,
it indicates that the block can be mined through a partial
cycle of relay mining (i.e., some nodes do not mine), the
value of ri depends on the position of the node i in the
relay queue. When hwTw =
N
i=1 hit, it indicates that the
block can be mined through a whole cycle of relay min-
ing, and ri = 1. If the block is not mined in a cycle, the
edge server will start a new cycle. In this case, ri has two
possible values, when node i does not participate in the min-
ing in the last cycle, ri = (hwTw)/(
N
i=1 hit), otherwise,
ri = (hwTw)/(
N
i=1 hit) . Whether node i can participate in
the last cycle of mining also depends on its position in the
relay queue.
We can know that ri ≤ (hwTw)/(
N
i=1 hit) 
([hwTw]/[
N
i=1 hit]) + 1, so
WR−S  hi

hwTw
N
i=1 hit
+ 1

t. (20)
In this case, t Tw, (hw/[
N
i=1 hi]) ∈ (0, 1), we can know
that hi(([hwTw]/[
N
i=1 hit]) + 1)t  hiTw, so WR−S  WP−S.
We can also know that
WR−S
WP−S
≈
hw
N
i=1 hi
. (21)
If the hash power of all N nodes is equal, the energy con-
sumption of a single node of Relay-PoW is only 1/N of that
of PoW.
From the characteristic of Relay-PoW, we can know that
the workload of all N nodes WR−A is equal to the workload
of the winner node in PoW
WR−A =
N
i=1
hirit = hwTw. (22)
It can be seen that WR−A  WP−A, Theorem 2 is proved.
C. Mining Time Analysis
In the parallel relay mining method, the system can adjust
the number of blocks continuously mined through parallel
degree. In this section, we will analyze the time required to
Fig. 5. Required time for mining in Relay-PoW and PoW with varying τ.
mine blocks with multiple heights continuously in Relay-PoW
and PoW.
Theorem 3: When the parallel degree is τ, node number
is n, the ratio of the time required to continuously mine τ
blocks in Relay-PoW and PoW is ([τ + n − 1]/τn).
Proof: When the parallel degree is τ, node number is n,
the time TR required to continuously mine τ blocks in Relay-
PoW is
TR = nt + (τ − 1)t. (23)
The time Tp required to continuously mine τ blocks in
PoW is
TP = τnt. (24)
We can see that nt is the expected time required to mine a
block for n nodes in (2), and Theorem 3 is proved. In order to
show the relative relationship between TR and TP more clearly,
we set n = 5, and observe the theoretical time required for
continuously mining τ blocks in Relay-PoW and PoW with
varying τ. The result is shown in Fig. 5.
The x-axis is the parallel degree τ, the y-axis is the required
time for mining τ blocks and this time is not a specific time
value, which is expressed as a multiple of t. With the increment
of τ, the gap of the required time for mining τ blocks in PoW
and Relay-PoW becomes larger and larger, and the required
time in Relay-PoW is much smaller than that in PoW, which
indicates that the consensus efficiency of Relay-PoW is much
higher than that of PoW.
D. Attack Resistance Analysis
In this section, we will analyze the attack resistance of
Relay-PoW. We divide attacks into two types: 1) general
attacks and 2) special attacks. General attack refers to the com-
mon attacks in PoW consensus, and special attack refers to the
attacks against Relay-PoW alone.
1) General Attacks: Selfish Mining: In PoW, malicious
nodes can take advantage of hash power to overthrow the hon-
est main chain by building a selfish chain. Unlike traditional
PoW, nodes in Relay-PoW cannot independently complete
mining tasks for a single block. In each round of Relay-PoW,
each node mines for t time in random order. If a node fails to
mine a block in its turn, the successor nodes need to continue
mining. Therefore, malicious nodes cannot mine blocks with
continuous height in a short time in Relay-PoW, and cannot
construct a selfish chain and launch selfish mining attack.
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
QI et al.: COOPERATIVE PoW AND INCENTIVE MECHANISM FOR BLOCKCHAIN IN EDGE COMPUTING 18119
Sybil Attack: Malicious nodes control most nodes in the
network by forging identities, which can affect the security
of blockchain. Traditional PoW can resist Sybil attack, even
if malicious nodes forge multiple identities, they cannot use
these forged identities to mine simultaneously due to the limit
of computing resource. In Relay-PoW, there is always only one
node mining block, which ostensibly provides convenience for
malicious nodes to launch Sybil attack. However, in parallel
relay mining, nodes are required to mine blocks with different
heights, so malicious nodes still cannot use forged identities
to mine blocks with different heights at the same turn. In addi-
tion, in the IoT scenario with high-security requirements (such
as IIoT), there are strict identity management measures, which
further increases the difficulty for malicious nodes to launch
the Sybil attack.
2) Special Attacks: Delay Attack: It can be regarded as a
special form of selfish mining attack, the malicious node does
not forward the pending block or the mined block for a long
time, which can delay the time required for mining success-
fully and reduce the throughput. We can resist delay attack
through the following measures.
1) The relay queue is random, malicious node cannot
predict its order, and the honest nodes may have mined
the block before the turn of the malicious node, so it is
difficult to launch delay attack.
2) We set the longest waiting time. If the waiting time
toward the malicious node is longer than the longest
waiting time, its successor node will inform this behav-
ior to the edge server, and the edge server will handle
this case timely.
3) The supervision group composed of edge servers monitors
the behaviors of the nodes. When a node behaves abnor-
mally, its trust value will decline. If the trust value is lower
than the threshold θ, it will be eliminated by the system.
Lazy Leader Attack: In Relay-PoW, the role of edge server
is very important, such as packaging blocks, determining the
relay queue, etc. The edge servers may have three aspects of
malicious behavior.
1) The edge server packages duplicate or illegal transac-
tions. In order to prevent such attacks, the blocks need
to be jointly verified by other edge servers.
2) The edge server repeatedly selects a node to mine or
deliberately ignores some nodes. To prevent such attack,
we design cycle field in NonceList. Nodes can check the
PK value to see whether there are duplicate nodes mine
blocks, and whether all the nodes have mined when edge
server starts a new cycle.
3) In parallel relay mining, the edge server may maliciously
change the block content when it fills the PrevHash field.
To prevent this attack, the consistency of the filled block
should be validated again by other edge servers and
nodes in the local network.
VII. EVALUATION AND ANALYSIS
A. Environment and Parameters Setting
We use PC as edge servers, and each PC runs several nodes
as IoT devices. Each PC and its running nodes form a local
TABLE I
PARAMETERS SETTING
Fig. 6. Trust values of nodes with different capability values (with honest
behavior).
network. The number of PC and node varies with the require-
ments. Each PC is equipped with Intel Core i7-6700 CPU,
16-GB memory, and runs Windows 10 operation system. We
only consider the differences in hash powers of nodes, and
simulate nodes with different hash power by limiting the per-
forming number of hash functions. Each PC connects a client
which can send transactions with varying rate. The parameters
are set as Table I.
B. Result Analysis
1) Trust Mechanism Analysis: The edge servers collect
the behavior information of the nodes, calculate the trust
value based on the capability and quality. In order to verify
whether the trust mechanism can accurately reflect the behav-
ior changes of nodes, we set up four groups of nodes with
different capability values (0.2, 0.4, 0.6, and 0.8, respectively),
and run for 15 epochs. The changes of trust values of these
nodes are shown in Figs. 6 and 7.
Fig. 6 proves that if a node maintains honest behavior,
the trust value will gradually increase and stabilize after a
period of time (six epochs). In addition, the higher the capa-
bility value a node has, the higher the trust value it has. This
shows that the trust mechanism can well distinguish nodes
with different capability values.
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
18120 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023
Fig. 7. Trust values of nodes with different capability values (with malicious
behavior).
In order to observe the impact of malicious behavior on the
trust value, the nodes implement a delay attack in 7th epoch
and then restore honest behavior, Fig. 7 shows the changes
of trust values. We can see that when nodes have malicious
behavior in 7th epoch, the trust value will decline rapidly.
Even if the nodes restore honest behavior, it will take a long
time (about eight epochs) to restore the previous level of trust
value. The reason is that the trust value of the node in the
previous epoch is considered when we calculating the final
trust value, the node needs a certain period of good behavior
accumulation to return to the normal level.
From the above results, we can see that the trust mecha-
nism can quickly and accurately reflect the honest or malicious
behavior of nodes, and the punishment for malicious behavior
is severe. The supervision group composed of edge servers can
detect malicious nodes in time and ensure system security.
2) Performance of Relay-PoW: To evaluate the
performance of Relay-PoW, we compare Relay-PoW
with PoW and DMD-PoW. It should be noted that DMD-
PoW represents a kind of consensus that changes the mining
difficulty according to trust value or other index, which is
used in [22], [23], [24], [25], and [26]. These works also
consider other components to improve the performance of
blockchain, for example, the space-structure chain architecture
in [25], but they are not the focus of our evaluations. The
parameters are set as follows: the node scale is 50, the
transaction rate is 30/s. The node scale and transaction rate
can be adjusted according to the needs of the experiment.
The block size is 4 kB and the transaction size is 8 B. The
nodes have the same trust value 0.7 and the same hash power
200 kH/s, which can also be adjusted according to the needs
of the experiment. In DMD-PoW, the mining difficulty is
adjusted according to Dad = (Dinit/δT), where Dinit = 26 is
the initial difficulty, Dinit is also the mining difficulty of PoW
and Relay-PoW, Dad is the adjusted difficulty, δ = 2 is the
difficulty factor, T is trust value. Considering the fairness, we
use the same method in Section IV-D to calculate the trust
value in DMD-PoW in the security comparison experiment.
Since there is no nonce workload in DMD-PoW, we only
consider the block workload when we calculating the quality
value.
a) Required time for mining a block: Through the anal-
ysis in Section VI-C, we know that parallel relay mining can
Fig. 8. Required time for mining with varying τ.
Fig. 9. Comparison of throughput with varying transaction rates.
effectively save the required time for mining blocks with con-
tinuous height. In this section, we compare the practical time
for mining blocks with continuous height of Relay-PoW, PoW,
and DMD-PoW.
Fig. 8 shows the relationship between the mining time and
the parallel degree τ in Relay-PoW, PoW, and DMD-PoW.
In PoW and DMD-PoW, a parallel degree can be understood
as the number of blocks mined continuously. First, the time
required in Relay-PoW is much smaller than that in PoW and
DMD-PoW, the reason is that we reduce the mining time
for blocks with continuous height by parallel relay mining.
Second, with the increment of τ, the time required in PoW and
DMD-PoW also increases approximately linearly, but the time
in DMD-PoW is smaller than that in PoW. This is because the
mining difficulty in DMD-PoW is inversely proportional to the
trust value, so the mining difficulty in DMD-PoW is smaller
than that in PoW, resulting a shorter mining time. These results
prove that Relay-PoW can effectively reduce the mining time
for continuous blocks, and the higher the τ is, the more obvi-
ous the effect is. When τ is 10, the mining time of Relay-PoW
outperforms PoW and DMD-PoW by 84.04% and 72.73%,
respectively, which indicates that Relay-PoW can improve the
consensus efficiency.
b) Throughput: In this section, we compare the through-
put of Relay-PoW with PoW and DMD-PoW under different
conditions.
Fig. 9 shows the changes of throughput with varying trans-
action rates from 10 to 50/s. With the increment of transaction
rate, the throughput of three methods all increase, but Relay-
PoW outperforms PoW and DMD-PoW. Attributed to parallel
mining, when the transaction rate is 50/s, the throughput of
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
QI et al.: COOPERATIVE PoW AND INCENTIVE MECHANISM FOR BLOCKCHAIN IN EDGE COMPUTING 18121
Fig. 10. Comparison of throughput with varying node scales.
Relay-PoW is 4.63× and 2.78× that of PoW and DMD-PoW,
respectively. Relay-PoW can adjust the parallel degree accord-
ing to the network load, which can significantly improve the
throughput. Limited by the block size, miners cannot packet
more transactions into blocks, so the throughput of PoW and
DMD-PoW reaches bottleneck when the transaction rate is
higher than 40/s. However, the mining difficulty in DMD-PoW
is lower than that in PoW, the miner can mine more blocks,
the performance of DMD-PoW is better than PoW.
Fig. 10 shows the changes of throughput with varying node
scales from 50 to 100. With the increment of node scale, the
throughput of three methods all decrease. When the node scale
is less than 70, the decline is not obvious. When the node scale
exceeds 70, the throughput of PoW and DMD-PoW decreases
significantly, the reason is that the increasing node scale pro-
motes ledger forking. While in Relay-PoW, there is no concern
about forking since the blocks are mined in a cooperative man-
ner, so the decline is not obvious. However, when the node
size is expanded, the throughput of Relay-PoW will decrease
slightly because it takes a long time to synchronize blocks.
In general, the throughput of Relay-PoW is not significantly
affected by the node scale, and its scalability is better than
PoW and DMD-PoW.
c) Security: In this section, we compare the security by
observing the throughput of three methods under the influence
of malicious nodes. The attack strategies are as follows.
1) PoW and DMD-PoW: Malicious nodes implement selfish
mining strategy, and will arbitrarily delay or refuse to
forward messages from honest nodes. The purpose is to
build a selfish chain to replace the honest chain, which
will fork blockchain and reduce throughput.
2) Relay-PoW: Malicious nodes implement delay attack
strategy, which is a special kind of selfish mining attack.
The purpose is to reduce the throughput.
Fig. 11 shows the changes of throughput with varying
percent of malicious nodes. With the increment of the per-
cent of malicious node, the throughput of three methods
all decrease. PoW has the worst performance, the through-
put has decreased by 69.71% compared with the beginning.
This is because there are no security measures in PoW, the
malicious nodes will fork the blockchain easily, resulting in
an obvious decline in throughput. DMD-PoW has a better
performance than PoW, the throughput has decreased by 25%.
The reason is that DMD-PoW dynamically adjusts the mining
Fig. 11. Comparison of throughput with varying percent of malicious nodes.
Fig. 12. Comparison of throughput over time under the influence of malicious
nodes.
difficulty according to trust value, which can prevent malicious
nodes from forking the blockchain. Relay-PoW has the best
performance, and the throughput decreases by only 9.4%. The
reasons are listed in the following.
1) Relay mining, the nodes mine blocks in a cooperative
manner, which strengthens the connection between the
nodes. Even if malicious nodes do not respond for a long
time, the honest successor nodes can still mine block
with the help of the longest waiting time parameter.
2) Supervision group mechanism, the system will eliminate
nodes with abnormal trust values, further reducing the
impact of malicious nodes on throughput.
In order to observe the change of throughput over time under
the influence of malicious nodes, we set the percent of mali-
cious nodes as 30%, maintain attack behavior from 5th epoch
to 10th epoch, the results are shown in Fig. 12. We can see
that the throughput of three methods does not decrease signif-
icantly at 5th epoch, because the attack effect needs a period
of time to accumulate, and decreases at 7th epoch. Attributed
to the dynamic adjusting the mining difficulty, the decrease
amplitude of DMD-PoW is less than that of PoW. As men-
tioned before, the relay mining improves the attack resistance,
so the decrease amplitude of Relay-PoW is much less than
that of PoW and DMD-PoW. In particular, the throughput
of Relay-PoW increases from 8th epoch, the reason is that
the supervision group eliminates the malicious nodes, which
reduces the node scale and increases the throughput.
d) Energy consumption and resource utilization rate: In
this section, we will compare the energy consumption and
resource utilization rate (RUR). We set up four groups of
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
18122 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023
TABLE II
COMPARISON OF THE NUMBER OF HASH OPERATIONS (MH)
TABLE III
COMPARISON OF RUR
nodes, the hash power of the nodes is 400, 300, 200, and
100 kH/s, respectively. First, we will compare the energy con-
sumption by observing the number of the hash operations, the
results are shown in Table II.
As depicted in Table II, the energy consumption of Relay-
PoW is lower than those of DMD-PoW and PoW. We can
furtherly calculate the total number of the hash operations,
the total number of the hash operations in Relay-PoW is only
83.60 MH, while those in DMD-PoW and PoW are 200.91
and 215.28 MH, respectively. The reasons are listed in the
following.
1) The essence of Relay-PoW is cooperative mining. Each
node only needs to complete the mining task within its
turn, and nodes can continue mining based on the mining
workload of other nodes. The workload of each node is
fully utilized, and the mining time is smaller than those
of DMD-PoW and PoW, so the energy consumption is
lower.
2) The essence of DMD-PoW and PoW is competitive min-
ing. All nodes need to mine blocks simultaneously to
win the permission of a block, which will create a sig-
nificant redundant workload, resulting in a high energy
consumption. In addition, we can see that the energy
consumption of DMD-PoW is lower than that of PoW.
The reason is that DMD-PoW adjusts the mining dif-
ficulty through trust value, and the number of hash
operations that nodes need to perform is smaller than
that in PoW.
Next, we will compare the resource utilization efficiency
based on data in Table II. Inspired by [25], we define RUR
for individual miners. RUR is calculated as: RUR = (S/T),
where T is the total hash operations executed by nodes to
mine a block in the network, s is the hash operations exe-
cuted by one node on the successful block. The RURs are
shown in Table III.
As depicted in Table III, the RURs of the nodes in Relay-
PoW are not 0, and the RUR ratio is similar to the hash power
ratio, which shows that the workload of each node has been
effectively utilized. Thanks to the relay mining method, nodes
mine blocks in a cooperative manner, so that the workload
of each node is not wasted. Since each node has the same
TABLE IV
COMPARISON OF REWARD
mining time (t) in its turn, the workload ratio of the nodes is
similar to the hash power ratio. However, there is only one
node whose RUR is not 0 in PoW and DMD-PoW, which
can be blamed to the competitive mining manner. In PoW and
DMD-PoW, only one node can mine a block successfully in
each round, resulting in the waste of the workload of other
nodes. In general, the workload of each node in Relay-PoW
is utilized, which is better than the other two methods in terms
of resource utilization.
3) Performance of SRAS: To observe the performance of
SRAS, we compare SRAS with the average allocation strat-
egy (AAS) and workload proportion-based allocation strategy
(WPAS).
1) AAS: The system rewards the nodes equally.
2) WPAS: The system rewards the nodes according to the
nonce workload proportion.
We set up four groups of nodes, the hash power ratio is
1:1:1:2, run Relay-PoW and reward the miners according to
different allocation strategies. The block reward is R, and the
node rewards are shown in Table IV, where the reward is
expressed by the proportion of R.
As depicted in Table IV, the rewards of the nodes are equal
in AAS, where the reward has no relationship with hash power.
AAS cannot reflect the contribution of nodes in the mining
process, which will dampen the enthusiasm of the nodes with
higher hash power. WPAS considers the hash power of the
nodes, however, it cannot fairly reflect the marginal contri-
bution of nodes and only consider one coalition form. The
relay order is random in Relay-PoW, in other words, there
are many types of coalitions, a fair reward allocation strategy
should consider all the coalition forms. SRAS considers the
marginal contribution of nodes in all relay orders, which is
more comprehensive and fairer than AAS and WPAS.
To observe the impact of the incentive mechanism on the
enthusiasm, we observe the change of the number of nodes
participating in consensus over time under three reward allo-
cation methods. We set 60 nodes, the proportion of the nodes
with 100 and 200 kH/s hash power is 3:1. We run Relay-PoW
under AAS, WPAS, and SRAS for ten epochs, the results are
shown in Fig. 13.
As shown in Fig. 13, the node number can remain stable in
the early epoch, but the performance is different in later. In
AAS, the node number gradually decreases from 4th epoch.
The reason is that the AAS allocates the same reward to the
nodes with different hash power, which dampens the enthusi-
asm of the nodes with higher hash power. In WPAS, the node
number gradually decreases from 3rd epoch and is even less
than that of AAS in 10th epoch. Although WPAS considers
the difference in hash power and allocates reward according to
the nonce workload contributed by nodes, it can only reward
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
QI et al.: COOPERATIVE PoW AND INCENTIVE MECHANISM FOR BLOCKCHAIN IN EDGE COMPUTING 18123
Fig. 13. Comparison of node number under different reward allocation
methods.
nodes according to a single mining result. Some nodes may
not be rewarded when they do not have the opportunity to
participate in mining, which dampens the enthusiasm of these
unlucky nodes. It can be seen that the number of nodes in
SRAS is relatively stable, since SRAS considers the marginal
contribution of nodes in different forms of coalitions, which
motivates nodes to participate in the mining.
VIII. CONCLUSION AND FUTURE WORK
In this article, we proposed several mechanisms to make
PoW more suitable for the BC-EC-IoT system. First, we
proposed Relay-PoW to reduce the energy consumption and
increase resource utilization efficiency, where the nodes can
mine block cooperatively. Second, we designed parallel relay
mining method to improve the throughput, where the nodes
mined blocks with multiple heights in a pipeline manner.
In addition, we proposed a supervision group mechanism to
ensure the security, where the edge servers considered the
capability and quality of the nodes to evaluate the trust value.
Finally, we formulated the mining process in Relay-PoW as a
coalitional game and proposed a fair reward allocation strat-
egy named SRAS to motivate more nodes to participate in
Relay-PoW. Experimental results have shown that Relay-PoW
and SRAS have a better performance than other methods.
For future work, we will consider applying Relay-PoW in
more IoT scenes and the resource allocation problem in edge
computing.
REFERENCES
[1] G. S. S. Chalapathi, V. Chamola, A. Vaish, and R. Buyya, “Industrial
Internet of Things (IIoT) applications of edge and fog comput-
ing: A review and future directions,” in Fog/Edge Computing for
Security, Privacy, and Applications. Cham, Switzerland: Springer, 2021,
pp. 293–325.
[2] A. Hammoud, H. Sami, A. Mourad, H. Otrok, R. Mizouni, and
J. Bentahar, “AI, blockchain, and vehicular edge computing for smart
and secure IoV: Challenges and directions,” IEEE Internet Things Mag.,
vol. 3, no. 2, pp. 68–73, Jun. 2020.
[3] U. Majeed, L. U. Khan, I. Yaqoob, S. M. A. Kazmi, K. Salah, and
C. S. Hong, “Blockchain for IoT-based smart cities: Recent advances,
requirements, and future challenges,” J. Netw. Comput. Appl., vol. 181,
May 2021, Art. no. 103007.
[4] X. Chen, M. Li, H. Zhong, Y. Ma, and C.-H. Hsu, “DNNOff: Offloading
DNN-based intelligent IoT applications in mobile edge computing,”
IEEE Trans. Ind. Informat., vol. 18, no. 4, pp. 2820–2829, Apr. 2022.
[5] M. Abbasi, E. Mohammadi-Pasand, and M. R. Khosravi, “Intelligent
workload allocation in IoT–fog–cloud architecture towards mobile edge
computing,” Comput. Commun., vol. 169, pp. 71–80, Mar. 2021.
[6] Y. Mansouri and M. A. Babar, “A review of edge computing: Features
and resource virtualization,” J. Parallel Distrib. Comput., vol. 150,
pp. 155–183, Apr. 2021.
[7] D. C. Nguyen et al., “Federated learning meets blockchain in edge com-
puting: Opportunities and challenges,” IEEE Internet Things J., vol. 8,
no. 16, pp. 12806–12825, Aug. 2021.
[8] A. S. M. S. Hosen, P. K. Sharma, I.-H. Ra, and G. H. Cho, “SPTM-EC:
A security and privacy-preserving task management in edge computing
for IIoT,” IEEE Trans. Ind. Informat., vol. 18, no. 9, pp. 6330–6339,
Sep. 2022.
[9] A. Singh, S. C. Satapathy, A. Roy, and A. Gutub, “AI-based mobile edge
computing for IoT: Applications, challenges, and future scope,” Arabian
J. Sci. Eng., vol. 47, pp. 9801–9831, Jan. 2022.
[10] Z. Liao, X. Pang, J. Zhang, B. Xiong, and J. Wang, “Blockchain on
security and forensics management in edge computing for IoT: A com-
prehensive survey,” IEEE Trans. Netw. Service Manag., vol. 19, no. 2,
pp. 1159–1175, Jun. 2022.
[11] J. H. Khor, M. Sidorov, and P. Y. Woon, “Public blockchains for
resource-constrained IoT devices—A state-of-the-art survey,” IEEE
Internet Things J., vol. 8, no. 15, pp. 11960–11982, Aug. 2021.
[12] S. Nakamoto. “Bitcoin: A peer-to-peer electronic cash system.”
2008. [Online] Available: https://assets.pubpub.org/d8wct41f/
31611263538139.pdf
[13] Z. Wang, H. Jin, W. Dai, K.-K. R. Choo, and D. Zou, “Ethereum smart
contract security research: Survey and future research opportunities,”
Front. Comput. Sci., vol. 15, no. 2, pp. 1–18, 2021.
[14] Y. Wu, H.-N. Dai, and H. Wang, “Convergence of blockchain and edge
computing for secure and scalable IIoT critical infrastructures in industry
4.0,” IEEE Internet Things J., vol. 8, no. 4, pp. 2300–2317, Feb. 2021.
[15] Q. Xu, Z. Su, and Q. Yang, “Blockchain-based trustworthy edge caching
scheme for mobile cyber-physical system,” IEEE Internet Things J.,
vol. 7, no. 2, pp. 1098–1110, Feb. 2020.
[16] G. Baranwal, D. Kumar, and D. P. Vidyarthi, “BARA: A blockchain-
aided auction-based resource allocation in edge computing enabled
industrial Internet of Things,” Future Gener. Comput. Syst., vol. 135,
pp. 333–347, Oct. 2022.
[17] S. Luo et al., “Blockchain-based task offloading in drone-aided
mobile edge computing,” IEEE Netw., vol. 35, no. 1, pp. 124–129,
Jan./Feb. 2021.
[18] L. Yuan et al., “CoopEdge: A decentralized blockchain-based plat-
form for cooperative edge computing,” in Proc. Web Conf., 2021,
pp. 2245–2257.
[19] Y. Ming et al., “Blockchain-enabled efficient dynamic cross-domain
deduplication in edge computing,” IEEE Internet Things J., vol. 9,
no. 17, pp. 15639–15656, Sep. 2022, doi: 10.1109/JIOT.2022.3150042.
[20] J. Kang, Z. Xiong, D. Niyato, D. Ye, D. I. Kim, and J. Zhao, “Toward
secure blockchain-enabled Internet of Vehicles: Optimizing consensus
management using reputation and contract theory,” IEEE Trans. Veh.
Technol., vol. 68, no. 3, pp. 2906–2920, Mar. 2019.
[21] R. Zhang, F. R. Yu, J. Liu, T. Huang, and Y. Liu, “Deep reinforcement
learning (DRL)-based device-to-device (D2D) caching with blockchain
and mobile edge computing,” IEEE Trans. Wireless Commun., vol. 19,
no. 10, pp. 6469–6485, Oct. 2020.
[22] J. Huang, L. Kong, G. Chen, M.-Y. Wu, X. Liu, and P. Zeng, “Towards
secure industrial IoT: Blockchain system with credit-based consensus
mechanism,” IEEE Trans. Ind. Informat., vol. 15, no. 6, pp. 3680–3689,
Jun. 2019.
[23] Y. Liu, K. Wang, Y. Lin, and W. Xu, “LightChain: A lightweight
blockchain system for industrial Internet of Things,” IEEE Trans. Ind.
Informat., vol. 15, no. 6, pp. 3571–3581, Jun. 2019.
[24] E. K. Wang, R. Sun, C.-M. Chen, Z. Liang, S. Kumari, and M. K. Khan,
“Proof of X-repute blockchain consensus protocol for IoT systems,”
Comput. Security, vol. 95, Aug. 2020, Art. no. 101871.
[25] Y. Liu, K. Wang, K. Qian, M. Du, and S. Guo, “Tornado:
Enabling blockchain in heterogeneous Internet of Things through a
space-structured approach,” IEEE Internet Things J., vol. 7, no. 2,
pp. 1273–1286, Feb. 2020.
[26] Y. Xu, H. Zhang, H. Ji, L. Yang, X. Li, and V. C. M. Leung, “Transaction
throughput optimization for integrated blockchain and MEC system in
IoT,” IEEE Trans. Wireless Commun., vol. 21, no. 2, pp. 1022–1036,
Feb. 2022.
[27] Z. Xiong, Y. Zhang, D. Niyato, P. Wang, and Z. Han, “When mobile
blockchain meets edge computing,” IEEE Commun. Mag., vol. 56, no. 8,
pp. 33–39, Aug. 2018.
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
18124 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023
[28] W. Sun, J. Liu, Y. Yue, and P. Wang, “Joint resource allocation and
incentive design for blockchain-based mobile edge computing,” IEEE
Trans. Wireless Commun., vol. 19, no. 9, pp. 6050–6064, Sep. 2020.
[29] Y. Du et al., “Blockchain-aided edge computing market: Smart con-
tract and consensus mechanisms,” IEEE Trans. Mobile Comput., vol. 22,
no. 6, pp. 3193–3208, Jun. 2023, doi: 10.1109/TMC.2021.3140080.
[30] J. Zhang, W. Lou, H. Sun, Q. Su, and W. Li, “Truthful auction mech-
anisms for resource allocation in the Internet of Vehicles with public
blockchain networks,” Future Gener. Comput. Syst., vol. 132, pp. 11–24,
Jul. 2022.
[31] X. Ding, J. Guo, D. Li, and W. Wu, “An incentive mechanism for build-
ing a secure blockchain-based Internet of Things,” IEEE Trans. Netw.
Sci. Eng., vol. 8, no. 1, pp. 477–487, Jan.–Mar. 2021.
[32] B. Cao et al., “Performance analysis and comparison of PoW, PoS
and DAG based blockchains,” Digit. Commun. Netw., vol. 6, no. 4,
pp. 480–485, 2020.
[33] L. S. Shapley, “A value for N-person games,” Contributions Theory
Games, vol. 2, no. 28, pp. 307–317, 1953.
Liuling Qi received the master’s degree in com-
puter science and technology from Hebei University,
Baoding, China, in 2018, where he is currently pur-
suing the Ph.D. degree in management science and
engineering.
His research interest is in blockchain and network
security.
Junfeng Tian received the master’s degree from
Xidian University, Xi’an, China, in 1995, and the
Ph.D degree in computer science and technology
from the University of Science and Technology of
China, Hefei, China, in 2004.
He is currently the Dean and the Ph.D. Supervisor
of the School of Cyber Security and Computer,
Hebei University. The main research direction is
information security and trusted computing. More
than 80 academic papers have been published in aca-
demic conferences and journals at home and abroad,
and nearly 60 have been retrieved by SCI, EI, and ISTP; responsible for the
Natural Science Foundation of Hebei Province, the Science and Technology
Transformation Fund of Hebei Province, the Tenth Five-Year Plan Project of
Hebei Province, and commissioning more than 20 development projects.
He is a Director of the China Computer Federation, the Chairman of the
Hebei Cyber Security Federation, the Vice-Chairman of the Hebei Computer
Federation, the Editorial Board of the Journal of Communications, and a mem-
ber of the China Cloud Computing Expert Advisory Committee and editorial
board.
Mengjia Chai received the master’s degree in com-
puter science and technology from Hebei University,
Baoding, China, in 2018.
She works with Hebei University. Her research
interests are network security and cryptography.
Hongyun Cai received the Ph.D. degree in computer
science and technology from Yanshan University,
Qinhuangdao, China, in 2020.
Since 2005, she has been working with Hebei
University, Baoding, China, where she is cur-
rently an Associate Professor. Her research interests
include information security, privacy computing, and
recommender systems.
Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.

More Related Content

PDF
Q-Learning Model for Blockchain Security in Internet of Medical Things Networks
PDF
Q-Learning Model for Blockchain Security in Internet of Medical Things Networks
PDF
Groupchain
PDF
Lifetime centric load balancing mechanism in wireless sensor network based Io...
PDF
AN EFFICIENT SECURE CRYPTOGRAPHY SCHEME FOR NEW ML-BASED RPL ROUTING PROTOCOL...
PDF
F233842
PDF
International Refereed Journal of Engineering and Science (IRJES)
PDF
Improving the performance of IoT devices that use Wi-Fi
Q-Learning Model for Blockchain Security in Internet of Medical Things Networks
Q-Learning Model for Blockchain Security in Internet of Medical Things Networks
Groupchain
Lifetime centric load balancing mechanism in wireless sensor network based Io...
AN EFFICIENT SECURE CRYPTOGRAPHY SCHEME FOR NEW ML-BASED RPL ROUTING PROTOCOL...
F233842
International Refereed Journal of Engineering and Science (IRJES)
Improving the performance of IoT devices that use Wi-Fi

Similar to A_Cooperative_PoW_and_Incentive_Mechanism_for_Blockchain_in_Edge_Computing.pdf (20)

PDF
Smart offload chain: a proposed architecture for blockchain assisted fog off...
PDF
HYBRID OPTICAL AND ELECTRICAL NETWORK FLOWS SCHEDULING IN CLOUD DATA CENTRES
PDF
IRJET- Blockchain based Data Sharing Framework
PDF
REVIEW ON IMPLEMENTING BLOCKCHAIN ASSISTED PUBLIC KEY ENCRYPTION TECHNIQUE IN...
PDF
Ijarcet vol-2-issue-4-1420-1427
PDF
An efficient reconfigurable workload balancing scheme for fog computing netwo...
PDF
Optimizing the placement of cloud data center in virtualized environment
PDF
Network Virtualization - A Survey
PDF
IRJET- An Adaptive Scheduling based VM with Random Key Authentication on Clou...
PDF
Resource optimization-based network selection model for heterogeneous wireles...
PDF
Secure Auditing and Deduplicating Data in Cloud
PDF
A COMPARATIVE STUDY FOR BLOCK CHAIN APPLICATIONS IN THE MANET
PDF
CFP: A Comparative Study for Block Chain Applications in the MANET
PDF
A Comparative Study for Block Chain Applications in the MANET
PDF
A Comparative Study for Block Chain Applications in the MANET
PDF
Cryptographically Secured Communication With Extraterrestrial Intelligence Us...
PDF
Network on Chip Architecture and Routing Techniques: A survey
PDF
TRUST BASED ROUTING METRIC FOR RPL ROUTING PROTOCOL IN THE INTERNET OF THINGS
PDF
TRUST BASED ROUTING METRIC FOR RPL ROUTING PROTOCOL IN THE INTERNET OF THINGS
PDF
Trustbased Routing Metric for RPL Routing Protocol in the Internet of Things.
Smart offload chain: a proposed architecture for blockchain assisted fog off...
HYBRID OPTICAL AND ELECTRICAL NETWORK FLOWS SCHEDULING IN CLOUD DATA CENTRES
IRJET- Blockchain based Data Sharing Framework
REVIEW ON IMPLEMENTING BLOCKCHAIN ASSISTED PUBLIC KEY ENCRYPTION TECHNIQUE IN...
Ijarcet vol-2-issue-4-1420-1427
An efficient reconfigurable workload balancing scheme for fog computing netwo...
Optimizing the placement of cloud data center in virtualized environment
Network Virtualization - A Survey
IRJET- An Adaptive Scheduling based VM with Random Key Authentication on Clou...
Resource optimization-based network selection model for heterogeneous wireles...
Secure Auditing and Deduplicating Data in Cloud
A COMPARATIVE STUDY FOR BLOCK CHAIN APPLICATIONS IN THE MANET
CFP: A Comparative Study for Block Chain Applications in the MANET
A Comparative Study for Block Chain Applications in the MANET
A Comparative Study for Block Chain Applications in the MANET
Cryptographically Secured Communication With Extraterrestrial Intelligence Us...
Network on Chip Architecture and Routing Techniques: A survey
TRUST BASED ROUTING METRIC FOR RPL ROUTING PROTOCOL IN THE INTERNET OF THINGS
TRUST BASED ROUTING METRIC FOR RPL ROUTING PROTOCOL IN THE INTERNET OF THINGS
Trustbased Routing Metric for RPL Routing Protocol in the Internet of Things.
Ad

More from nilesh405711 (11)

PDF
A_Review_of_Cybersecurity_in_Grid-Connected_Power_Electronics_Converters_Vuln...
PDF
Smart_Land_Registration_Using_BlockChain.pdf
PDF
CHERUBIM_A_Secure_and_Highly_Parallel_Cross-Shard_Consensus_Using_Quadruple_P...
PDF
Smart_Land_Registration_Using_BlockChain.pdf
PDF
DQDB notes.pdf
PPTX
Frame-Script and Predicate logic.pptx
DOCX
practical 9.docx
PPT
lecture02-cpp.ppt
PPT
Introduction06.ppt
PPT
Network-20210426203825.ppt
PPTX
New Microsoft PowerPoint Presentation.pptx
A_Review_of_Cybersecurity_in_Grid-Connected_Power_Electronics_Converters_Vuln...
Smart_Land_Registration_Using_BlockChain.pdf
CHERUBIM_A_Secure_and_Highly_Parallel_Cross-Shard_Consensus_Using_Quadruple_P...
Smart_Land_Registration_Using_BlockChain.pdf
DQDB notes.pdf
Frame-Script and Predicate logic.pptx
practical 9.docx
lecture02-cpp.ppt
Introduction06.ppt
Network-20210426203825.ppt
New Microsoft PowerPoint Presentation.pptx
Ad

Recently uploaded (20)

PDF
Abrasive, erosive and cavitation wear.pdf
PPTX
Module 8- Technological and Communication Skills.pptx
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
PDF
Soil Improvement Techniques Note - Rabbi
PPTX
Management Information system : MIS-e-Business Systems.pptx
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PDF
Categorization of Factors Affecting Classification Algorithms Selection
PPTX
Information Storage and Retrieval Techniques Unit III
PDF
Improvement effect of pyrolyzed agro-food biochar on the properties of.pdf
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PPTX
Feature types and data preprocessing steps
PPTX
Chemical Technological Processes, Feasibility Study and Chemical Process Indu...
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PPTX
Software Engineering and software moduleing
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Abrasive, erosive and cavitation wear.pdf
Module 8- Technological and Communication Skills.pptx
Fundamentals of safety and accident prevention -final (1).pptx
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
Soil Improvement Techniques Note - Rabbi
Management Information system : MIS-e-Business Systems.pptx
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
Categorization of Factors Affecting Classification Algorithms Selection
Information Storage and Retrieval Techniques Unit III
Improvement effect of pyrolyzed agro-food biochar on the properties of.pdf
"Array and Linked List in Data Structures with Types, Operations, Implementat...
Exploratory_Data_Analysis_Fundamentals.pdf
Feature types and data preprocessing steps
Chemical Technological Processes, Feasibility Study and Chemical Process Indu...
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
Software Engineering and software moduleing
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf

A_Cooperative_PoW_and_Incentive_Mechanism_for_Blockchain_in_Edge_Computing.pdf

  • 1. IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023 18111 A Cooperative PoW and Incentive Mechanism for Blockchain in Edge Computing Liuling Qi , Junfeng Tian , Mengjia Chai, and Hongyun Cai Abstract—More and more works use blockchain to improve the data security of integrated edge computing and Internet of Things (IoT) system. However, there are some problems of Proof- of-Work (PoW) that hinder the application, such as high energy consumption, low resource utilization efficiency, and insufficient incentive. In this article, we present a cooperative PoW named relay mining-based PoW (Relay-PoW) to reduce energy consump- tion and improve resource utilization efficiency, where the nodes can mine blocks together under the management of edge server. We further propose parallel relay mining method to increase the throughput, where the nodes can mine blocks with multiple heights in a pipeline manner. In addition, we design supervision group mechanism to ensure the security, where the edge server evaluates the trust values of the nodes according to the capabil- ity and quality, and eliminates abnormal nodes timely. Finally, we propose a Shapley-based reward allocation strategy (SRAS) to encourage node to participate in Relay-PoW. Experimental results show that Relay-PoW can effectively decrease the energy consumption, improve the throughput and resource utilization efficiency, SRAS can motivate nodes to cooperate, and they all have a better performance than other methods. Index Terms—Blockchain, edge computing, energy consump- tion, incentive, resource utilization. I. INTRODUCTION WITH the development of 5G and the large-scale deploy- ment of mobile devices, some Internet of Things (IoT) applications [1], [2], [3] will generate a large number of delay-sensitive and computation-intensive businesses, the inte- grated edge computing and IoT (EC-IoT) system has been a natural trend [4], [5], [6]. Edge computing distributes com- puting and storage resources to the edge of network, provides lower delay and more intelligent service for end users, and improves Quality of Service (QoS) of the IoT applications effectively. Compared with cloud servers, a single-edge server has lim- ited computing and storage resources, so it usually requires Manuscript received 9 August 2022; revised 26 January 2023 and 6 April 2023; accepted 15 May 2023. Date of publication 22 May 2023; date of current version 9 October 2023. This work was supported in part by the Natural Science Foundation of Hebei Province under Grant F2021201049 and Grant F2020201023; and in part by the Social Science Foundation of Hebei Province under Grant HB18SH002. (Corresponding author: Junfeng Tian.) Liuling Qi is with the Key Laboratory on High Trusted Information System, School of Cyber Security and Computer, and the School of Management, Hebei University, Baoding 071000, China (e-mail: qiliuling@hbu.edu.cn). Junfeng Tian, Mengjia Chai, and Hongyun Cai are with the Key Laboratory on High Trusted Information System, School of Cyber Security and Computer, Hebei University, Baoding 071000, China (e-mail: tjf@hbu.edu.cn; cmghbu@163.com; chy_hbu@126.com). Digital Object Identifier 10.1109/JIOT.2023.3278314 multiple edge servers to process service requests cooperatively. However, the security of intensive data is a vital challenge for service migration and sharing in EC-IoT system [7], [8], [9]. Blockchain has been regarded as a promising technology to solve the above problem, which can be integrated into the EC- IoT system (BC-EC-IoT) [10]. As a distributed ledger tech- nology, blockchain has decentralization, transparency, security, immutability, and anonymity properties, and provides a good technical support for solving the data security problem in edge computing. Since the node scale in IoT is large and dynamic, most existing works build public blockchain [11]. As a public chain consensus, Proof-of-Work (PoW) has been widely used in traditional blockchain applications, such as Bitcoin and Ethereum [12], [13]. However, there are still some critical flaws that prevent us from deploying PoW in BC-EC-IoT. 1) The energy consumption of PoW is huge, which is not suitable for power-constrained IoT devices and will decrease the system security. 2) Even though the IoT devices can rent computing resources from edge servers, they still need to mine blocks in a competitive manner, which results in low resource utilization efficiency and throughput. 3) There is a lack of effective incentive mechanism to encourage nodes to participate in consensus, the high cost of computing hinders the enthusiasm of nodes. Some works focus on lightweight PoW for IoT [22], [23], [24], [25], [26], the main idea of these works is to change the mining difficulty based on trust value or other index to reduce the energy consumption of PoW. However, the man- ner of mining blocks is still competitive, which results in low resource utilization efficiency. On the other hand, there is a lack of incentive mechanism to encourage nodes to participate in consensus in these works. In this article, we propose several mechanisms in BC-EC- IoT aiming to make PoW more suitable, the main contributions are summarized as follows. 1) We propose a cooperative PoW named relay mining- based PoW (Relay-PoW) to promote nodes from compe- tition to cooperation, decrease the energy consumption, and increase the resource utilization efficiency, where the nodes mine blocks together in a cooperative manner under the management of edge server. 2) We design a parallel relay mining method based on Relay-PoW to increase the throughput, where the system sets dynamic parallel degree according to the network 2327-4662 c 2023 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See https://www.ieee.org/publications/rights/index.html for more information. Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
  • 2. 18112 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023 load and the nodes mine blocks with multiple heights in a pipeline manner. 3) We propose a supervision group mechanism to increase the security, where edge servers supervise the consensus behavior of IoT devices in their local networks, evalu- ate the trust values from two aspects of capability and quality, and eliminate abnormal nodes timely. 4) We propose a Shapley-based reward allocation strategy (SRAS) to encourage node to participate in Relay-PoW, where we formulate the mining process in Relay-PoW as a coalitional game and fairly reward the nodes according to their marginal contributions. 5) We analyze the security and performance of Relay-PoW, and the experimental results show that Relay-PoW can effectively decrease the energy consumption, increase the resource utilization efficiency and throughput, SRAS can effectively improve the participation enthusiasm of nodes. The remainder of this article is organized as follows. In Section II, we describe the related work. Section III focuses on the system overview. In Section IV, we describe the details of Relay-PoW, parallel relay mining method, and supervi- sion group mechanism. In Section V, we design SRAS. In Section VI, we analyze the performance and security of Relay- PoW. In Section VII, we describe the experimental results in detail. Finally, we conclude this article in Section VIII. II. RELATED WORK In recent years, the BC-EC-IoT system has been a natural trend. On the one hand, edge computing can provide com- puting services with lower delay for IoT. On the other hand, blockchain can provide more secure data storage and access control services for distributed EC-IoT nodes [14]. Xu et al. [15] presented a novel blockchain-based edge caching scheme for mobile users, where they supervised the caching transactions by blockchain to tackle the data security problem. Baranwal et al. [16] proposed a resource allocation mechanism based on blockchain, where they took various quality parameters into consideration to make the resource allocation more reasonable. Luo et al. [17] intro- duced a novel task offloading architecture for mobile edge computing (MEC), where they stored the data in MEC servers who run private blockchain to ensure the audit trail of data processer. Yuan et al. [18] developed a novel decentralized platform based on blockchain, they recorded the performance of task execution by consensus to tackle the trust and incen- tive problems between the edge servers. Ming et al. [19] proposed a dynamic cross-domain deduplication scheme based on blockchain, they used smart contract to assist cross-domain deduplication to reduce the storage cost of edge nodes. The consensus protocol is the key component to deter- mine the security of blockchain. Some works used Delegated Proof of Stake (DPoS) [20]. However, DPoS selects a fixed number of agents to generate block in turn, which cannot quickly adapt to the dynamic changes of node scale in IoT. Some works used practical Byzantine fault tolerance (PBFT) which has a high consensus efficiency with a small node scale [21]. However, the high communication cost hinders its application in IoT. Since the node scale in IoT is large and dynamic, it is more appropriate to build public blockchain. Nonetheless, PoW has a high energy consumption, some works focused on lightweight PoW in IoT. Huang et al. [22] proposed Credit-based PoW based on the trust mechanism, where they changed the mining difficulty according to the trust value to reduce the energy consumption and improve the security of PoW. Liu et al. [23] presented a green consensus mech- anism named synergistic multiple proof (SMP), where the mining difficulty was changed based on the cooperation index (CI). In addition, in order to maintain the decentralization of blockchain, they set two rules to restrict the holding time of CI and the priority of mining blocks. Wang et al. [24] introduced a reputation-based consensus Proof-of-X-Repute (PoXR). In addition to dynamically adjusting the mining dif- ficulty, the reward and punishment functions of trust value were also considered, which further improved the security of consensus. Liu et al. [25] proposed a high-performance blockchain system based on a space-structured ledger, where they designed Collaborative Proof of Work (Co-PoW) to over- come the heterogeneity of IoT devices. In Co-PoW, the devices were divided into wimpy and brawny devices, and they mined Macroblocks and Microblocks, respectively. Xu et al. [26] extended the idea of [25] to the edge computing, they designed an integrated blockchain and MEC framework based on a space-structured ledger, where a novel consensus mechanism named Re-PoW was proposed. The edge servers mined MEC block and devices mined MD block, the mining difficulty of MD block was adjusted by MEC server according to the trust value. Most works change the mining difficulty according to trust value or other index to reduce the energy consumption of PoW, we summarize these works as dynamic mining difficulty PoW (DMD-PoW). Although DMD-PoW reduces the energy con- sumption, it does not change the competition state between nodes, which wastes the workload of most nodes and reduces the resource utilization efficiency. IoT users can rent a certain number of computational resources (such as CPU and GPU) from edge servers to par- ticipate in the consensus. In this case, the interaction between edge service providers and users can be modeled as resource allocation and service pricing problems. Some works studied the incentive mechanism of blockchain from the aspect of auc- tion or game theory. Xiong et al. [27] modeled the interaction between edge server and users as two-stage Stackelberg game in MEC, where they used backward induction to find the optimal pricing strategy. Sun et al. [28] considered the cross- server resource allocation problem in blockchain-based MEC, they modeled the interaction between edge servers and mobile devices as a double auction model, which can find the optimal resource allocation strategy according to the service request of the user. Du et al. [29] further considered the service pric- ing problem when there was a data service operator (DSO) in blockchain-aided edge computing. They used smart contract to establish the renting association between the DSO and edge computing node, and proposed a social welfare improved dou- ble auction mechanism to find the renting price of the winner. Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
  • 3. QI et al.: COOPERATIVE PoW AND INCENTIVE MECHANISM FOR BLOCKCHAIN IN EDGE COMPUTING 18113 Fig. 1. System overview. Zhang et al. [30] considered the resource allocation and service pricing problems in integrated blockchain and edge comput- ing Internet of Vehicles (IoV), they proposed two auction mechanisms to maximize the social welfare. Ding et al. [31] considered the relationship between the blockchain security and profits of the platform, modeled the interaction between users and platform as a two-stage Stackelberg game, and designed an incentive mechanism to motivate users to purchase more computing resource to increase the platform security. Most works considered resource allocation and service pric- ing problems between users and edge computing servers. However, they ignored how to allocate the block revenue fairly among the nodes participating in the consensus, and how to promote cooperation between nodes. III. SYSTEM OVERVIEW In this section, we will describe the overview of our system. We consider a BC-EC-IoT system in Industrial IoT (IIoT). The system architecture is shown in Fig. 1. There are three layers in the system, i.e., the device layer, the edge layer, and the cloud layer. The device layer is com- posed of IoT devices, such as sensors, actuators, etc. IoT devices connect to the nearest edge server, and can offload delay-sensitive and computation-intensive tasks to the edge server. The edge layer is composed of multiple edge servers, which have richer resources than IoT devices, and can provide low-latency computing and storage services. The cloud layer is composed of cloud server, which is controlled and managed by the administrator. We suppose the nodes in the system have private and public key pair SK, PK, and messages should be signed with private key by sender to ensure the integrity and nonrepudiation. The system adopts a hierarchical management mechanism. The cloud server directly manages the edge servers, and then the edge servers manage the IoT devices within its connec- tion range. Each edge server and its connected IoT devices can be regarded as a local network. The IoT devices in each local network can choose to participate in solo mining or relay mining under the management of the edge server (Relay mining will be described in Section IV). Each IoT device can be regarded as a node in our system. Considering the system security, we divide nodes into consensus nodes and ordinary nodes. The nodes whose trust values are higher than the trust threshold θ are consensus nodes, they can mine and validate blocks. The others are ordinary nodes, they cannot mine blocks, but they can forward transactions and validate blocks. Due to limited resources, IoT devices only store par- tial blockchain for mining and transaction verification. Edge servers can store local blockchain of local networks, and cloud server stores the entire blockchain of system. We divide the running time of our system into sequen- tial epochs. When the communication is in good condition, the transactions in the node transaction pool should be the same [23]. Therefore, in order to reduce the repeated workload, only one local network is selected in each epoch to implement the consensus. Edge server can generate the same number of tokens for each block, which can be seen as block reward R. The winner node in solo mining can get the whole R, and the node which participates in relay mining can get a part of R according to SRAS. When a node rents resources from edge server, it can pay some tokens for a discount, the specific exchange rules can be made by the edge service provider. There are four types of transactions in the system, i.e., asset movements, important instructions between devices, task offloading, and resource scheduling. The information of asset movements and important instructions between devices is captured and constructed as transactions by IoT devices, trans- mitted to other devices in the local network through wireless communication, and transmitted to other local networks by edge servers until all nodes in the system receive transactions. The information of task offloading, and resource scheduling is captured and constructed as transactions by edge servers. The structure of transaction is: [Type, From, To, Content]. Type represents the transaction type, we use 00, 01, 10, and 11 to represent asset movements, important instructions between devices, task offloading and resource scheduling transac- tions, respectively; From represents the transaction sender; To represents the transaction receiver; Content represents the transaction details, which can be filled with instruction type, and the number of transferred assets, offloading tasks, and scheduling resources. IV. COOPERATIVE POW: RELAY MINING-BASED POW In this section, we will describe the detail of Relay-PoW. Relay-PoW adopts relay mining strategy, which is an improved cooperative mining consensus different from traditional PoW. In traditional PoW, miners continuously fill in new nonce val- ues by performing nonce increment operations to find valid blocks. We design Relay-PoW based on the above character- istic of the mining process, where the nodes in each local network participate in relay mining under the management of edge server. Fig. 2 describes the process of Relay-PoW carried out by three nodes. Each node works successively for the same time t based on the nonce workload of the previous node, and node 3 successfully mines the block. We define each round of relay mining as a round, and nodes can mine a block together in each round. The work turn of each node is defined as turn, the work time of each turn is t. The steps of Relay-PoW are as follows. Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
  • 4. 18114 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023 Algorithm 1 Generation Algorithm of Relay Queue Input: Edge server private key SK, cycle σ, public key set of consen- sus nodes in local network PK = {PK1, PK2, . . . , PKn}, the nonce workloads of the nodes in previous epoch, relay queue Q = [ ]. Output: Relay queue Q. 1: for each PKi in PK: 2: if σ = 1: 3: set nonce=0. 4: end if 5: calculate Hi = H(SK|σ|PKi|nonce). 6: end for 7: Add the node has the lowest Hi into Q. 8: if multiple nodes have the lowest Hi: 9: Add the node has the lowest PK value into Q. 10: end if 11: Remove PKi from PK set. 12: Repeat 1-11 until PK is empty. 13: Return Q. Fig. 2. Relay-PoW. Step 1: The edge server constructs a pending block (see in Section IV-A), generates a relay queue according to Algorithm 1 (see in Section IV-B), and forwards the pending block to the first node in the relay queue. Step 2: Each node works successively in its turn for t time (the detail of t is in Section IV-B) according to the order in the relay queue. If a node mines successfully, it will notify all nodes in the local network and all edge servers. Otherwise, it will fill its nonce workload into the block (NonceList in the pending block) and send the block to the next node. The next relay node will continue to mine the block based on the nonce workload of the predecessor node. Step 3: Repeat step 2 until the block is mined successfully, the edge server monitors the performance of all nodes in the local network (see in Section IV-D), updates the trust values according to the work performance of the nodes, and starts the next round of relay mining. In Relay-PoW, the mining time of the node is limited, so the energy consumption of the node is reduced. Furtherly, the workload of nodes will not be wasted, which improves the resource utilization efficiency. Next, we will describe the details of Relay-PoW. A. Block Structure We define two kinds of blocks. One is pending block, which refers to a block that has no valid nonce. The other is regular block, which refers to the block with valid nonce. The pend- ing block and regular block of block i can be represented as Fig. 3. Block structure. PBi and RBi, respectively. We can know that all transactions need to be forwarded by the edge server from Section III, so the edge server can collect transactions and construct pending blocks. There is no difference between pending block and regu- lar block in terms of block structure, the block structure is shown in Fig. 3. Specifically, PrevHash is the hash value of the previous block, LeaderNode is the PK of the edge server who constructs the block, NodeList is the PK list of the nodes in the local network, t is the work time of each turn, Body contains the transactions. The meanings of Height, Difficulty, TimeStamp, Merkle Root, and Nonce are the same as those in the traditional PoW. Specially, we use NonceList to record the nonce workload of each node. If a node fails to mine a block in its turn, it will record its nonce workload into the NonceList, the successor nodes continue mining according to NonceList until a node mines a block successfully. The struc- ture of NonceList is: {cycle | PK | nonce}, cycle is used to record the cycle number, the initial value is 1. The mining interval from the first node to the last node in the relay queue is called a cycle. To mine a block, there may be multiple cycles. In one cycle, each node only has one turn. When all nodes fail to mine a block in a cycle, the edge server will start a new cycle (the cycle number will add 1) and generate a new relay queue according to Algorithm 1. Since NonceList is dynamic, it is not included in the mining. The mining function is given in the following: H(H(PrevHash|LeaderNode|NodeList|Height|Difficulty|t| TimeStamp|MerkleRoot|Nonce)) Target. For the pending blocks, we need to focus on validating the NonceList: 1) whether there are some nodes mine more than one time in a cycle and 2) whether all the nodes in the local network have participated in Relay-PoW in old cycles when there is more than one cycle. For regular blocks, the validation is the same as that in traditional PoW. B. Relay Queue and Work Time In order to ensure the randomness and unpredictability of the relay order, the edge server generates a relay queue according to Algorithm 1 before relay mining. The edge server Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
  • 5. QI et al.: COOPERATIVE PoW AND INCENTIVE MECHANISM FOR BLOCKCHAIN IN EDGE COMPUTING 18115 uses the nonce workload of the node in a previous cycle as a random source, calculates the value of H(SK|σ|PKi|nonce) by the hash function, and adds the node with the minimum hash value into relay queue. If there are multiple nodes with the same minimum hash value, the edge server will compare the PK values of these nodes and add the node with the smallest PK value into relay queue. Considering the security, the edge server will not forward the whole relay queue to the nodes in the local network, it only forwards the PK value of successor node to the node. For the following reasons, we set the same work time in a turn for each node. 1) The convenience of the management, the edge server only needs to fill one t value in the pending block. 2) Each node can participate in Relay-PoW theoretically; in order to make t reasonable, it is necessary to analyze the node mining time in PoW. The mining time of a single node is subject to exponential distribution with parameters λ [32], the expected mining time Ts of node with hash power hi is calculated as follows: Ts = 1 λ = 1 hip = D hi . (1) p is the mining probability of a single hash operation, which is inversely proportional to the mining difficulty D. By calcu- lating the average hash power, the expected mining time Tt of all nodes in the network can be calculated as follows: Tt = nD hi . (2) n is the total node number that can participate in Relay- PoW in the local network. In order to ensure that each node has the opportunity to participate in Relay-PoW theoretically, the work time t is calculated by dividing Tt equally t = D hi . (3) Additionally, the node may do not respond to the message for a long time for the following reasons, which will hinder the process of relay mining: 1) the network fluctuation in the wireless environment; 2) the damage of the device; and 3) the attack from malicious nodes. We set the longest waiting time tr = ωt, where ω 1 and ω can be adjusted by edge server. When node i starts to mine a block, it will send a starting message to its successor node, and the successor node will start a waiting clock. If the successor node does not receive a message (i.e., pending block or mined block) from node i after tr time, it will notify the edge server, and take over the work of node i with the coordination of the edge server. C. Parallel Relay Mining Method In Relay-PoW, only one node is working in each turn, the other nodes need to wait their turns to continue mining. In order to improve the throughput of Relay-PoW, we further propose a parallel relay mining method. Fig. 4 shows the mining process of the parallel relay min- ing method, where nodes mine blocks with multiple heights (Block 1 to Block 5) in a pipeline manner. In the first t, node Fig. 4. Parallel relay mining. 1 mines block 1. In the second t, node 2 mines block 1 and node 1 mines block 2, and so on. We propose parallel degree τ to represent the number of blocks that can be processed continuously by a node, and τ is 5 in Fig. 4. It can be seen that the higher the τ is, the higher the throughput the system has. Limited by the resource owned by IoT devices, τ cannot grow indefinitely. The edge server can dynamically adjust τ by monitoring the transaction sending rate in the network. When the transaction sending rate is high, the edge server can set a higher τ to cope with the heavy workload. Otherwise, the edge server can set a lower τ to reduce the energy consumption of IoT devices. In parallel relay mining, when a node needs to mine block i, its parent block i − 1 may not be valid. We will take block i−1 and block i as an example to describe the detail in parallel relay mining. We suppose the parent block i−2 of block i−1 is valid. Step 1: The edge server constructs PBi−1 and PBi for block i−1 and block i. The edge server fills the hash value of Block i−2 (HSi−2) into the PrevHash of PBi−1. Since block i−1 has not been mined, the edge server fills NULL into the PrevHash of PBi. Step 2: The nodes start parallel relay mining for block i−1 and block i. For block i − 1, the nodes implement the min- ing operation mentioned in Section IV-A. For block i, since the PrevHash of PBi is NULL, the PrevHash of PBi is not included in the mining operation, the nodes implement the mining operation as follows: H(H(LeaderNode|NodeList|Height|Difficulty|t|TimeStamp |MerkleRoot|Nonce)) Target. Step 3: When block i−1 is mined (PBi−1 becomes RBi−1), it will be verified by the nodes, and the edge server will cal- culate the hash value HSi−1 of valid block i−1. When block i is mined (PBi becomes RBi), the edger server will fill HSi−1 into the PrevHash of block i. In order to prevent the edge server from changing the content of the block i maliciously, the consistency of the completed block i should be validated by other edge servers and the nodes in the local network (e.g., they can validate the hash value of each field in block i, if the hash value is not changed, it means that the edge server does not change the content of the block). D. Supervision Group Mechanism In order to ensure the normal operation of the system, we design a supervision group mechanism. The supervision group is composed of the edge servers of each local network, they supervise the consensus behavior of the IoT devices in Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
  • 6. 18116 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023 their local networks, and then calculate the corresponding trust values. The supervision group can timely intervene the IoT devices with abnormal behavior and maintain the system security. Considering the resource heterogeneity of IoT devices, the edge servers evaluate the trust values from two aspects of capa- bility and quality, the trust value of node i in epoch j can be calculated as follows: T j i = α1C j i + α2Q j i. (4) α1 + α2 = 1, 0 α1, α2 1, 0 ≤ T j i , C j i, Q j i ≤ 1. C j i and Q j i are the capability and quality values of node i in epoch j, respectively. The capability value of IoT devices can be measured from the following three aspects: 1) comput- ing capability (CC); 2) communication capability (CMC); and 3) storage capability (SC), the capability value of node i in epoch j can be calculated as follows: C j i = β1CC j i + β2CMC j i + β3SC j i. (5) β1 + β2 + β3 = 1, 0 β1, β2, β3 1. CC j i, CMC j i, and SC j i are the CC, CMC, and SC values of node i in epoch j, respectively. We use the ratio of CPU computing power (MH/s), bandwidth (Mb/s), and available storage space (MB) to the current highest standard to represent the CC, CMC, and SC, respectively. For example, if the general highest standard of computing power is 2 MH/s and the computing power of the device is 1.2 MH/s, its CC value is 0.6. The quality value is obtained by monitoring the consensus behavior of nodes, the quality value of node i in epoch j can be calculated as follows: Q j i = γ1NP j i + γ2BP j i. (6) γ1 + γ2 = 1, 0 γ1, γ2 1. The consensus behavior of a node can be quantified by workload. Furtherly, we calculate the quality value of a node by observing whether the node has stably completed the workload matching its capability. In Relay-PoW, nodes have two kinds of behavior in their turns. 1) If a node fails to mine a block, it needs to forward the pending block to the next node. In this case, we can measure the nonce workload through the NonceList field in the block, and calculate the nonce performance value of a node. 2) If a node mines a block successfully, it needs to report the block to other nodes. In this case, we can mea- sure the block number workload, and calculate the block performance value of a node. We use NP j i and BP j i to represent the nonce performance and block performance value of node i in epoch j, respectively, and take NP j i as an example to show how to calculate it step by step. In parallel relay mining, a node may mine different blocks in different turns, so there may be multiple nonce workloads in an epoch. We calculate NP j i by measuring the average nonce workload, the average nonce workload NW j i of node i in epoch j can be calculated as follows: NW j i = n j i m=1 nm n j i (7) where n j i is the number of the blocks that node i participates in epoch j, n j i m=1 nm is the total nonce workload of node i in n j i blocks. In order to measure whether the node has stably completed the workload matching its capability, we compare the NW j i and NW j−1 i , and calculate the deviation value DNW j i DNW j i = NW j i − NW j−1 i NW j−1 i (8) where NW j−1 i is the average nonce workload of node i in previous epoch. DNW j i can reflect the workload deviation of a node in two adjacent epochs, furtherly, we can calculate NP j i through DNW j i NP j i = ⎧ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎩ 1, 0 DNW j i ≤ x1 y1, x1 DNW j i ≤ x2 y2, x2 DNW j i ≤ x3 0, DNW j i x3. (9) 0 y2 y1 1, x1 x2 x3. The smaller the value of DNW j i is, the closer the value of NP j i is to 1, which means that the node behavior is stable. For the new node, we set NP j i = 1. Similarly, we can calculate BP j i by measuring the block number workload. The calculation process is the same as NP j i, we do not repeat it again. The final trust value of node i can be calculated by com- bining the trust value of the current epoch and the previous epoch together Ti = ρT j−1 i + (1 − ρ)T j i . (10) 0 ρ 1, 0 ≤ Ti ≤ 1. The final trust value is the basis for evaluating the credibility of nodes. V. SHAPLEY-BASED REWARD ALLOCATION STRATEGY In this section, we will describe SRAS. Relay mining can be regarded as a cooperative mining strategy, which can improve the resource utilization efficiency of IoT device. The IoT devices can choose solo mining or relay mining. In order to attract IoT devices to participate in Relay-PoW, a fair reward allocation strategy is needed to allocate the block reward. Shapley value is a revenue allocation strategy in a cooperative game, which can fairly allocate the overall revenue accord- ing to the average marginal contribution of participants [33]. Inspired by the Shapley value, we propose SRAS. First, we formulate the Relay-PoW as a coalitional game. Let set S = {1, 2, 3, . . . , |S|} be a grand coalition that collects all the nodes in the local network, |S| is the total number of S. A coalition K is defined as a subset of S, which contains all nodes that participate in Relay-PoW from the beginning to the present. According to the rules of Relay-PoW, we can know that the order of nodes joining K is random and K is a Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
  • 7. QI et al.: COOPERATIVE PoW AND INCENTIVE MECHANISM FOR BLOCKCHAIN IN EDGE COMPUTING 18117 nonempty subset of S. If the newly added node successfully mines a block in its turn, we define coalition K as the winning coalition, and the utility is v(K). Now, we can define a coalitional game according to (S, v(K)) v(K) = R, if K is winning coalition 0, otherwise. (11) R is the block reward when a node mines a new block, the nodes in winning coalition K earn the reward R for all nodes in S. Each node in S is rewarded according to its marginal con- tribution, the Shapley value of the nodes in S can be calculated as follows: φ(S, s) = 1 |S|! K∈S{s} |K|!(|S| − |K| − 1)![v(K ∪ {s}) − v(K)] (12) The Shapley value is calculated according to the average marginal contribution of members in all forms of coalitions. K can be any coalition in S and |K| denotes the number of nodes in coalition K. K can be regarded as a coalition that member s waiting to join, (1/|S|!)|K|!(|S|−|K|−1)! is the probability that member s joins coalition K, [v(K ∪ {s}) − v(K)] is the marginal contribution of member s in coalition K. Finally, we can allocate the block reward according to the Shapley value. VI. PERFORMANCE AND SECURITY ANALYSIS A. Mining Probability Analysis In this section, we will analyze the success probability that a node mines a block in its turn. Theorem 1: In Relay-PoW, the success probability that a node mines a block in its turn depends on the hash power proportion of a set, which includes this node and all its predecessor nodes in the relay queue. Proof: We suppose that N nodes can participate in Relay- PoW in the local network, node i is the nth relay node in the relay queue with hash power hi. Since node i mines blocks according to the nonce workloads of its predecessor nodes, we should discuss them together when we calculate the success probability that node i mines a block in its turn. We treat node i and all its predecessor nodes as a logic node η, let X be a random variable that represents the time required for node η to mine a block successfully, X is subject to the exponential distribution with parameter λ. In this case, the success probability that node i mines a block in its turn is equal to the probability that node η mines a block when (n − 1)t ≤ X ≤ nt (the transmission delay is ignored). P((n − 1)t ≤ X ≤ nt) can be calculated by P((n − 1)t ≤ X ≤ nt) = nt (n−1)t λe−λx dx = e−(n−1)λt − e−nλt (13) where λ = ([ n i=1 hi]/n)p, ([ n i=1 hi]/n) is the average hash power of η, p is the mining probability of single hash operation. According to the definition of t, λt can be expressed by λt = n i=1 hi n N i=1 hi (14) where ([ n i=1 hi]/[ N i=1 hi]) is the hash power proportion of η in the local network, we denote it as ξ, ξ ∈ (0, 1]. So P((n − 1)t ≤ X ≤ nt) = e− n−1 n ξ − e−ξ . (15) We denote e−([n−1]/n)ξ −e−ξ as f(ξ), furtherly, we can know f(0) 0 and f(ξ) 0, Theorem 1 is proved. From Theorem 1, we can know that when we discuss the success probability that node i mines a block in its turn, we should treat node i and its predecessor nodes as a whole, the higher hash power proportion this whole has, the higher the success probability node i has in its turn. In parallel relay mining, as time goes on, nodes mine multiple blocks parallelly in the form of pipeline, which greatly improves mining efficiency. In a single turn, a node still only mines a single block based on the nonce workloads of its predecessor nodes, so Theorem 1 still works in parallel relay mining. B. Energy Consumption Analysis In this section, we will analyze the energy consumption of Relay-PoW and PoW. Theorem 2: The energy consumption of Relay-PoW is lower than that of PoW. Proof: We suppose that N nodes can participate in mining, the hash power of node i is hi, which denotes the number of hash operations that node i can implement per second. The block is mined by a node with hash power hw, the mining time is Tw, the communication delay between the nodes is not considered. In PoW, all N nodes need to mine blocks in a competitive manner. When a node wins the mining, it will forward the mined block to other nodes, and the remaining nodes will stop mining operations. In this case, the mining time for all nodes is also Tw, the workload of a single node i WP−S can be calculated as follows: WP−S = hiTw. (16) The workload of all N nodes WP−A can be calculated as follows: WP−A = N i=1 hiTw. (17) In Relay-PoW, all N nodes mine a block in a cooperative manner, which can be seen as allocating the workload of the winner node in PoW (hwTw) to all N nodes. Each node only needs to mine a short time in its turn (the time length of a turn is t), and nodes can continue mining based on the work- load of other nodes until the block is mined. In this case, the workload of a single node i is related to the number of the turns it participates in, which is denoted as WR−S and can be calculated as follows: WR−S = hirit (18) Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
  • 8. 18118 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023 where ri is the number of the turns that node i participates in, ri can be calculated as follows: ri = ⎧ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎩ 0 or 1, when hwTw N i=1 hit 1, when hwTw = N i=1 hit hwTw N i=1 hit , when it does not mine in the last cycle hwTw N i=1 hit , when it mines in the last cycle (19) where hwTw is the workload of the winner node, N i=1 hit is the total workload of N nodes in a cycle in Relay-PoW, (hwTw)/( N i=1 hit) denotes the largest integer which is smaller than ([hwTw]/[ N i=1 hit]), and (hwTw)/( N i=1 hit) denotes the smallest integer which is larger than ([hwTw]/[ N i=1 hit]). In Section IV-A, we defined cycle (i.e., the mining interval from the first node to the last node in the relay queue). When hwTw N i=1 hit, it indicates that the block can be mined through a partial cycle of relay mining (i.e., some nodes do not mine), the value of ri depends on the position of the node i in the relay queue. When hwTw = N i=1 hit, it indicates that the block can be mined through a whole cycle of relay min- ing, and ri = 1. If the block is not mined in a cycle, the edge server will start a new cycle. In this case, ri has two possible values, when node i does not participate in the min- ing in the last cycle, ri = (hwTw)/( N i=1 hit), otherwise, ri = (hwTw)/( N i=1 hit) . Whether node i can participate in the last cycle of mining also depends on its position in the relay queue. We can know that ri ≤ (hwTw)/( N i=1 hit) ([hwTw]/[ N i=1 hit]) + 1, so WR−S hi hwTw N i=1 hit + 1 t. (20) In this case, t Tw, (hw/[ N i=1 hi]) ∈ (0, 1), we can know that hi(([hwTw]/[ N i=1 hit]) + 1)t hiTw, so WR−S WP−S. We can also know that WR−S WP−S ≈ hw N i=1 hi . (21) If the hash power of all N nodes is equal, the energy con- sumption of a single node of Relay-PoW is only 1/N of that of PoW. From the characteristic of Relay-PoW, we can know that the workload of all N nodes WR−A is equal to the workload of the winner node in PoW WR−A = N i=1 hirit = hwTw. (22) It can be seen that WR−A WP−A, Theorem 2 is proved. C. Mining Time Analysis In the parallel relay mining method, the system can adjust the number of blocks continuously mined through parallel degree. In this section, we will analyze the time required to Fig. 5. Required time for mining in Relay-PoW and PoW with varying τ. mine blocks with multiple heights continuously in Relay-PoW and PoW. Theorem 3: When the parallel degree is τ, node number is n, the ratio of the time required to continuously mine τ blocks in Relay-PoW and PoW is ([τ + n − 1]/τn). Proof: When the parallel degree is τ, node number is n, the time TR required to continuously mine τ blocks in Relay- PoW is TR = nt + (τ − 1)t. (23) The time Tp required to continuously mine τ blocks in PoW is TP = τnt. (24) We can see that nt is the expected time required to mine a block for n nodes in (2), and Theorem 3 is proved. In order to show the relative relationship between TR and TP more clearly, we set n = 5, and observe the theoretical time required for continuously mining τ blocks in Relay-PoW and PoW with varying τ. The result is shown in Fig. 5. The x-axis is the parallel degree τ, the y-axis is the required time for mining τ blocks and this time is not a specific time value, which is expressed as a multiple of t. With the increment of τ, the gap of the required time for mining τ blocks in PoW and Relay-PoW becomes larger and larger, and the required time in Relay-PoW is much smaller than that in PoW, which indicates that the consensus efficiency of Relay-PoW is much higher than that of PoW. D. Attack Resistance Analysis In this section, we will analyze the attack resistance of Relay-PoW. We divide attacks into two types: 1) general attacks and 2) special attacks. General attack refers to the com- mon attacks in PoW consensus, and special attack refers to the attacks against Relay-PoW alone. 1) General Attacks: Selfish Mining: In PoW, malicious nodes can take advantage of hash power to overthrow the hon- est main chain by building a selfish chain. Unlike traditional PoW, nodes in Relay-PoW cannot independently complete mining tasks for a single block. In each round of Relay-PoW, each node mines for t time in random order. If a node fails to mine a block in its turn, the successor nodes need to continue mining. Therefore, malicious nodes cannot mine blocks with continuous height in a short time in Relay-PoW, and cannot construct a selfish chain and launch selfish mining attack. Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
  • 9. QI et al.: COOPERATIVE PoW AND INCENTIVE MECHANISM FOR BLOCKCHAIN IN EDGE COMPUTING 18119 Sybil Attack: Malicious nodes control most nodes in the network by forging identities, which can affect the security of blockchain. Traditional PoW can resist Sybil attack, even if malicious nodes forge multiple identities, they cannot use these forged identities to mine simultaneously due to the limit of computing resource. In Relay-PoW, there is always only one node mining block, which ostensibly provides convenience for malicious nodes to launch Sybil attack. However, in parallel relay mining, nodes are required to mine blocks with different heights, so malicious nodes still cannot use forged identities to mine blocks with different heights at the same turn. In addi- tion, in the IoT scenario with high-security requirements (such as IIoT), there are strict identity management measures, which further increases the difficulty for malicious nodes to launch the Sybil attack. 2) Special Attacks: Delay Attack: It can be regarded as a special form of selfish mining attack, the malicious node does not forward the pending block or the mined block for a long time, which can delay the time required for mining success- fully and reduce the throughput. We can resist delay attack through the following measures. 1) The relay queue is random, malicious node cannot predict its order, and the honest nodes may have mined the block before the turn of the malicious node, so it is difficult to launch delay attack. 2) We set the longest waiting time. If the waiting time toward the malicious node is longer than the longest waiting time, its successor node will inform this behav- ior to the edge server, and the edge server will handle this case timely. 3) The supervision group composed of edge servers monitors the behaviors of the nodes. When a node behaves abnor- mally, its trust value will decline. If the trust value is lower than the threshold θ, it will be eliminated by the system. Lazy Leader Attack: In Relay-PoW, the role of edge server is very important, such as packaging blocks, determining the relay queue, etc. The edge servers may have three aspects of malicious behavior. 1) The edge server packages duplicate or illegal transac- tions. In order to prevent such attacks, the blocks need to be jointly verified by other edge servers. 2) The edge server repeatedly selects a node to mine or deliberately ignores some nodes. To prevent such attack, we design cycle field in NonceList. Nodes can check the PK value to see whether there are duplicate nodes mine blocks, and whether all the nodes have mined when edge server starts a new cycle. 3) In parallel relay mining, the edge server may maliciously change the block content when it fills the PrevHash field. To prevent this attack, the consistency of the filled block should be validated again by other edge servers and nodes in the local network. VII. EVALUATION AND ANALYSIS A. Environment and Parameters Setting We use PC as edge servers, and each PC runs several nodes as IoT devices. Each PC and its running nodes form a local TABLE I PARAMETERS SETTING Fig. 6. Trust values of nodes with different capability values (with honest behavior). network. The number of PC and node varies with the require- ments. Each PC is equipped with Intel Core i7-6700 CPU, 16-GB memory, and runs Windows 10 operation system. We only consider the differences in hash powers of nodes, and simulate nodes with different hash power by limiting the per- forming number of hash functions. Each PC connects a client which can send transactions with varying rate. The parameters are set as Table I. B. Result Analysis 1) Trust Mechanism Analysis: The edge servers collect the behavior information of the nodes, calculate the trust value based on the capability and quality. In order to verify whether the trust mechanism can accurately reflect the behav- ior changes of nodes, we set up four groups of nodes with different capability values (0.2, 0.4, 0.6, and 0.8, respectively), and run for 15 epochs. The changes of trust values of these nodes are shown in Figs. 6 and 7. Fig. 6 proves that if a node maintains honest behavior, the trust value will gradually increase and stabilize after a period of time (six epochs). In addition, the higher the capa- bility value a node has, the higher the trust value it has. This shows that the trust mechanism can well distinguish nodes with different capability values. Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
  • 10. 18120 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023 Fig. 7. Trust values of nodes with different capability values (with malicious behavior). In order to observe the impact of malicious behavior on the trust value, the nodes implement a delay attack in 7th epoch and then restore honest behavior, Fig. 7 shows the changes of trust values. We can see that when nodes have malicious behavior in 7th epoch, the trust value will decline rapidly. Even if the nodes restore honest behavior, it will take a long time (about eight epochs) to restore the previous level of trust value. The reason is that the trust value of the node in the previous epoch is considered when we calculating the final trust value, the node needs a certain period of good behavior accumulation to return to the normal level. From the above results, we can see that the trust mecha- nism can quickly and accurately reflect the honest or malicious behavior of nodes, and the punishment for malicious behavior is severe. The supervision group composed of edge servers can detect malicious nodes in time and ensure system security. 2) Performance of Relay-PoW: To evaluate the performance of Relay-PoW, we compare Relay-PoW with PoW and DMD-PoW. It should be noted that DMD- PoW represents a kind of consensus that changes the mining difficulty according to trust value or other index, which is used in [22], [23], [24], [25], and [26]. These works also consider other components to improve the performance of blockchain, for example, the space-structure chain architecture in [25], but they are not the focus of our evaluations. The parameters are set as follows: the node scale is 50, the transaction rate is 30/s. The node scale and transaction rate can be adjusted according to the needs of the experiment. The block size is 4 kB and the transaction size is 8 B. The nodes have the same trust value 0.7 and the same hash power 200 kH/s, which can also be adjusted according to the needs of the experiment. In DMD-PoW, the mining difficulty is adjusted according to Dad = (Dinit/δT), where Dinit = 26 is the initial difficulty, Dinit is also the mining difficulty of PoW and Relay-PoW, Dad is the adjusted difficulty, δ = 2 is the difficulty factor, T is trust value. Considering the fairness, we use the same method in Section IV-D to calculate the trust value in DMD-PoW in the security comparison experiment. Since there is no nonce workload in DMD-PoW, we only consider the block workload when we calculating the quality value. a) Required time for mining a block: Through the anal- ysis in Section VI-C, we know that parallel relay mining can Fig. 8. Required time for mining with varying τ. Fig. 9. Comparison of throughput with varying transaction rates. effectively save the required time for mining blocks with con- tinuous height. In this section, we compare the practical time for mining blocks with continuous height of Relay-PoW, PoW, and DMD-PoW. Fig. 8 shows the relationship between the mining time and the parallel degree τ in Relay-PoW, PoW, and DMD-PoW. In PoW and DMD-PoW, a parallel degree can be understood as the number of blocks mined continuously. First, the time required in Relay-PoW is much smaller than that in PoW and DMD-PoW, the reason is that we reduce the mining time for blocks with continuous height by parallel relay mining. Second, with the increment of τ, the time required in PoW and DMD-PoW also increases approximately linearly, but the time in DMD-PoW is smaller than that in PoW. This is because the mining difficulty in DMD-PoW is inversely proportional to the trust value, so the mining difficulty in DMD-PoW is smaller than that in PoW, resulting a shorter mining time. These results prove that Relay-PoW can effectively reduce the mining time for continuous blocks, and the higher the τ is, the more obvi- ous the effect is. When τ is 10, the mining time of Relay-PoW outperforms PoW and DMD-PoW by 84.04% and 72.73%, respectively, which indicates that Relay-PoW can improve the consensus efficiency. b) Throughput: In this section, we compare the through- put of Relay-PoW with PoW and DMD-PoW under different conditions. Fig. 9 shows the changes of throughput with varying trans- action rates from 10 to 50/s. With the increment of transaction rate, the throughput of three methods all increase, but Relay- PoW outperforms PoW and DMD-PoW. Attributed to parallel mining, when the transaction rate is 50/s, the throughput of Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
  • 11. QI et al.: COOPERATIVE PoW AND INCENTIVE MECHANISM FOR BLOCKCHAIN IN EDGE COMPUTING 18121 Fig. 10. Comparison of throughput with varying node scales. Relay-PoW is 4.63× and 2.78× that of PoW and DMD-PoW, respectively. Relay-PoW can adjust the parallel degree accord- ing to the network load, which can significantly improve the throughput. Limited by the block size, miners cannot packet more transactions into blocks, so the throughput of PoW and DMD-PoW reaches bottleneck when the transaction rate is higher than 40/s. However, the mining difficulty in DMD-PoW is lower than that in PoW, the miner can mine more blocks, the performance of DMD-PoW is better than PoW. Fig. 10 shows the changes of throughput with varying node scales from 50 to 100. With the increment of node scale, the throughput of three methods all decrease. When the node scale is less than 70, the decline is not obvious. When the node scale exceeds 70, the throughput of PoW and DMD-PoW decreases significantly, the reason is that the increasing node scale pro- motes ledger forking. While in Relay-PoW, there is no concern about forking since the blocks are mined in a cooperative man- ner, so the decline is not obvious. However, when the node size is expanded, the throughput of Relay-PoW will decrease slightly because it takes a long time to synchronize blocks. In general, the throughput of Relay-PoW is not significantly affected by the node scale, and its scalability is better than PoW and DMD-PoW. c) Security: In this section, we compare the security by observing the throughput of three methods under the influence of malicious nodes. The attack strategies are as follows. 1) PoW and DMD-PoW: Malicious nodes implement selfish mining strategy, and will arbitrarily delay or refuse to forward messages from honest nodes. The purpose is to build a selfish chain to replace the honest chain, which will fork blockchain and reduce throughput. 2) Relay-PoW: Malicious nodes implement delay attack strategy, which is a special kind of selfish mining attack. The purpose is to reduce the throughput. Fig. 11 shows the changes of throughput with varying percent of malicious nodes. With the increment of the per- cent of malicious node, the throughput of three methods all decrease. PoW has the worst performance, the through- put has decreased by 69.71% compared with the beginning. This is because there are no security measures in PoW, the malicious nodes will fork the blockchain easily, resulting in an obvious decline in throughput. DMD-PoW has a better performance than PoW, the throughput has decreased by 25%. The reason is that DMD-PoW dynamically adjusts the mining Fig. 11. Comparison of throughput with varying percent of malicious nodes. Fig. 12. Comparison of throughput over time under the influence of malicious nodes. difficulty according to trust value, which can prevent malicious nodes from forking the blockchain. Relay-PoW has the best performance, and the throughput decreases by only 9.4%. The reasons are listed in the following. 1) Relay mining, the nodes mine blocks in a cooperative manner, which strengthens the connection between the nodes. Even if malicious nodes do not respond for a long time, the honest successor nodes can still mine block with the help of the longest waiting time parameter. 2) Supervision group mechanism, the system will eliminate nodes with abnormal trust values, further reducing the impact of malicious nodes on throughput. In order to observe the change of throughput over time under the influence of malicious nodes, we set the percent of mali- cious nodes as 30%, maintain attack behavior from 5th epoch to 10th epoch, the results are shown in Fig. 12. We can see that the throughput of three methods does not decrease signif- icantly at 5th epoch, because the attack effect needs a period of time to accumulate, and decreases at 7th epoch. Attributed to the dynamic adjusting the mining difficulty, the decrease amplitude of DMD-PoW is less than that of PoW. As men- tioned before, the relay mining improves the attack resistance, so the decrease amplitude of Relay-PoW is much less than that of PoW and DMD-PoW. In particular, the throughput of Relay-PoW increases from 8th epoch, the reason is that the supervision group eliminates the malicious nodes, which reduces the node scale and increases the throughput. d) Energy consumption and resource utilization rate: In this section, we will compare the energy consumption and resource utilization rate (RUR). We set up four groups of Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
  • 12. 18122 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023 TABLE II COMPARISON OF THE NUMBER OF HASH OPERATIONS (MH) TABLE III COMPARISON OF RUR nodes, the hash power of the nodes is 400, 300, 200, and 100 kH/s, respectively. First, we will compare the energy con- sumption by observing the number of the hash operations, the results are shown in Table II. As depicted in Table II, the energy consumption of Relay- PoW is lower than those of DMD-PoW and PoW. We can furtherly calculate the total number of the hash operations, the total number of the hash operations in Relay-PoW is only 83.60 MH, while those in DMD-PoW and PoW are 200.91 and 215.28 MH, respectively. The reasons are listed in the following. 1) The essence of Relay-PoW is cooperative mining. Each node only needs to complete the mining task within its turn, and nodes can continue mining based on the mining workload of other nodes. The workload of each node is fully utilized, and the mining time is smaller than those of DMD-PoW and PoW, so the energy consumption is lower. 2) The essence of DMD-PoW and PoW is competitive min- ing. All nodes need to mine blocks simultaneously to win the permission of a block, which will create a sig- nificant redundant workload, resulting in a high energy consumption. In addition, we can see that the energy consumption of DMD-PoW is lower than that of PoW. The reason is that DMD-PoW adjusts the mining dif- ficulty through trust value, and the number of hash operations that nodes need to perform is smaller than that in PoW. Next, we will compare the resource utilization efficiency based on data in Table II. Inspired by [25], we define RUR for individual miners. RUR is calculated as: RUR = (S/T), where T is the total hash operations executed by nodes to mine a block in the network, s is the hash operations exe- cuted by one node on the successful block. The RURs are shown in Table III. As depicted in Table III, the RURs of the nodes in Relay- PoW are not 0, and the RUR ratio is similar to the hash power ratio, which shows that the workload of each node has been effectively utilized. Thanks to the relay mining method, nodes mine blocks in a cooperative manner, so that the workload of each node is not wasted. Since each node has the same TABLE IV COMPARISON OF REWARD mining time (t) in its turn, the workload ratio of the nodes is similar to the hash power ratio. However, there is only one node whose RUR is not 0 in PoW and DMD-PoW, which can be blamed to the competitive mining manner. In PoW and DMD-PoW, only one node can mine a block successfully in each round, resulting in the waste of the workload of other nodes. In general, the workload of each node in Relay-PoW is utilized, which is better than the other two methods in terms of resource utilization. 3) Performance of SRAS: To observe the performance of SRAS, we compare SRAS with the average allocation strat- egy (AAS) and workload proportion-based allocation strategy (WPAS). 1) AAS: The system rewards the nodes equally. 2) WPAS: The system rewards the nodes according to the nonce workload proportion. We set up four groups of nodes, the hash power ratio is 1:1:1:2, run Relay-PoW and reward the miners according to different allocation strategies. The block reward is R, and the node rewards are shown in Table IV, where the reward is expressed by the proportion of R. As depicted in Table IV, the rewards of the nodes are equal in AAS, where the reward has no relationship with hash power. AAS cannot reflect the contribution of nodes in the mining process, which will dampen the enthusiasm of the nodes with higher hash power. WPAS considers the hash power of the nodes, however, it cannot fairly reflect the marginal contri- bution of nodes and only consider one coalition form. The relay order is random in Relay-PoW, in other words, there are many types of coalitions, a fair reward allocation strategy should consider all the coalition forms. SRAS considers the marginal contribution of nodes in all relay orders, which is more comprehensive and fairer than AAS and WPAS. To observe the impact of the incentive mechanism on the enthusiasm, we observe the change of the number of nodes participating in consensus over time under three reward allo- cation methods. We set 60 nodes, the proportion of the nodes with 100 and 200 kH/s hash power is 3:1. We run Relay-PoW under AAS, WPAS, and SRAS for ten epochs, the results are shown in Fig. 13. As shown in Fig. 13, the node number can remain stable in the early epoch, but the performance is different in later. In AAS, the node number gradually decreases from 4th epoch. The reason is that the AAS allocates the same reward to the nodes with different hash power, which dampens the enthusi- asm of the nodes with higher hash power. In WPAS, the node number gradually decreases from 3rd epoch and is even less than that of AAS in 10th epoch. Although WPAS considers the difference in hash power and allocates reward according to the nonce workload contributed by nodes, it can only reward Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
  • 13. QI et al.: COOPERATIVE PoW AND INCENTIVE MECHANISM FOR BLOCKCHAIN IN EDGE COMPUTING 18123 Fig. 13. Comparison of node number under different reward allocation methods. nodes according to a single mining result. Some nodes may not be rewarded when they do not have the opportunity to participate in mining, which dampens the enthusiasm of these unlucky nodes. It can be seen that the number of nodes in SRAS is relatively stable, since SRAS considers the marginal contribution of nodes in different forms of coalitions, which motivates nodes to participate in the mining. VIII. CONCLUSION AND FUTURE WORK In this article, we proposed several mechanisms to make PoW more suitable for the BC-EC-IoT system. First, we proposed Relay-PoW to reduce the energy consumption and increase resource utilization efficiency, where the nodes can mine block cooperatively. Second, we designed parallel relay mining method to improve the throughput, where the nodes mined blocks with multiple heights in a pipeline manner. In addition, we proposed a supervision group mechanism to ensure the security, where the edge servers considered the capability and quality of the nodes to evaluate the trust value. Finally, we formulated the mining process in Relay-PoW as a coalitional game and proposed a fair reward allocation strat- egy named SRAS to motivate more nodes to participate in Relay-PoW. Experimental results have shown that Relay-PoW and SRAS have a better performance than other methods. For future work, we will consider applying Relay-PoW in more IoT scenes and the resource allocation problem in edge computing. REFERENCES [1] G. S. S. Chalapathi, V. Chamola, A. Vaish, and R. Buyya, “Industrial Internet of Things (IIoT) applications of edge and fog comput- ing: A review and future directions,” in Fog/Edge Computing for Security, Privacy, and Applications. Cham, Switzerland: Springer, 2021, pp. 293–325. [2] A. Hammoud, H. Sami, A. Mourad, H. Otrok, R. Mizouni, and J. Bentahar, “AI, blockchain, and vehicular edge computing for smart and secure IoV: Challenges and directions,” IEEE Internet Things Mag., vol. 3, no. 2, pp. 68–73, Jun. 2020. [3] U. Majeed, L. U. Khan, I. Yaqoob, S. M. A. Kazmi, K. Salah, and C. S. Hong, “Blockchain for IoT-based smart cities: Recent advances, requirements, and future challenges,” J. Netw. Comput. Appl., vol. 181, May 2021, Art. no. 103007. [4] X. Chen, M. Li, H. Zhong, Y. Ma, and C.-H. Hsu, “DNNOff: Offloading DNN-based intelligent IoT applications in mobile edge computing,” IEEE Trans. Ind. Informat., vol. 18, no. 4, pp. 2820–2829, Apr. 2022. [5] M. Abbasi, E. Mohammadi-Pasand, and M. R. Khosravi, “Intelligent workload allocation in IoT–fog–cloud architecture towards mobile edge computing,” Comput. Commun., vol. 169, pp. 71–80, Mar. 2021. [6] Y. Mansouri and M. A. Babar, “A review of edge computing: Features and resource virtualization,” J. Parallel Distrib. Comput., vol. 150, pp. 155–183, Apr. 2021. [7] D. C. Nguyen et al., “Federated learning meets blockchain in edge com- puting: Opportunities and challenges,” IEEE Internet Things J., vol. 8, no. 16, pp. 12806–12825, Aug. 2021. [8] A. S. M. S. Hosen, P. K. Sharma, I.-H. Ra, and G. H. Cho, “SPTM-EC: A security and privacy-preserving task management in edge computing for IIoT,” IEEE Trans. Ind. Informat., vol. 18, no. 9, pp. 6330–6339, Sep. 2022. [9] A. Singh, S. C. Satapathy, A. Roy, and A. Gutub, “AI-based mobile edge computing for IoT: Applications, challenges, and future scope,” Arabian J. Sci. Eng., vol. 47, pp. 9801–9831, Jan. 2022. [10] Z. Liao, X. Pang, J. Zhang, B. Xiong, and J. Wang, “Blockchain on security and forensics management in edge computing for IoT: A com- prehensive survey,” IEEE Trans. Netw. Service Manag., vol. 19, no. 2, pp. 1159–1175, Jun. 2022. [11] J. H. Khor, M. Sidorov, and P. Y. Woon, “Public blockchains for resource-constrained IoT devices—A state-of-the-art survey,” IEEE Internet Things J., vol. 8, no. 15, pp. 11960–11982, Aug. 2021. [12] S. Nakamoto. “Bitcoin: A peer-to-peer electronic cash system.” 2008. [Online] Available: https://assets.pubpub.org/d8wct41f/ 31611263538139.pdf [13] Z. Wang, H. Jin, W. Dai, K.-K. R. Choo, and D. Zou, “Ethereum smart contract security research: Survey and future research opportunities,” Front. Comput. Sci., vol. 15, no. 2, pp. 1–18, 2021. [14] Y. Wu, H.-N. Dai, and H. Wang, “Convergence of blockchain and edge computing for secure and scalable IIoT critical infrastructures in industry 4.0,” IEEE Internet Things J., vol. 8, no. 4, pp. 2300–2317, Feb. 2021. [15] Q. Xu, Z. Su, and Q. Yang, “Blockchain-based trustworthy edge caching scheme for mobile cyber-physical system,” IEEE Internet Things J., vol. 7, no. 2, pp. 1098–1110, Feb. 2020. [16] G. Baranwal, D. Kumar, and D. P. Vidyarthi, “BARA: A blockchain- aided auction-based resource allocation in edge computing enabled industrial Internet of Things,” Future Gener. Comput. Syst., vol. 135, pp. 333–347, Oct. 2022. [17] S. Luo et al., “Blockchain-based task offloading in drone-aided mobile edge computing,” IEEE Netw., vol. 35, no. 1, pp. 124–129, Jan./Feb. 2021. [18] L. Yuan et al., “CoopEdge: A decentralized blockchain-based plat- form for cooperative edge computing,” in Proc. Web Conf., 2021, pp. 2245–2257. [19] Y. Ming et al., “Blockchain-enabled efficient dynamic cross-domain deduplication in edge computing,” IEEE Internet Things J., vol. 9, no. 17, pp. 15639–15656, Sep. 2022, doi: 10.1109/JIOT.2022.3150042. [20] J. Kang, Z. Xiong, D. Niyato, D. Ye, D. I. Kim, and J. Zhao, “Toward secure blockchain-enabled Internet of Vehicles: Optimizing consensus management using reputation and contract theory,” IEEE Trans. Veh. Technol., vol. 68, no. 3, pp. 2906–2920, Mar. 2019. [21] R. Zhang, F. R. Yu, J. Liu, T. Huang, and Y. Liu, “Deep reinforcement learning (DRL)-based device-to-device (D2D) caching with blockchain and mobile edge computing,” IEEE Trans. Wireless Commun., vol. 19, no. 10, pp. 6469–6485, Oct. 2020. [22] J. Huang, L. Kong, G. Chen, M.-Y. Wu, X. Liu, and P. Zeng, “Towards secure industrial IoT: Blockchain system with credit-based consensus mechanism,” IEEE Trans. Ind. Informat., vol. 15, no. 6, pp. 3680–3689, Jun. 2019. [23] Y. Liu, K. Wang, Y. Lin, and W. Xu, “LightChain: A lightweight blockchain system for industrial Internet of Things,” IEEE Trans. Ind. Informat., vol. 15, no. 6, pp. 3571–3581, Jun. 2019. [24] E. K. Wang, R. Sun, C.-M. Chen, Z. Liang, S. Kumari, and M. K. Khan, “Proof of X-repute blockchain consensus protocol for IoT systems,” Comput. Security, vol. 95, Aug. 2020, Art. no. 101871. [25] Y. Liu, K. Wang, K. Qian, M. Du, and S. Guo, “Tornado: Enabling blockchain in heterogeneous Internet of Things through a space-structured approach,” IEEE Internet Things J., vol. 7, no. 2, pp. 1273–1286, Feb. 2020. [26] Y. Xu, H. Zhang, H. Ji, L. Yang, X. Li, and V. C. M. Leung, “Transaction throughput optimization for integrated blockchain and MEC system in IoT,” IEEE Trans. Wireless Commun., vol. 21, no. 2, pp. 1022–1036, Feb. 2022. [27] Z. Xiong, Y. Zhang, D. Niyato, P. Wang, and Z. Han, “When mobile blockchain meets edge computing,” IEEE Commun. Mag., vol. 56, no. 8, pp. 33–39, Aug. 2018. Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.
  • 14. 18124 IEEE INTERNET OF THINGS JOURNAL, VOL. 10, NO. 20, 15 OCTOBER 2023 [28] W. Sun, J. Liu, Y. Yue, and P. Wang, “Joint resource allocation and incentive design for blockchain-based mobile edge computing,” IEEE Trans. Wireless Commun., vol. 19, no. 9, pp. 6050–6064, Sep. 2020. [29] Y. Du et al., “Blockchain-aided edge computing market: Smart con- tract and consensus mechanisms,” IEEE Trans. Mobile Comput., vol. 22, no. 6, pp. 3193–3208, Jun. 2023, doi: 10.1109/TMC.2021.3140080. [30] J. Zhang, W. Lou, H. Sun, Q. Su, and W. Li, “Truthful auction mech- anisms for resource allocation in the Internet of Vehicles with public blockchain networks,” Future Gener. Comput. Syst., vol. 132, pp. 11–24, Jul. 2022. [31] X. Ding, J. Guo, D. Li, and W. Wu, “An incentive mechanism for build- ing a secure blockchain-based Internet of Things,” IEEE Trans. Netw. Sci. Eng., vol. 8, no. 1, pp. 477–487, Jan.–Mar. 2021. [32] B. Cao et al., “Performance analysis and comparison of PoW, PoS and DAG based blockchains,” Digit. Commun. Netw., vol. 6, no. 4, pp. 480–485, 2020. [33] L. S. Shapley, “A value for N-person games,” Contributions Theory Games, vol. 2, no. 28, pp. 307–317, 1953. Liuling Qi received the master’s degree in com- puter science and technology from Hebei University, Baoding, China, in 2018, where he is currently pur- suing the Ph.D. degree in management science and engineering. His research interest is in blockchain and network security. Junfeng Tian received the master’s degree from Xidian University, Xi’an, China, in 1995, and the Ph.D degree in computer science and technology from the University of Science and Technology of China, Hefei, China, in 2004. He is currently the Dean and the Ph.D. Supervisor of the School of Cyber Security and Computer, Hebei University. The main research direction is information security and trusted computing. More than 80 academic papers have been published in aca- demic conferences and journals at home and abroad, and nearly 60 have been retrieved by SCI, EI, and ISTP; responsible for the Natural Science Foundation of Hebei Province, the Science and Technology Transformation Fund of Hebei Province, the Tenth Five-Year Plan Project of Hebei Province, and commissioning more than 20 development projects. He is a Director of the China Computer Federation, the Chairman of the Hebei Cyber Security Federation, the Vice-Chairman of the Hebei Computer Federation, the Editorial Board of the Journal of Communications, and a mem- ber of the China Cloud Computing Expert Advisory Committee and editorial board. Mengjia Chai received the master’s degree in com- puter science and technology from Hebei University, Baoding, China, in 2018. She works with Hebei University. Her research interests are network security and cryptography. Hongyun Cai received the Ph.D. degree in computer science and technology from Yanshan University, Qinhuangdao, China, in 2020. Since 2005, she has been working with Hebei University, Baoding, China, where she is cur- rently an Associate Professor. Her research interests include information security, privacy computing, and recommender systems. Authorized licensed use limited to: Jyoti Rothe. Downloaded on February 01,2024 at 05:08:15 UTC from IEEE Xplore. Restrictions apply.