## 3 System Model and Problem Statements
### Problem Formulation
#### 3.2.3 The Layer of the Blockchain  
The blockchain system has \(m\) consensus nodes that are represented by \(M=\{1,2,3,..,m\}\). They check the MC's transactions and then add the validated block to the blockchain. The blockchain in the proposed method employs a Practical Byzantine Fault Tolerance (PBFT) that could guarantee the system's consistency when the number of misbehaving nodes is less than one-third. Request, pre-prepare, prepare, commit, and respond are the PBFT specific consensus process steps, as shown in Figure 3. The MC first sends the data consensus specification and the unverified block to the blockchain network. The blockchain then assigns a master node randomly to validate the block's relevant information. The chosen master node first verifies the block's signature and Message Authentication Code (MAC). If the above information is correct, the signature and MAC of each transaction will be checked next. Then, the computing cycles are necessary to confirm one signature and generate/verify, and one MAC is assumed to be \(\omega\) and \(\Phi\), separately. As a result, the request period's computing cycles can be written as Equation (10), assuming \(tb\) denotes the transaction batch's total size and \(ts\) denotes the average transaction size [42]. \[cc_{1}(t)=1+\frac{tb}{ts}*(\omega+\Phi) \tag{10}\]The MC then creates a unique MAC and delivers it to each replicated node. The replicated nodes then double-check this MAC and the signature and MAC of each transaction in the block. In this step, the necessary computing cycles at the MC and replicated nodes are expressed by Equation (11) [44]. \[cc_{m}(t)=(m-1)*\Phi \tag{11}\]  
\[cc_{r}(t)=\Phi+\frac{l\;*\;tb}{ts}*(\omega+\Phi) \tag{12}\]  
Additionally, the percentage of right transactions sent by the MC is represented by \(l\). The duplicated nodes that have been checked generate and send a single MAC to other nodes. Then, each node receives \((m-1)\) MACs from other nodes and verifies them. The next phase is available if the number of appropriately checked nodes is greater than \(2k\) (where \(k=m-1/3\)). The MCs and replicated nodes' processing cycles can be interpreted as [45]:  
\[cc_{m2}(t)=2k*\Phi \tag{13}\]  
\[cc_{r2}(t)=(m-1+2k)*\Phi \tag{14}\]  
If they have received more than \(2k\) correct messages, the checked node sends a single MAC message to all other nodes. Meanwhile, each node verifies the MACs of all other nodes. Then, the computing cycles are denoted by Equation (15) [45]. \[cc_{3}(t)=(m-1+2k)*\Phi \tag{15}\]  
Eventually, nodes that have got more than \(2k\) valid commit information give the MC one reply response. If there are more than \(2k\) correct reply messages, the consensus process is considered complete and efficient. Therefore, the created block is delivered to the blockchain system. There is also block overhead that is proportional to the block size, as follows [46]:  
\[CO_{block}(t)=\partial*j(t) \tag{16}\]  
Here, \(j(t)\) is the block size and \(\partial\) is the fixed coefficient to explain the relationship between block overhead and block size. All nodes confirm a large number of signatures and MACs at each stage of the verification process, resulting in a large number of complicated and heavy jobs. Each PBFT consensus mechanism has a time limit \(t\) that is proportional to the whole transaction size. The created block will not be modified if the consensus time  
Figure 3: PBFT consensus process, step by step shows how to communicate with each other. surpasses the cap. The efficiency of the consensus is critical. Edge nodes and cloud servers are used to facilitate the verification process of all nodes to deal with these complicated and heavy computation jobs and satisfy the time constraints of the consensus process. Edge and cloud servers have different computational capacities and charge different computation costs. Plus, servers charge extra computational overhead when several consensus processes are needed because of inadequate block size.