Wireless Communications and Mobile Computing

Wireless Communications and Mobile Computing / 2021 / Article
Special Issue

Applications of Semantic Mobile Computing in the Internet of Things and Web of Things

View this Special Issue

Research Article | Open Access

Volume 2021 |Article ID 8851121 | https://doi.org/10.1155/2021/8851121

Sujie Shao, Weichao Gong, Shaoyong Guo, Xuesong Qiu, "Computational Resource Allocation Strategy in a Public Blockchain Supported by Edge Computing", Wireless Communications and Mobile Computing, vol. 2021, Article ID 8851121, 8 pages, 2021. https://doi.org/10.1155/2021/8851121

Computational Resource Allocation Strategy in a Public Blockchain Supported by Edge Computing

Academic Editor: Feng-Jang Hwang
Received15 Jul 2020
Revised21 Mar 2021
Accepted01 Apr 2021
Published15 Apr 2021

Abstract

Blockchain, as an emerging distributed data management technology, has attracted extensive attention in recent years. In particular, a public blockchain network can ensure data security by addressing computationally intensive cryptographic tasks. Therefore, for node devices, sufficient computing power is required. However, mobile devices with limited computing power do not meet the conditions required by public blockchain network applications (OZEX, CoininAsia, BitRewards, etc.). To copy with the mentioned problems, nodes can offload computing tasks to edge computing services with low latency. This paper mainly focuses on the trade between edge computing providers (ECP) and nodes. We build a computational resource market model based on auction. Meanwhile, we propose two strategies to deal with two methods of offloading to achieve higher system profit. We also prove that the proposed strategy has individual rationality, authenticity under resource constraints. The simulation results have significance for administrators of a public blockchain network to improve the efficiency of computing resource allocation.

1. Introduction

Since blockchain was first proposed in 2008, it has gradually expanded from cryptographic digital currencies to innovative applications in all walks of life [1]. Blockchain implements a decentralized system that can reach a consensus of trust in the digital space. By reaching a consensus among peers in the peer-to-peer (P2P) network, nodes jointly maintain a data chain that connects data blocks in a chain way in a chronological order [2]. Each block on the data chain is protected from tampering and forgery by digital signature and other data verification methods [3].

Proof of work (PoW) is an important consensus mechanism in the public blockchain, which is used to prove that a task is completed and the calculation is paid for [4]. The task is to compute a cryptographic security-related nonce value that leads the hash of the nonce and block data to be less than a given upper limit (depending on the mining difficulty). This calculation process is called mining [5], and the nodes that complete tasks to reach consensus are called miners. Miners broadcast transactions on the network after calculating the nonce value. Other nodes immediately verify the consensus after receiving the block containing transactions. After verification, the block will be added to their local node in the chain of block maintenance [4]. Only data which is packaged by the node that calculates the nonce value fastest can be added to the blockchain. In return, the miners can receive a reward as an incentive of mining. The reward consists of a fixed bonus and a variable transaction fee [6].

Unfortunately, solving the PoW puzzle in public blockchain requires sustained high computing power that mobile devices cannot afford [7]. In order to alleviate the problem of insufficient computing power, consensus nodes can offload their mining tasks to edge computing services, supporting applications based on the public blockchain [8]. Edge computing closer to data source is a comprehensive platform that provides network, computing, and storage. It enables data storage and computing power to be deployed closer to the edge of the user, thereby reducing network latency. Edge computing services can support more consensus nodes to mine tasks, which will significantly improve the robustness and security of the public blockchain network, further attracting more developers to join to promote the construction of public blockchain.

Further, edge computing matches the distributed model of blockchain on networking, computing, and storage. On the one hand, when blockchain nodes are deployed in edge node devices, edge computing services provide computing resources and storage capacity to a large number of scattered nodes in the blockchain. To copy with the problem of delay transmission in the case of coexistence of a large number of nodes, edge computing with low latency is a good response to the application demands of blockchain on the edge side. On the other hand, blockchain provides a trusted and secure environment for edge services, which ensure the integrity and authenticity of storage, achieving the collaborative management of resources among multiple subjects.

In this paper, we divide the nodes into full nodes and light nodes in a public blockchain network. Full nodal participation in the consensus process, i.e., miners, light nodes do not participate in the consensus process, in spite of can be rewarded by performing a portion of the computing tasks for full nodes for collaborative mining [9]. We also call light nodes “sharer.” We consider the trading between the edge compute provider (ECP) and the full node as well as the trading between the full node and the light node. From a system perspective, our goal is to maximize the social welfare of the public blockchain networks. Social welfare can be understood as system efficiency in [10]. In order to achieve the goal, we propose an edge computing resource market model based on auction for a public blockchain network. In addition, we designed an individual and truthful computing resource allocation mechanism.

The specific contributions of this paper are summarized as follows: (i)In the proposed edge computing resource market model, we consider the competitive relationship between miners in the public blockchain and maximize social welfare under appropriate network effect parameters(ii)Two offloading modes are proposed in a public blockchain network based on edge computing. Miners can offload their mining tasks to ECP or idle nodes, which takes advantage of idle resources in a network and reduces load on an edge server(iii)Two auction algorithms were used to improve network efficiency. The trade between ECP and miners was conducted through the Vickrey-Clarke-Groves (VCG) auction. The trade between miners and sharers was realized through Continuous Double Auction (CDA). Algorithms are designed to meet resource constraints, individual rationality, and authenticity

There have been many excellent works studying resource allocation problems among the edge providers and miners in a blockchain network. In [11], authors study the interactions among the cloud/edge providers and miners in blockchain using a multileader multifollower game-theoretic approach, in order to support proof-of-work-based blockchain application. In [12], the authors formulate resource allocation between ECPs and computationally constrained devices as a double auction game. Meanwhile, the experience-weighted attraction (EWA) algorithm is introduced to reach Nash equilibrium. The authors in [13] proposed a novel edge computing offloading framework, which applies decentralized resource management strategy based on auction to perform resource allocation to ECPs. In order to intelligently manage decentralized applications in a blockchain network, Edgence (EDGe + intelligENCE) is proposed by [14] to realize self-governing of the edge devices. In [15], dynamic resource allocation by combinatorial auction is mainly concentrated and the CA-PROVISION algorithm is used for providing pricing strategies. In [16], authors present a two-layer computation offloading paradigm that includes an edge computing provider (ECP) and a cloud computing provider (CCP) to jointly maximize the profits of each service provider and the payoffs of individual miners. In [17], a new model-free deep reinforcement learning-based online computation offloading approach was proposed for blockchain-empowered mobile edge computing in which both mining tasks and data processing tasks are considered. In [18], the authors introduced a broker to manage and adjust the trading market. Then, an iterative double-sided auction scheme was proposed for computing resource trading, where the broker solves an allocation problem to achieve the maximum social welfare meanwhile protecting the privacies of the buyers and the sellers. However, the above papers do not make good use of idle computing resources in the network. In this article, we consider the existence of competition among miners in the computing resource market model and propose two offloading models. Our model supports miners to offload tasks to idle nodes, which improves the utilization of computing resources in the network and reduces the load on edge servers. Further, on the basis of the above-mentioned papers, this paper realizes the optimal resource allocation of the public blockchain network through auction competition between miners and ECP.

3. System Model

3.1. Edge Computing Resources Trade Market Model

As shown in Figure 1, we propose a resources trade market model. There are two types of nodes: full nodes and light nodes in the public blockchain network with PoW as the consensus strategy. We consider an offload model where the full node could choose to offload the mining calculation task to ECP or to a light node for collaborative mining. In the proposed market model, auction strategy is used to guide trading. The miners submit their resource demands and corresponding bids . After receiving miner’s demands and bids, ECP uses different strategies to determine win miners , , and service prices according to different ways of offloading. In the case of task offloaded to edge sever, ECP uses the VCG auction strategy; in the case of task offloaded to light nodes, ECP uses the CDA strategy. This will be covered in detail in Section 3. To be clear, means that miner wins the competition and can be allocated to resources at price , while means that no resources are allocated and .

3.2. Mining Mechanism Supported by Edge Computing

The efficiency of blockchain is largely determined by network computing power, so how to ensure the availability of computing resources and the participation of devices will be the driving factors. Chang et al. [19] have discussed the incentive mechanism for edge computing-based blockchain in detail, so the focus of this chapter is on the mining mechanism. In order to balance market prices, optimize resource allocation, and minimize marginal loss, auction theory is applied to the computational resource allocation of the edge blockchain.

In the article, we assume that both the miner and ESP are rational and will bid the computational resources according to their actual needs. Device ’s hash capability is represented as where , is the computational resource unit required by device , and is an exponential parameter of hash power function [20].

In mining competition, miners need to be the first to find the correct nonce to solve the PoW problem and broadcast the block to reach consensus. The process of generating the new block can be described as a Poisson process with intensity [21]. Firstly, miners collect unconfirmed transactions represent by into their blocks. Secondly, miner broadcast its block to a blockchain network to reach consensus. The broadcast delay is affected by the size of transactions . Miner ’s expected reward consists of a fixed bonus and a variable transaction fee affected by . can be expressed as equation (2), where is the probability that miner reaches consensus and gets rewards.

Through the above mining competition, miners will only be rewarded if they succeed in creating blocks and reaching consensus. However, in the block broadcast process, the block that encapsulates more transactions has a higher latency. So, it may not reach a consensus first because of the high broadcast latency. It has a higher latency that the block encapsulates more transactions. This type of block is called an orphaned block. The miner ’s block broadcast latency is linear to the size of the encapsulated transactions, i.e., , ( is a constant) [22]. As mentioned earlier, the generation process of a block is a Poisson process with intensity , so miner ’s orphaning probability can be described as . Furthermore, the probability that miners will be rewarded can be calculated as follows:

4. Resource Allocation Based on Auction

In this part, we mainly introduce the auction strategy that the system executes when the computing task is offloaded to ECP or light nodes. Regarding how to decide which task is offloaded to ECP and which task is offloaded to light nodes, we have discussed in more detail in the previous study [23]. To rephrase briefly, Lyapunov theory and proposed deviation update decision algorithm (DUDA) are used to solve computation offloading decision-making and offloading update order-making.

4.1. Task Are Offloaded to ECP

When the miners’ tasks were offloaded to ECP, the VCG auction strategy was executed to determine winners and trade prices. Assume that is the unit cost of computing services provided by ECP. Moreover, in this offloading scenario, the social welfare of a network is the sum of all the miners’ rewards minus all the ECP’s costs. Therefore, maximizing social welfare can be described as the following optimization problem:

where is the constraint that needs to be met, and is the most computing resource unit that ECP can afford.

VCG auction is a method of distribution of goods with the optimization goal of maximizing social welfare. It uses the marginal damage caused by bidders to others as the bidding pricing rule. Therefore, VCG ensures that the best strategy for each bidder is to bid according to actual needs and value.

First, consider ECP auctioning a set of computing resources . Buyers can declare a set of bids , and bidders are sealed (only visible to the auction system), so they cannot see other people’s bids at any time. After all bids are completed, the auction will close.

Then, the auction system considers all possible bid combinations and reserves the bid combination that maximizes the total amount of bids. It should be noted that the price they pay is not the price they originally bid, but the marginal damage they cause to other bidders (at most as high as the original bid).

At the end of the auction, if the agent is completely rational and there is no collusion, we can assume that the willingness to pay has been truthfully reported, because each participant will only be accused of marginal damage to other bidders.

We solved this integer programming problem through a VCG auction using the following algorithm: first, determine the list of winning miners and then determine the final trade price based on marginal damage [24].

Input: ;
Output: ;
 1.    For each
 2.    ;;
 3.    End for
 4.    ;;;;
 5.    While &&;
 6.    ;
 7.    ;;;
 8.    
 9.    End while
 10.   For each ;
 11.   ;;;
 12.   ;;;;
 13.   While &&;
 14.   ;
 15.   ;;;
 16.   
 17.   End while
 18.   
 19.   End for
4.2. Task Are Offloaded to Light Nodes

In our scenario, there are some light nodes (sharers) in the blockchain network that have computing resources but do not participate in mining; they only help the full nodes (miners) perform computing tasks. When the miners’ tasks were offloaded to light nodes, the Continuous Double Auction (CDA) strategy was executed to determine winners and trade price [25].

In the CDA strategy, the miner’s (buyer) resource demand is , and corresponding bids are , assuming the trade price for the buyer is . The sharers (sellers) will also bid for the computing resource as. Let us define the seller’s trade price as . ECP acts as an auctioneer, and his income is that the seller’s trade price subtracted from the buyer’s.

Then, we discuss the validity of the CDA algorithm. Similar to Zhang et al. [26], we try to prove the validity from the following: (1)Individual rationality: both sellers and buyers need to make a profit(2)Resource constraints: if both seller and buyer agree to trade, equations (7) and (8) need to be met(3)Truthful: the seller ’s profit is defined as , and the buyer ’s profit is defined as . In the CDA process, the highest profits occur when participants compete based on the true price of the resource. In other words, the constraints of equations (11) and (12) have to be satisfied:

In the process of CDA in this paper, we set and used equation (13) to determine the trade price, with .

Input: ;;;
Output: matching relationship ; trading price
1. Sort bids of buyers with decreasing value.
2. Sort bids of sellers with increasing value.
3. For each ;
4. If then ;
5. Output , ;
6. End for

5. Experiment Results and Analysis

In this chapter, the auction strategy we proposed is simulated to verify the effectiveness and rationality. Simulation result proves that the strategy proposed has better system profits.

According to Figure 2, the value of reward factor also affects the system’s profits. It can be clearly seen that, with increasing of the reward factor in the number of different devices, the system’s profits have increased significantly. This is because the grown of reward factor incentivizes devices to rent computing resources from edge servers at a higher cost, leading to better expected profits.

The profits of different network roles are shown in Figure 3. Under the same circumstances, device-sharing computing resources have lower profits. Devices acting as a miner can get higher profits. Meanwhile, edge server provider can also get higher profits. It should be noted that as the number of devices increases, the profits to all roles in the system increased.

In Figure 4, we analyze the gap between demands and supplies in different cases. It is obvious that as the number of iterations increases, the gap gradually approaches zero. This shows that the strategy we proposed can meet the demand dynamically.

We compared the proposed strategy with mode A (offloading all tasks to ECP) and mode B (offloading all tasks to adjacent idle devices) in Figure 5. In (a), the convergence performance of the three models is compared. The system profit increases sharply in the first 20 iterations and then reaches a stable state, indicating that our mechanism has a faster convergence than the other two modes. This is because our model can offload mining tasks to idle devices, improving the utilization of computing resources. Moreover, because there are offloading decisions to be made, the plateau is reached relatively late. In (b), we compare the system profit of the three modes. With the increase of time, the system profit of all three modes will increase, but our strategy has higher returns. Offloading all mining tasks to idle devices causes longer delays, so mode B (offloading all tasks to adjacent idle devices) has the lowest return. In (c), we compare the average delay of the three modes. Since the miners who choose mode B are closer to the provider, the average delay is lower. Taken as a whole, our strategy performs better.

6. Conclusions

In this paper, we offload computing tasks to ECP or light nodes to alleviate the PoW problem in a public blockchain network. When miners offload tasks to the ECP, the VCG auction strategy is adopted to maximize the social welfare of resource allocation; when tasks are offloaded to light nodes, the CDA strategy is adopted to realize efficient allocation of computing resources. The authenticity, individual rationality, and effectiveness of the strategy are also proved in this paper. The simulation results prove that the proposed strategy can improve the profits of the system, as well as providing reference significance for the administrators of the public blockchain network.

Data Availability

Data are available upon request.

Conflicts of Interest

The authors declare that there is no conflict of interest regarding the publication of this paper.

Acknowledgments

This work is supported by the National Key R&D Program of China (2018YFB1402704).

References

  1. G. B. Mermer, E. Zeydan, and S. S. Arslan, “An overview of blockchain technologies: principles, opportunities and challenges,” in 2018 26th Signal Processing and Communications Applications Conference (SIU), pp. 1–4, Izmir, 2018. View at: Google Scholar
  2. Z. Guo, Z. Gao, H. Mei, M. Zhao, and J. Yang, “Design and optimization for storage mechanism of the public blockchain based on redundant residual number system,” IEEE Access, vol. 7, pp. 98546–98554, 2019. View at: Publisher Site | Google Scholar
  3. D. Ding, K. Li, L. Jia, Z. Li, J. Li, and Y. Sun, “Privacy protection for blockchains with account and multi-asset model,” China Communications, vol. 16, no. 6, pp. 69–79, 2019. View at: Publisher Site | Google Scholar
  4. T. P. Keenan, “Alice in blockchains: surprising security pitfalls in PoW and PoS blockchain systems,” in 2017 15th Annual Conference on Privacy, Security and Trust (PST), pp. 400–4002, Calgary, AB, 2017. View at: Google Scholar
  5. A. Kiayias, E. Koutsoupias, M. Kyropoulou, and Y. Tselekounis, “Blockchain mining games,” in Proceedings of the 2016 ACM Conference on Economics and Computation, pp. 365–382, 2016. View at: Google Scholar
  6. Z. Yu, X. Liu, and G. Wang, “A survey of consensus and incentive mechanism in blockchain derived from P2P,” in 2018 IEEE 24th international conference on parallel and distributed systems (ICPADS), pp. 1010–1015, Singapore, Singapore, 2018. View at: Google Scholar
  7. K. Suankaewmanee, D. T. Hoang, D. Niyato, S. Sawadsitang, P. Wang, and Z. Han, “Performance analysis and application of mobile blockchain,” in 2018 International Conference on Computing, Networking and Communications (ICNC), pp. 642–646, 2018. View at: Google Scholar
  8. Z. Xiong, Y. Zhang, D. Niyato, P. Wang, and Z. Han, “When mobile blockchain meets edge computing,” IEEE Communications Magazine, vol. 56, no. 8, pp. 33–39, 2018. View at: Publisher Site | Google Scholar
  9. A. Palai, M. Vora, and A. Shah, “Empowering light nodes in blockchains with block summarization,” in 2018 9th IFIP international conference on new technologies, mobility and security (NTMS), pp. 1–5, Paris, 2018. View at: Google Scholar
  10. X. Zhang, Z. Huang, C. Wu, Z. Li, and F. C. M. Lau, “Online auctions in IaaS clouds: welfare and profit maximization with server costs,” IEEE/ACM Transactions on Networking, vol. 25, no. 2, pp. 1034–1047, 2017. View at: Publisher Site | Google Scholar
  11. Z. Xiong, J. Kang, D. Niyato, P. Wang, and V. Poor, “Cloud/edge computing service management in blockchain networks: multi-leader multi-follower game-based ADMM for pricing,” IEEE Transactions on Services Computing, vol. 13, no. 2, pp. 356–367, 2020. View at: Publisher Site | Google Scholar
  12. Q. Li, H. Yao, T. Mai, C. Jiang, and Y. Zhang, “Reinforcement-learning- and belief-learning-based double auction mechanism for edge computing resource allocation,” IEEE Internet of Things Journal, vol. 7, no. 7, pp. 5976–5985, 2020. View at: Publisher Site | Google Scholar
  13. C. Avasalcai, C. Tsigkanos, and S. Dustdar, “Decentralized resource auctioning for latency-sensitive edge computing,” in 2019 IEEE international conference on EDGE computing (EDGE), pp. 72–76, Milan, Italy, 2019. View at: Publisher Site | Google Scholar
  14. J. Xu, S. Wang, A. Zhou, and F. Yang, “Edgence: a blockchain-enabled edge-computing platform for intelligent IoT-based dApps,” China Communications, vol. 17, no. 4, pp. 78–87, 2020. View at: Publisher Site | Google Scholar
  15. E. I. Nehru, J. I. S. Shyni, and R. Balakrishnan, “Auction based dynamic resource allocation in cloud,” in 2016 International Conference on Circuit, Power and Computing Technologies (ICCPCT), pp. 1–4, Nagercoil, 2016. View at: Publisher Site | Google Scholar
  16. S. Jiang, X. Li, and J. Wu, “Hierarchical edge-cloud computing for mobile blockchain mining game,” in 2019 IEEE 39th international conference on distributed computing systems (ICDCS), pp. 1327–1336, Dallas, TX, USA, 2019. View at: Publisher Site | Google Scholar
  17. X. Qiu, L. Liu, W. Chen, Z. Hong, and Z. Zheng, “Online deep reinforcement learning for computation offloading in blockchain-empowered mobile edge computing,” IEEE Transactions on Vehicular Technology, vol. 68, no. 8, pp. 8050–8062, 2019. View at: Publisher Site | Google Scholar
  18. Z. Li, Z. Yang, and S. Xie, “Computing resource trading for edge-cloud-assisted internet of things,” IEEE Transactions on Industrial Informatics, vol. 15, no. 6, pp. 3661–3669, 2019. View at: Publisher Site | Google Scholar
  19. Z. Chang, W. Guo, X. Guo, Z. Zhou, and T. Ristaniemi, “Incentive mechanism for edge-computing-based blockchain,” IEEE Transactions on Industrial Informatics, vol. 16, no. 11, pp. 7105–7114, 2020. View at: Publisher Site | Google Scholar
  20. Y. Jiao, P. Wang, D. Niyato, and Z. Xiong, “Social welfare maximization auction in edge computing resource allocation for mobile blockchain,” in 2018 IEEE international conference on communications (ICC), pp. 1–6, Kansas City, MO, 2018. View at: Google Scholar
  21. D. Kraft, “Difficulty control for blockchain-based consensus systems,” Peer-to-Peer Networking and Applications, vol. 9, no. 2, pp. 397–413, 2016. View at: Publisher Site | Google Scholar
  22. A. Narayanan, J. Bonneau, E. Felten, A. Miller, and S. Goldfeder, Bitcoin and Cryptocurrency Technologies: A Comprehensive Introduction, Princeton Univ. Press, Princeton, NJ, USA, 2016.
  23. L. Ruan, Z. Liu, X. Qiu, Z. Wang, S. Guo, and F. Qi, “Resource allocation and distributed uplink offloading mechanism in fog environment,” Journal of Communications and Networks, vol. 20, no. 3, pp. 247–256, 2018. View at: Publisher Site | Google Scholar
  24. S. Yang and B. Hajek, “VCG-Kelly mechanisms for allocation of divisible goods: adapting VCG mechanisms to one-dimensional signals,” in 2006 40th annual conference on information sciences and systems, pp. 1391–1396, Princeton, NJ, 2006. View at: Google Scholar
  25. J. Wang, Q. Wang, and N. Zhou, “A decentralized electricity transaction mode of microgrid based on blockchain and continuous double auction,” in 2018 IEEE Power & Energy Society General Meeting (PESGM), pp. 1–5, Portland, OR, 2018. View at: Google Scholar
  26. D. Zhang, Z. Chang, T. Hämäläinen, and F. R. Yu, “Double auction based multi-flow transmission in software-defined and virtualized wireless networks,” IEEE Transactions on Wireless Communications, vol. 16, no. 12, pp. 8390–8404, 2017. View at: Publisher Site | Google Scholar

Copyright © 2021 Sujie Shao et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Related articles

No related content is available yet for this article.
 PDF Download Citation Citation
 Download other formatsMore
 Order printed copiesOrder
Views500
Downloads518
Citations

Related articles

No related content is available yet for this article.

Article of the Year Award: Outstanding research contributions of 2021, as selected by our Chief Editors. Read the winning articles.