## 2 System and Problem Statement  
### System Model  
The Byzantine Model is a consensus algorithm in the field of distributed systems, aimed at solving the problem of Byzantine Fault [6]. Byzantine failures refer to the possible occurrence of arbitrary fault behavior among nodes in a distributed system, including sending incorrect messages, unresponsive messages, sending inconsistent messages, etc. At present, it is mainly used in blockchain, distributed databases, cloud computing, distributed storage systems, Internet of Things and other fields.  
**PBFT (Practical Byzantine Fault Tolerance)** is a fault-tolerant consensus algorithm designed to address the Byzantine fault problem in distributed systems. The Byzantine fault problem refers to the presence of malicious nodes (Byzantine nodes) in a distributed system that can send incorrect messages and disrupt the normal operation of the system. The PBFT algorithm introduces the concept of a replicated state machine, allowing nodes in the system to achieve consensus and execute operations in the same order, even in the presence of Byzantine nodes. It exhibits high fault tolerance and security in practical applications. However, it is important to note that the performance of the PBFT algorithm is directly proportional to the number of nodes, as it requires a significant amount of message passing and verification. To improve performance, optimization techniques such as fast path optimization, batching, and asynchronous communication can be employed.  
HBFT is an improvement of the PBFT algorithm in 2017 [10] that can be applied to a structured Byzantine fault-tolerant system. It is designed to address the challenges of performance and scalability in large-scale distributed systems while maintaining system security and fault tolerance. To achieve this goal, HBFT organizes system nodes into multiple levels or hierarchies, with each level consisting of multiple subcommittees. The consensus protocol within each subcommittee is performed using the PBFT algorithm, and cross-subcommittee consensus is achieved through a similar protocol. In the internal network communication process, each subcommittee has a primary node and multiple backup nodes. The primary node of each subcommittee participates in the global consensus process, while backup nodes are responsible for backing up the consensus at their respective levels. In the event of a primary node failure, the backup nodes within the subcommittee take over its role to ensure the normal operation of the system. The hierarchical structure of HBFT improves system scalability, as nodes within each subcommittee can execute the consensus protocol in parallel, reducing consensus latency. Additionally, the protocol between subcommittees reduces the complexity of message exchange and computation, thereby improving system performance. Furthermore, HBFT provides strong fault tolerance and can tolerate malicious nodes and Byzantine faults.  
Figure 1 illustrates the consensus process of the degree-3 HBFT algorithm protocol. Table 1 provides a comparison of three algorithms, revealing that each algorithm has its advantages and disadvantages. The RAFT algorithm demonstrates better performance but cannot handle Byzantine faults. The PBFT algorithm falls short in some aspects, while the HBFT algorithm performs well but lacks the fairness of the RAFT algorithm. Hence, the HBFT algorithm can benefit from the insights of the RAFT algorithm to address its shortcomings.