DPOS consensus algorithm method and system based on reputation value and strong blind signature algorithm
The DPOS consensus algorithm, which uses reputation value and strong blind signature algorithm, solves the problems of centralization risk and non-active voting in the DPOS algorithm, realizes a safer and more efficient blockchain consensus process, protects node privacy and improves the stability of the consensus system.
Patent Information
- Application Number
- CN202410162499.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-05
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2044-02-05
AI Technical Summary
Existing DPOS consensus algorithms suffer from centralization risks, lack of active node voting, and collusion attacks due to identity leaks, all of which affect the consensus process.
By introducing reputation values and strong blind signature algorithms, and through node sorting, proxy node voting, reputation mechanisms, and dynamic witness node transformation, combined with the Elgamal signature algorithm, identity registration and blind signature encryption are performed to ensure voting privacy and reputation assessment.
It improves the security and efficiency of blockchain networks, reduces centralization risks, enhances transaction privacy protection, incentivizes node participation, and optimizes consensus efficiency and system security.
Smart Images

Figure CN118075280B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of blockchains, and particularly relates to a DPOS consensus algorithm method and system based on a reputation value and a strong blind signature algorithm. BACKGROUND
[0002] As a decentralized and trustworthy distributed technology, blockchains have attracted extensive attention and application, which involves the financial industry, the medical industry, the livelihood service industry, the traceability industry, etc. However, to realize a safe and reliable blockchain system, a consensus algorithm is a crucial component. The consensus algorithm aims to make multiple nodes in a distributed network reach an agreement on the order and state of transactions, so as to ensure the consistency of data and the reliability of the system. In the past few years, the consensus algorithm has made remarkable development in the field of blockchains.
[0003] The most famous blockchain consensus algorithm, Proof of Work (PoW), was proposed by Nakamoto in Bitcoin: A peer-to-peer electronic cash system. The concept of PoW was first proposed by Cynthia Dwork in 1993 to solve the problem of spam. In 1999, Markus Jakobsson formally proposed the concept of "proof of work", which laid the foundation for Nakamoto's design of the consensus mechanism. Its calculation formula is as follows:
[0004] SHA256(SHA256(Data|Nonce))≤D (1)
[0005] The core idea is that nodes constantly search for random numbers, so that the values obtained by two hash function operations meet the specified difficulty value. However, this will cause a large amount of resource consumption. In order to solve the problem of resource waste caused by the consumption of a large amount of computing power by PoW, the PoS consensus algorithm is proposed and uses the concept of "shares" instead of the original computing power in the PoW algorithm.
[0006] In order to solve the problems existing in the PoS consensus algorithm, the DPOS consensus algorithm is proposed. The DPOS consensus algorithm was first proposed by Bitshares developer Dan Larimer in 2014 and applied to the blockchain network. The proxy mechanism is introduced, and multiple delegate nodes are selected through the voting mechanism of each round to complete the accounting in turn, which greatly improves the consensus efficiency of the system.
[0007] Through the above analysis, the problems and defects of the prior art are as follows:
[0008] (1) Centralization risk: The DPOS algorithm delegates the right to generate blocks to a few representative nodes, which leads to excessive concentration of power and thus exacerbates the risk of centralization.
[0009] (2) When the identity of a voting node is leaked, it is easy for malicious nodes to bribe it, thereby colluding with other nodes to carry out a joint attack, affecting the subsequent consensus process.
[0010] (3) Low node voting activity. In the DPOS algorithm, the election and delegation of representative nodes are based on the current token holdings. This leads to the rich getting richer and weaker users having difficulty obtaining the right to vote for representative nodes, resulting in low voting activity. Summary of the Invention
[0011] To address the problems existing in the prior art, this invention provides a DPOS consensus algorithm method and system based on reputation value and strong blind signature algorithm.
[0012] This invention is implemented as follows: a DPOS consensus algorithm method based on reputation value and a strong blind signature algorithm, wherein the DPOS consensus algorithm method based on reputation value and a strong blind signature algorithm includes:
[0013] Step 1: Determine if a node is entering the system for the first time, and then sort it.
[0014] Step 2: Select the set of proxy nodes according to the sorting.
[0015] Step 3: The proxy nodes vote for each other, and finally the number of votes received by each node is counted, summed with the reputation value, averaged, and then the nodes are sorted.
[0016] Step 4: Select the top 21 nodes to form the witness node set, and the remaining nodes to form the backup witness node set.
[0017] Step 5: Monitor the block production process of the witness nodes and dynamically switch between them and the backup witness node set using the proposed reputation mechanism;
[0018] Step six: Witness nodes package blocks, produce blocks, and the consensus algorithm ends.
[0019] Furthermore, in step one, if a node is entering the system for the first time, it is sorted according to the time of its entry into the system; otherwise, it is sorted according to the size of its historical reputation value.
[0020] Furthermore, the proxy nodes in step three vote against each other, and the main process is as follows:
[0021] (1) System initialization
[0022] During system initialization, some precautions for the electronic voting process are set, including the start and end times of registration and voting, and published in the blockchain network, so that all nodes participating in the election can share this information;
[0023] (2) Identity Registration
[0024] The registration phase primarily involves voters sending their public and private keys, generated using the Elgamal signature algorithm, to the registration smart contract for registration. The smart contract then verifies the authenticity and legality of the information submitted by the node. Once verified, the node's information is written into the list of legitimate nodes and stored in the smart contract. The identity registration process is as follows:
[0025] The voting node first initiates a registration request to the registration smart contract, and at the same time generates a random number z∈Z. p Used as the private key and calculated y = g z Using mod p as the public key, after completing the calculation, the node simultaneously sends its public and private keys to the registration smart contract. After the registration smart contract applies, it will verify the node's application, public and private keys, and information. Once the information is approved, it will return an ID unrelated to identity information as an identity identifier to prevent identity leakage. Finally, it will send the relevant information about the vote to the node and send the ID to the vote counting smart contract for subsequent recording and tracking of the vote.
[0026] (3) Voting stage
[0027] This stage involves encrypting the ballots using a blind signature algorithm based on Elgamal;
[0028] (4) Voting stage
[0029] Once the designated voting period has elapsed, the vote-counting nodes stop accepting node registration applications and distributing ballots. At this point, the vote-counting smart contract begins counting the votes, comparing each ballot with the registered node ID. Nodes that do not match or have not received a ballot are considered to have abstained. Finally, the node's vote count is added to its reputation value, and the average is calculated. The 21 nodes with the highest average values become delegated nodes to participate in the subsequent consensus process.
[0030] Furthermore, in the voting stage of step two, for simplicity, V is used to represent the voting node and S is used to represent the receiving node. V obtains information such as voting instructions from the administrator and generates the original ballot, denoted as m. At the same time, the ballot is encrypted using a blind signature algorithm. The specific process is as follows:
[0031] Step 1: V generates random numbers k∈Z p-1 And calculate r = g k modp, then send r to S;
[0032] Step 2: S generates random numbers α and β, and simultaneously blinds the message m to obtain m′. The calculation process is m′=α -1 g -β r 1-α mmod(p-1), then send m′ to V;
[0033] Step 3: V calculates s = xm′ + krmod(p-1), signs (m′,(r,s)) with its private key, and then sends it to S;
[0034] Step 4: V calculates the hash digest of the initial message m, denoted as hash(m), and encrypts it using S's public key. Finally, the signed (m′,(r,s)) and hash(m) are recorded as votes on the blockchain, and the votes are also sent to S.
[0035] Step 5: Calculate r′ = r β mod(p-1), s′=r′r -1 smod(p-1) to obtain the signature (m,(r′,s′)), and S decrypts it with its own private key to obtain hash(m).
[0036] Furthermore, the reputation mechanism proposed in step five divides the node's reputation value into three parts, as shown in formula (3):
[0037] T(u)=TH(u)+μTB t (u)+σTE t (u) (3)
[0038] Where T(u) is the total reputation value of node u in the current period, TB t (u) is the behavior evaluation value of node u in the current period t, TE t (u) represents the satisfaction rating of other nodes with node u in the current period, and μ and σ are adjustment factors;
[0039] By incorporating a node's historical reputation score and referencing its past transaction information, we can better evaluate the node's subsequent behavior.
[0040]
[0041] in, It is an influencing factor of historical reputation score. It is an adjustment parameter, and l represents the cycle number.
[0042] Furthermore, the reputation mechanism proposed in step five sets different reward and punishment mechanisms for node behavior. The formula for calculating the reputation value of node behavior is as follows:
[0043]
[0044] The calculation of node behavior mainly consists of the following three parts: the time it takes for the node to complete voting, the calculation of the reputation value of node u's positive behavior, and the calculation of the reputation value of its malicious behavior. 投票 For the voting process, a voting time T is set. 投票 If the time it takes for a node to complete voting is less than T 投票 Just This ratio is supplemented by the reputation value of node u from the previous cycle; conversely, if voting is not completed within the specified time, the reputation value for that part is 0. u Let λ be the number of positive actions performed by node u, and let λ be the adjustment factor. The more times a node performs positive actions, the higher its reputation value will be. At the same time, if a node's positive actions are at a high level, it will also have a positive impact on the node's evaluation. Specifically, this is done by adjusting the adjustment factor λ. If a node has been performing positive actions in recent cycles, then λ can be appropriately increased. Conversely, if a node has performed malicious actions in the previous cycle, then the value of λ will be decreased accordingly. If a node has performed malicious actions in the current cycle, the node's reputation value for the current cycle will be reset to zero.
[0045] The final part calculates the reputation value corresponding to malicious behavior of a node, where δ is the reputation adjustment factor for malicious behavior of a node, and R... b The number of times node u performs malicious behavior, with each different malicious behavior corresponding to a different penalty factor;
[0046]
[0047] The reputation score for node satisfaction is calculated as shown in the formula. The satisfaction calculation incorporates the EigenTrust reputation evaluation model, where sat(u,i) represents the number of times node u has been satisfied with node i in historical transactions, and unsat(u,i) represents the number of times node u has been dissatisfied with node i in historical transactions. total This represents the total number of evaluations received by node u.
[0048] Another objective of this invention is to provide a DPOS consensus algorithm system based on reputation value and a strong blind signature algorithm, wherein the DPOS consensus algorithm system based on reputation value and a strong blind signature algorithm includes:
[0049] The node sorting module is used to determine whether a node is entering the system for the first time, and then sort it.
[0050] The proxy node selection module is used to select a set of proxy nodes based on sorting.
[0051] The proxy node voting module is used for proxy nodes to vote for each other. Finally, the number of votes received by each node is counted, summed with the reputation value, averaged, and then the nodes are sorted.
[0052] The witness node selection module is used to select the top 21 nodes to become the witness node set, and the remaining nodes become the backup witness node set.
[0053] The monitoring module is used to monitor the block production process of witness nodes and dynamically switch between them and the backup witness node set using the proposed reputation mechanism.
[0054] The node block production module is used by witness nodes to package blocks and produce blocks.
[0055] Another object of the present invention is to provide a computer device including a memory and a processor, the memory storing a computer program, which, when executed by the processor, causes the processor to perform the steps of the DPOS consensus algorithm method based on reputation value and strong blind signature algorithm.
[0056] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the DPOS consensus algorithm method based on reputation value and strong blind signature algorithm.
[0057] Another objective of this invention is to provide an information data processing terminal for implementing the DPOS consensus algorithm system based on reputation value and strong blind signature algorithm.
[0058] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows:
[0059] First, this invention addresses the increased centralization risk and node issues in traditional DPOS consensus algorithms by proposing a reputation mechanism and a reward / punishment mechanism. This reputation mechanism incorporates more node information, reflecting recent node behavior through changes in reputation values, and dynamically adjusting reputation values based on node behavior. Positive or malicious behavior is rewarded or punished, thereby constraining node behavior and reducing the likelihood of malicious actions. The set of witness nodes and backup witness points dynamically change based on reputation value changes; once the reputation value reaches a certain threshold, it decreases to a specific value, thus reducing the concentration of power in the hands of a few nodes and mitigating the risk of centralization. Simultaneously, the reward mechanism also increases nodes' willingness to vote.
[0060] This invention addresses the problem that when the identity of a voting node is leaked, it can be bribed by malicious nodes, leading to a conspiracy with other nodes to attack and affect the subsequent consensus process. It introduces an electronic voting model and applies a blind signature algorithm to prevent the leakage of voting node identity information, thereby improving the security of the system.
[0061] Second, considering the technical solution as a whole or from a product perspective, the technical effects and advantages of the technical solution to be protected by this invention are specifically described as follows:
[0062] (1) Enhanced transaction privacy protection: By utilizing the characteristics of strong blind signatures, this invention ensures that the privacy of both parties in a transaction is strictly protected, and even in a transparent blockchain environment, transaction details can be prevented from being leaked.
[0063] (2) Optimize consensus efficiency: This scheme incorporates a reputation value evaluation mechanism, which ensures that only nodes with good reputation can participate in the consensus process, thereby improving consensus efficiency and reducing the risk of consensus delays or failures caused by malicious nodes.
[0064] (3) Enhancing the enthusiasm of voting nodes and maintaining system security: Through the reputation value system, this invention incentivizes nodes to honestly maintain the network while punishing malicious behavior by nodes. This maintains the security of the consensus system.
[0065] (4) Enhanced system scalability: The design of this invention is modular, which makes it easy to expand or optimize the functions as needed in the future, thereby adapting to the ever-changing business needs and technical environment.
[0066] Third, by introducing reputation values and a strong blind signature algorithm, this invention significantly improves the security and efficiency of the DPOS consensus algorithm while protecting the transaction privacy of participating nodes. This will greatly enhance confidence in the application of blockchain technology in finance, supply chain, and the Internet of Things, thereby attracting more enterprises and individual users to adopt the technical solutions of this invention.
[0067] Fourth, the significant technological advancements of this invention have occurred in various fields and industries. The following are some examples of significant technological advancements in certain fields:
[0068] 1) Artificial Intelligence and Machine Learning: Advances in natural language processing and speech recognition technologies have made intelligent and virtual assistants more accurate and intelligent. Reinforcement learning has expanded its applications to fields such as autonomous driving, healthcare, and gaming, improving the decision-making capabilities of these systems.
[0069] The emergence of large-scale pre-trained models such as GPT3 has made natural language generation and understanding more advanced.
[0070] 2) Quantum Computing: Advances in quantum computer research and development are expected to provide breakthrough computing performance in fields such as encryption, materials science, and optimization. The development of quantum communication technology can provide a more secure communication method.
[0071] 3) Renewable Energy and Battery Technology: Decreasing costs of solar and wind power make renewable energy more competitive and promise to reduce carbon emissions. Research into new battery technologies such as lithium-sulfur batteries has improved energy storage capacity and battery life.
[0072] 4) Autonomous Driving Technology: The development of intelligent transportation systems and autonomous vehicles has improved traffic safety and efficiency. Advances in high-precision map creation and vehicle perception technology have made autonomous driving systems more reliable.
[0073] 5) Blockchain and Cryptocurrencies: The application of blockchain technology has expanded to areas such as finance, supply chain management, and voting, increasing transparency and security. This includes the decentralization of centralized financial services and the widespread adoption of digital currencies.
[0074] 6) Environmental protection technologies: Improvements in air and water quality monitoring technologies help monitor and improve environmental quality. Innovations in waste treatment and recycling technologies help reduce waste and resource waste.
[0075] These technological advancements have driven innovation in their respective fields, had a profound impact on society, improved quality of life, increased efficiency, and provided tools and methods for addressing many global challenges.
[0076] Fifth, this invention provides detailed implementation steps and a reputation mechanism for the DPOS (Delegated Proof-of-Stake) consensus algorithm based on reputation value and strong blind signature algorithms. This algorithm, by combining reputation evaluation and strong blind signature technology, aims to improve the security and efficiency of blockchain networks. Below, I will analyze this process step by step based on your description:
[0077] Step-by-step explanation:
[0078] 1. Generate and calculate random numbers: This step may involve generating initial transaction or voting data, where the generation of random numbers can increase the security of the system.
[0079] 2. Blinding Messages and Computation: Blinding technology in the field of encryption is used to ensure the privacy of message senders, that is, to digitally sign the message without knowing its content. Here, blinding might be used for encrypting voting or transaction information.
[0080] 3. Signing and Sending: Use a private key to sign the data to ensure its integrity and verifiability, and then send it to other nodes in the network or store it in the blockchain.
[0081] 4. Hash Digest Calculation and Encryption: The initial message is hashed to ensure data consistency and immutability, and then encrypted using public-key cryptography for secure recording on the blockchain.
[0082] 5. Calculation and decryption: The final step involves verifying and decrypting the data that has been encrypted and signed in the previous steps to ensure the authenticity and integrity of the data.
[0083] Reputation score calculation: The reputation score calculation takes into account the node's behavior evaluation in the current period, the satisfaction evaluation of other nodes, and the historical reputation score, forming a comprehensive reputation scoring system.
[0084] Reward and punishment mechanism: By setting up a reward and punishment mechanism, positive behavior of nodes is encouraged, such as timely completion of voting and active participation in network maintenance, while malicious behavior is punished, thereby maintaining the overall health and security of the network.
[0085] Combining reputation assessment with strong blind signatures: This combination provides a method that protects privacy while ensuring transaction trustworthiness, which is crucial for improving the security and efficiency of the DPOS consensus algorithm.
[0086] Dynamic reward and punishment system: By dynamically adjusting the reward and punishment mechanism, it can respond more flexibly to various behaviors on the network, promote positive behavior, and suppress malicious behavior.
[0087] Leveraging historical reputation values: Considering a node's historical performance allows for a more accurate assessment of its current and future behavior, adding depth and complexity to the consensus mechanism.
[0088] The reputation-based DPOS consensus algorithm provided by this invention can theoretically enhance the security and stability of blockchain networks by incentivizing good behavior and punishing malicious behavior, thus maintaining the healthy operation of the network. However, in practical applications, the efficiency and effectiveness of this mechanism may be affected by various factors, including the accuracy of reputation assessment, the design of the reward and punishment mechanism, and the behavioral patterns of network participants. Attached Figure Description
[0089] Figure 1 This is a flowchart of the DPOS consensus algorithm method based on reputation value and strong blind signature algorithm provided in the embodiments of the present invention;
[0090] Figure 2 This is a flowchart of the electronic voting process provided in an embodiment of the present invention;
[0091] Figure 3 This is a system block diagram of the DPOS consensus algorithm based on reputation value and strong blind signature algorithm provided in the embodiments of the present invention;
[0092] Figure 4This invention is based on experiments conducted to improve node activity.
[0093] Figure 5 This invention is based on experiments conducted to reduce the proportion of malicious nodes. Detailed Implementation
[0094] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0095] like Figure 1 As shown, the DPOS consensus algorithm method based on reputation value and strong blind signature algorithm provided in this embodiment of the invention includes the following steps:
[0096] S101, determine whether the node is entering the system for the first time, and then sort it;
[0097] S102, Select the set of proxy nodes according to the sorting;
[0098] S103, the proxy nodes vote for each other, and finally the number of votes received by each node is counted, summed with the reputation value, averaged, and then the nodes are sorted.
[0099] S104, Select the top 21 nodes to become the witness node set, and the remaining nodes to become the backup witness node set;
[0100] S105 monitors the block production process of the witness nodes and uses the proposed reputation mechanism to dynamically switch between the backup witness node set;
[0101] S106, the witness node packages the block, produces the block, and the consensus algorithm ends.
[0102] The working principle of the DPOS (Delegated Proof of Stake) consensus algorithm method based on reputation value and strong blind signature algorithm in this invention is as follows:
[0103] 1) Initial sorting of nodes entering the system (S101):
[0104] When a node first enters the system, it needs to be sorted in some way. This could be based on specific node attributes, performance, or by randomly assigning an initial rank. This step ensures that the node has a starting position in the system.
[0105] 2) Agent node selection (S102):
[0106] Based on the ranking, a set of proxy nodes is selected from all nodes. This set of proxy nodes typically includes the higher-ranked nodes, as they have a greater chance of becoming witness nodes. These proxy nodes will be responsible for verifying and confirming transactions, and further participate in the consensus process.
[0107] 3) Proxy nodes vote and rank each other (S103):
[0108] The selected proxy nodes vote among themselves, expressing their support or trust in other nodes. These votes are collected and tallied, and each node ultimately receives a certain number of votes. Simultaneously, each node's reputation score is also included in the calculation.
[0109] 4) Select witness node (S104):
[0110] Based on the voting results and the nodes' reputation scores, the top 21 nodes from the proxy nodes are selected to form the witness node set. These witness nodes are responsible for generating new blocks and maintaining the security of the blockchain. The remaining nodes form the standby witness node set, which can replace the current witness nodes when needed.
[0111] 5) Supervision and dynamic transformation (S105):
[0112] Witness nodes are responsible for overseeing and verifying transactions, then packaging and producing blocks. A reputation mechanism is employed in this process, meaning that a node's reputation plays a crucial role in the consensus process. If a witness node performs poorly, its reputation value decreases, and a node from the standby witness node set has the opportunity to take its place. This dynamic transition improves the system's stability and security.
[0113] 6) Consensus algorithm ends (S106):
[0114] Once the witness nodes have completed the process of packaging and producing blocks, the consensus algorithm enters the next round. This process will continue continuously to ensure the continuous growth and operation of the blockchain.
[0115] The DPOS consensus algorithm method provided by this invention, based on reputation value and strong blind signature algorithm, achieves an efficient and secure blockchain consensus process through node sorting, proxy node selection, dynamic transformation of witness nodes, and the application of reputation mechanism. It ensures that nodes in the blockchain network participate in consensus according to certain rules, providing a decentralized blockchain maintenance method.
[0116] In step one of the embodiments of the present invention, if a node is entering the system for the first time, it is sorted according to the time of admission to the system; otherwise, it is sorted according to the size of its historical reputation value.
[0117] In step three of the embodiments of the present invention, the proxy nodes vote with each other, such as... Figure 2 As shown, the main process is as follows:
[0118] The equation for the strong blind signature algorithm used is: s =mk+rx, Table 1 shows some of the symbols used and their meanings.
[0119] (1) System initialization.
[0120] To mitigate the centralization risks associated with administrator roles in the entire electronic voting model, smart contracts are used instead. During system initialization, specific details regarding the electronic voting process, including registration and voting start and end times, are set and published on the blockchain network. All nodes participating in the election can share this information.
[0121] (2) Identity Registration
[0122] The registration phase primarily involves voters sending their public and private keys, generated using the Elgamal signature algorithm, to the registration smart contract for registration. The smart contract then verifies the authenticity and legality of the information submitted by the nodes. Once verified, the node's information is added to the list of legitimate nodes and stored in the smart contract. The identity registration process is as follows:
[0123] The voting node first initiates a registration request to the registration smart contract, and at the same time generates a random number z∈Z. p Used as the private key and calculated y = g z `mod p` is used as the public key. After completing the calculation, the node simultaneously sends its public and private keys to the registered smart contract.
[0124] After registering the smart contract application, the application, public and private keys, and information will be verified. Once the information is approved, an ID unrelated to identity information will be returned as an identity identifier to prevent identity leakage. Finally, the relevant information about the vote will be sent to the node, and the ID will be sent to the vote counting contract for subsequent recording and tracking of the vote.
[0125] (3) Voting stage
[0126] This stage involves encrypting the ballot using an Elgamal-based blind signature algorithm, thereby protecting the privacy of both the voting nodes and the recipients. For simplicity, we use V to represent the voting nodes and S to represent the receiving nodes. V obtains voting instructions and other information from the administrator, generating the original ballot, denoted as m. The specific process for encrypting the ballot using the blind signature algorithm is as follows:
[0127] Step 1: V generates random numbers k∈Z p-1 And calculate r = g k modp, then send r to S.
[0128] Step 2: S generates random numbers α and β, and simultaneously blinds the message m to obtain m′. The calculation process is as follows: m′=α -1 g -β r 1-α mmod(p-1), then send m′ to V.
[0129] Step 3: V calculates s = xm′ + krmod(p-1), signs (m′,(r,s)) with its own private key, and then sends it to S.
[0130] Step 4: V calculates the hash digest of the initial message m, denoted as hash(m), and encrypts it using S's public key. Finally, the signed (m′,(r,s)) and hash(m) are recorded as votes on the blockchain, and the votes are also sent to S.
[0131] Step 5: Calculate r′ = r β mod(p-1), s′=r′r -1 smod(p-1) obtains the signature (m,(r′,s′)). S decrypts the signature using its private key to obtain hash(m). Due to the nature of hash functions, the content of the original message m is unknown, which means that S received the vote but does not know who voted for it, thus ensuring privacy.
[0132] (4) Voting stage
[0133] Once the designated voting period has elapsed, the vote-counting nodes stop accepting node registration applications and distributing ballots. At this point, the vote-counting smart contract begins counting votes, comparing each ballot with the registered node ID. Nodes that do not match or have not received a ballot are considered to have abstained. Finally, the node's vote count is summed with its reputation score, and the average is calculated. The 21 nodes with the highest average scores become delegated nodes to participate in the subsequent consensus process.
[0134] The reputation mechanism proposed in step five of this embodiment of the invention is as follows:
[0135] At the end of each consensus cycle of the algorithm, the reputation value of a node dynamically changes based on the transaction behavior of the previous cycle. A node's reputation value increases when it is more active or honestly participates in consensus activities. If a node's activity is passive or it engages in malicious behavior that disrupts the consensus process, its reputation value decreases after a cycle ends. If the reputation value falls below a certain threshold, a node state transition occurs. Therefore, a reasonable incentive mechanism can be designed to dynamically adjust the reputation value, thereby constraining node behavior and maintaining the system's consensus process. The reputation algorithm is shown in the table below:
[0136] To constrain node behavior, a reputation value calculation formula is proposed based on historical reputation values. We divide the node's reputation value into three parts, as shown in formula (3):
[0137] T(u)=TH(u)+μTB t (u)+σTE t (u) (3)
[0138] Where T(u) is the total reputation value of node u in the current period, TB t (u) represents the behavioral evaluation value of node u within the current period t. The number of positive and malicious behaviors of a node affects the increase or decrease of its reputation value. TE t (u) represents the satisfaction rating of node u by other nodes in the current period. μ and σ are adjustment factors.
[0139] To make the assessment of node reputation values more comprehensive and reliable, historical reputation values of nodes are introduced, drawing on past transaction information to better evaluate subsequent node behavior.
[0140]
[0141] in, It is an influencing factor of historical reputation score. This is an adjustment parameter, where 'l' represents the cycle number. According to the function's characteristics, as 'l' increases, the value of the influence factor also increases. This indicates that historical reputation values from closer cycles better reflect the influence of a node's subsequent reputation value. Therefore, a node's recent performance will greatly affect its subsequent activities. If a node has consistently exhibited mostly positive behavior recently, its overall historical reputation value will be high, positively impacting the calculation of subsequent node reputation values. Conversely, if a node's historical behavior is predominantly malicious, it will hinder the growth of its subsequent reputation value.
[0142] Different reward and punishment mechanisms are set up for node behavior. Positive behavior is rewarded. For malicious behavior, different penalties are imposed for different types of malicious acts, thus providing a comprehensive evaluation of node behavior. The formula for calculating a node's behavior reputation score is as follows:
[0143]
[0144] The calculation of node behavior mainly consists of the following three parts: the time it takes for the node to complete its vote, the calculation of the reputation value for node u's positive behavior, and the calculation of the reputation value for its malicious behavior. 投票 For the voting process, we set a voting time T. 投票 If the time it takes for a node to complete voting is less than T 投票Just This proportion is supplemented by the reputation value of node u from the previous cycle; conversely, if voting is not completed within the specified time, the reputation value for this part is 0. η u Let δ be the number of positive actions performed by node u, and λ be the adjustment factor. The more times a node performs positive actions, the higher its reputation value. A higher level of positive behavior also positively impacts a node's evaluation, specifically through adjustment using the factor λ. If a node has consistently performed positive actions in recent cycles, λ can be appropriately increased; conversely, if a node exhibited malicious behavior in the previous cycle, λ will be decreased accordingly. It's important to note that if a node exhibits malicious behavior in the current cycle, its reputation value for that cycle will be reset to zero. The final part calculates the reputation value corresponding to malicious behavior. Here, δ is the reputation adjustment factor for malicious behavior, and R... b This represents the number of times node u performs malicious actions. Each different malicious action corresponds to a different penalty factor, allowing for better management of node malicious behavior rather than a one-size-fits-all approach. For example, if a node exhibits the following malicious behaviors: malicious nodes colluding to launch attacks, maliciously delaying message propagation, tampering with messages and then propagating them, etc., δ can be set to 0.5, 0.6, and 0.7. This necessitates tiered penalties for each different malicious action by the node.
[0145]
[0146] The reputation score for node satisfaction is calculated as shown in the formula: the satisfaction calculation incorporates the EigenTrust reputation evaluation model. Here, sat(u,i) represents the number of times node u is satisfied with node i in historical transactions, and unsat(u,i) represents the number of times node u is dissatisfied with node i in historical transactions. EigenTrust... total This represents the total number of ratings received by node u. Generally speaking, the higher the number of satisfaction ratings a node receives, the more trustworthy it is among many nodes, and its reputation score will also be higher.
[0147] like Figure 3 As shown, the DPOS consensus algorithm system based on reputation value and strong blind signature algorithm provided in this embodiment of the invention includes:
[0148] The node sorting module is used to determine whether a node is entering the system for the first time, and then sort it.
[0149] The proxy node selection module is used to select a set of proxy nodes based on sorting.
[0150] The proxy node voting module is used for proxy nodes to vote for each other. Finally, the number of votes received by each node is counted, summed with the reputation value, averaged, and then the nodes are sorted.
[0151] The witness node selection module is used to select the top 21 nodes to become the witness node set, and the remaining nodes become the backup witness node set.
[0152] The monitoring module is used to monitor the block production process of witness nodes and dynamically switch between them and the backup witness node set using the proposed reputation mechanism.
[0153] The node block production module is used by witness nodes to package blocks and produce blocks.
[0154] Example 1
[0155] The technical solution of the present invention includes:
[0156] Step 1: Determine if a node is entering the system for the first time, and then sort it.
[0157] Step 2: Select the set of proxy nodes according to the sorting.
[0158] Step 3: The proxy nodes vote for each other, and finally the number of votes received by each node is counted, summed with the reputation value, averaged, and then the nodes are sorted.
[0159] Step 4: Select the top 21 nodes to form the witness node set, and the remaining nodes to form the backup witness node set;
[0160] Step 5: Monitor the block production process of the witness nodes and dynamically switch between them and the backup witness node set using the proposed reputation mechanism;
[0161] Step Six: Witness nodes package blocks, produce blocks, and the consensus algorithm ends.
[0162] Example 2
[0163] To address the issue that leaked identities of voting nodes can lead to bribery by malicious nodes, which could then collude with other nodes to launch attacks and disrupt the subsequent consensus process, an electronic voting model is introduced, in which a blind signature algorithm is applied to prevent the leakage of voting node identity information and improve system security. Figure 2 This is the electronic voting process.
[0164] Table 1. Symbols and their meanings
[0165]
[0166] The DPOS consensus algorithm method based on reputation value and strong blind signature algorithm provided in the application embodiment of the present invention is applied to a computer device, the computer device including a memory and a processor, the memory storing a computer program, and when the computer program is executed by the processor, the processor performs the steps of the DPOS consensus algorithm method based on reputation value and strong blind signature algorithm.
[0167] The DPOS consensus algorithm method based on reputation value and strong blind signature algorithm provided in the application embodiment of the present invention is applied to an information data processing terminal, which is used to implement the DPOS consensus algorithm system based on reputation value and strong blind signature algorithm.
[0168] The DPOS consensus algorithm method based on reputation value and strong blind signature algorithm provided in the application embodiments of the present invention is applied to an electronic voting scheme. The electronic voting scheme executes the steps of the DPOS consensus algorithm method based on reputation value and strong blind signature algorithm.
[0169] It should be noted that embodiments of the present invention can be implemented using hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented using hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or using software executed by various types of processors, or using a combination of the above-described hardware circuitry and software, such as firmware.
[0170] To verify the effectiveness of this solution, a simulation experiment was conducted, which simulated 100 blockchain nodes.
[0171] 1. Node Activity Comparison Experiment
[0172] Node activity refers to the degree to which nodes actively participate in voting. In the original consensus algorithm, nodes with higher weights have a greater probability of being selected as witness nodes, which leads to power being concentrated in the hands of a few nodes and exacerbates centralization. Therefore, a reputation mechanism and a reward / penalty mechanism are proposed to improve node voting enthusiasm. To verify the effectiveness of the proposed reputation and reward mechanisms, 100 nodes were simulated for 10 rounds of consensus, with all nodes starting from the same condition. The experimental results are as follows...Figure 4 As shown
[0173] As the number of consensus attempts increases, the active node ratio in the original DPOS consensus algorithm is between 50% and 60%, while in the improved DPOS consensus algorithm it is between 70% and 80%. This is because with the introduction of a reputation mechanism and reward / penalty mechanism, nodes receive corresponding rewards after actively voting. Furthermore, the addition of a reputation threshold prevents nodes from accumulating excessively high reputation values, which could exacerbate centralization. Once the threshold is reached, the reputation value decreases, causing the node to be downgraded. This significantly increases node participation in voting, resulting in a higher willingness to vote compared to the original algorithm. Experimental data demonstrates the effectiveness of the reputation and reward mechanisms in this scheme.
[0174] 2. Malicious Node Percentage Experiment
[0175] In the original algorithm, the number of malicious nodes cannot exceed one-third of the total number of nodes in the system. When a malicious node appears during each consensus process, the system merely marks it as malicious; it does not immediately remove the malicious node from the system. Therefore, this scheme introduces a mechanism to punish malicious nodes. Experimental results are as follows... Figure 5 As shown in the figure.
[0176] As the number of consensus attempts increased, the number of malicious nodes in the original algorithm fluctuated around 30%. However, in the improved consensus algorithm introduced in this paper with a penalty mechanism, the number of malicious nodes continuously decreased, eventually approaching zero. This is because when a node engages in malicious behavior, the system deducts a reputation value from the node according to the penalty mechanism; if the reputation value falls below a certain threshold, the node is removed from the system. After being penalized multiple times, the high cost of the penalty reduces the frequency of malicious behavior. Experiments demonstrate that the penalty mechanism in this scheme is effective.
[0177] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A DPOS consensus algorithm method based on reputation value and strong blind signature algorithm, characterized in that, include: Step 1: Determine if a node is entering the system for the first time. If a node is entering the system for the first time, sort it according to the time it was admitted to the system. Otherwise, sort them according to their historical reputation score; Step 2: Select the set of proxy nodes according to the sorting. Step 3: The proxy nodes vote for each other, and finally the number of votes received by each node is counted, summed with the reputation value, averaged, and then the nodes are sorted. Step 4: Select the top 21 nodes to form the witness node set, and the remaining nodes to form the backup witness node set. Step 5: Monitor the block production process of the witness nodes and dynamically switch between them using a reputation mechanism and the backup witness node set; Step six: Witness nodes package blocks, produce blocks, and the consensus algorithm ends; The reputation mechanism proposed in step five is shown in formula (3): T(u)=TH(u)+μTBt(u)+σTEt(u) (3) Where T(u) is the total reputation value of node u in the current period, TBt(u) is the behavior evaluation value of node u in the current period t, TEt(u) is the satisfaction evaluation value of other nodes for node u in the current period, TH(u) is the historical reputation value of the node, and μ and σ are adjustment factors. in, It is an influencing factor of historical reputation score. It is an adjustment parameter, where l represents the cycle number; The formula for calculating the reputation value of node behavior is as follows: The calculation of a node's behavioral reputation value consists of the following three parts: calculating the time t it takes for the node to complete voting. 投票 The calculation of reputation values for node u's positive and negative behaviors involves setting a voting time T for the voting process. 投票 If the time t when the node completes voting 投票 Less than T 投票 Just This ratio is supplemented by the reputation value of node u from the previous cycle; conversely, if voting is not completed within the specified time, the reputation value for that part is 0. u Let λ be the number of positive behaviors of node u, and let λ be the adjustment factor. If the node has been performing positive behaviors in recent cycles, then λ can be increased. Conversely, if the node has performed malicious behaviors in the previous cycle, then the value of λ will be decreased accordingly. If the node has performed malicious behaviors in the current cycle, the node's reputation value for the current cycle will be reset to zero. The final part calculates the reputation value corresponding to malicious behavior of a node, where δ is the reputation adjustment factor for malicious behavior of a node, and R... b The number of times node u performs malicious behavior, with each different malicious behavior corresponding to a different penalty factor; The reputation value for node satisfaction is calculated as shown in formula (6). The satisfaction calculation introduces the EigenTrust reputation evaluation model, where sat(u,i) represents the number of times node u is satisfied with node i in historical transactions, and unsat(u,i) represents the number of times node u is dissatisfied with node i in historical transactions. total This represents the total number of evaluations received by node u.
2. The DPOS consensus algorithm method based on reputation value and strong blind signature algorithm according to claim 1, characterized in that, The process of mutual voting among the proxy nodes in step three is as follows: (1) System initialization During system initialization, some precautions for the electronic voting process are set, including the start and end times of registration and voting, and published on the blockchain network so that all nodes participating in the election can share this information. (2) Identity Registration The registration phase involves voters sending their public and private keys, generated using the Elgamal signature algorithm, to the registration smart contract for registration. The smart contract verifies the authenticity and legality of the information submitted by the node. Once verified, the node's information is written into the list of legitimate nodes and stored in the smart contract. The identity registration process is as follows: The voting node first initiates a registration request to the registration smart contract, and at the same time generates a random number z∈Z. p Used as the private key and calculated y = g z Using modp as the public key, after completing the calculation, the node simultaneously sends its public and private keys to the registration smart contract. After the registration smart contract applies, it will verify the node's application, public and private keys, and information. Once the information is approved, it will return an ID unrelated to identity information as an identity identifier to prevent identity leakage. Finally, it will send the relevant information about the vote to the node and send the ID to the vote counting smart contract for subsequent recording and tracking of the vote. (3) Voting stage This stage involves encrypting the ballots using a blind signature algorithm based on Elgamal; (4) Voting stage Once the designated voting period has elapsed, the counting nodes stop receiving node registration applications and issuing ballots. At this point, the counting smart contract begins counting the votes, comparing each ballot with the registered node ID. Nodes that do not match or have not received a ballot are considered to have abstained. Finally, the node's vote count is added to its reputation value, and the average is calculated. The 21 nodes with the highest average values become delegated nodes to participate in the subsequent consensus process.
3. The DPOS consensus algorithm method based on reputation value and strong blind signature algorithm according to claim 1, characterized in that, In the voting stage of step two, for simplicity, we use V to represent the voting node and S to represent the receiving node. V obtains voting instructions from the administrator, generates the original ballot, denoted as m, and simultaneously encrypts the ballot using a blind signature algorithm. The specific process is as follows: Step 1: V generates random numbers k∈Z p-1 And calculate r = g k modp, then send r to S; Step 2: S generates random numbers α and β, and simultaneously blinds the message m to obtain m′. The calculation process is m′=α -1 g -β r 1-α mmod(p-1), then send m′ to V; Step 3: V calculates s = xm′ + krmod(p-1), signs (m′,(r,s)) with its private key, and then sends it to S; Step 4: V calculates the hash digest of the initial message m, denoted as hash(m), and encrypts it using S's public key. Finally, the signed (m′,(r,s)) and hash(m) are recorded as votes on the blockchain, and the votes are also sent to S. Step 5: Calculate r′ = r β mod(p-1), s′=r′r -1 s mod(p-1) to obtain the signature (m,(r′,s′)), and S decrypts it with its own private key to obtain hash(m).
4. A DPOS consensus algorithm system implementing the DPOS consensus algorithm method based on reputation value and strong blind signature algorithm as described in any one of claims 1-3, characterized in that, The DPOS consensus algorithm system based on reputation value and strong blind signature algorithm includes: The node sorting module is used to determine whether a node is entering the system for the first time, and then sort it. The proxy node selection module is used to select a set of proxy nodes based on sorting. The proxy node voting module is used for proxy nodes to vote for each other. Finally, the number of votes received by each node is counted, summed with the reputation value, averaged, and then the nodes are sorted. The witness node selection module is used to select the top 21 nodes to become the witness node set, and the remaining nodes become the backup witness node set. The monitoring module is used to monitor the block production process of witness nodes and dynamically switch between them and the backup witness node set using the proposed reputation mechanism. The node block production module is used by witness nodes to package blocks and produce blocks.
5. A computer device, characterized in that, The computer device includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the DPOS consensus algorithm method based on reputation value and strong blind signature algorithm as described in any one of claims 1 to 3.
6. A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the DPOS consensus algorithm method based on reputation value and strong blind signature algorithm as described in any one of claims 1 to 3.
7. An information data processing terminal, characterized in that, The information data processing terminal is used to implement the DPOS consensus algorithm system as described in claim 4, which is based on reputation value and strong blind signature algorithm.
Citation Information
Patent Citations
PeerTrust-based consensus node evaluation method for DPos
CN112532587A
Anonymous and anti-stress electronic voting system based on partial blind signature and block chain
CN114333137A