# The Modification of pBFT Algorithm to Increase Network Operations Efficiency in Private Blockchains
## 3 Modification of the pBFT Algorithm
### The Performance of the Consensus Algorithm
#### 3.2. mpBFT (Modified pBFT)  
The mpBFT presented in this paper is designed to be useful in inter-organizational consensus algorithms. By actively using the characteristics of the private network that has reliability-based nodes, the algorithm proposes a simplification of safety and process by assuming that only honest nodes would be present in a blockchain network. Based on reliability among nodes, the number of broadcasts were minimized during the prepare and commit stages in order to manage the network connection cost more efficiently, in which the process is handled based on reliability to have a node elected via vote to be ID_\(\alpha\) (pBFT Leader ID). When electing a leader node, an opportunity for prioritization is given in consideration of the frequency of the nodes and the reliability of the institution, and voting should be taken into account when the leader node is re-elected. The election process of the ID_\(\alpha\) and the primary node is shown in Figure 2.  
1. Initially N nodes: Follower
2. Leader node election:
3. N/3 (33.3% of N nodes) are selected as the leader node (ID_a) group by evalua tion and voting on the network usage frequency (\(\alpha\)1) and institutional reliability (\(\beta\)1) for each node. 4. Any node among the leader nodes becomes the primary node and receives the client's request. 5. In the case of an error occurrence node among the leader nodes:
6. If there is no 'permission' reception or the communication between ID_\(\alpha\) is d isconnected, it is regarded as an error. 7. Among the 2N/3 Followers, the frequency of use (\(\alpha\)1) and the institution's reliability (\(\beta\)1) are prioritized to be included in the ID_\(\alpha\) group. The primary node delivers a message to the leader node and, at the same time, communicates to all nodes that consensus is in progress by the leader node. The leader nodes go through the consensus process through two methods depending on the importance of the message. When the importance of the message is high, a consensus process is performed through mutual confirmation between the leader nodes, and the computation cost of \((N/3)\) * \((N/3)+N/3=N^{2}/9\) is consumed. In general, it is delivered to the leader node for consensus, and the leader nodes pass through the process of delivering it to the primary node, which consumes the computational cost of \(N/3+N/3=2N/3\). It can be seen that the efficiency in terms of computational cost can be improved, considering that 2N\({}^{2}\) of computational cost is consumed in the case of conventional pBFT. Schematic of the mpBFT process is as follows. A leader node is selected at the start of processing. ID_\(\alpha\) (PBFT_Leader) is selected through voting and node status and, when an error occurs, the insufficient leader node is re-elected in the form shown in Figure 3.  
When Msg arrives, it sends the client's state change request to the start node, which forwards the client's request to the leader nodes and the leader nodes start processing the message. At this time, the content to be transmitted to the leader node is Msg1 (PreStep, V N, D (M)), ID_\(\alpha\)) and the ID and Msg summary of the selected leader nodes (ID_\(\alpha\)) are transmitted. The leader nodes transmit the contents of Msg2 (V, N, ID_\(\alpha\), ID_\(\alpha\)T) to all nodes, along with the ID (ID_\(\alpha\)) of the elected node, the reliability of the ID (ID_\(\alpha\)T), and the request status flag. The PreCommit processed by the leader nodes is delivered and PreCommit is carried out, and the contents of the PreCommit (Msg (Commit, V, ID_\(\alpha\))) are sent to the start node. In each process, cases with high message importance and cases without messages are selected and processed, and for the PreCommit result, the initiating node transmits the consensus decision to all nodes. The pseudocode that schematically shows the consensus process is shown in Figure 4.  
Figure 2: ID_\(\alpha\) election algorithm.