## 4 Proposed Frameworks with the Utilization of Competing Miners
### EC-Enabled Blockchain Network with Multiple Competing Miners  
The critical limitation of the blockchain for practical IoT/UAV applications (such as transportation and autonomous driving) is that to solve the PoW puzzles and reach a consensus, a huge amount of computing resources (such as time and energy) is required at the IoT/UAVs, which, however, have strictly limited computing capability with limited energy. If multiple competing miners are employed in the blockchain, the required computing resources are quite high. As we introduced in Section 1.2, EC is very promising and useful to alleviate the computational burden of devices because computing tasks can be offloaded to the (nearest) edge servers, since the edge servers have more computational resources and are not limited by energy. Motivated by this, in this article, we suggest using EC as a means to overcome the above-mentioned limitations of the blockchain. Specifically, in an EC-enabled blockchain, the required mining tasks in the blockchain are offloaded to edge servers and each edge server further employs multiple competing miners to substantially reduce the time spent on mining. This novel framework is called the EC-enabled blockchain and is depicted in Figure 5.  
As depicted in Figure 5, in the EC-enabled blockchain, the data acquired by each device for mining are offloaded to an edge server. By employing competing miners, the edge server then performs the mining task; after which, the mined data are added to the blockchain. By offloading the mining tasks, the computational burden of the device owing to the mining task can be substantially reduced, as the mining tasks are carried out completely on edge servers, which have enough computing resources and thus the capability to execute the mining task even with many competing miners. Because of the sufficient computing resources and capability, the edge server can generally employ a number of competing miners (much more miners than on the device); thus, the time spent on mining can be substantially reduced. In addition, since all the tasks are being executed on the edge server, the communication time between the edge device and the edge server remain the same for each task, both on the framework proposed in [PERSON] et al. [2] and in our proposed framework. For this reason, we have chosen to only show the benefits of usingEC's computational resources to aid in blockchain mining. Furthermore, by combining EC with the blockchain, there will be a significant improvement when it comes to security. Having the data stored in a blockchain network eliminates the single point of failure (i.e., when all of the data is being stored in a single place, thus leading to a high security risk if that place is hacked or compromised), which can be a problem when storing important data on the cloud. The data are stored on all participants that are connected to the blockchain network, and even though one participant is a victim to malicious attacks, the data will still be safe until the whole network is compromised. An attacker would need to control more than half of all the devices in the network before getting access to the encrypted data, which is practically impossible [31]. Experiments and Results  
To confirm the above-mentioned benefits, in Figure 6, the time spent on mining on the edge server is plotted against the number of mining tasks for the case of competing miners. The numerical simulations were performed on a Windows operating system with a Ryzen 7 series 3700x CPU. We created a simple blockchain in Python where we could change the difficulty for every simulation. The blockchain included from and to addresses, an amount in currency, data to be sent, and the hash of the previous block. To make the simulations as similar and fair as possible, we ran all of the experiments on the same parameters, which we copied from [PERSON] et al. [2]. The difficulty level of the PoW, which was described in Section 2.1 (denoted by D), was set to D = 5.