Abstract
Blockchain consensus mechanisms are fundamental to the security and decentralization of distributed ledgers. In Proof-of-Stake (PoS) systems, which are lauded for their energy efficiency, the fair and unpredictable selection of block proposers is paramount and relies heavily on secure random number generation. The RANDAO random number generation mechanism in the Gasper protocol is susceptible to hash collision attack, which can introduce adversarial bias in the block proposer selection process. From the perspective of resisting adversarial bias attacks, this paper examines the optimization of the Gasper consensus protocol, focusing on security issues such as vulnerabilities to hash collisions in RANDAO and high latency in asynchronous network environments. By analyzing the spatial–temporal distribution of historical block hashes, we propose a dual-round random number verification mechanism that enhances reliability through multiple validation models. We develop a dynamic game-theoretic model under incomplete information to analyze node strategy selection and interaction dynamics. Our experimental results demonstrate that the improved protocol (RABA-Gasper) offers superior resistance to attacks, fairness, and efficiency compared to conventional protocols. RABA-Gasper outperforms conventional ones, achieving a 6.8% attack success rate (vs. 32.7% for RANDAO and 18.2% for Two Look-Back) with 94.3% hash collision detection, a proposer Gini coefficient below 0.23, 2.3x higher throughput retention than RANDAO in asynchronous networks, and a slightly increased random number generation latency of 125 ms. Supported by a game-theoretic model, it guarantees security when honest nodes account for ≥2/3 of the total.