Information Technology | Cryptocurrencies, Blockchain » Xiong-Zhang-Niyato - When Mobile Blockchain Meets Edge Computing, Challenges and Applications

Datasheet

Year, pagecount:2017, 17 page(s)

Language:English

Downloads:5

Uploaded:April 16, 2018

Size:2 MB

Institution:
-

Comments:

Attachment:-

Download in PDF:Please log in!



Comments

No comments yet. You can be the first!

Content extract

Source: http://www.doksinet 1 When Mobile Blockchain Meets Edge Computing: Challenges and Applications Zehui Xiong, Student Member, IEEE, Yang Zhang, Member, IEEE, arXiv:1711.05938v1 [csDC] 16 Nov 2017 Dusit Niyato, Fellow, IEEE, Ping Wang, Senior Member, IEEE, and Zhu Han, Fellow, IEEE Abstract Blockchain, as the backbone technology of the current popular Bitcoin digital currency, has become a promising decentralized approach for resource and transaction management. Although blockchain has been widely adopted in many applications, e.g, finance, healthcare, and logistics, its application in mobile environments is still limited. This is due to the fact that blockchain users need to solve preset proof-of-work puzzles to add new transactions to the blockchain. Solving the proof-of-work, however, consumes substantial resources in terms of CPU time and energy, which is not suitable for resource-limited mobile devices. To facilitate blockchain applications in future mobile Internet of

Things systems, multiple access mobile edge computing appears to be an auspicious option to solve the proof-of-work puzzles for mobile users. We first introduce a novel concept of edge computing for mobile blockchain. Then, we introduce an economic approach for edge computing resource management Moreover, a demonstrative prototype of mobile edge computing enabled blockchain systems is presented with experimental results to justify the proposed concept. Index Terms Blockchain, edge computing, Internet of Things, game theory, proof-of-work puzzle. Zehui Xiong, Dusit Niyato and Ping Wang are with School of Computer Science and Engineering, Nanyang Technological University, Singapore. Yang Zhang is with School of Computer Science and Technology, Wuhan University of Technology, China. Zhu Han is with the Department of Electrical and Computer Engineering as well as the Department of Computer Science, University of Houston, USA. Source: http://www.doksinet 2 I. I NTRODUCTION Blockchain

technology has attracted much attention as a decentralized public ledger which can store records of user and business transactions. Blockchain outperforms centralized digital ledger approaches, where users reach consensuses of transactions only at a centralized authority or intermediary. The centralized approach suffers from low efficiency of transaction processing, single point of failure and attack, as well as moral hazard of the centralized authorities. Alternatively, user transactions are recorded by blockchain as blocks, which are connected with each other as a linked list data structure to indicate the logical relations among transaction data added to the blockchain. There will be no centralized entity to store the transaction data blocks Instead, data blocks are copied and shared over the entire network, thus being redundant and resilient to system failure and cyber attacks. Blockchain has been applied in several distributed system and multiple access network application

scenarios, e.g, content delivery networks [1], cognitive radio [2] and smart grid systems [3]. The core point to guarantee transaction integrity and validity in blockchain is a computational process defined as mining [4], [5]. To append a new set of transactions to the current blockchain, a blockchain user, i.e, miner, is usually required to solve a computationally difficult problem named proof-of-work (PoW) puzzle for validation usages. Since solving the proof-of-work puzzles consumes substantially computing power, blockchain is not generally and widely adopted by mobile systems that may encounter resource constraints. The deployment of blockchain will face a big challenge in the future Internet of Things (IoT) network architecture that tends to be highly distributed with unpredictable topology and simple devices. This issue becomes more challenging as multiple blockchain users compete for winning the mining, i.e, complete solving proof-of-work puzzle and propagate the result to the

blockchain network, i.e, a network of miners. The blockchain users have to trade-off between computing power used and the reward from successful mining. Mobile edge computing [6] (MEC) emerges to be an architecture that leverages available computing power in mobile environments. In the edge computing environment, local data centers and servers are deployed by edge computing service providers at the “edge” of mobile networks, e.g, base stations and access points of radio access networks Mobile IoT devices can access the edge computing servers to enhance the computing power for mobile tasks, e.g, IoT sensed data analytics and processing. By offloading computing tasks from mobile IoT users to edge Source: http://www.doksinet 3 computing services locally without going to the remote cloud and data center, the latency and backhaul bandwidth usage can be reduced considerably. With this capability, the edge computing becomes a promising solution for mobile blockchain applications. The

blockchain users can offload the task of solving proof-of-work puzzles to the edge computing services, improving the chance of success in mining and block chaining. However, edge computing services are deployed by the provider which aims to maximize its own benefit, i.e, revenue and profit A pricing issue of the edge computing services arises. Accordingly, given the pricing adopted by the edge computing service provider, blockchain users need to optimize their demand for edge computing service for solving the proof-of-work puzzle such that their payoff is maximized. In this article, we consider an edge computing enabled mobile IoT blockchain network, where IoT devices as mobile users can strategically access and utilize resources, e.g, data, information, and computing power, from local edge computing service providers [7] to support their blockchain applications. Firstly, we present overviews of blockchain and edge computing architecture in Section II and Section III, respectively. We

propose a demonstrative system of mobile edge computing enabled blockchain system in Section IV. Then, in Sections V and VI, we consider a general economic-driven resource management model for the edge computing enabled blockchain networks. In the model, actions of the users and edge computing service provider are driven by resource prices and rewards. In particular, we propose a pricing mechanism for edge computing enabled blockchain networks, which is modeled as a two-stage Stackelberg game. In the first stage, the edge computing service provider sets the price and obtains the profit from charging the miners for offloading the mining task. In the second stage, the miners decide on the edge computing service demand to purchase from the edge computing service provider. Two pricing schemes of edge computing service are considered, including uniform pricing in which the same price is applied to all the miners, and discriminatory pricing in which different unit prices are offered to

different miners. II. B LOCKCHAIN OVERVIEW A. Blockchain Architecture The basic idea of blockchain is a chain-shaped data structure. Each node in the chain is a data block that contains historical, verified transactions, information and control data. A chain of blocks can be replicated and spread to all participants in the blockchain network such that the data contained in the blockchain is synchronized globally. Source: http://www.doksinet 4 Figure 1 shows the diagram of a blockchain structure. For each block in the blockchain, there are typically two parts, i.e, transaction data and hash values Transaction data are recorded by the blockchain users or systems, e.g, mobile IoT devices Hash values are used to store coded or secured information. A hash value in a block is generated based on the information of the previous block, which is similar to a link pointing from the current block to the block prior to it. The first block in the blockchain is called genesis block which does not

have a hash value pointing the earlier block. Other data structures can also be included in the structure of a block to improve security and transaction performance requirements, e.g, a timestamp, and a hash tree (namely, Merkle tree) to store data blocks and to hash the previous transaction information into the non-leaf tree node. In general, blockchain operates in the following steps 1) A blockchain user performs a transaction and creates a new transaction record. The new transaction will be transferred to neighboring peer users in the blockchain network. 2) Each neighboring peer user collects the transferred transactions for a certain period of time. Invalid user transactions, e.g, fake transactions, or negative balance in debit account, will be discarded. After the period, the user which has collected a set of transactions packs the transactions into a block and performs mining. 3) The mined block is then sent into the network to notify other blockchain users. Other users which

receive the mined block will examine the validity with security mechanisms accordingly. If the block is proved valid, it will be appended to the end of the current blockchain In this case, the users’ view, i.e, contents and structures of the current blockchain, has been updated. The transactions in the block created in Step 2 are generally accepted by blockchain users. This is referred to as the consensus B. Consensus and Mining: A Trust Overlay on a Trustless Network Blockchain can offer more than cryptography for transactions in trustless distributed networks. In particular, blockchain guarantees that transaction records in the blockchain are acknowledged and accounted by many users. The encryption techniques are adopted to prevent the records from being changed, falsified, or deleted by malicious middleman users. Then, consensus is a mechanism to ensure trust in the network, which means that users in the network commonly reach an agreement of a block added to the existing

blockchain. For an attacker injecting a false transaction, the users which receive the false transaction can discover the attacking behavior by obtaining commonly acknowledged transaction records from the network. As such, the majority Source: http://www.doksinet 5 of users can “veto” to discard the false transaction. The deployment of consensus can be useful for distributed computing systems where users are relatively independent and belong to different parties, e.g, mobile networks [8] However, given a simple mining process, consensus may still be vulnerable to attacks, e.g, Byzantine attack and Sybil attack, where an attacker creates mixed information (i.e, fake blockchain) and pseudonymous users in the network, respectively. These fake blockchain information and pseudonymous users can lead to the consensus of false transactions generated by the attacker. The solution to such attacks is to raise the complexity of mining so that attackers may not have enough computing power to

support enough fake users in the network. Proof-of-work puzzles are used to increase the mining complexity. Confirming and securing the integrity and validity of transactions are executed by a set of miners. The security of blockchain relies on the distributed consensus mechanism maintained by these miners. In practical blockchain systems, eg, Bitcoin, a miner which successfully mines a block receives the mining reward when the mined block is successfully added to the blockchain. This consensus mechanism guarantees the security and dependability of blockchain systems [4], [5]. In such a network where mining is costly, malicious users need to control over 51% of all the computing power in the network to mislead the network to accept a false block. This is an enormous cost for a malicious user which can rarely be feasible in practice. III. M OBILE E DGE C OMPUTING FOR B LOCKCHAIN A. Beyond Bitcoin: Mobile Edge Computing Enabled IoT with Blockchain Blockchain is commonly known to the

public because of Bitcoin. Besides that, blockchain has found many applications in various networks and distributed systems today. A typical application scenario is IoT [9], [10]. IoT systems can connect a variety of physical objects such as mobile devices, sensors and actuators to the Internet. The IoT devices can sense, communicate, and exchange information with each other to achieve a certain goal of the systems, e.g, smart transportation, logistics, healthcare, and manufacturing Economic models are applied for information and resource allocation in IoT [11]. As a public ledger framework, blockchain is suitable for IoT, where IoT devices can exchange information and resources independently and autonomously with formalized trading processes and rewards. These can be defined as transactions in blockchain. Source: http://www.doksinet 6 Remote Cloud Services Local Mobile IoT Networks Blockchain: Blockchain Block k Block . . Hash of k Transactions . . Cloud services MEC

Service Provider MEC Service Provider . Hash of Transactions Edge . Top Hash IP networks Hash MEC Service Provider . Macrocell . VANET WiFi/WLAN Blockchain (private) Hash Hash TX TX Merkle tree to combine multiple transactions (TXs) . Micro/Pico/Femtocells Hash Added block Blockchain Mobile/IoT users D2D Network Figure 1: Mobile Edge Computing (MEC) Enabled Blockchain. IoT devices are usually low-powered, geographically distributed, and possibly mobile. Limited computing and energy resources of IoT devices become critical when blockchain is applied to IoT systems specifically because of the mining process. This is a common and major barrier to deploying blockchain in other mobile systems. Instead, mobile edge computing can supply the resources to cater to blockchain computing demands. Mobile edge computing [6] allows service providers to deploy cloud computing services at the “edge” of the mobile Internet as shown in Figure 1. For example, base stations

equipped with a small data center or a set of servers in radio access networks can accept offloaded jobs from adjacent mobile and IoT devices [12]. By providing local computing power, edge computing enables blockchain deployment in IoT networks to support solving proof-of-work puzzles, hashing, encryption algorithms, and possibly consensus. Interactions among edge computing service providers and IoT devices or IoT users1 can be modeled as market activities, where edge computing service providers sell resources such as data and computing power, and receive reward, i.e, revenue, in return from IoT devices which 1 We use “IoT device” and “IoT user” interchangeably. Source: http://www.doksinet 7 need the resources. In practice, the similar concept that integrates cloud and blockchain has been realized. For example, Microsoft provides Blockchain as a Service (BaaS) on the Azure cloud platform. A UK company CloudHashing offers customers Bitcoin Mining as a Service (MaaS) where

users only buy software services online to mine Bitcoins, without deploying hardware equipments. IBM provides Watson IoT platform to manage IoT data in a private blockchain ledger, which is integrated in IBM’s business-level cloud services. Despite all the cloud-based blockchain applications, economic models for blockchain transactions in edge computing systems are not well studied. B. Application Scenarios Mobile edge computing for IoT with blockchain can be applied to various application scenarios. 1) Crowdsourcing: Crowdsourcing in IoT systems allows an undetermined set of IoT devices to incrementally generate and modify contents to complete a task, e.g, sensing Mobile edge computing enabled blockchain can provide transparent and secured transferring of data as digitized assets [9]. Due to the constraints of computing power, IoT devices may offload data to edge computing servers for further processing. Historical traceable records are available in blockchain for reward and payment

to IoT devices. 2) Smart Grid: Smart grid systems [13] contain heterogeneous sensors, e.g, smart meters For smart meters, energy consumption data and energy transactions are recorded. Mobile edge computing for IoT with blockchain can be integrated alongside with smart meters to process complex jobs automatically, e.g, making transactions, executing smart electricity contracts and balancing the grid load [14]. The similar concept can be applied for plug-in hybrid electric vehicles (PHEVs) [3] to support energy storage sharing. C. Open Issues There are still many open issues to be addressed in the mobile edge computing for IoT with blockchain. 1) Security Issues in Mobile Edge Computing for IoT with Blockchain: Although blockchain offers attractive security features for distributed data processing and storage, some security issues emerge when blockchain is tailored for edge computing enabled IoT systems, especially private blockchains. One possible implementation can be the small-scaled

“whitelisted” IoT networks [9] Source: http://www.doksinet 8 where all the network nodes trust each other, and PoW is not necessarily required as a trust mechanism. In this case, attacks can happen when transaction data is transferred from mobile IoT devices to the mobile edge computing servers. A secure and trust network between the devices and the servers is required. Distributed Denial of Service (DDoS) attacks can be easily launched in mobile IoT networks as IoT devices have less protection. Likewise, since mobile IoT devices rely on wireless transmission, jamming attacks can disrupt the blockchain data exchange. 2) Unbalanced Computing Power: Trust is not necessary in blockchain networks given that the consensus method is well designed. However, an attacker can cheat and falsify blockchain records if the attacker can control over 51% computing power of the blockchain network. The attacker needs to cooperate with a large number of blockchain miners in the network which might

be practically hard to achieve. However, in IoT systems with mobile edge computing services, this problem becomes critical due to the low computing power of mobile IoT networks. Only a few collusive or compromised servers may cause the “51% attack” cooperation situation easily. Effective mechanisms to prevent such a collusion need to be developed. 3) Resource Utilization and Allocation: As aforementioned, mobile IoT devices are not able to efficiently solve proof-of-work puzzles of blockchain. Mobile edge computing service can be adopted to perform the mining. In the following, we present a new paradigm for offloading the mining task to the edge of pervasive networks nearby IoT users. Further, we implement the demonstrative prototypes of mobile edge computing enabled blockchain networks and analyze the resource utilization. IV. D EMONSTRATION S YSTEMS OF M OBILE E DGE C OMPUTING E NABLED B LOCKCHAIN To demonstrate the feasibility and practicability of the proposed mobile edge

computing enabled blockchain presented in Section III, we implement a demonstration system of a mobile edge computing enabled blockchain system. As illustrated in Figure 2(a), in wireless and mobile blockchain systems, nodes, e.g, IoT devices, need to perform mining on resource rich edge computing devices, such as servers and workstations. The experiment is implemented on a workstation with Intel Xeon CPU E5-1630 as the edge computing server and Android devices as the mobile nodes which are also the miners, installing a mobile blockchain client application. The application can be to record data using internal sensors, e.g an accelerometer and GPS, or the transactions of mobile peer-to-peer data transfer. Each miner’s working environment has one CPU core as its processor. The workstation’s processor and its CPU utilization rate are Source: http://www.doksinet 9 0.5 0.45 0.4 Real Data (3 miners case) Proposed Model (3 miners case) Real Data (4 miners case) Proposed Model (4

miners case) 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 10 20 30 40 50 60 70 80 90 Edge computing service demand (a) (b) Figure 2: (a) Real mobile blockchain mining experimental setup with Ethereum which is a popular open ledger (b) The comparison of real experiment results with our proposed model. generated and managed by the Docker platform. The workstation used by the miners is installed with Ubuntu 16.04 LTS (Xenial Xerus) and Go-Ethereum2 as the operating system and the blockchain framework, respectively. In Figure 2(a), the computer screens shown in Boxes 1 and 2 display the Ethereum interface, which is running on the workstation as an edge computing node, i.e, Box 5 We employ mobile phones and tablets to functionally act as mobile IoT devices The mobile devices in Box 4 are connected to the edge computing node through a network hub (Box 3) using the mobile blockchain client application. The basic mining steps can be implemented as follows. The miners, use the Android

devices to connect to the edge computing node through the network hub. Then, the miners can request the service from the edge node, and mine the block with the assistance of Ethereum service provided accordingly. The mined blocks in blockchain can be accessed and distributed through the Ethereum function. To validate the proposed model of mobile edge computing enabled blockchain systems in Section III, we conduct the following real experiments. We first create 1000 blocks using Nodejs and use the mobile devices to initiate the mining of these blocks. We consider two cases with three miners and four miners, respectively. In the three-miner case, we first fix the other two miners’ 2 https://ethereum.githubio/go-ethereum/ Source: http://www.doksinet 10 edge computing service demand (CPU utilization) at 40 and 60, and then vary one miner’s edge computing service demand. In the four-miner case, we first fix the other three miners’ service demand as 40, 50 and 60, and then vary one

miner’s service demand. In our experiment, the number of transactions in each mined block is 10, i.e, the size of a block is the same Note that the delay effects are negligible. The experimental results are shown in Figure 2(b) in which when the edge computing service demand increases, the probability that the miner wins the mining process is higher. We also compare the experimental results with the theoretical calculation of the probability as calculated in [15]. Clearly, the analytical and experimental results reasonably match, from which the validity of our analytical model is justified. V. M OBILE E DGE C OMPUTING R ESOURCE M ANAGEMENT IN B LOCKCHAIN In this section, we first present the system model of edge computing for mobile blockchain. Again, since the mobile edge computing service for blockchain miners is deployed by the service provider, it aims to maximize the profit. Therefore, the miners have to consider the reward from mining and the price paid to the provider in

deciding on the computing demand to access to the mobile edge computing service. Therefore, we consider the edge computing service management and pricing issue for mobile blockchain. Specifically, we present a two-stage Stackelberg game formulation and equilibrium analysis. A. Mobile Edge Computing for Blockchain Mining We consider a mobile blockchain application which is supported by edge computing. The mobile blockchain network is composed of N mobile IoT users acting as the miners. Each user runs mobile blockchain applications to record the transactions performed in the network. There is an edge computing service provider deploying the edge computing units/nodes for the miners. The proof-of-work puzzle can be offloaded to the edge computing unit, and the miners are priced by the provider. Figure 3 shows the system model of the mobile blockchain network under our consideration. The offloaded mining process is secured by some security solutions, such as data masking or obfuscation to

hide the details of puzzle solving of the blockchain. The mobile edge computing provider, i.e, the seller, receives the payment from the miners, i.e, the buyers, which access and consume the edge computing service Each miner decides on an individual service demand in accordance with the current blockchain operation, e.g, blockchain data synchronization. Here, the demand can be the CPU speed or the number of CPU cores to Source: http://www.doksinet 11 Resource pricing Resource pricing Edge computing service provider Edge computing unit Edge computing unit Upper Stage I (leader) Stackelberg game Edge Computing Service Provider Payment Edge computing service Noncooperative game Lower Stage II (followers) Data synchronization and consensus Mobile/IoT device running blockchain app Miner 1 Miner 2 Miner 3 . Miner N Mobile/IoT device running blockchain app Figure 3: Mobile edge computing enabled blockchain system with the two-stage Stackelberg game model. be rented. The

provider accepts the demand and the edge computing unit processes the offloaded puzzle solving for the miners. We can treat the edge computing service demand as the (bought) computing power of the corresponding miner. In the mobile blockchain network, miners compete against each other in order to be the first to successfully solve the proof-of-work puzzle. Once successfully solving the puzzle, the miner broadcasts its solution to the whole mobile blockchain network to reach consensus. The first miner to successfully mine a block that reaches the consensus earns the mining reward accordingly. The reward is from the blockchain applications For miner i, the utility function is defined as follows: ui (xi , x−i , pi ) = (R + rti )Pi (αi (xi , x−i ), ti ) − pi xi , (1) ∆ where x = (x1 , . , xN ) and x−i represent the edge computing service demand vector of all the miners and all other miners except miner i, respectively. There are a fixed reward R and a variable reward rti ,

where r is a given variable reward factor, and ti represents the size of block, i.e, the number of transactions included in the block that miner i successfully mines However, even though the miner has successfully mined a block, there could still be a chance that the consensus may not be reached in the blockchain network due to long latency of transmission. As a result, the utility function includes the probability Pi (αi (xi , x−i ), ti ) that miner i successfully mines the block, and its solution reaches consensus, i.e, miner i wins the mining reward, where P αi (xi , x−i ) = xi / N j=1 xj is defined as the relative computing power of miner i. Additionally, Source: http://www.doksinet 12 the process of solving the puzzle incurs an associated cost, i.e, miner i pays a unit price pi to the provider for using the computing power from the edge computing service. B. Two-Stage Stackelberg Game Formulation and Equilibrium Analysis The interaction between the provider and miners can

be modeled as a two-stage Stackelberg game, as illustrated in Figure 3. The provider, ie, the leader, sets the price of the service per computing unit in the upper Stage I. The miners, ie, the followers, decide on their optimal computing service demand for offloading the mining task in the lower Stage II, being aware of the price set by the provider. By using backward induction, we formulate the optimization problems for the leader and followers as follows. 1) Sub-game: Miners’ Mining Strategies in Stage II: When participating in the sub-game, each miner i decides on a value of the mining demand xi maximizing the expected utility ui (xi , x−i , pi ), given all the other miners’ demands, i.e, strategies, as well as the edge computing service price pi charged to the miner. In distributed mobile IoT systems, users can be treated as rational game participants, which make decisions to maximize their own payoffs. Thus, each miner i has the sub-game problem as follows: Problem 1. (Stage

II, Miner i sub-game): maximize ui (xi , x−i , pi ) xi (2) subject to xi ∈ [x, x]. The constraint indicates that the demand must be bounded. 2) Sub-game: Provider’s pricing strategies in Stage I: The profit of the provider, Π(p, x) is the revenue obtained from charging the miners for edge computing service minus the service cost, where p denotes the optimal unit price vector of edge computing service for all the miners. The service cost is a function of the service demand, the time that the miner takes to mine a block, and the other costs, e.g, electricity Practically, the constraint in the sub-game denotes that the price is upper bounded. The provider solves the sub-game problem to maximize its profit defined as follows: Problem 2. (Stage I, Provider sub-game): maximize Π(p, x) p subject to 0 ≤ pi ≤ p, ∀i ∈ N . (3) Source: http://www.doksinet 13 3) Solving Game Equilibrium: The two stages of sub-games aforementioned together form the Stackelberg game. The

objective of the game is to find the Stackelberg equilibrium The Stackelberg equilibrium is a point where the payoff of the leader is maximized given that the followers adopt their best responses, i.e, the Nash equilibrium in their sub-game In the mobile edge computing enabled blockchain system, the solution of the game has a practical meaning of importance. In particular, if the uniqueness of Nash equilibrium is proved, the miners and the provider can potentially reach a market agreement to trade edge computing power for blockchain mining. For the provider’s pricing, the uniform and discriminatory pricing schemes can be adopted. Miners are charged by the provider with a same unit price p in the uniform pricing scheme. For the discriminatory pricing scheme, the provider charges each miner i with exclusive unit price pi . The uniform pricing is easier to implement as the provider does not need to keep track of information of all miners, and charging the same prices is fair for miners.

However, it may not yield the highest profit compared with discriminatory pricing scheme. The solution of the Stackelberg game, as well as the proof of the existence and uniqueness of each sub-game equilibrium can be done by employing backward induction. The detailed proof steps are presented in [15]. We take the uniform pricing case as an example as follows • For existence of the Nash equilibrium in Stage II, we can prove that the miner sub-game is a concave game, from which the existence of the Nash equilibrium follows. The key aspect of the existence proof is to show the concavity of the utility function of miner i, i.e, the second order derivative of ui (·) is negative. • For uniqueness of the Nash equilibrium in Stage II, we can derive an analytical condition of miner parameters, which, if the condition is satisfied, guarantees the uniqueness of the Nash equilibrium. The key aspect of the uniqueness proof is to show that the best response function of each miner is the

standard function [15]. • For the optimal pricing in Stage I, the provider as the leader in the Stackelberg game, obtains the optimal price p for the uniform pricing scheme and pi for the discriminatory pricing scheme charged to each miner by substituting the solved Nash equilibrium of edge computing service demand in the miner game in Stage II into (3), and solving the optimal problem in (3). Source: http://www.doksinet 14 VI. N UMERICAL R ESULTS We investigate the performance of the proposed edge computing resource management for mobile blockchain applications. We consider a group of N mobile blockchain miners in the network and assume the size of a block mined by miner i follows the normal distribution N (µt , σ 2 ). System parameters are set as in [15] A. Impacts of the Number of Miners 142 UP, DP, 141 UP, DP, 140 UP, DP, 139 =190, 2 =5 =190, t 2 =5 =200, 2 =5 =200, 2 =5 =210, 2 =2 =210, 2 =2 t t t t t 138 137 136 135 50 60 70 80 90 100

110 120 Number of miners Figure 4: Impacts of number of miners on total service demand. (x is normalized to be 100 In the legend, UP: Uniform Pricing, and DP: Discriminatory Pricing) From Figure 4, we observe that the total service demand of miners and the profit of the provider increase with the increase of the number of miners in mobile blockchain. This is due to the fact that having more miners will intensify the competition of mining, which potentially motivates them to have higher service demand. Further, the coming miners have their service demand, and thus the total service demand from miners is increased. In turn, the provider extracts more surplus from miners and thereby has greater profit gain. Additionally, it is observed that the rate of service demand increment decreases as the number of miners increases. This is from the fact that the incentive of miners to increase their service demand is weakened because the probability of successful mining is reduced when the

number of miners increases. We also observe that the total service demand of miners and the profit of the provider increase as µt increases. This is because when µt , i.e, the average size of one block increases, the variable reward for each miner also increases. Thus, the incentive of miners to increase their service demand rises, and Source: http://www.doksinet 15 100 100 95 95 90 90 85 80 85 75 80 70 Miner 1 with 100 transactions Miner 2 with 200 transactions Miner 3 with 300 transactions 65 60 2000 3000 4000 5000 6000 7000 8000 9000 10000 Miner 1 with 100 transactions Miner 2 with 200 transactions Miner 3 with 300 transactions 75 70 10 Fixed reward for successfully mining (a) 15 20 25 30 35 40 45 50 Variable reward factor (b) Figure 5: Impacts of mining reward: (a) Fixed mining reward to optimal edge service price; (b) Variable reward factor to individual demand of miner. (p is normalized to be 100) accordingly the total service demand of miners

increases. Consequently, the provider achieves greater profit gain. B. Impacts of Reward on Miners We study a group of 3 mobile blockchain miners in the network to explore the impacts of reward on each specific miner. As expected, we observe from Figure 5(a) that the optimal price under discriminatory pricing charging to the miners with the smaller block is lower, e.g, miners 1 and 2. This is because the variable reward of miners 1 and 2 for successful mining is smaller than that of miner 3. Thus, miners 1 and 2 have no incentive to pay a high price for their service demand as miner 3. In this case, the provider can greatly improve the individual service demand of miners 1 and 2 by setting lower prices to attract them. Due to the competition from other two miners, miner 3 also has an incentive to increase its service demand. However, due to the high service unit price, consequently, miner 3 reduces its service demand for saving cost. Nevertheless, the increase of service demand from

miners 1 and 2 are greater. Therefore, the total service demand and the profit of the provider are still improved under discriminatory pricing compared with uniform pricing. Further, from Figure 5(a), we observe that the optimal prices for miners 1 and 2 increase with the increase of fixed mining reward. This is because as the fixed reward increases, the Source: http://www.doksinet 16 incentives of miners 1 and 2 to have higher service demand are greater. In this case, the provider is able to raise the price and charge more for higher revenue, and thus achieves greater profit. Additionally, we observe from Figure 5(b) that the optimal prices for miners 1 and 2 decrease as the variable reward factor increases. This is because when the variable reward factor increases, the incentive of each miner to have higher service demand is greater. However, the incentives of the miners with smaller block to mine, i.e, miners 1 and 2, are still not much as that of miner 3, and become smaller than

that of miner 3 as the variable reward factor increases. Therefore, the provider intends to set the lower price for miners 1 and 2 which may induce more individual service demand. VII. C ONCLUSION In this article, we have introduced the concept of edge computing for mobile blockchain applications. Specifically, mobile IoT users can use edge computing service offered by an edge computing service provider for blockchain mining tasks. We have demonstrated the testbed with some experimental results. Then, for efficient edge computing resource management for mobile blockchain, we have presented a Stackelberg game model. In addition to the game analysis, we have also conducted the numerical simulations to evaluate the network performance, which help the edge computing service provider achieve optimal resource management and gain the highest profit. R EFERENCES [1] N. Herbaut and N Negru, “A Model for Collaborative Blockchain-Based Video Delivery Relying on Advanced Network Services

Chains,” IEEE Communications Magazine, vol. 55, no 9, pp 70-76, September 2017 [2] K. Kotobi and S G Bilén, “Blockchain-enabled Spectrum Access in Cognitive Radio Networks,” in Proc 2017 Wireless Telecommunications Symposium (WTS), Chicago, IL, 2017. [3] J. Kang, R Yu, X Huang, S Maharjan, Y Zhang, and E Hossain, “Enabling Localized Peer-to-Peer Electricity Trading Among Plug-in Hybrid Electric Vehicles Using Consortium Blockchains,” IEEE Transactions on Industrial Informatics, vol. PP, no 99, pp 1-1, Preprints [4] R. Pass and E Shi, “FruitChains: A Fair Blockchain,” in Proc PODC ’17 Proceedings of the ACM Symposium on Principles of Distributed Computing, Washington, DC, July 25-27, 2017. [5] M. Conti, S K E, C Lal, and S Ruj, “A Survey on Security and Privacy Issues of Bitcoin,” [online] arXiv:170600916 [cs.CR], 2017 [6] N. Abbas, Y Zhang, A Taherkordi, and T Skeie, “Mobile Edge Computing: A Survey,” IEEE Internet of Things Journal, vol. PP, no 99, pp 1-1,

Preprints Source: http://www.doksinet 17 [7] Y. Zhang, L Liu, Y Gu, D Niyato, M Pan, and Z Han, “Offloading in Software Defined Network at Edge with Information Asymmetry: A Contract Theoretical Approach,” Journal of Signal Processing Systems, vol. 83, no 2, pp 241-253, May 2016. [8] E. M Schooler, D Zage, J Sedayao, H Moustafa, A Brown, and M Ambrosin, “An Architectural Vision for a Data-Centric IoT: Rethinking Things, Trust and Clouds,” in Proc. 37th IEEE International Conference on Distributed Computing Systems (ICDCS), Atlanta, GA, June 5-8, 2017. [9] K. Christidis and M Devetsikiotis, “Blockchains and Smart Contracts for the Internet of Things,” IEEE Access, vol 4, pp. 2292-2303, May 2016 [10] N. Kshetri, “Can Blockchain Strengthen the Internet of Things?,” IT Professional, vol 19, no 4, pp 68-72, August 2017 [11] J.-M Bohli, C Sorge, and D Westhoff, “Initial Observations on Economics, Pricing, and Penetration of the Internet of Things Market,” ACM SIGCOMM

Computer Communication Review, vol. 39, no 2, pp 50-55, 2009 [12] Y. Wu, J Zheng, K Guo, L Qian, X Shen, and Y Cai, “Joint Traffic Scheduling and Resource Allocations for Traffic Offloading with Secrecy-Provisioning,” IEEE Transactions on Vehicular Technology, vol. PP, no 99, pp 1-1, Preprints [13] Y. Wu, X Tan, L Qian, D H Tsang, W Z Song, and L Yu, “Optimal Pricing and Energy Scheduling for Hybrid Energy Trading Market in Future Smart Grid,” IEEE Transactions on Industrial Informatics, vol. 11, no 6, pp 1585-1596, April 2015. [14] A. Thurai, “Cloud Computing Moves to the Edge in 2016,” [online] https://www.ibmcom/blogs/cloud- computing/2016/01/cloud-computing-move-to-the-edge-in-2016/. [15] Z. Xiong, S Feng, D Niyato, P Wang, and Z Han, “Edge Computing Resource Management and Pricing for Mobile Blockchain, ” [online] arXiv:1710.01567 [csCR], 2017