Keywords

1 Introduction

The cellular infrastructures of today are facing a demand-driven explosion to provide quality of service (QoS) to various data-hungry mobile applications [1]. Earlier, mobile cloud computing (MCC) was proposed as a solution because it integrates cloud and mobile platforms to increase capabilities of mobile nodes in terms of storage and energy requirements as a centralized cloud service [2, 3]. MCC suffers from many security vulnerabilities and latency in data transmission, thus making it unsuitable for real-time services [4]. MEC addresses the challenges of MCC by designating cloud resources to edge systems within a radio network (RN). Thus, end-user accesses data through RN, and hence, user experience is enhanced as powerful computing is now possible with services like location and context awareness closer to the user [5, 6], within normally 1–2 hops. This drastically reduces end-to-end latency and solves issues related to network congestion. Figure 1 shows the MEC architecture which includes modular routing [7], network scalability [8], and platform services [9].

Fig. 1
figure 1

MEC architecture

Thus, IoT-enabled mobile devices can access the edge servers to enhance computing capability and meet the low latency requirements as imposed by 5G [10]. The above promising architecture, however, has some serious drawbacks. In a distributed computing environment, the edge network analytics support serves as centralized support to various mobile users within an RN. Moreover, the edge network engine undergoes a highly power-intensive CPU computation due to ever-increasing data. This leads to more battery drain of mobile devices even in the presence of low powered protocols in mobile-based IoT applications like Message Queuing Telemetry Transport (MQTT) and Constrained Application Protocol (COAP). Also, as multiple authoritative domains have built their infrastructure over the cloud, we need a trust-based mechanism between the various communicating systems. Blockchain comes to the rescue by providing a trust-enabled smart edge network system [11], where a service provider can facilitate IoT-enabled mobile devices to operate via edge computing service node to support various blockchain applications.

As shown in Fig. 2, a blockchain is a distributed ledger over a public or private network that records transactions between peer nodes that do not trust each other. The information or data as transactions are hashed, verified, and mined into blocks which are added to the chain by miners based on a consensus mechanism. The addition of blocks is always done to the longest valid chain. This rule of longest chaining allows recorded transactions in blocks to be immutable as any change to the block will change hash value leading to the invalidation of blocks. Thus, the valid chain provides a history of transactions as logs which can be verified and created at any moment in the network.

Fig. 2
figure 2

A simplified look of blockchain architecture

The rapid growth of business processes has led to an inevitable requirement of shifting security processes over blockchain networks as they ensure trust and transparency. Today, blockchain is gaining more agility as it is integrating with many domains like finance [12, 13] in the form of digital assets, remittance, and online payments. Also, blockchain is widely used as emerging technology in IoT [14, 15], smart contracts [16], healthcare industry [17, 18], voting [19], and verification of educational documents [20]. Further, blockchain can be used in a transactional manner in tracking tangible luxury items, intellectual property rights, and many other uses.

Blockchain achieves consistency in transactions by accounting for auditability, atomicity, and integrity of data over distributed autonomous platforms, where peer nodes do not trust each other. They are similar to distributed systems where nodes continuously check other nodes integrity using a consensus protocol to agree on a common state of the chain. The chains are cryptographically auditable as they rely on Merkle root value and order-execute architecture in which blockchain network orders the transactions first using a consensus protocol and then executes them in the listed order in all peer nodes in a sequential manner. The entities involved in the transaction performs an update to their local copy of the document which is then added by computing the hash value of the document which could be digitally signed using users’ private/public key pairs and added to the chain. The validation of the transactions is done by miners which add a block to a chain. This logical chaining is done by the process of hashing of data blocks, where any block Bi stores the hash of its previous block Bi-1. The hash in any ith block is computed as Hi = f(inputi, IDi, Timestamp, Hi-1) where inputi is the input document, IDi is the digital identifier associated with the document, Timestamp is the current timestamp value, and Hi and Hi-1 are the hashes of current and previous blocks, respectively. The blocks link to form a trace back to the genesis block, thus allowing consensus in a blockchain network.

Also as shown in Fig. 3, all the hash are computed and used to form the hash at the next higher level in the chain. This is the concept of Merkle tree, and the final Merkle value is stored in a block; hence even there is a tamper in one of the blocks, it leads to complete invalidation of all blocks in the path, to the genesis block. This makes the blockchain system “tamper-proof and secure.”

Fig. 3
figure 3

Overview of blockchain transactions and Merkle root

To add a block, a miner must solve a puzzle in a challenge-response environment by guessing starting bytes of the block in such a way that the hash of the block is smaller than the acceptable target hash value. Each block acts a puzzle for a miner which is termed as nonce or difficulty value. Once the nonce is solved by a miner, the block gets appended to the existing validated chain by appending the hash value of the chain to the block. The above concept is also known as “proof-of-work (PoW)” in a blockchain network. The copies of the new block are added to all nodes in the network maintaining consensus.

The remainder of the article is organized as follows. Section 2 provides an overview of MEC architecture. Section 3 provides the technological aspects of integration of blockchain in MEC and designing of mining as a service (MaaS) in MEC architecture. Section 4 discusses the proposed framework for mobile blockchain in MEC with possible rewards schemes for miners. Finally, Sect. 5 discusses future directions and concluding remarks.

2 Overview of MEC Architecture

2.1 Modulars in MEC

MEC refers to service environment close to the user within an RN. Thus, deploying MEC as base station improves bottlenecks and increases system robustness [4, 21]. According to the technical white paper by the European Telecommunications Standards Institute (ETSI), MEC can be categorized as on-premises, proximity, lower latency, location awareness, and network context information [22]. MEC can be implemented as a software entity such as Open vSwitch (OVS) [23]. MEC platforms include three functionalities, namely routing modular, network capability exposure modular and management modular. Routing modular is responsible for forwarding packets between RN and user. We can define a software-defined flow to smoothly conduct the offered load. Network capability exposure modular securely provides network services like location, video/voice calling through the invocation of suitable application programming interfaces (API), thus providing platform as a service (PaaS) [24]. Management modular deals with the management of local IT infrastructure in third-party applications forming infrastructure as a service (IaaS), such as OpenStack [9]. The interactions among the modulars are shown in Fig. 4.

Fig. 4
figure 4

Interaction among various modulars in MEC architecture

2.2 The MEC Architecture

A radio access network (RAN) is used at the lowest level of communication which facilitates the connections between the mobile devices and the edge network [25]. The RAN networks normally employ a 4G long-term evolution (LTE) and distribute a wide geographical area in smaller clusters, which are then controlled by radio network controller (RNC). The RNC is responsible to control the base station nodes and to carry out network management functions.

The three-layer MEC architecture is proposed as follows:

  1. 1.

    User Interface Layer—The user layer is normally the devices which gather data like mobile, IoT sensors, social networks, and big-data applications which normally communicate with the RAN network. The applications need to transfer huge data for computation to the MEC edge servers.

  2. 2.

    MEC Servers—It is the most important part of the architecture, and it mainly consists of geo-distributed user interface layer. The user layer is normally the devices which gather data like mobile, IoT sensors, social networks, and big-data applications which normally communicate with the RAN network. The applications need to transfer huge data for computation to the MEC edge servers or virtual servers that have built-in IT capability. These MEC servers provide content offloading services where the useful content of the applications could be kept at servers and downloaded whenever required. This ensures resource optimizations and saves useful time.

  3. 3.

    Cloud Servers—The content which is only requiring heavy computations is forwarded to the cloud platform, and the results are shared back to the MEC server.

As shown in Fig. 5, at the edge of the architecture we have mobile devices which install application and process data. The applications communicate with a middle layer, which are MEC servers which is a virtualization of the cloud services and incorporates a local infrastructure, thus provide infrastructure as a service (IaaS). All the extensive computations are now performed at the MEC nodes which make a quick response to a user application. At the top level, we have the cloud-based services for computations not possible at edge level, and one deployment is performed at cloud nodes, content replicas are again maintained at MEC nodes to facilitate faster processing.

Fig. 5
figure 5

MEC architecture

3 Blockchain Consensus and Mining in MEC Architecture

3.1 Security Issues in MEC Architecture

A joint collaboration between the European Telecommunications Standards Institute (ETSI) and Industry Specification Group (ISG) standardized the MEC architecture. MEC also operates upon 5G infrastructure-based public–private partnership (PPP) [14]. MEC can be characterized into various forms such as on-premises, proximity, lower latency, location awareness, and network context information [26]. MEC architecture suffers from security and privacy concerns. Some of them are listed in Table 1.

Table 1 MEC security architecture issues

3.2 Blockchain-Based Solutions

A blockchain-based edge computing system works in the following manner. Firstly, a blockchain user creates a transaction which can be transferred to a neighboring node. Each neighboring peer now collects the transferred transactions over a certain time period discarding the fake transactions. After the time period, the neighboring peers pack the transactions in a block mining is done by solving a difficulty based nonce called PoW. The mined blocks are now validated by a majority of peers and appended to the longest-running chain achieving consensus.

As shown in Fig. 6, the data stored in cloud servers are passed through IP routers normally employing type of service handshake parameters with client applications and passed to the MEC service providers, normally within an RN. The RN can use communication technologies like 5G and provide smaller MECs to serve smaller cells. These cells, normally called microcells, or picocells or femtocells as in the case of 5G architecture, try to provide dedicated service to smaller user groups. This acts as an edge layer to end-user devices. The transactions performed by end-users are then mined as blocks and stored in either public or private blockchain networks. Several approaches are applied to achieve trust and low powered computations as discussed below.

Fig. 6
figure 6

MEC-enabled blockchain network

  • Designing Complex Proof-of-Work Systems—An attacker can create a piece of false blockchain information and bot users in the network. Then, using these bots he can create false transactions and fake blockchain information. These attacks are known as Sybil attacks. One way to curb these attacks is to increase the difficulty of mining algorithm so that an attacker does not have enough computing resources in resource-constrained environments; hence, the environment cannot support the attacker. The attackers provide a nonce value that minimizes the hash value of the packet header below the required threshold of the difficulty level [27]. To manipulate the network, the attacker has to gain a majority in consensus; i.e., it has to achieve a computing power of 51% of total network power. Since the attacker has to hold 51% of the computing power in the network to manipulate the network, this becomes computationally infeasible in a resource-constrained environment.

  • Designing Mining as a Service (MaaS) for Mobile Blockchain—Considering the requirements for IoT-based environments, authors in [14] suggested the incorporation of many blockchain-based solutions that operate at low energy and lower communication overheads. Since IoT devices combine many low-powered sensor and actuator devices, exchange of information over geographically distributed environment poses a major challenge. Further, the complexity of the mining algorithm in limited energy levels of the network becomes a challenging issue. The solution to the above problem is allowing small data servers in an RN to accept offloaded jobs to execute from adjacent mobile and IoT devices [26] in a MEC-enabled blockchain environment. Allowing this local computation solves the problem of blockchain deployment in IoT by allowing PoW difficulty based puzzles, strong hashing algorithms, encryption of data, and achieving distributed consensus. The above integration facilitates cloud hashing and achieving mining as a service(MaaS) in which a user can buy software services in the cloud, to mine blocks and generate incentives, without actually investing in installing hardware platforms. This allows miner nodes to be sufficiently closer to the edge devices, which further reduces the overall complexity and propagation latency for the end user which is suitable in resource-constrained environments, normally found in delay-sensitive IoT-based services. A suitable example would be providing authentication-enabled data privacy for smart homes and smart grid-based systems where the MaaS nodes can be deployed near to grid meters to execute smart contracts and compute resource reservations required for the user. Extra resources allocated to grid nodes are not executed as they are not part of the smart contract. The above scheme allows flexible user resource reservation, which is the key requirement in smart automated IoT-based systems.

  • Designing Optimal Parameters for Balancing Resource Demands in Mobile Environments—Due to limited energy, practically demand of all users may not be fulfilled. This leads to a resource allocation problem. Also, a particular user may define a software-defined networking (SDN) flow and have a different set of value for a service than another user. The valuation depends on certain factors like the number of transactions in a block and mining rewards. The edge computing provider can thus maximize profits by adjusting the price levels based on the demand of competing users. Thus, a direct proportionality can be achieved giving an optimal economic model for resource allocation in an edge computing environment.

4 Proposed Mobile Blockchain-Enabled Edge Framework

The data recorded by the sensor nodes are first sent to the edge servers that will now run the client blockchain application, thus allowing the mining of nodes on edge servers, instead of sending data to cloud platforms. The basic steps can be now computed as follows:

  • Each user Ui, where i = {1, 2, 3, … N}, will run the client-based blockchain API for recording the data on their systems. These data or readings are recorded as transactional data for these systems.

  • The proposed framework will consist of N users, or systems, which will act as a miner node. The role of miner nodes is to send a request for seeking computational power to the edge computing server, normally running the server version of blockchain API synchronized with the client-based API interface. The server application might be running Ethereum or Ripple for the execution of smart contracts to provide smart reservation as well as guaranteeing only the desired resource requirement. Thus, smart execution leads to the exact resource reservation to the miner nodes.

  • The above scenario leads to offloading of computational power to the edge systems which provides the desired MaaS to the miner nodes. The miner nodes now can solve the PoW puzzles on edge nodes, and their pricing schemes are now governed by the edge nodes rather than the cloud nodes leading to the efficient design of pricing mechanisms for the miner nodes. In addition to this, MaaS also provides user infrastructure to build efficient cloud-based applications.

As shown in Fig. 7, the edge computing server or the MEC deploys the infrastructure on a service provider on which the mining as a service is performed and the reward scheme for miners is decided at the middle level. The details are then transferred to the cloud server where the resource pricing is decided for using infrastructure services and informed back to the client. The client can also occasionally offload jobs to be executed at the edge server and blocks are formed by miners once the transactions are verified and added to the chain. The resource-intensive PoW puzzles are solved by miners by taking resources from service provider; hence, the proposed architecture does not drain the limited energy or battery power of the mobile devices; thus, trust management is now added to the edge platform using blockchain network; and dually, the limited energy sources of the client node are also saved. This framework will be beneficial to operate in low-powered energy environments, namely monitoring services in IoT platforms where sensors can be installed in client nodes and monitoring can be done at MEC servers.

Fig. 7
figure 7

Proposed mobile blockchain-enabled edge computing framework

5 Conclusions and Future Work

In this article, we have proposed a blockchain mining framework that can solve complex proof-of-work (PoW) puzzles for mobile blockchain applications, especially for IoT-based mining tasks where resource optimization is a major concern. In the future, we would like to explore the results and the impact of the mining scheme and rewards and pricing of miners. We would also like to develop an efficient reward-based scheme for miners and also a consensus scheme which will simulate the block addition by solving PoW puzzles in such low-powered environments.