Abstract
As supply chains expand in scale and the number of participating nodes increases, existing consensus algorithms are increasingly showing limitations in scalability, communication complexity, and handling complex network environments. To address the shortcomings of blockchain consensus mechanisms in master node selection, scalability, and communication complexity in supply chain traceability scenarios, this paper proposes a blockchain hybrid consensus optimization algorithm named Node Rating-Based and Grouping Raft cluster Practical Byzantine Fault Tolerance (NG-RPBFT) for supply chain traceability. This algorithm builds a multi-index comprehensive rating model for nodes to comprehensively evaluate consensus nodes, reasonably groups consensus nodes, adopts an inter-group and intra-group dual consensus mechanism to achieve efficient data synchronization, and introduces Brotli data compression technology to optimize message load, effectively enhancing system performance. Experimental results confirm that this algorithm significantly improves the scalability of the consensus mechanism and performs exceptionally well in consensus efficiency, making it suitable for complex application scenarios such as supply chain traceability under CPS scenarios.