While ensuring that blocks in the blockchain are generated in an orderly manner according to the timestamp, Blockchain consensus algorithm has a direct effect on the performance of the blockchain system. PoS consensus algorithm is a mainstream one adopted in the public chain of blockchain, blocks are generated randomly and in some cases the time interval between blocks is too long, making it difficult to meet the needs of commercial scenarios. To address performance limitations of PoS consensus algorithm, we design a Silkworm algorithm, which defines the fastest and slowest time for the generation of blocks through smart contract, and which selects the master node by combining Raft algorithm. When there are transactions, if PoS consensus algorithm does not generate blocks within the defined fastest time, the Silkworm algorithm ensures that blocks are automatically generated by the master node. In the case of no transactions, when the PoS consensus algorithm does not generate blocks within the defined slowest time, the Silkworm algorithm also generates blocks through the master node. It still generates blocks normally when the master node shuts down or fails. As verified in experiment, Silkworm algorithm can greatly improve the performance of blockchain based on PoS consensus algorithm, ensure the security and robustness of blockchain, and better meet the needs of commercial application scenarios.
参考文献
相似文献
引证文献
引用本文
钟增胜.一种基于区块链PoS共识算法的改进研究[J].重庆工商大学学报(自然科学版),2021,38(4):36-41 ZHONG Zeng-sheng. An Improvement on Blockchain-Based PoS Consensus Algorithm[J]. Journal of Chongqing Technology and Business University(Natural Science Edition),2021,38(4):36-41