## 5 Modification of the HBFT Algorithm
### Throughput  
In this section, we conducted experiments on the blockchain network with an increase in the number of nodes from 4 to 25. The nodes were divided into different groups for the experiments. Our goal is to evaluate the scalability and performance of the integrated HBFT and RAFT algorithm in the network environment.  
The experiments involved measuring various performance metrics such as throughput, transaction latency, and consensus efficiency for each configuration of nodes and groups. The results of these experiments would provide valuable insights into the behavior and capabilities of the integrated algorithm under different network conditions, helping us assess its suitability for practical deployments in real-world blockchain systems with varying node numbers and group structures.  
TPS, or Transactions Per Second, refers to the number of transactions or operations that can be processed per second. It is a commonly used metric to measure the processing capacity and throughput of a system, network, or application. In this paper, we define TPS as the number of transactions submitted per second. TPS is influenced by factors such as system architecture design, the number of system nodes, and the size of data input. To evaluate the performance of our proposed algorithm improvements in terms of TPS, we conducted experiments and compared them with the HBFT and PBFT algorithms. We kept the data size and the number of agreed-upon transactions constant and performed experiments with 4 to 25 nodes. The results show the relationship between TPS and the number of nodes, as illustrated in Figure 9, which presents a comparison of TPS between mHBFT and PBFT algorithms.  
\[\text{TPS}=\frac{\text{Transactions}}{td}. \tag{8}\]  
Figure 8: RAFT election role replacement process.  
Formula (7) represents the calculation formula for TPS, where \(td\) denotes the time taken to complete one consensus.  
From the TPS comparison graph in Figure 9, we can observe that our algorithm maintains consistent TPS with the HBFT algorithm until the total number of nodes reaches seven, and it outperforms the PBFT algorithm significantly. However, when the total number of nodes exceeds seven, the throughput of our algorithm starts to gradually deviate from the HBFT algorithm's TPS. This indicates that our algorithm demonstrates a high-performance advantage as the total number of nodes increases.  
Furthermore, as the total number of nodes increases, the algorithm's TPS decreases, indicating an increase in consensus latency. To address this issue, we propose integrating batch processing operations into the improved algorithm. Batch processing operations can significantly improve efficiency, reduce errors, enhance consistency, and provide convenience, offering significant benefits and advantages. Figure 10 shows the TPS comparison graph after integrating batch processing operations, displaying the experimental results between algorithms with and without batch processing operations. The results demonstrate a noticeable improvement in TPS for our algorithm after integrating batch processing operations. This indicates that batch processing operations alleviate the latency issues caused by an increase in the number of nodes.  
Based on the comprehensive analysis of Figures 9 and 10, our mHBFT algorithm's throughput will increase by approximately 10% compared to the HBFT algorithm when  
Figure 10: mHBFT TPS comparison chart after adding batch processing operation.  
Figure 9: Algorithm throughput comparison chart.  
incorporating batch processing operations at the same number of nodes. This is a significant result, indicating that our algorithm's efficiency and performance are effectively enhanced by combining batch processing operations and utilizing ECC instead of the RSA algorithm. These improvements enable our algorithm to handle transactions more efficiently while maintaining high security levels. As a result, our mHBFT algorithm demonstrates promising practical applications in distributed systems.