# A Hierarchical Blockchain-Based Trust Measurement Method for Drone Cluster Nodes
## 3 Simulation and Results
### Analysis of Blockchain Simulation Results  
Figure 9 presents the relationship between the block generation latency of the PBFT consensus algorithm and the number of UAVs per cluster for both the task offloading scheme and the non-offloading scheme.  
As the number of UAVs increases, the consensus latency for both schemes gradually increases. This is because the verification tasks required in the PBFT consensus process increase with the number of UAV nodes, thereby affecting the verification latency of the nodes. It can be observed from the graph that the block generation latency of the task offloading scheme increases at a faster rate compared to the non-offloading scheme. This is because the cluster head node has limited available computational resources. As the number of UAV nodes increases, the allocated bandwidth and computational power for each UAV decrease, resulting in a greater increase in latency.  
In Figure 10, we investigated the relationship between the transaction throughput of the blockchain system and the number of UAVs under different resource allocation schemes. We set the number of PBFT blocks packed by PoW blocks to 30 and controlled the PoW mining delay by setting the mining task based on the block generation delay of PBFT blocks. As shown in Figure 10, the transaction throughput of the blockchain system decreases as the number of UAVs increases, and the decrease rate gradually slows down. This is because the block generation rate of PBFT blocks decreases with the increase in the number of UAVs. From the graph, it can be observed that under this resource allocation scenario, the bandwidth equal distribution method performs better than the computing power equal distribution method. This is because the allocation of computing resources has a greater impact on the latency.  
The relationship curve between the block generation latency of PBFT and the allocated computing power of cluster head nodes is shown in Figure 11. As the allocated computing resources of cluster head nodes increase, the block generation time of PBFT gradually decreases. However, as the computing power of UAV nodes for task validation reaches saturation, the rate at which the time delay decreases slows down. Since PBFT requires at least 2/3 validation messages from other nodes to achieve consensus, the computing power average allocation scheme cannot compensate for the validation tasks of nodes with low computing power. Therefore, the block generation time will be significantly higher than the resource optimization scheme proposed in this paper.  
In Figure 12, we investigated the relationship between the optimization of the leader node election scheme and the PBFT consensus latency. We set the number of UAVs per cluster to 30 and compared the latency of the leader node election scheme and the task offloading scheme under different average UAV  
Figure 9: The relationship between block latency and the number of UAVs.  
decreases. From the figure, we can see that the performance of the task offloading scheme alone is better than that of the scheme focusing solely on optimizing the leader node election. This is because the impact of improving the verification efficiency of the majority of regular nodes is greater than the impact of solely improving the verification efficiency of the leader node.