## 3 Improved RE-BPFT Blockchain Consensus Algorithm
### Node Credit Calculation
Specifically, this comprehensive metric combines direct credit, indirect credit, and historical credit values, each assigned distinct weights. The comprehensive credit value \(C_{i}\) for node \(i\) is calculated as follows:_  
\[C_{i}= \begin{cases}\beta_{1}\times C_{\text{dir}_{i}}+\beta_{2}\times C_{\text {idir}_{i}}+\beta_{3}\times C_{\text{his}_{i}},&\text{Normal Node}\\ \frac{1}{2}\times C_{\text{his}_{i}},&\text{Malicious Node}\end{cases}  \tag{10}\]  
_where \(\beta_{1}\) controls the influence of a node's immediate behavior in the comprehensive score, \(\beta_{2}\) reflects the importance of trend-based participation behavior, \(\beta_{3}\) measures the contribution ratio of long-term stability, and \(\beta_{1}\), \(\beta_{2}\), \(\beta_{3}\) satisfies \(\beta_{1}+\beta_{2}+\beta_{3}=1\). For example, in dynamic network environments that require higher participation, \(\beta_{1}\), \(\beta_{2}\), \(\beta_{3}\) can be set to strengthen the selection priority of \"immediate response\" nodes, while in government scenarios emphasizing long-term trust and stability, the weight of \(\beta_{3}\) can be increased._  
**Definition 9**. : _Credit value normalization. After calculating the comprehensive credit value, data normalization is applied to confine it within the range of \([0,1]\). The normalization result is_  
\[\hat{C}_{i}=\frac{C_{i}-\min_{T}(C)}{\max_{T}(C)-\min_{T}(C)+\varepsilon} \tag{11}\]  
_Here, \(max_{T}\) (\(C\)) represents the maximum comprehensive credit value of nodes in each consensus round, \(min_{T}\) (\(C\)) represents the minimum comprehensive credit value, and \(\varepsilon\) is a tiny constant to prevent division by zero._  
Typically, by dynamically adjusting the values of \(\lambda\), \(\mu\), \(\alpha\), \(\beta\) and \(\eta\), the direct credit value, indirect credit value, and historical credit value can be regulated. Additionally, it must be noted that each weight must satisfy \(\lambda+\mu+\alpha+\beta+\eta=1\) and \(\lambda+\mu>\alpha+\beta\), where \(\lambda\) is the maximum weight. The explanation of each credit evaluation index is shown in Tables 2 and 3. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Node Type** & **Primary** **Indicator** & **Symbol** & **Weight** & **Secondary** **Indicator** & **Symbol** & **Weight** & **Description** \\ \hline Excellent Node, & Direct Credit Value & \(C_{dir}\) & \(\lambda+\mu\) & Consensus Credit & \(C_{cut}\) & \(\lambda\) & Measures a node’s ability to successfully complete consensus processes, reflecting its core contribution. \\ Good Node, & & & & Voting Credit & \(C_{cut}\) & \(\mu\) & in voting processes, rewarding successful voting behavior. \\ Ordinary Node & & & & Activity Credit & \(C_{net}\) & \(\alpha\) & sometimes the node’s engagement by counting participants as master or consensus node, weighted by recent activity. \\ Indirect Credit Value & \(C_{dir}\) & \(\alpha+\beta\) & Activity Credit & \(C_{net}\) & \(\alpha\) & \(\beta\) & provides additional rewards based on node credit rankings to stimulate low-credit nodes to perform better. \\ Indirect Credit Value & \(C_{\text{his}}\) & \(\eta\) & - & - & - & - \\ Malicious Node & \(\frac{1}{2}\times C_{\text{his}}\) & - & - & - & - & - \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Node credit evaluation—primary and secondary indicators.