WO2019137282A1 - Block chain delegation consensus method - Google Patents

Block chain delegation consensus method Download PDF

Info

Publication number
WO2019137282A1
WO2019137282A1 PCT/CN2019/070170 CN2019070170W WO2019137282A1 WO 2019137282 A1 WO2019137282 A1 WO 2019137282A1 CN 2019070170 W CN2019070170 W CN 2019070170W WO 2019137282 A1 WO2019137282 A1 WO 2019137282A1
Authority
WO
WIPO (PCT)
Prior art keywords
validator
block
official
voting
consensus
Prior art date
Application number
PCT/CN2019/070170
Other languages
French (fr)
Chinese (zh)
Inventor
吴思进
王志文
Original Assignee
杭州复杂美科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州复杂美科技有限公司 filed Critical 杭州复杂美科技有限公司
Publication of WO2019137282A1 publication Critical patent/WO2019137282A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • the invention relates to the technical field of blockchain, and relates to a method for entrusting consensus of a blockchain.
  • the existing blockchain consensus methods mainly include POW consensus method, POS consensus method, PBFT consensus method and DPOS consensus method.
  • the POW consensus method is less efficient, consumes a lot of power and computing power, but has the highest credibility, and the nodes are not easy to do evil; the POS consensus method does not consume a lot of power and computing power, but because of profit, the nodes are easy to do evil; PBFT
  • the consensus method is a consensus method with strong consistency, but requires that more than 50% of the nodes in all nodes be voted. If the number of votes is not collected enough, the blockchain system will not continue to operate; the DPOS consensus method has 101 Consensus nodes participate in voting, and the consensus efficiency is high. If there is a consensus node failure, the blockchain system needs to re-elect new consensus nodes until 101 consensus nodes are met. The blockchain system cannot continue to work until 101 consensus nodes are reached.
  • each consensus method has its advantages and disadvantages. If it can provide a technical solution, it can have higher consensus efficiency and ensure that the blockchain system cannot continue without guaranteeing the power calculation. The probability of work.
  • the present invention provides a trusted consensus method for a blockchain that solves or partially solves the above problems.
  • the technical solution of the present invention is: a method for entrusting consensus of a blockchain, which includes the following contents:
  • the roles of the delegate consensus method include: Validator, Validator Set, Vg, fund account, and mortgage account;
  • the Validator is the node that participates in the voting.
  • the Validator includes the official Validator and the candidate Validator.
  • the vote of the candidate Validator is only used to determine the correctness of the candidate Validator vote. It cannot be used for the consensus of the block, nor can it be used for the benefit.
  • the official Validator vote is used for the zone.
  • the consensus of the block; the Validator Set is the set of formal Validator of all the participating blocks. Before each round of consensus, all the official Validators in the Validator Set need to be determined; for each round of consensus, a formal Validator generated block is randomly selected from the Validator Set.
  • the official Validator selected is Vg, which is also used to package transactions, generate Merkle trees, broadcast block headers, and transaction hashes.
  • the fund account is used to store the validated margin of the Validator and the partial gains from the successfully generated block.
  • the mortgage account is used to freeze the deposit paid by the Validator, and the Validator needs to pay a deposit to participate in the voting;
  • the user delegates his own equity Stake to the official Validator in the Validator Set; the user can also become a candidate Validator after paying the deposit on the blockchain system; the candidate Validator becomes the official Validator after successively voting on the N blocks; After the official Validator continuously voted incorrectly on N blocks, it becomes a candidate Validator; after the Validator is converted from the official Validator to the candidate Validator, it needs to vote correctly on the M blocks before it can become the official Validator, M and N is a positive integer, the value is determined by the staff, and M> N; if the candidate Validator, after successively voting on X blocks has not become the official Validator, the blockchain system will confiscate part of the margin of the candidate Validator.
  • X is a positive integer and the value is determined by the staff;
  • the steps to generate a block by the consensus method include:
  • Step S1 determining all formal Validators in the Validator Set; the user delegates his own equity Stake to the official Validator in the Validator Set;
  • Step S2 randomly select a formal Validator as a Vg from the Validator Set, Vg packages the collected transaction, generates a Merkle tree by the transaction list, and then broadcasts the list of the block header and the transaction hash to the Validators Set;
  • Step S3 After the official Validator receives the block header and the transaction hash list of the Vg broadcast, if the official Validator transaction candidate set and the Vg transaction candidate set are identical, the official Validator calculates the block header and broadcasts to other official members in the Validators Set. Validator;
  • Step S4 If the hash value of the block header of the official Validator broadcast is equal to the hash value of the block header of the Vg broadcast, and the equity Stake held by the official Validator exceeds 50% of the total equity Stake, the block generated by the Vg is correct. , the block generated by Vg is written into the blockchain; if the shareholding Stake held by the official Validator does not exceed 50% of the total equity Stake, Vg continues to generate the block, and the accumulated weight of the equity Stake generated by the Vg block If 50% of the average equity Stake of the online Validators Set is over a certain period of time, the block generated by Vg is also written into the blockchain;
  • Block_Time After the block generated by Vg is written into the blockchain, Block_Time needs to pass through, and the blockchain system will release the requirement to generate the next block. If the requirement of generating the next block is released too early, the official Validator will not process it. Generate the requirements of the next block; Block_Time is the shortest time to publish the created block, Block_Time is a positive real number, the value is determined by the staff;
  • Vgs in the blockchain there are multiple Vgs in the blockchain to generate bifurcation, including the following cases: 1) If the original Vg fails to generate a block within the specified time, the candidate Vg needs to be selected, and the candidate Vg generates the block. The original Vg then generates a block; 2) after the candidate Vg receives the list of the original Vg broadcast block header and transaction hash, it is considered incorrect, and the alternative Vg generates the block itself;
  • the Validator Before the new round of consensus, the Validator needs to pay a certain amount of margin, the deposit paid by the Validator is frozen in the mortgage account; the margin is minimal, and when the Validator's margin is below the minimum, the blockchain system will cancel the Validator vote. When the Validator does not want to continue to participate in the voting, you can apply for a refund of the deposit. After the blockchain system returns the frozen deposit in the mortgage account to the Validator, the Validator will be disqualified;
  • the method of freezing voting rights is: after the Validator pays the deposit, the blockchain system agrees on the block height range of the Validator's voting. If the Validator has multiple consecutive blocks that are not voting within the voting block height interval, then the freezing is frozen. Validator's voting rights; if the Validator's voting rights are frozen within the voting block height interval, and the Validator pays the fee again, the Validator's voting rights are restored;
  • the blockchain system When the Validator has a vote that does not meet the rules, the blockchain system will confiscate part of the deposit and even cancel its voting qualification. The Validator's forfeited margin will enter the fund account from the mortgage account; if the Validator believes that the other Validator has a non-compliant vote , you can add a new transaction and broadcast, the transaction will be consensus in the next block, if the consensus is successful, the margin of the Validator with non-conforming votes will be forfeited; the vote that does not meet the rules includes: Validator for the same area The block makes multiple votes, the Validator does not vote on the block, the Validator casts the wrong ticket to the block, and the Validator votes for the block on each forked chain when the blockchain branches.
  • the blockchain system works fine only when a formal Validator is running normally
  • the user can immediately take the equity Stake out of the official Validator, but when the equity Stake is delegated to the official Validator, it will take a certain amount of time to take effect.
  • the beneficial result of the present invention is that the present invention provides a method for delegating consensus of a blockchain, the roles including Validator, Validator Set, Vg, fund account and mortgage account. Using this consensus method, not only can it have higher consensus efficiency on the basis of ensuring no power calculation, but also reduce the probability that the blockchain system can not continue to work.
  • FIG. 1 is a schematic diagram of a consensus process of a method for entrusting consensus of a blockchain according to the present invention
  • FIG. 2 is a schematic diagram of a Validator voting rule of a method for delegating consensus of a blockchain according to the present invention.
  • Embodiment 1 This embodiment specifically describes the steps of the trust consensus method of the blockchain, as follows:
  • the roles of the delegate consensus method include: Validator, Validator Set, Vg, fund account, and mortgage account;
  • the Validator is the node that participates in the voting.
  • the Validator includes the official Validator and the candidate Validator.
  • the vote of the candidate Validator is only used to determine the correctness of the candidate Validator vote. It cannot be used for the consensus of the block, nor can it be used for the benefit.
  • the official Validator vote is used for the zone.
  • the consensus of the block; the Validator Set is the set of formal Validator of all the participating blocks. Before each round of consensus, all the official Validators in the Validator Set need to be determined; for each round of consensus, a formal Validator generated block is randomly selected from the Validator Set.
  • the official Validator selected is Vg, which is also used to package transactions, generate Merkle trees, broadcast block headers, and transaction hashes.
  • the fund account is used to store the validated margin of the Validator and the partial gains from the successfully generated block.
  • the mortgage account is used to freeze the deposit paid by the Validator, and the Validator needs to pay a deposit to participate in the voting;
  • the user delegates his own equity Stake to the official Validator in the Validator Set; the user can also become a candidate Validator after paying the deposit on the blockchain system; the candidate Validator becomes the official Validator after successively voting on the N blocks; After the official Validator continuously voted incorrectly on N blocks, it becomes a candidate Validator; after the Validator is converted from the official Validator to the candidate Validator, it needs to vote correctly on the M blocks before it can become the official Validator, M and N is a positive integer, the value is determined by the staff, and M> N; if the candidate Validator, after successively voting on X blocks has not become the official Validator, the blockchain system will confiscate part of the margin of the candidate Validator.
  • X is a positive integer and the value is determined by the staff;
  • the steps to generate a block by the consensus method include:
  • Step S1 determining all formal Validators in the Validator Set; the user delegates his own equity Stake to the official Validator in the Validator Set;
  • Step S2 randomly select a formal Validator as a Vg from the Validator Set, Vg packages the collected transaction, generates a Merkle tree by the transaction list, and then broadcasts the list of the block header and the transaction hash to the Validators Set;
  • Step S3 After the official Validator receives the block header and the transaction hash list of the Vg broadcast, if the official Validator transaction candidate set and the Vg transaction candidate set are identical, the official Validator calculates the block header and broadcasts to other official members in the Validators Set. Validator;
  • Step S4 If the hash value of the block header of the official Validator broadcast is equal to the hash value of the block header of the Vg broadcast, and the equity Stake held by the official Validator exceeds 50% of the total equity Stake, the block generated by the Vg is correct. , the block generated by Vg is written into the blockchain; if the equity Stake held by the official Validator does not exceed 50% of the total equity Stake, Vg continues to generate the block, and the cumulative weight of the equity Stake generated by the Vg block If 50% of the average equity Stake of the online Validators Set is over a certain period of time, the block generated by Vg is also written into the blockchain;
  • Block_Time After the block generated by Vg is written into the blockchain, Block_Time needs to pass through, and the blockchain system will release the requirement to generate the next block. If the requirement of generating the next block is released too early, the official Validator will not process it. Generate the requirements of the next block; Block_Time is the shortest time to publish the created block, Block_Time is a positive real number, the value is determined by the staff;
  • Vgs in the blockchain there are multiple Vgs in the blockchain to generate bifurcation, including the following cases: 1) If the original Vg fails to generate a block within the specified time, the candidate Vg needs to be selected, and the candidate Vg generates the block. The original Vg then generates a block; 2) after the candidate Vg receives the list of the original Vg broadcast block header and transaction hash, it is considered incorrect, and the alternative Vg generates the block itself;
  • the Validator In order to increase the cost of the Validator, before the new round of consensus, the Validator needs to pay a certain amount of margin, the deposit paid by the Validator is frozen in the mortgage account; the margin is minimal, when the Validator's margin is below the minimum, the blockchain The system will cancel the Validator's voting qualification; when the Validator does not want to continue to participate in the voting, it can apply for a refund of the deposit. After the blockchain system returns the frozen deposit in the mortgage account to the Validator, the Validator will be disqualified;
  • the method of freezing voting rights is: after the Validator pays the deposit, the blockchain system agrees on the block height range of the Validator's voting. If the Validator has multiple consecutive blocks that are not voting within the voting block height interval, then the freezing is frozen. Validator's voting rights; if the Validator's voting rights are frozen within the voting block height interval, and the Validator pays the fee again, the Validator's voting rights are restored;
  • the blockchain system When the Validator has a vote that does not meet the rules, the blockchain system will confiscate part of the deposit and even cancel its voting qualification. The Validator's forfeited margin will enter the fund account from the mortgage account; if the Validator believes that the other Validator has a non-compliant vote , you can add a new transaction and broadcast, the transaction will be consensus in the next block, if the consensus is successful, the margin of the Validator with non-conforming votes will be forfeited; the vote that does not meet the rules includes: Validator for the same area The block makes multiple votes, the Validator does not vote on the block, the Validator casts the wrong ticket to the block, and the Validator votes for the block on each forked chain when the blockchain branches.
  • the blockchain system works fine only when a formal Validator is running normally
  • the user can immediately take the equity Stake out of the official Validator, but when the equity Stake is delegated to the official Validator, it will take a certain amount of time to take effect.
  • Embodiment 2 This embodiment illustrates the consensus process of the blockchain trust consensus method, as shown in Figure 1 and Figure 2:
  • Step S1 The blockchain system has five Validators, the user entrusts the equity Stake to the five Validators, the Validator A has the X-share staked Stake, the Validator B has the Y-share stake Stake, and the Validator C has the Z-share stake Stake.
  • Validator D has a stake of Million Stake
  • the Validator Set includes 5 Validators;
  • Step S2 randomly selecting a Validator as a Vg from the Validator Set, Vg packages the collected transaction, generates a Merkle tree by the transaction list, and then broadcasts the list of the block header and the transaction hash to the Validators Set;
  • Step S3 After the Validator receives the block header and the transaction hash list of the Vg broadcast, if the Validator transaction candidate set and the Vg transaction candidate set are consistent, the Validator calculates the block header and broadcasts to other Validator in the Validators Set;
  • Step S4 If the hash value of the block header of the Validator broadcast is equal to the hash value of the block header of the Vg broadcast, and the equity Stake held by the Validator exceeds 50% of the total equity Stake, then the block generated by the Vg is correct, then The block generated by Vg is written into the blockchain; if the equity Stake held by Validator does not exceed 50% of the total equity Stake, Vg continues to generate the block, and when the cumulative weight of the equity of the block generated by Vg exceeds a certain time 50% of the average equity Stake of the online Validators Set, then the block generated by Vg is also written into the blockchain;
  • Block(H) when the block height is H, after Vg generates the block Block(H), Validator C, Validator D, and Validator E do not vote for the block for some reason. Only Validator A and Validator B are the area. The block is voted, and the weight of Block(H) is (2+2.5)/(2+2.5+2+0.5+3) ⁇ 50%, Block(H) is not determined;
  • Block(H+1) When the block height is (H+1), after Vg generates block Block(H+1), Validator B, Validator D and Validator E do not vote for the block for some reason, only Validator A and Validator C pairs.
  • the block is voted, and the cumulative weight of Block(H) is (2+2.5+2)/(2+2.5+2+0.5+3)>50%, Block(H) determines, Block(H+1) The weight is (2+2)/(2+2.5+2+0.5+3) ⁇ 50%, and Block(H+1) is not determined;
  • Block(H+2) When the block height is (H+2), after Vg generates the block Block (H+2), Validator A, Validator B, and Validator E do not vote for the block for some reason, only the Validator C and Validator D pairs. The block is voted.
  • the cumulative weight of Block(H+1) is (2+2+0.5)/(2+2.5+2+0.5+3) ⁇ 50%, Block(H+1) is not determined, Block The weight of (H+2) is (2+0.5)/(2+2.5+2+0.5+3) ⁇ 50%, and Block(H+2) is not determined;
  • Block height is (H+3)
  • Vg generates the block Block (H+3)
  • Validator A, Validator B, Validator C, and Validator D do not vote for the block for some reason, only the Validator E pair
  • Block(H+1) is determined
  • Block The cumulative weight of (H+2) is (2+0.5+3)/(2+2.5+2+0.5+3)>50%
  • Block(H+2) determines that the weight of Block(H+3) is ( 3) / (2+2.5 + 2+0.5 + 3) ⁇ 66.7%, not determined.
  • Validator A gets 2 votes in total.
  • Validator B received a total of 1 vote
  • Validator C received 2 votes
  • Validator D received 1 vote
  • Validator E received 1 return.
  • the blockchain system agrees on the block height range of the Validator voting and the rule of freezing the Validator's voting rights: assuming that the Validator pays the deposit, the voting block height interval is 100,000 blocks. And if there are 1000 blocks that have not voted continuously, the voting rights of the Validator are frozen; in the 100,000 blocks, if the Validator is frozen and then pays a certain fee, the Validator is restored. Voting rights in 10,000 blocks.
  • the beneficial result of the present invention is that the present invention provides a method for delegating consensus of a blockchain, the roles including Validator, Validator Set, Vg, fund account and mortgage account. Using this consensus method, not only can it have higher consensus efficiency on the basis of ensuring no power calculation, but also reduce the probability that the blockchain system can not continue to work.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The present invention relates to a block chain delegation consensus method, comprising roles of a Validator, a Validator Set, a Vg, a fund account and a collateral account. By using the consensus method, relatively high consensus efficiency can be achieved on the basis that electric power and computing power are not consumed; and the probability that a block chain system cannot continue to work is reduced.

Description

一种区块链的委托共识方法A Trusted Consensus Method for Blockchain 技术领域Technical field
本发明涉及区块链技术领域,涉及一种区块链的委托共识方法。The invention relates to the technical field of blockchain, and relates to a method for entrusting consensus of a blockchain.
背景技术Background technique
现有的区块链共识方法主要有POW共识方法、POS共识方法、PBFT共识方法及DPOS共识方法。POW共识方法共识效率较低,耗费大量电力及算力,但拥有最高的公信力,且节点不容易作恶;POS共识方法不会耗费大量电力及算力,但由于逐利性,节点容易作恶;PBFT共识方法是强一致性的共识方法,但要求可以收到所有节点中50%以上节点的投票,若一直收集不到足够的票数,区块链系统会无法继续运作;DPOS共识方法约定有101个共识节点参与投票,共识效率高,如果其中有共识节点失效,区块链系统需重新选举新的共识节点直至满足101个共识节点,在达到101个共识节点前,区块链系统无法继续工作。The existing blockchain consensus methods mainly include POW consensus method, POS consensus method, PBFT consensus method and DPOS consensus method. The POW consensus method is less efficient, consumes a lot of power and computing power, but has the highest credibility, and the nodes are not easy to do evil; the POS consensus method does not consume a lot of power and computing power, but because of profit, the nodes are easy to do evil; PBFT The consensus method is a consensus method with strong consistency, but requires that more than 50% of the nodes in all nodes be voted. If the number of votes is not collected enough, the blockchain system will not continue to operate; the DPOS consensus method has 101 Consensus nodes participate in voting, and the consensus efficiency is high. If there is a consensus node failure, the blockchain system needs to re-elect new consensus nodes until 101 consensus nodes are met. The blockchain system cannot continue to work until 101 consensus nodes are reached.
综上所述,每个共识方法都有其优缺点,如果能提供一种技术方案,能够在保证不耗费电力算力的基础上,拥有较高的共识效率,且降低区块链系统无法继续工作的概率。In summary, each consensus method has its advantages and disadvantages. If it can provide a technical solution, it can have higher consensus efficiency and ensure that the blockchain system cannot continue without guaranteeing the power calculation. The probability of work.
发明内容Summary of the invention
有鉴于此,本发明提供一种解决或部分解决上述问题的区块链的委托共识方法。In view of this, the present invention provides a trusted consensus method for a blockchain that solves or partially solves the above problems.
为达到上述技术方案的效果,本发明的技术方案为:一种区块链的委托共识方法,包含以下内容:In order to achieve the effects of the above technical solutions, the technical solution of the present invention is: a method for entrusting consensus of a blockchain, which includes the following contents:
委托共识方法的角色包括:Validator、Validator Set、Vg、基金账户和抵押账户;The roles of the delegate consensus method include: Validator, Validator Set, Vg, fund account, and mortgage account;
Validator是参与投票的节点,Validator包括正式Validator和候选Validator,候选Validator的投票只用于判断候选Validator投票的正确性,不能用于区块的共识, 也不能获得收益,正式Validator的投票用于区块的共识;Validator Set是所有参与区块的共识的正式Validator的集合,每轮共识前需要确定Validator Set中的所有正式Validator;每轮共识时,从Validator Set中随机选取一个正式Validator生成区块,被选择的正式Validator即是Vg,Vg还用于打包交易、生成Merkle树、广播区块头及交易哈希的列表;基金账户用于存放Validator被没收的保证金和成功生成区块获得的部分收益;抵押账户用于冻结Validator缴纳的保证金,Validator需要缴纳保证金才能参与投票;The Validator is the node that participates in the voting. The Validator includes the official Validator and the candidate Validator. The vote of the candidate Validator is only used to determine the correctness of the candidate Validator vote. It cannot be used for the consensus of the block, nor can it be used for the benefit. The official Validator vote is used for the zone. The consensus of the block; the Validator Set is the set of formal Validator of all the participating blocks. Before each round of consensus, all the official Validators in the Validator Set need to be determined; for each round of consensus, a formal Validator generated block is randomly selected from the Validator Set. The official Validator selected is Vg, which is also used to package transactions, generate Merkle trees, broadcast block headers, and transaction hashes. The fund account is used to store the validated margin of the Validator and the partial gains from the successfully generated block. The mortgage account is used to freeze the deposit paid by the Validator, and the Validator needs to pay a deposit to participate in the voting;
用户将自己的股权Stake委托给Validator Set中的正式Validator;用户也可以在区块链系统上缴纳保证金后可以成为候选Validator;候选Validator连续在N个区块上正确投票后,则成为正式Validator;正式Validator连续在N个区块上错误投票后,则成为候选Validator;Validator从正式Validator转换为候选Validator后,则需要连续在M个区块上正确投票后,才可重新成为正式Validator,M和N均为正整数,取值由工作人员确定,且M>N;如果候选Validator,连续在X个区块上投票后还未成为正式Validator,则区块链系统将没收候选Validator的部分保证金,X为正整数,取值由工作人员确定;The user delegates his own equity Stake to the official Validator in the Validator Set; the user can also become a candidate Validator after paying the deposit on the blockchain system; the candidate Validator becomes the official Validator after successively voting on the N blocks; After the official Validator continuously voted incorrectly on N blocks, it becomes a candidate Validator; after the Validator is converted from the official Validator to the candidate Validator, it needs to vote correctly on the M blocks before it can become the official Validator, M and N is a positive integer, the value is determined by the staff, and M> N; if the candidate Validator, after successively voting on X blocks has not become the official Validator, the blockchain system will confiscate part of the margin of the candidate Validator. X is a positive integer and the value is determined by the staff;
委托共识方法生成区块的步骤包括:The steps to generate a block by the consensus method include:
步骤S1:确定Validator Set中的所有正式Validator;用户将自己的股权Stake委托给Validator Set中的正式Validator;Step S1: determining all formal Validators in the Validator Set; the user delegates his own equity Stake to the official Validator in the Validator Set;
步骤S2:从Validator Set中随机选取一个正式Validator作为Vg,Vg将收集到的交易打包,将交易列表生成Merkle树,然后把区块头及交易哈希的列表广播给Validators Set;Step S2: randomly select a formal Validator as a Vg from the Validator Set, Vg packages the collected transaction, generates a Merkle tree by the transaction list, and then broadcasts the list of the block header and the transaction hash to the Validators Set;
步骤S3:正式Validator收到Vg广播的区块头及交易哈希的列表后,如果正式Validator的交易候选集和Vg的交易候选集一致,则正式Validator计算区块头并广播给Validators Set中的其它正式Validator;Step S3: After the official Validator receives the block header and the transaction hash list of the Vg broadcast, if the official Validator transaction candidate set and the Vg transaction candidate set are identical, the official Validator calculates the block header and broadcasts to other official members in the Validators Set. Validator;
步骤S4:如果正式Validator广播的区块头的哈希值与Vg广播的区块头的哈希值相等,且正式Validator持有的股权Stake超过总体股权Stake的50%,则代表Vg生成的区块正确,则将Vg生成的区块写入区块链;如果正式Validator持有的股权Stake 没有超过总体股权Stake的50%,则Vg继续生成区块,当Vg生成的区块的股权Stake的累计权重超过一定时间内在线的Validators Set的平均股权Stake的50%,则Vg生成的区块也被写入区块链;Step S4: If the hash value of the block header of the official Validator broadcast is equal to the hash value of the block header of the Vg broadcast, and the equity Stake held by the official Validator exceeds 50% of the total equity Stake, the block generated by the Vg is correct. , the block generated by Vg is written into the blockchain; if the shareholding Stake held by the official Validator does not exceed 50% of the total equity Stake, Vg continues to generate the block, and the accumulated weight of the equity Stake generated by the Vg block If 50% of the average equity Stake of the online Validators Set is over a certain period of time, the block generated by Vg is also written into the blockchain;
Vg生成的区块被写入区块链后,需要经过Block_Time,区块链系统才会发布生成下一个区块的需求,如果过早发布生成下一个区块的需求,则正式Validator不会处理生成下一个区块的需求;Block_Time是发布创建区块的最短时间,Block_Time是正实数,取值由工作人员确定;After the block generated by Vg is written into the blockchain, Block_Time needs to pass through, and the blockchain system will release the requirement to generate the next block. If the requirement of generating the next block is released too early, the official Validator will not process it. Generate the requirements of the next block; Block_Time is the shortest time to publish the created block, Block_Time is a positive real number, the value is determined by the staff;
区块链会出现多个Vg从而产生分叉,包括以下情况:1)如果原有的Vg未能在规定的时间内产生区块,则需要选出备选Vg,备选Vg产生区块后,原有的Vg随即生成区块;2)备选Vg收到原有的Vg广播的区块头及交易哈希的列表后,认为其不正确,备选Vg自己产生区块;There are multiple Vgs in the blockchain to generate bifurcation, including the following cases: 1) If the original Vg fails to generate a block within the specified time, the candidate Vg needs to be selected, and the candidate Vg generates the block. The original Vg then generates a block; 2) after the candidate Vg receives the list of the original Vg broadcast block header and transaction hash, it is considered incorrect, and the alternative Vg generates the block itself;
当区块链系统出现分叉时,则计算每条链上股权Stake的总和,股权Stake的总和最大的链即为当下主链。When there is a fork in the blockchain system, the sum of the equity Stakes on each chain is calculated, and the largest chain of the sum of the equity Stakes is the current main chain.
新一轮共识之前,Validator需要缴纳一定数量的保证金,Validator缴纳的保证金冻结在的抵押账户中;保证金有最低限度,当Validator的保证金低于最低限度时,区块链系统将取消Validator的投票资格;当Validator不想继续参与投票时,可申请退还保证金,区块链系统将抵押账户中冻结的保证金退还给Validator后,会取消Validator的投票资格;Before the new round of consensus, the Validator needs to pay a certain amount of margin, the deposit paid by the Validator is frozen in the mortgage account; the margin is minimal, and when the Validator's margin is below the minimum, the blockchain system will cancel the Validator vote. When the Validator does not want to continue to participate in the voting, you can apply for a refund of the deposit. After the blockchain system returns the frozen deposit in the mortgage account to the Validator, the Validator will be disqualified;
冻结投票权的方法为:Validator缴纳保证金后,区块链系统则约定Validator的投票的区块高度区间,如果在投票的区块高度区间内,Validator有连续的多个区块未投票,则冻结Validator的投票权;如果在投票的区块高度区间内,Validator的投票权被冻结后,Validator又缴纳费用,则恢复Validator的投票权;The method of freezing voting rights is: after the Validator pays the deposit, the blockchain system agrees on the block height range of the Validator's voting. If the Validator has multiple consecutive blocks that are not voting within the voting block height interval, then the freezing is frozen. Validator's voting rights; if the Validator's voting rights are frozen within the voting block height interval, and the Validator pays the fee again, the Validator's voting rights are restored;
当Validator有不符合规则的投票时,区块链系统将会没收其部分保证金,甚至取消其投票资格,Validator被没收的保证金从抵押账户进入基金账户;如果Validator认为其它Validator有不符合规则的投票,则可以新增一条交易并广播,该交易会在下一个区块进行共识,若共识成功,则有不符合规则的投票的Validator的保证金将被没收;不符合规则的投票包括:Validator对同一区块进行多次投票, Validator不对区块投票,Validator对区块投错误的票,当区块链产生分叉时Validator对每条分叉的链上的区块都投票;When the Validator has a vote that does not meet the rules, the blockchain system will confiscate part of the deposit and even cancel its voting qualification. The Validator's forfeited margin will enter the fund account from the mortgage account; if the Validator believes that the other Validator has a non-compliant vote , you can add a new transaction and broadcast, the transaction will be consensus in the next block, if the consensus is successful, the margin of the Validator with non-conforming votes will be forfeited; the vote that does not meet the rules includes: Validator for the same area The block makes multiple votes, the Validator does not vote on the block, the Validator casts the wrong ticket to the block, and the Validator votes for the block on each forked chain when the blockchain branches.
备选Vg被选出后,首先会新增一条交易用来没收原有的Vg的保证金;然后备选Vg重新将交易列表生成Merkle树,再把区块头及交易哈希的列表广播给Validators Set;After the alternative Vg is selected, a new transaction will be added to confiscate the original Vg margin; then the alternative Vg will re-generate the transaction list into the Merkle tree, and then broadcast the list of block headers and transaction hashes to the Validators Set. ;
成功生成区块后将产生收益,收益将按比例分配给诚实投票的正式Validator、诚实生成区块的Vg及基金账户;收益每隔多个投票的区块高度区间分发一次,且获得收益的正式Validator将自己获得的收益分配给委托的用户。Upon successful block generation, revenue will be generated, and the proceeds will be prorated to the official Validator of the honest voting, the Vg of the honestly generated block, and the fund account; the proceeds will be distributed once every block of the voting height, and the proceeds will be officially obtained. Validator assigns the proceeds it receives to the delegated user.
只有一个正式Validator正常运行时,区块链系统也能正常运行;The blockchain system works fine only when a formal Validator is running normally;
用户可以即时将股权Stake从正式Validator中取出,但是将股权Stake委托给正式Validator时,需要等待一定时间后才可生效。The user can immediately take the equity Stake out of the official Validator, but when the equity Stake is delegated to the official Validator, it will take a certain amount of time to take effect.
本发明的有益成果为:本发明提供了一种区块链的委托共识方法,角色包括Validator、Validator Set、Vg、基金账户和抵押账户。使用此共识方法,不仅能够在保证不耗费电力算力的基础上,拥有较高的共识效率,而且降低了区块链系统无法继续工作的概率。The beneficial result of the present invention is that the present invention provides a method for delegating consensus of a blockchain, the roles including Validator, Validator Set, Vg, fund account and mortgage account. Using this consensus method, not only can it have higher consensus efficiency on the basis of ensuring no power calculation, but also reduce the probability that the blockchain system can not continue to work.
附图说明DRAWINGS
图1为本发明一种区块链的委托共识方法的共识过程的示意图;1 is a schematic diagram of a consensus process of a method for entrusting consensus of a blockchain according to the present invention;
图2为本发明一种区块链的委托共识方法的Validator投票规则的示意图。2 is a schematic diagram of a Validator voting rule of a method for delegating consensus of a blockchain according to the present invention.
具体实施方式Detailed ways
为了使本发明所要解决的技术问题、技术方案及有益效果更加清楚明白,以下结合实施例,对本发明进行详细的说明。应当说明的是,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明,能实现同样功能的产品属于等同替换和改进,均包含在本发明的保护范围之内。具体方法如下:In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention more clearly, the present invention will be described in detail below with reference to the embodiments. It should be noted that the specific embodiments described herein are only intended to explain the present invention, and are not intended to limit the invention, and that the products that can achieve the same function are equivalents and modifications, and are included in the scope of the present invention. The specific method is as follows:
实施例1:本实施例具体说明了区块链的委托共识方法的步骤,如下:Embodiment 1: This embodiment specifically describes the steps of the trust consensus method of the blockchain, as follows:
委托共识方法的角色包括:Validator、Validator Set、Vg、基金账户和抵押账 户;The roles of the delegate consensus method include: Validator, Validator Set, Vg, fund account, and mortgage account;
Validator是参与投票的节点,Validator包括正式Validator和候选Validator,候选Validator的投票只用于判断候选Validator投票的正确性,不能用于区块的共识,也不能获得收益,正式Validator的投票用于区块的共识;Validator Set是所有参与区块的共识的正式Validator的集合,每轮共识前需要确定Validator Set中的所有正式Validator;每轮共识时,从Validator Set中随机选取一个正式Validator生成区块,被选择的正式Validator即是Vg,Vg还用于打包交易、生成Merkle树、广播区块头及交易哈希的列表;基金账户用于存放Validator被没收的保证金和成功生成区块获得的部分收益;抵押账户用于冻结Validator缴纳的保证金,Validator需要缴纳保证金才能参与投票;The Validator is the node that participates in the voting. The Validator includes the official Validator and the candidate Validator. The vote of the candidate Validator is only used to determine the correctness of the candidate Validator vote. It cannot be used for the consensus of the block, nor can it be used for the benefit. The official Validator vote is used for the zone. The consensus of the block; the Validator Set is the set of formal Validator of all the participating blocks. Before each round of consensus, all the official Validators in the Validator Set need to be determined; for each round of consensus, a formal Validator generated block is randomly selected from the Validator Set. The official Validator selected is Vg, which is also used to package transactions, generate Merkle trees, broadcast block headers, and transaction hashes. The fund account is used to store the validated margin of the Validator and the partial gains from the successfully generated block. The mortgage account is used to freeze the deposit paid by the Validator, and the Validator needs to pay a deposit to participate in the voting;
用户将自己的股权Stake委托给Validator Set中的正式Validator;用户也可以在区块链系统上缴纳保证金后可以成为候选Validator;候选Validator连续在N个区块上正确投票后,则成为正式Validator;正式Validator连续在N个区块上错误投票后,则成为候选Validator;Validator从正式Validator转换为候选Validator后,则需要连续在M个区块上正确投票后,才可重新成为正式Validator,M和N均为正整数,取值由工作人员确定,且M>N;如果候选Validator,连续在X个区块上投票后还未成为正式Validator,则区块链系统将没收候选Validator的部分保证金,X为正整数,取值由工作人员确定;The user delegates his own equity Stake to the official Validator in the Validator Set; the user can also become a candidate Validator after paying the deposit on the blockchain system; the candidate Validator becomes the official Validator after successively voting on the N blocks; After the official Validator continuously voted incorrectly on N blocks, it becomes a candidate Validator; after the Validator is converted from the official Validator to the candidate Validator, it needs to vote correctly on the M blocks before it can become the official Validator, M and N is a positive integer, the value is determined by the staff, and M> N; if the candidate Validator, after successively voting on X blocks has not become the official Validator, the blockchain system will confiscate part of the margin of the candidate Validator. X is a positive integer and the value is determined by the staff;
委托共识方法生成区块的步骤包括:The steps to generate a block by the consensus method include:
步骤S1:确定Validator Set中的所有正式Validator;用户将自己的股权Stake委托给Validator Set中的正式Validator;Step S1: determining all formal Validators in the Validator Set; the user delegates his own equity Stake to the official Validator in the Validator Set;
步骤S2:从Validator Set中随机选取一个正式Validator作为Vg,Vg将收集到的交易打包,将交易列表生成Merkle树,然后把区块头及交易哈希的列表广播给Validators Set;Step S2: randomly select a formal Validator as a Vg from the Validator Set, Vg packages the collected transaction, generates a Merkle tree by the transaction list, and then broadcasts the list of the block header and the transaction hash to the Validators Set;
步骤S3:正式Validator收到Vg广播的区块头及交易哈希的列表后,如果正式Validator的交易候选集和Vg的交易候选集一致,则正式Validator计算区块头并广播给Validators Set中的其它正式Validator;Step S3: After the official Validator receives the block header and the transaction hash list of the Vg broadcast, if the official Validator transaction candidate set and the Vg transaction candidate set are identical, the official Validator calculates the block header and broadcasts to other official members in the Validators Set. Validator;
步骤S4:如果正式Validator广播的区块头的哈希值与Vg广播的区块头的哈希值相等,且正式Validator持有的股权Stake超过总体股权Stake的50%,则代表Vg生成的区块正确,则将Vg生成的区块写入区块链;如果正式Validator持有的股权Stake没有超过总体股权Stake的50%,则Vg继续生成区块,当Vg生成的区块的股权Stake的累计权重超过一定时间内在线的Validators Set的平均股权Stake的50%,则Vg生成的区块也被写入区块链;Step S4: If the hash value of the block header of the official Validator broadcast is equal to the hash value of the block header of the Vg broadcast, and the equity Stake held by the official Validator exceeds 50% of the total equity Stake, the block generated by the Vg is correct. , the block generated by Vg is written into the blockchain; if the equity Stake held by the official Validator does not exceed 50% of the total equity Stake, Vg continues to generate the block, and the cumulative weight of the equity Stake generated by the Vg block If 50% of the average equity Stake of the online Validators Set is over a certain period of time, the block generated by Vg is also written into the blockchain;
Vg生成的区块被写入区块链后,需要经过Block_Time,区块链系统才会发布生成下一个区块的需求,如果过早发布生成下一个区块的需求,则正式Validator不会处理生成下一个区块的需求;Block_Time是发布创建区块的最短时间,Block_Time是正实数,取值由工作人员确定;After the block generated by Vg is written into the blockchain, Block_Time needs to pass through, and the blockchain system will release the requirement to generate the next block. If the requirement of generating the next block is released too early, the official Validator will not process it. Generate the requirements of the next block; Block_Time is the shortest time to publish the created block, Block_Time is a positive real number, the value is determined by the staff;
区块链会出现多个Vg从而产生分叉,包括以下情况:1)如果原有的Vg未能在规定的时间内产生区块,则需要选出备选Vg,备选Vg产生区块后,原有的Vg随即生成区块;2)备选Vg收到原有的Vg广播的区块头及交易哈希的列表后,认为其不正确,备选Vg自己产生区块;There are multiple Vgs in the blockchain to generate bifurcation, including the following cases: 1) If the original Vg fails to generate a block within the specified time, the candidate Vg needs to be selected, and the candidate Vg generates the block. The original Vg then generates a block; 2) after the candidate Vg receives the list of the original Vg broadcast block header and transaction hash, it is considered incorrect, and the alternative Vg generates the block itself;
当区块链系统出现分叉时,则计算每条链上股权Stake的总和,股权Stake的总和最大的链即为当下主链。When there is a fork in the blockchain system, the sum of the equity Stakes on each chain is calculated, and the largest chain of the sum of the equity Stakes is the current main chain.
为增加Validator的作恶成本,新一轮共识之前,Validator需要缴纳一定数量的保证金,Validator缴纳的保证金冻结在的抵押账户中;保证金有最低限度,当Validator的保证金低于最低限度时,区块链系统将取消Validator的投票资格;当Validator不想继续参与投票时,可申请退还保证金,区块链系统将抵押账户中冻结的保证金退还给Validator后,会取消Validator的投票资格;In order to increase the cost of the Validator, before the new round of consensus, the Validator needs to pay a certain amount of margin, the deposit paid by the Validator is frozen in the mortgage account; the margin is minimal, when the Validator's margin is below the minimum, the blockchain The system will cancel the Validator's voting qualification; when the Validator does not want to continue to participate in the voting, it can apply for a refund of the deposit. After the blockchain system returns the frozen deposit in the mortgage account to the Validator, the Validator will be disqualified;
冻结投票权的方法为:Validator缴纳保证金后,区块链系统则约定Validator的投票的区块高度区间,如果在投票的区块高度区间内,Validator有连续的多个区块未投票,则冻结Validator的投票权;如果在投票的区块高度区间内,Validator的投票权被冻结后,Validator又缴纳费用,则恢复Validator的投票权;The method of freezing voting rights is: after the Validator pays the deposit, the blockchain system agrees on the block height range of the Validator's voting. If the Validator has multiple consecutive blocks that are not voting within the voting block height interval, then the freezing is frozen. Validator's voting rights; if the Validator's voting rights are frozen within the voting block height interval, and the Validator pays the fee again, the Validator's voting rights are restored;
当Validator有不符合规则的投票时,区块链系统将会没收其部分保证金,甚至取消其投票资格,Validator被没收的保证金从抵押账户进入基金账户;如果 Validator认为其它Validator有不符合规则的投票,则可以新增一条交易并广播,该交易会在下一个区块进行共识,若共识成功,则有不符合规则的投票的Validator的保证金将被没收;不符合规则的投票包括:Validator对同一区块进行多次投票,Validator不对区块投票,Validator对区块投错误的票,当区块链产生分叉时Validator对每条分叉的链上的区块都投票;When the Validator has a vote that does not meet the rules, the blockchain system will confiscate part of the deposit and even cancel its voting qualification. The Validator's forfeited margin will enter the fund account from the mortgage account; if the Validator believes that the other Validator has a non-compliant vote , you can add a new transaction and broadcast, the transaction will be consensus in the next block, if the consensus is successful, the margin of the Validator with non-conforming votes will be forfeited; the vote that does not meet the rules includes: Validator for the same area The block makes multiple votes, the Validator does not vote on the block, the Validator casts the wrong ticket to the block, and the Validator votes for the block on each forked chain when the blockchain branches.
备选Vg被选出后,首先会新增一条交易用来没收原有的Vg的保证金;然后备选Vg重新将交易列表生成Merkle树,再把区块头及交易哈希的列表广播给Validators Set;After the alternative Vg is selected, a new transaction will be added to confiscate the original Vg margin; then the alternative Vg will re-generate the transaction list into the Merkle tree, and then broadcast the list of block headers and transaction hashes to the Validators Set. ;
成功生成区块后将产生收益,收益将按比例分配给诚实投票的正式Validator、诚实生成区块的Vg及基金账户;收益每隔多个投票的区块高度区间分发一次,且获得收益的正式Validator将自己获得的收益分配给委托的用户。Upon successful block generation, revenue will be generated, and the proceeds will be prorated to the official Validator of the honest voting, the Vg of the honestly generated block, and the fund account; the proceeds will be distributed once every block of the voting height, and the proceeds will be officially obtained. Validator assigns the proceeds it receives to the delegated user.
只有一个正式Validator正常运行时,区块链系统也能正常运行;The blockchain system works fine only when a formal Validator is running normally;
用户可以即时将股权Stake从正式Validator中取出,但是将股权Stake委托给正式Validator时,需要等待一定时间后才可生效。The user can immediately take the equity Stake out of the official Validator, but when the equity Stake is delegated to the official Validator, it will take a certain amount of time to take effect.
实施例2:本实施例举例说明了区块链的委托共识方法的共识过程,如图1和图2:Embodiment 2: This embodiment illustrates the consensus process of the blockchain trust consensus method, as shown in Figure 1 and Figure 2:
委托共识方法生成区块的步骤如下:The steps to generate a block by the consensus method are as follows:
步骤S1:区块链系统有5个Validator,用户将股权Stake委托给这5个Validator,Validator A有X亿的股权Stake,Validator B有Y亿的股权Stake,Validator C有Z亿的股权Stake,Validator D有M亿的股权Stake,Validator E有N亿的股权Stake,假设X:Y:Z:M:N=2:2.5:2:0.5:3,股权Stake一共有10亿,则Validator A有2亿的股权Stake,Validator B有2.5亿的股权Stake,Validator C有2亿的股权Stake,Validator D有0.5亿的股权Stake,Validator E有3亿的股权Stake。新一轮共识之前,确定Validator Set包括5个Validator;Step S1: The blockchain system has five Validators, the user entrusts the equity Stake to the five Validators, the Validator A has the X-share staked Stake, the Validator B has the Y-share stake Stake, and the Validator C has the Z-share stake Stake. Validator D has a stake of Million Stake, Validator E has a stake of N100 million Stake, assuming X:Y:Z:M:N=2:2.5:2:0.5:3, and a total of 1 billion equity Stake, then Validator A has 200 million shares of Stake, Validator B has a 250 million stake in Stake, Validator C has a 200 million stake in Stake, Validator D has a 50 million stake in Stake, and Validator E has a 300 million stake in Stake. Before the new round of consensus, determine that the Validator Set includes 5 Validators;
步骤S2:从Validator Set中随机选取一个Validator作为Vg,Vg将收集到的交易打包,将交易列表生成Merkle树,然后把区块头及交易哈希的列表广播给Validators Set;Step S2: randomly selecting a Validator as a Vg from the Validator Set, Vg packages the collected transaction, generates a Merkle tree by the transaction list, and then broadcasts the list of the block header and the transaction hash to the Validators Set;
步骤S3:Validator收到Vg广播的区块头及交易哈希的列表后,如果Validator的交易候选集和Vg的交易候选集一致,则Validator计算区块头并广播给Validators Set中的其它Validator;Step S3: After the Validator receives the block header and the transaction hash list of the Vg broadcast, if the Validator transaction candidate set and the Vg transaction candidate set are consistent, the Validator calculates the block header and broadcasts to other Validator in the Validators Set;
步骤S4:如果Validator广播的区块头的哈希值与Vg广播的区块头的哈希值相等,且Validator持有的股权Stake超过总体股权Stake的50%,则代表Vg生成的区块正确,则将Vg生成的区块写入区块链;如果Validator持有的股权Stake没有超过总体股权Stake的50%,则Vg继续生成区块,当Vg生成的区块的股权Stake的累计权重超过一定时间内在线的Validators Set的平均股权Stake的50%,则Vg生成的区块也被写入区块链;Step S4: If the hash value of the block header of the Validator broadcast is equal to the hash value of the block header of the Vg broadcast, and the equity Stake held by the Validator exceeds 50% of the total equity Stake, then the block generated by the Vg is correct, then The block generated by Vg is written into the blockchain; if the equity Stake held by Validator does not exceed 50% of the total equity Stake, Vg continues to generate the block, and when the cumulative weight of the equity of the block generated by Vg exceeds a certain time 50% of the average equity Stake of the online Validators Set, then the block generated by Vg is also written into the blockchain;
如图1,区块高度为H时,Vg生成区块Block(H)后,Validator C、Validator D及Validator E由于某些原因没有对该区块进行投票,只有Validator A及Validator B对该区块进行投票,Block(H)的权重为(2+2.5)/(2+2.5+2+0.5+3)<50%,Block(H)未确定;As shown in Figure 1, when the block height is H, after Vg generates the block Block(H), Validator C, Validator D, and Validator E do not vote for the block for some reason. Only Validator A and Validator B are the area. The block is voted, and the weight of Block(H) is (2+2.5)/(2+2.5+2+0.5+3)<50%, Block(H) is not determined;
区块高度为(H+1)时,Vg生成区块Block(H+1)后,Validator B、Validator D及Validator E由于某些原因没有对该区块进行投票,只有Validator A及Validator C对该区块进行投票,Block(H)的累计权重为(2+2.5+2)/(2+2.5+2+0.5+3)>50%,Block(H)确定,Block(H+1)的权重为(2+2)/(2+2.5+2+0.5+3)<50%,Block(H+1)未确定;When the block height is (H+1), after Vg generates block Block(H+1), Validator B, Validator D and Validator E do not vote for the block for some reason, only Validator A and Validator C pairs. The block is voted, and the cumulative weight of Block(H) is (2+2.5+2)/(2+2.5+2+0.5+3)>50%, Block(H) determines, Block(H+1) The weight is (2+2)/(2+2.5+2+0.5+3)<50%, and Block(H+1) is not determined;
区块高度为(H+2)时,Vg生成区块Block(H+2)后,Validator A、Validator B及Validator E由于某些原因没有对该区块进行投票,只有Validator C及Validator D对该区块进行投票,Block(H+1)时的累计权重为(2+2+0.5)/(2+2.5+2+0.5+3)<50%,Block(H+1)未确定,Block(H+2)的权重为(2+0.5)/(2+2.5+2+0.5+3)<50%,Block(H+2)未确定;When the block height is (H+2), after Vg generates the block Block (H+2), Validator A, Validator B, and Validator E do not vote for the block for some reason, only the Validator C and Validator D pairs. The block is voted. The cumulative weight of Block(H+1) is (2+2+0.5)/(2+2.5+2+0.5+3)<50%, Block(H+1) is not determined, Block The weight of (H+2) is (2+0.5)/(2+2.5+2+0.5+3)<50%, and Block(H+2) is not determined;
区块高度为(H+3)时,Vg生成区块Block(H+3)后,Validator A、Validator B、Validator C及Validator D由于某些原因没有对该区块进行投票,只有Validator E对该区块进行投票,Block(H+1)时的累计权重(2+2+0.5+3)/(2+2.5+2+0.5+3)>50%,Block(H+1)确定,Block(H+2)的累计权重为(2+0.5+3)/(2+2.5+2+0.5+3)>50%,Block(H+2)确定,Block(H+3)的权重为(3)/(2+2.5+2+0.5+3)<66.7%,未确定。When the block height is (H+3), after Vg generates the block Block (H+3), Validator A, Validator B, Validator C, and Validator D do not vote for the block for some reason, only the Validator E pair The block is voted, and the cumulative weight (2+2+0.5+3)/(2+2.5+2+0.5+3)>50% at Block(H+1), Block(H+1) is determined, Block The cumulative weight of (H+2) is (2+0.5+3)/(2+2.5+2+0.5+3)>50%, Block(H+2) determines that the weight of Block(H+3) is ( 3) / (2+2.5 + 2+0.5 + 3) < 66.7%, not determined.
约定每隔500个区块高度结算一次收益,假设不计Block(H+3)之后的区块,从区块Block(H)到区块Block(H+3)中,Validator A共获得2次投票收益,Validator B共获得1次投票收益,Validator C共获得2次投票收益,Validator D共获得1次投票收益,Validator E共获得1次收益。It is agreed to settle the return every 500 block heights, assuming that the block after Block (H+3) is not counted, from block Block (H) to block Block (H+3), Validator A gets 2 votes in total. In return, Validator B received a total of 1 vote, Validator C received 2 votes, Validator D received 1 vote, and Validator E received 1 return.
如图2,Validator缴纳保证金后,区块链系统约定该Validator投票的区块高度区间及冻结Validator的投票权的规则:假设Validator缴纳保证金后,投票的区块高度区间为10万个区块,且若有1000个区块连续未投票,则冻结该Validator的投票权;在这10万个区块内,若该Validator被冻结投票权后,又缴纳一定的费用,则恢复该Validator在此10万个区块中的投票权。As shown in Figure 2, after the Validator pays the deposit, the blockchain system agrees on the block height range of the Validator voting and the rule of freezing the Validator's voting rights: assuming that the Validator pays the deposit, the voting block height interval is 100,000 blocks. And if there are 1000 blocks that have not voted continuously, the voting rights of the Validator are frozen; in the 100,000 blocks, if the Validator is frozen and then pays a certain fee, the Validator is restored. Voting rights in 10,000 blocks.
本发明的有益成果为:本发明提供了一种区块链的委托共识方法,角色包括Validator、Validator Set、Vg、基金账户和抵押账户。使用此共识方法,不仅能够在保证不耗费电力算力的基础上,拥有较高的共识效率,而且降低了区块链系统无法继续工作的概率。The beneficial result of the present invention is that the present invention provides a method for delegating consensus of a blockchain, the roles including Validator, Validator Set, Vg, fund account and mortgage account. Using this consensus method, not only can it have higher consensus efficiency on the basis of ensuring no power calculation, but also reduce the probability that the blockchain system can not continue to work.
以上所述仅为本发明之较佳实施例,并非用以限定本发明的权利要求保护范围。同时以上说明,对于相关技术领域的技术人员应可以理解及实施,因此其他基于本发明所揭示内容所完成的等同改变,均应包含在本权利要求书的涵盖范围内。The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the claims of the present invention. At the same time, the above description should be understood and implemented by those skilled in the art, and other equivalent changes made based on the disclosure of the present invention should be included in the scope of the claims.

Claims (3)

  1. 一种区块链的委托共识方法,其特征在于,包含以下内容:A constituency consensus method for a blockchain, characterized in that it comprises the following contents:
    委托共识方法的角色包括:Validator、Validator Set、Vg、基金账户和抵押账户;The roles of the delegate consensus method include: Validator, Validator Set, Vg, fund account, and mortgage account;
    所述Validator是参与投票的节点,所述Validator包括正式Validator和候选Validator,所述候选Validator的投票只用于判断所述候选Validator投票的正确性,不能用于区块的共识,也不能获得收益,所述正式Validator的投票用于区块的共识;所述Validator Set是所有参与区块的共识的正式Validator的集合,每轮共识前需要确定所述Validator Set中的所有正式Validator;每轮共识时,从所述Validator Set中随机选取一个所述正式Validator生成区块,被选择的正式Validator即是所述Vg,所述Vg还用于打包交易、生成Merkle树、广播区块头及交易哈希的列表;所述基金账户用于存放所述Validator被没收的保证金和成功生成区块获得的部分收益;所述抵押账户用于冻结所述Validator缴纳的保证金,所述Validator需要缴纳保证金才能参与投票;The Validator is a node participating in the voting, the Validator includes a formal Validator and a candidate Validator, and the voting of the candidate Validator is only used to judge the correctness of the candidate Validator voting, and cannot be used for the consensus of the block, nor can the income be obtained. The official Validator's vote is used for the consensus of the block; the Validator Set is the set of formal Validator of all the participating blocks, and each formal Validator in the Validator Set needs to be determined before each round of consensus; each round of consensus At the time, one of the official Validator generation blocks is randomly selected from the Validator Set, and the selected official Validator is the Vg, and the Vg is also used for packaging transactions, generating a Merkle tree, a broadcast block header, and a transaction hash. a list of funds used to store the margin for the Validator to be confiscated and a portion of the proceeds obtained by successfully generating the block; the mortgage account is used to freeze the deposit paid by the Validator, and the Validator is required to pay a deposit to participate in the voting. ;
    用户将自己的所述股权Stake委托给所述Validator Set中的正式Validator;用户也可以在区块链系统上缴纳所述保证金后可以成为候选Validator;所述候选Validator连续在N个区块上正确投票后,则成为所述正式Validator;所述正式Validator连续在N个区块上错误投票后,则成为所述候选Validator;所述Validator从所述正式Validator转换为所述候选Validator后,则需要连续在M个区块上正确投票后,才可重新成为所述正式Validator,所述M和所述N均为正整数,取值由工作人员确定,且M>N;如果所述候选Validator,连续在X个区块上投票后还未成为所述正式Validator,则所述区块链系统将没收所述候选Validator的部分保证金,所述X为正整数,取值由工作人员确定;The user delegates his own equity Stake to the official Validator in the Validator Set; the user can also become the candidate Validator after paying the deposit on the blockchain system; the candidate Validator is correctly in N blocks. After voting, it becomes the official Validator; after the official Validator successively votes on N blocks, it becomes the candidate Validator; after the Validator is converted from the official Validator to the candidate Validator, it is required After being correctly voted on M blocks, the formal Validator can be re-established, the M and the N are positive integers, the value is determined by the staff member, and M>N; if the candidate Validator, After the voting on the X blocks has not become the official Validator, the blockchain system will confiscate the partial margin of the candidate Validator, and the X is a positive integer, and the value is determined by the staff member;
    所述委托共识方法生成区块的步骤包括:The step of the delegation consensus method to generate a block includes:
    步骤S1:新一轮共识之前,确定所述Validator Set,所述Validator Set由所述新一轮共识中所有正式Validator组成;Step S1: Before the new round of consensus, determine the Validator Set, the Validator Set is composed of all the official Validators in the new round of consensus;
    步骤S2:从所述Validator Set中随机选取一个所述正式Validator作为所述Vg,所述Vg将收集到的交易打包,将交易列表生成所述Merkle树,然后把所述区块头及所述交易哈希的列表广播给所述Validators Set;Step S2: randomly selecting one of the official Validator from the Validator Set as the Vg, the Vg packages the collected transaction, generates a transaction list to generate the Merkle tree, and then puts the block header and the transaction A list of hashes is broadcast to the Validators Set;
    步骤S3:所述正式Validator收到所述Vg广播的区块头及交易哈希的列表后,如果所述正式Validator的交易候选集和所述Vg的交易候选集一致,则所述正式Validator计算所述区块头并广播给所述Validators Set中的其它正式Validator;Step S3: After the formal Validator receives the list of the block header and the transaction hash of the Vg broadcast, if the transaction candidate set of the official Validator and the transaction candidate set of the Vg are consistent, the formal Validator calculation office The block header is broadcast and broadcast to other official Validators in the Validators Set;
    步骤S4:如果所述正式Validator广播的区块头的哈希值与所述Vg广播的区块头的哈希值相等,且所述正式Validator持有的股权Stake超过总体股权Stake的50%,则代表所述Vg生成的区块正确,则将所述Vg生成的区块写入区块链;如果所述正式Validator持有的股权Stake没有超过所述总体股权Stake的50%,则所述Vg继续生成区块,当所述Vg生成的区块的股权Stake的累计权重超过一定时间内在线的所述Validators Set的平均股权Stake的50%,则所述Vg生成的区块也被写入区块链;Step S4: If the hash value of the block header of the official Validator broadcast is equal to the hash value of the block header of the Vg broadcast, and the equity Stake held by the official Validator exceeds 50% of the total equity Stake, then the representative If the block generated by the Vg is correct, the block generated by the Vg is written into the blockchain; if the equity Stake held by the official Validator does not exceed 50% of the total equity Stake, the Vg continues Generating a block, when the accumulated weight of the equity Stake of the block generated by the Vg exceeds 50% of the average equity Stake of the Validators Set online within a certain time, the block generated by the Vg is also written into the block. chain;
    所述Vg生成的区块被写入所述区块链后,需要经过Block_Time,所述区块链系统才会发布生成下一个区块的需求,如果过早发布所述生成下一个区块的需求,则所述正式Validator不会处理所述生成下一个区块的需求;所述Block_Time是发布创建区块的最短时间,所述Block_Time是正实数,取值由工作人员确定;After the block generated by the Vg is written into the blockchain, it needs to pass Block_Time, and the blockchain system will release the requirement for generating the next block. If the block is generated too early, the next block is generated. The demand, the formal Validator does not process the requirement for generating the next block; the Block_Time is the shortest time to publish the created block, and the Block_Time is a positive real number, and the value is determined by the staff member;
    所述区块链会出现多个所述Vg从而产生分叉,包括以下情况:1)如果原有的Vg未能在规定的时间内产生区块,则需要选出备选Vg,所述备选Vg产生区块后,所述原有的Vg随即生成区块;2)所述备选Vg收到所述原有的Vg广播的区块头及交易哈希的列表后,认为其不正确,所述备选Vg自己产生区块;A plurality of the Vgs may be generated in the blockchain to generate a bifurcation, including the following cases: 1) if the original Vg fails to generate a block within a prescribed time, an alternative Vg needs to be selected. After selecting the Vg to generate the block, the original Vg then generates the block; 2) after the candidate Vg receives the list of the block header and the transaction hash of the original Vg broadcast, it is considered to be incorrect. The candidate Vg generates a block by itself;
    当所述区块链系统出现分叉时,则计算每条链上所述股权Stake的总和,所述股权Stake的总和最大的链即为当下主链。When the blockchain system is bifurcated, the sum of the equity Stakes on each chain is calculated, and the largest chain of the sum of the equity Stakes is the current main chain.
  2. 根据权利要求1所述的一种区块链的委托共识方法,其特征在于,包括:The method for entrusting consensus of a blockchain according to claim 1, comprising:
    所述新一轮共识之前,所述Validator需要缴纳一定数量的保证金,所述Validator缴纳的保证金冻结在所述的抵押账户中;所述保证金有最低限度,当所述Validator的保证金低于所述最低限度时,所述区块链系统将取消所述Validator的投票资格;当所述Validator不想继续参与投票时,可申请退还所述保证金,所 述区块链系统将所述抵押账户中冻结的保证金退还给所述Validator后,会取消所述Validator的投票资格;Before the new round of consensus, the Validator needs to pay a certain amount of deposit, and the deposit paid by the Validator is frozen in the mortgage account; the margin is minimal, when the deposit of the Validator is lower than the stated At a minimum, the blockchain system will cancel the voting qualification of the Validator; when the Validator does not want to continue to participate in the voting, the deposit may be refunded, and the blockchain system freezes the mortgage account. After the deposit is returned to the Validator, the validity of the Validator will be cancelled;
    冻结投票权的方法为:所述Validator缴纳所述保证金后,所述区块链系统则约定所述Validator的投票的区块高度区间,如果在所述投票的区块高度区间内,所述Validator有连续的多个区块未投票,则冻结所述Validator的投票权;如果在所述投票的区块高度区间内,所述Validator的投票权被冻结后,所述Validator又缴纳费用,则恢复所述Validator的投票权;The method of freezing the voting rights is: after the Validator pays the deposit, the blockchain system stipulates a block height interval of the voting of the Validator, if the Validator is within the block height range of the voting. If there are consecutive blocks that are not voted, the voting rights of the Validator are frozen; if the voting rights of the Validator are frozen within the block height interval of the voting, the Validator pays the fee again, then the voting is resumed. The voting rights of the Validator;
    当所述Validator有不符合规则的投票时,所述区块链系统将会没收其部分保证金,甚至取消其投票资格,所述Validator被没收的保证金从所述抵押账户进入所述基金账户;如果所述Validator认为其它Validator有所述不符合规则的投票,则可以新增一条交易并广播,该交易会在下一个区块进行共识,若共识成功,则有所述不符合规则的投票的Validator的保证金将被没收;所述不符合规则的投票包括:所述Validator对同一区块进行多次投票,所述Validator不对区块投票,所述Validator对区块投错误的票,当所述区块链产生分叉时所述Validator对每条分叉的链上的区块都投票;When the Validator has a vote that does not comply with the rules, the blockchain system will confiscate part of the deposit, or even cancel its voting eligibility, and the Validator's forfeited margin enters the fund account from the mortgage account; If the Validator considers that the other Validator has the voting that does not meet the rule, then a new transaction may be added and broadcasted, and the transaction will be consensus in the next block. If the consensus is successful, the Validator of the voting that does not meet the rule is The margin will be forfeited; the non-conforming vote includes: the Validator votes multiple times on the same block, the Validator does not vote on the block, and the Validator casts an incorrect ticket to the block when the block When the chain branches, the Validator votes for each block on the forked chain;
    所述备选Vg被选出后,首先会新增一条交易用来没收所述原有的Vg的保证金;然后所述备选Vg重新将所述交易列表生成所述Merkle树,再把所述区块头及所述交易哈希的列表广播给所述Validators Set;After the candidate Vg is selected, a transaction is first added to confiscate the deposit of the original Vg; then the candidate Vg re-creates the transaction list to generate the Merkle tree, and then the a block header and a list of the transaction hashes are broadcast to the Validators Set;
    成功生成区块后将产生收益,所述收益将按比例分配给诚实投票的正式Validator、诚实生成区块的Vg及所述基金账户;所述收益每隔多个所述投票的区块高度区间分发一次,且获得收益的正式Validator将自己获得的收益分配给委托的用户。Upon successful generation of the block, revenue will be generated, which will be prorated to the official Validator of the honest vote, the Vg of the honestly generated block, and the fund account; The official Validator, which is distributed once and earned revenue, distributes the proceeds it receives to the delegated user.
  3. 根据权利要求1所述的一种区块链的委托共识方法,其特征在于,包括:The method for entrusting consensus of a blockchain according to claim 1, comprising:
    只有一个所述正式Validator正常运行时,所述区块链系统也能正常运行;The blockchain system can also operate normally when only one of the official Validators is operating normally;
    用户可以即时将所述股权Stake从所述正式Validator中取出,但是将所述股权Stake委托给所述正式Validator时,需要等待一定时间后才可生效。The user can immediately take the equity Stake out of the official Validator, but when the equity Stake is delegated to the official Validator, it takes a certain time to take effect.
PCT/CN2019/070170 2018-01-10 2019-01-03 Block chain delegation consensus method WO2019137282A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810023781.4 2018-01-10
CN201810023781.4A CN108133420B (en) 2018-01-10 2018-01-10 Committee consensus method of block chain

Publications (1)

Publication Number Publication Date
WO2019137282A1 true WO2019137282A1 (en) 2019-07-18

Family

ID=62400573

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/070170 WO2019137282A1 (en) 2018-01-10 2019-01-03 Block chain delegation consensus method

Country Status (2)

Country Link
CN (1) CN108133420B (en)
WO (1) WO2019137282A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11907174B2 (en) 2019-09-27 2024-02-20 Cypherium Blockchain Inc. Systems and methods for managing data generation, storage, and verification in a distributed system having a committee of validator nodes

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108133420B (en) * 2018-01-10 2020-09-11 杭州复杂美科技有限公司 Committee consensus method of block chain
CN108923909B (en) * 2018-07-02 2021-07-20 上海达家迎信息科技有限公司 Block chain generation method and device, computer equipment and storage medium
CN109067516B (en) * 2018-07-20 2021-05-11 杭州复杂美科技有限公司 Lottery drawing method, consensus method, device and storage medium
CN108846750B (en) * 2018-08-01 2020-09-15 杭州复杂美科技有限公司 Stock right certification consensus method
CN108965329B (en) * 2018-08-23 2021-03-23 泰链(厦门)科技有限公司 Method, medium, device and system for realizing consensus mechanism of block chain system
CN109446266B (en) * 2018-09-20 2021-02-26 海南趣块飞扬科技有限公司 Method for improving transaction efficiency and stability suitable for block chain network
CN109361661B (en) * 2018-10-08 2020-07-10 莆田市烛火信息技术有限公司 Block chain consensus device depending on related chain computing power
CN109714404B (en) * 2018-12-12 2021-04-06 中国联合网络通信集团有限公司 Block chain consensus method and device based on Raft algorithm
CN109978528B (en) * 2019-03-15 2020-05-12 北京世纪诚链科技有限公司 Pluggable consensus protocol framework model, consensus protocol and implementation method thereof
CN110197373B (en) * 2019-06-04 2021-10-15 数字钱包(北京)科技有限公司 Data processing method, device, block chain node and computer readable storage medium
EP3992883A4 (en) * 2019-06-25 2023-01-25 Antpool Technologies Limited Digital certificate processing method, gateway, device, system, medium, and program product
CN111510285B (en) * 2020-03-09 2021-07-23 上海能链众合科技有限公司 Intelligent block chain consensus method based on random number
CN114710507B (en) * 2022-03-30 2023-10-27 蚂蚁区块链科技(上海)有限公司 Consensus method, blockchain node, medium and consensus node

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878071A (en) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 A kind of block chain common recognition mechanism based on Raft algorithms
CN107317672A (en) * 2017-05-10 2017-11-03 广东网金控股股份有限公司 A kind of light weight terminating machine block catenary system
CN107341660A (en) * 2017-05-27 2017-11-10 唐盛(北京)物联技术有限公司 A kind of block chain bottom common recognition mechanism and the block catenary system based on the common recognition mechanism
CN107395353A (en) * 2017-04-24 2017-11-24 阿里巴巴集团控股有限公司 A kind of block chain common recognition method and device
CN107423961A (en) * 2017-07-11 2017-12-01 北京泛融科技有限公司 A kind of optimization common recognition method based on random correlation analysis
CN108133420A (en) * 2018-01-10 2018-06-08 杭州复杂美科技有限公司 A kind of commission common recognition method of block chain

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107146087A (en) * 2017-04-11 2017-09-08 广东网金控股股份有限公司 A kind of quick common recognition bookkeeping methods and system based on block chain alliance chain
CN107124403A (en) * 2017-04-14 2017-09-01 朱清明 The generation method and computing device of common recognition block in block chain
CN107424066B (en) * 2017-07-19 2020-11-10 武汉凤链科技有限公司 Method and system for establishing consensus mechanism based on value quantity
CN107493173B (en) * 2017-08-30 2018-09-25 北京知金链网络技术有限公司 Block chain random number common recognition election method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878071A (en) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 A kind of block chain common recognition mechanism based on Raft algorithms
CN107395353A (en) * 2017-04-24 2017-11-24 阿里巴巴集团控股有限公司 A kind of block chain common recognition method and device
CN107317672A (en) * 2017-05-10 2017-11-03 广东网金控股股份有限公司 A kind of light weight terminating machine block catenary system
CN107341660A (en) * 2017-05-27 2017-11-10 唐盛(北京)物联技术有限公司 A kind of block chain bottom common recognition mechanism and the block catenary system based on the common recognition mechanism
CN107423961A (en) * 2017-07-11 2017-12-01 北京泛融科技有限公司 A kind of optimization common recognition method based on random correlation analysis
CN108133420A (en) * 2018-01-10 2018-06-08 杭州复杂美科技有限公司 A kind of commission common recognition method of block chain

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11907174B2 (en) 2019-09-27 2024-02-20 Cypherium Blockchain Inc. Systems and methods for managing data generation, storage, and verification in a distributed system having a committee of validator nodes

Also Published As

Publication number Publication date
CN108133420B (en) 2020-09-11
CN108133420A (en) 2018-06-08

Similar Documents

Publication Publication Date Title
WO2019137282A1 (en) Block chain delegation consensus method
US11636450B2 (en) Blockchain system to which proof-of-transaction consensus algorithm is applied, and method therefor
CN108108487B (en) A kind of common recognition method of block chain
CN109426952B (en) Block chain structure
Everett Origins and development of credit-based crowdfunding
US20210209885A1 (en) A system and a method for achieving consensus between multiple parties on an event
CN108805627B (en) Media resource allocation method, device, system, medium and equipment
CN109639430B (en) Safe high-speed lightweight block chain system and method
US20160224949A1 (en) Temporary consensus subnetwork in a distributed network for payment processing
CN113407632A (en) PBFT (proxy-based policy and authorization-based ft) trust certification block chain consensus algorithm
Pirani Russo-Ukrainian gas wars and the call on transit governance
KR20190050163A (en) Mutual Finance Platform and Implement Method thereof based on Block Chain
Savolainen et al. Too Big to Cheat: Mining Pools' Incentives to Double Spend in Blockchain Based Cryptocurrencies
Lee et al. Project management model based on consistency strategy for blockchain platform
Yu et al. Low powered blockchain consensus protocols based on consistent hash
Xiao et al. Proof of importance: A consensus algorithm for importance based on dynamic authorization
CN111490994B (en) Consensus mechanism method for combining DPOS between block link point groups and POW in node group
CN110278091B (en) Internet of things block chain consensus method
WO2024127686A1 (en) Blockchain system that prevents steep decline in value of coins while suppressing fluctuation of same and computer program
CN116452334B (en) Multi-carbon transaction method and system for industrial park based on blockchain
CN111539822A (en) Random multi-asset equity pledge consensus method
Dolev et al. Rationality authority for provable rational behavior
Ray et al. A mechanism design approach to blockchain protocols
Bertucci Where do Blockchains Fit in the History of Financial Institutions?
Pappu Demand side management using blockchain for distributed networks

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19739146

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19739146

Country of ref document: EP

Kind code of ref document: A1