| With the birth and the rapid development of blockchain,many areas have gradually produced some applications based on blockchain technology,including cross-border payment with blockchain technology in the financial field,traceability with blockchain technology in the field of logistics and agriculture,public management with blockchain technology in the field of public services,rights management with blockchain technology in the field of digital rights,etc.The blockchain system is a decentralized shared database.Therefore,ensuring the consistency and security of the blockchain system is crucial.The consensus mechanism is the core technology of the blockchain system.It verifies and confirms the transactions in a short period of time through the voting of special nodes,and solves the problem of reaching the consensus in the network that lacks the trust and is completely free and open.The consensus mechanism enables the decentralized blockchain system to reach consistent.Proposal of the Proof of Stake mechanism,except enabling the system to reach the consensus and reducing the energy consumption of other consensus mechanism,such as Proof of Work mechanism,maintains the security of the network at a certain scale,and has a wide range of applications.However,in the Proof of Stake mechanism,the system does not process the existing malicious nodes,and the bifurcation phenomenon is very easy to occur in the network with poor synchronization.These defects seriously affect the security and the consistency of the blockchain system.Therefore,exploring a more secure and efficient improved Proof of Stake mechanism is of great practical significance.Aiming at these two key issues,based on the Proof of Stake mechanism,this paper conducts research and analysis around a security improvement scheme based on the node states and an improvement consensus mechanism scheme based on credit rewards and punishments voting mechanism.The main innovations and research results are given as follows:(1)Aiming at the security problems caused by malicious nodes in the traditional Proof of Stake mechanism,we propose a security improvement scheme based on the node state.Set the node state sequence.According to the comparison of the number of invalid blocks produced by the nodes which represented in the node status sequence and the set threshold,the node status is classified and updated in the node attribute table in time.And by voting,malicious nodes with a voting rate of more than 50%are eliminated.It ensures that the blockchain system is not affected by malicious nodes,which may continuously produce the invalid blocks or make other malicious acts,and ensures the security of the blockchain system.Specifically,the proposed scheme is analyzed theoretically,and its necessity and efficiency are verified experimentally.(2)In view of the security improvement scheme of the Proof of Stake mechanism,the problem of easy forking still exists in the network with poor synchronization,an improvement consensus mechanism scheme based on credit rewards and punishments voting mechanism was proposed.Set credibility for each node.And according to the new voting mechanism,nodes vote on the multiple blocks which produced at the same time.The corresponding node is given credit punishments or credit rewards according to the voting performance of the node.According to the credibility of the block producer and other conditions,a block is voted for publishing on the chain finally,thereby ensuring the consistency and fairness of the blockchain system.Theoretical analysis and simulation experiments show that the proposed scheme can effectively solve the fork phenomenon in the blockchain which based on Proof of Stake mechanism,and has the performance of consistency and fairness. |