



技术领域technical field
本发明涉及区块链技术领域,更具体地,涉及一种基于可验证随机函数分配验证者奖励的异步BFT&DPOS共识机制。The present invention relates to the technical field of block chain, and more specifically, relates to an asynchronous BFT&DPOS consensus mechanism that distributes verifier rewards based on a verifiable random function.
背景技术Background technique
区块链技术的出现被称为新一代革命,区块链技术的出现让分布式系统和分布式应用得以蓬勃发展,区块链技术是多门技术和学科的综合,而在决定一个区块链分布式系统好坏的区块链技术里最重要的便是共识机制,共识机制是区块链分布式系统安全性和能够良好发展的核心技术。The emergence of blockchain technology is called a new generation of revolution. The emergence of blockchain technology allows distributed systems and distributed applications to flourish. The most important thing in the blockchain technology of chain distributed system is the consensus mechanism. The consensus mechanism is the core technology for the security and good development of the blockchain distributed system.
区块链系统是去中心化的,节点是各处分散且平行的,所以必须设计一套制度,来维护分布式系统的运作顺序与公平性,统一区块链的版本,并奖励提供资源维护区块链的使用者,以及惩罚恶意的危害者。这样的制度,必须依赖某种方式来证明,是由谁来取得了一个区块链的打包权(或称记帐权),并且可以获取打包这一个区块的奖励;又或者是谁意图进行危害,就会获得一定的惩罚,让分布式系统运转的制度便被称为共识机制,共识机制背景问题是拜占庭问题,在一个分布式去中心化的网络中,节点如何达成共识,保持数据一致,维护系统运行。区块链在经过约10年发展后,目前被公认为三大主流共识机制分别是以比特币为代表的POW共识机制,以以太坊为代表的POS共识机制,以及以EOS为代表的DPOS共识机制。The blockchain system is decentralized, and the nodes are scattered and parallel everywhere, so a system must be designed to maintain the order and fairness of the distributed system's operations, unify the version of the blockchain, and reward the provision of resource maintenance Users of the blockchain, and punishing malicious harmers. Such a system must rely on some way to prove that who has obtained the packaging right (or bookkeeping right) of a blockchain, and can obtain the reward for packaging this block; or who intends to carry out Harm, you will get a certain punishment. The system that makes the distributed system operate is called the consensus mechanism. The background problem of the consensus mechanism is the Byzantine problem. In a distributed decentralized network, how do nodes reach a consensus and keep data consistent? , to maintain system operation. After about 10 years of development, the blockchain is currently recognized as three mainstream consensus mechanisms, namely the POW consensus mechanism represented by Bitcoin, the POS consensus mechanism represented by Ethereum, and the DPOS consensus represented by EOS. mechanism.
目前市值前十的名为EOS的区块链分布式系统是由Block.one公司主导开发的高性能区块链底层操作系统,而EOS采取的共识机制是DPOS(委托权益证明)共识机制。DPOS共识机制通过去中心化的投票机制,投票选举出21位超级节点,21位超级节点代表全体EOS持有者履行权利和义务。超级节点被赋予记账权,收集交易信息将其打包进区块,并将区块广播给其他超级节点,通过验证后再将区块上传至区块链,获得相应的奖励。DPOS(委托权益证明)机制,是在PoS基础上优化而来的,通过投票选举的方式,选出生产者,代表他们履行权利和义务,而不是用算力来决定。如果生产者不称职,随时可能会被持币人投票出局。The current top ten blockchain distributed system named EOS is a high-performance blockchain underlying operating system developed by Block.one, and the consensus mechanism adopted by EOS is the DPOS (Delegated Proof of Stake) consensus mechanism. The DPOS consensus mechanism votes for 21 supernodes through a decentralized voting mechanism, and the 21 supernodes perform their rights and obligations on behalf of all EOS holders. Supernodes are given the right to bookkeeping, collect transaction information, package it into blocks, and broadcast the blocks to other supernodes, and then upload the blocks to the blockchain after verification to obtain corresponding rewards. The DPOS (Delegated Proof of Stake) mechanism is optimized on the basis of PoS. Through voting, producers are elected to fulfill their rights and obligations on their behalf, rather than being determined by computing power. If the producer is incompetent, he may be voted out by the token holders at any time.
现有的EOS设计的DPOS共识机制的奖励分配设置不合理,现有的EOS在10亿代币总量的基础上,采用领取时触发的连续增发方式,每年增发近似5%。增发的EOS代币用于节点奖励和提案基金两方面,其中节点奖励占五分之一,即EOS系统里增发的5%的代币里面,有1%的代币为节点奖励,剩下的4%为提案基金。在1%的节点奖励里又具体细分为两种奖励,一是超级节点出块奖励,二是超级节点和备用节点的得票率奖励。出块奖励占1%的四分之一,也就是每年增发的5%EOS代币里面有0.25%作为出块的奖励给到超级节点,每年增发的5%EOS代币里面有0.75%会作为得票奖励给到超级节点和备用节点,得票率奖励的分配规则是按照得票率占比来进行奖励分配,当得票率占比过低,导致备用节点实际领取的投票奖励不足100个EOS代币,则此备用节点无法获取投票奖励。The reward distribution setting of the DPOS consensus mechanism designed by the existing EOS is unreasonable. On the basis of the total amount of 1 billion tokens, the existing EOS adopts the continuous issuance method triggered when receiving, and the annual issuance is approximately 5%. The newly issued EOS tokens are used for node rewards and proposal funds, among which node rewards account for one-fifth, that is, among the 5% of the newly issued tokens in the EOS system, 1% of the tokens are node rewards, and the rest 4% for proposal funds. In the 1% node reward, it is subdivided into two types of rewards, one is the super node block reward, and the other is the vote rate reward for super nodes and backup nodes. Block rewards account for a quarter of 1%, that is, 0.25% of the 5% EOS tokens issued each year will be given to super nodes as block rewards, and 0.75% of the 5% EOS tokens issued each year will be used as Vote rewards are given to supernodes and standby nodes. The distribution rule for vote rate rewards is to distribute rewards according to the proportion of votes. When the proportion of votes is too low, the actual voting rewards received by the standby nodes are less than 100 EOS tokens. Then this standby node cannot get voting rewards.
由于现有的EOS系统的DPOS共识机制的惩罚机制不及时,导致EOS系统存在安全隐患。当超级节点串通对EOS系统发动攻击时,例如通过验证虚假交易、打包虚假交易、生产包含这些虚假交易的区块、同时打包多个区块和双花攻击等手段,会对EOS系统造成了不可挽回的损失,使持币者的利益蒙受了巨大的损失。Due to the untimely punishment mechanism of the DPOS consensus mechanism of the existing EOS system, there are security risks in the EOS system. When super nodes collude to launch attacks on the EOS system, such as by verifying false transactions, packaging false transactions, producing blocks containing these false transactions, packing multiple blocks at the same time, and double-spend attacks, etc., it will cause unbearable damage to the EOS system. The recovered losses have caused huge losses to the interests of the currency holders.
即使系统或者说用户发现超级节点的串通行为,但对攻击者的惩罚或者说对系统的维护是后置性的,即使最后持币者投票把作恶的攻击者投出了超级节点,对攻击者造成了惩罚,维护了EOS系统的稳定,但攻击者造成的损失已经无法挽回,因此EOS系统本身的安全和EOS系统用户的利益无法及时得到保障。Even if the system or users discover the collusion of the super node, the punishment for the attacker or the maintenance of the system is post-secondary. Punishment has been caused to maintain the stability of the EOS system, but the losses caused by the attackers have been irreparable, so the security of the EOS system itself and the interests of EOS system users cannot be guaranteed in time.
发明内容Contents of the invention
本发明为克服上述现有技术中EOS系统的DPOS共识机制的惩罚机制不及时的问题,提供一种基于可验证随机函数分配验证者奖励的异步BFT&DPOS共识机制。In order to overcome the problem that the penalty mechanism of the DPOS consensus mechanism of the EOS system in the above-mentioned prior art is not timely, the present invention provides an asynchronous BFT&DPOS consensus mechanism that distributes verifier rewards based on a verifiable random function.
为解决上述技术问题,本发明采用的技术方案是:一种基于可验证随机函数分配验证者奖励的异步BFT&DPOS共识机制,包括以下步骤:In order to solve the above-mentioned technical problems, the technical solution adopted by the present invention is: an asynchronous BFT&DPOS consensus mechanism that distributes verifier rewards based on verifiable random functions, including the following steps:
S1:系统初始化,在VBDPOS共识机制里,想要成为节点候选人的申请人通过提交设备、设施、人员资料说明和证明,候选人通过申请后成为节点;S1: System initialization. In the VBDPOS consensus mechanism, the applicant who wants to become a node candidate submits equipment, facilities, personnel information and proof, and the candidate becomes a node after passing the application;
S2:选出超级节点,代币持有者通过投票系统对各个节点候选人进行投票,根据票数排名选出票数最高的21个节点为超级节点,每生产252个区块为一个区块周期,每一个区块周期开始时,都会实时更新投票数,对超级节点和验证者排名进行更新;S2: Select super nodes. Token holders vote for each node candidate through the voting system. According to the ranking of votes, the 21 nodes with the highest number of votes are selected as super nodes. Every 252 blocks are produced as a block cycle. At the beginning of each block cycle, the number of votes will be updated in real time, and the ranking of super nodes and verifiers will be updated;
S3:选出验证者,当备用节点满足以下的三个条件,即可申请成为验证者,参与系统的区块验证和确认工作;三个条件为:备用节点获取的票数权重须大于系统X%的总票数,X%为根据网络得票率实时计算的能领取100EOS奖励的最低票数权重;参与验证的备用节点需锁仓一定数量的EOS保证金到特定账户,保证金提交的特定账户可以是权威机构的指定账户,或者由智能合约保证的特定账户;验证者需持续和所有超级节点和其他验证者保持实时通信状态;S3: Select a validator. When the standby node meets the following three conditions, it can apply to become a validator and participate in the block verification and confirmation of the system; the three conditions are: the weight of votes obtained by the standby node must be greater than X% of the system X% is the weight of the minimum number of votes that can receive 100 EOS rewards calculated in real time based on the vote rate of the network; the backup nodes participating in the verification need to lock a certain amount of EOS deposits to a specific account, and the specific account submitted by the deposit can be an authoritative organization Designated account, or a specific account guaranteed by a smart contract; the verifier needs to maintain real-time communication with all super nodes and other verifiers;
S4:区块的产生,与异步BFT-DPOS共识机制一致,在一轮区块生产过程中,超级节点会按照规定的算法安排好顺序生产区块,当前负责出块的超级节点会收集交易信息将其打包进区块,并将打包好的区块广播给其他超级节点和验证者验证,在等待区块确认的过程中,会同时产生新区块;如果一个节点在最近的24个小时内都没有产生区块,那么它将被移出超级节点的候选名单;S4: The generation of blocks is consistent with the asynchronous BFT-DPOS consensus mechanism. During a round of block production, the supernodes will arrange the production of blocks in accordance with the prescribed algorithm, and the current supernodes responsible for producing blocks will collect transaction information Pack it into a block, and broadcast the packed block to other super nodes and verifiers for verification. While waiting for block confirmation, a new block will be generated at the same time; If no block is generated, it will be removed from the super node candidate list;
S5:区块的确认,其他超级节点和验证者会对新区块进行验证,并把验证和签名结果广播,当负责出块的超级节点在广播后会持续监听网络,收集到15个超级节点的签名确认和超过2/3验证者的签名确认和凭证后,超级节点和验证者会根据不同的情况,按照VBDPOS共识机制的区块确认方案,来做出不用的选择;S5: Confirmation of the block. Other super nodes and verifiers will verify the new block, and broadcast the verification and signature results. When the super node in charge of block production will continue to monitor the network after broadcasting, the 15 super nodes will be collected. After the signature confirmation and signature confirmation and credentials of more than 2/3 verifiers, super nodes and verifiers will make different choices according to the block confirmation scheme of the VBDPOS consensus mechanism according to different situations;
S6:奖励的分配,根据基于可验证随机函数挑选获奖者的奖励分发机制,每一轮区块确认完成后,系统内的节点都会比较出一个最小凭证,对最小凭证达成共识,而持有最小凭证的验证者即是此轮区块的获奖者,可以获得这轮区块的验证奖励;S6: The distribution of rewards, according to the reward distribution mechanism based on verifiable random function selection of winners, after each round of block confirmation, the nodes in the system will compare a minimum certificate, reach a consensus on the minimum certificate, and hold the minimum The verifier of the certificate is the winner of this round of blocks, and can get the verification reward of this round of blocks;
S7:超级节点的切换,在区块的产生过程中,如果属于A超级节点的12个区块内,则上一个区块没确认时,A超级节点便会开始生产下一个区块,因为A超级节点可以相信自己没有作假。但如果A超级节点生产完12个区块,轮到B超级节点生产区块时,B超级节点会等到自己确认A超级节点的第12个区块已经获得其他15个超级节点和验证者确认后才会接着生产区块。S7: Switching of super nodes, in the process of block generation, if it belongs to the 12 blocks of A super node, when the previous block is not confirmed, A super node will start to produce the next block, because A Super nodes can believe that they have not cheated. But if A supernode has produced 12 blocks, when it is the turn of B supernode to produce blocks, B supernode will wait until it confirms that the 12th block of A supernode has been confirmed by other 15 supernodes and verifiers Blocks will then be produced.
需要说明的是,步骤S3可以与步骤S4同时进行,但是步骤S4需在步骤S5之前。It should be noted that step S3 can be performed simultaneously with step S4, but step S4 needs to be performed before step S5.
优选地,在步骤S5中,设所有验证者数量为Nall,2/3验证者数量为N2/3,区块高度为第r轮,第r轮产生的区块为B1,第r+1轮产生的区块为B2,第r轮的种子参数为Qr,负责出块的超级节点为A超级节点,设某个时刻A超级节点收到的验证者签名和凭证数量为X,VBDPOS区块的确认具体步骤如下:Preferably, in step S5, it is assumed that the number of all validators is Nall , the number of 2/3 validators is N2/3 , the block height is the rth round, the block generated in the rth round is B1, and the r+th round is B1. The block generated in the first round is B2, the seed parameter of the rth round is Qr , and the supernode responsible for generating the block is A supernode. Let the number of validator signatures and certificates received by A supernode be X at a certain time, VBDPOS The specific steps of block confirmation are as follows:
s51:区块、种子参数的生产与广播,第r-1轮的最小凭证Qr,即为第r轮的种子参数Qr,在第r轮区块生产过程中,超级节点会按照规定的算法安排好顺序生产区块,当前负责出块的超级节点会收集交易信息将其打包进区块,并将打包好的区块B1和此轮区块的种子参数Qr,广播给其他超级节点和验证者验证,在等待区块确认的过程中,会同时产生新区块B2;s51: Production and broadcasting of blocks and seed parameters. The minimum credential Qr of round r-1 is the seed parameter Qr of round r. During the block production process of round r, super nodes will The algorithm arranges the blocks to be produced sequentially, and the current supernode responsible for producing blocks will collect transaction information and package it into a block, and broadcast the packaged block B1 and the seed parameter Qr of this round of blocks to other supernodes Verified with the verifier, while waiting for the block confirmation, a new block B2 will be generated at the same time;
s52:区块的验证与凭证的生成,系统里的超级节点和验证者时刻在线,监听着网络,当他们收到新区块B1和种子参数Qr后,首先会根据基于可验证随机函数挑选获奖者的算法流程生成各自的凭证;其次各自独立对区块B1进行验证,确保交易信息无误和无作假后。s52: Block verification and certificate generation. The super nodes and verifiers in the system are always online and monitor the network. When they receive the new block B1 and the seed parameter Qr , they will first select winners based on a verifiable random function. The algorithm process of the previous party generates their own vouchers; secondly, each independently verifies the block B1 to ensure that the transaction information is correct and without fraud.
每一个超级节点和验证者会把第r轮的区块B1和各自的「签名+凭证」在网络里广播;Each super node and validator will broadcast the r-th round block B1 and their respective "signature + certificate" in the network;
s53:区块B1得到系统确认,A超级节点在广播区块B1后会持续监听网络,当收集到超过15个超级节点的签名确认和超过2/3验证者的签名确认和凭证后,即可视为区块B1得到了系统确认,超级节点会将区块B1添加到区块链上,将之前生产好的第r+1轮的区块B2和种子参数Qr+1广播,进入第r+1轮的区块确认;区块B1得到系统确认,因为网络延迟的缘故,会有两种不同的处理方式,得到二种不同的处理结果,确保系统正常运行,延迟被控制在一秒以内;A超级节点会时刻判断收集到的超级节点的签名确认数量,一旦超级节点签名确认数量超过(包含)15个,A超级节点会进入计时状态,并判断收集到的验证者的签名确认数量。s53: Block B1 is confirmed by the system. A supernode will continue to monitor the network after broadcasting block B1. After collecting the signature confirmation of more than 15 supernodes and the signature confirmation and credentials of more than 2/3 verifiers, it can As the block B1 has been confirmed by the system, the super node will add the block B1 to the blockchain, broadcast the previously produced block B2 and the seed parameter Qr+1 of the r+1 round, and enter the r+1 round +1 round of block confirmation; block B1 is confirmed by the system, because of network delay, there will be two different processing methods, and two different processing results will be obtained to ensure the normal operation of the system, and the delay is controlled within one second ;A supernode will always judge the number of signature confirmations collected by supernodes. Once the number of signature confirmations of supernodes exceeds (including) 15, A supernodes will enter the timing state and judge the number of signature confirmations collected from verifiers.
优选地,所述步骤s53具体包括:Preferably, the step s53 specifically includes:
1)在进入计时状态时,如果X=Nall,A超级节点会自动比较所有验证者的凭证大小,得出一个最小凭证,第r轮的最小凭证即为第r+1轮的种子参数Qr+1,A超级节点会将区块B1添加到区块链上,将之前生产好的第r+1轮的区块B2和种子参数Qr+1广播,进入第r+1轮的区块确认;1) When entering the timing state, if X=Nall , the A super node will automatically compare the size of the certificates of all verifiers to obtain a minimum certificate, and the minimum certificate of the r round is the seed parameter Q of the r+1 roundr+1 , A super node will add block B1 to the blockchain, broadcast the previously produced block B2 of the r+1 round and the seed parameter Qr+1 , and enter the area of the r+1 round block confirmation;
2)在进入计时状态时,N2/3<X<Nall,A超级节点会等待一秒,在一秒计时的任意时刻收集齐Nall个验证者签名数量,A超级节点会自动比较所有验证者的凭证大小,得出一个最小凭证,第r轮的最小凭证即为第r+1轮的种子参数Qr+1,接着A超级节点会将区块B1添加到区块链上,将之前生产好的第r+1轮的区块B2和种子参数Qr+1广播,进入第r+1轮的区块确认;2) When entering the timing state, N2/3 <X<Nall , the A supernode will wait for one second, and collect Nall validator signatures at any time of one second, and the A supernode will automatically compare all The credential size of the verifier can be used to obtain a minimum credential. The minimum credential of the rth round is the seed parameter Q r+1 of the r+1 round. Then A super node will add the block B1 to the blockchain, and the The previously produced block B2 of the r+1 round and the seed parameter Qr+1 broadcast, and enter the block confirmation of the r+1 round;
3)在进入计时状态时,如果X<N2/3,A超级节点会等待一秒,在一秒计时后未收集齐Nall个验证者签名数量,但在一秒计时后结算时,已收集验证者签名数量超过(包含)N2/3,A超级节点会自动比较已收集的验证者的凭证大小,得出一个最小凭证,第r轮的最小凭证即为第r+1轮的种子参数Qr+1,接着A超级节点会将区块B1添加到区块链上,将之前生产好的第r+1轮的区块B2和种子参数Qr+1广播,进入第r+1轮的区块确认。3) When entering the timing state, if X<N2/3 , A super node will wait for one second, and has not collected Nall validator signatures after one second timing, but when it is settled after one second timing, it has If the number of collected verifier signatures exceeds (includes) N2/3 , the A supernode will automatically compare the size of the collected verifier’s certificates to obtain a minimum certificate, and the minimum certificate of the r round is the seed of the r+1 round Parameter Qr+1 , then A super node will add block B1 to the blockchain, broadcast block B2 and seed parameter Qr+1 of the r+1 round produced before, and enter r+1 round of block confirmations.
4)在进入计时状态时,如果X<N2/3,A超级节点会等待一秒,在一秒计时后未收集齐N2/3个验证者签名数量,则会视为区块链系统出现了问题,验证者行使了验证权使区块无法确认,或者验证者遭受了攻击,区块停止生产。4) When entering the timing state, if X<N2/3 , A super node will wait for one second, and after one second of timing, it has not collected the number of signatures of N2/3 verifiers, it will be regarded as a blockchain system Something went wrong, the verifier exercised the right to verify the block and the block could not be confirmed, or the verifier was attacked, and the block production stopped.
在上述技术方案中,在区块的确认这一步,引入验证者后,区块的确认由之前的只需15个超级节点验证和确认,变成了需要15个超级节点和超过2/3验证者验证和确认,比起现有的基于DPOS共识机制的系统,基于VBDPOS共识机制的系统的安全性大大提高了,问题在于当前区块需要的验证和确认数量增多,会影响区块链系统里的下一个区块的产生(每一个区块都是在上一个区块基础上产生的),所以VBDPOS共识机制里,新设计了确认区块的方案,使VBDPOS共识机制在提高了系统安全性的基础上,使系统的性能不会受到过多的印象,因为在方案设计里,系统正常运行时,延迟被控制在一秒之内,而这个出块效率在区块链领域,可以满足商业需求,足以投入商业使用。In the above technical solution, in the step of block confirmation, after the introduction of verifiers, the confirmation of the block has changed from requiring only 15 super nodes to verify and confirm, to requiring 15 super nodes and more than 2/3 verification Compared with the existing system based on DPOS consensus mechanism, the security of the system based on VBDPOS consensus mechanism is greatly improved. The problem is that the number of verification and confirmation required by the current block increases, which will affect the blockchain system. The generation of the next block (each block is generated on the basis of the previous block), so in the VBDPOS consensus mechanism, a new scheme for confirming blocks is designed, so that the VBDPOS consensus mechanism can improve system security Based on this, the performance of the system will not be too impressed, because in the scheme design, when the system is running normally, the delay is controlled within one second, and this efficiency of block generation in the blockchain field can satisfy business demand, sufficient for commercial use.
验证者是强制在线的和强制要求参与每一轮的区块确认的,但系统不会因为验证者出现问题而宕机,而是会继续稳定运行。在现有的网络状态中,一秒是足够所有节点对同一个凭证同步完毕的时间,在参与验证的过程中,A验证者的签名确认和凭证在一秒内没有被正在生产的超级节点收到,就会视作A验证者缺席此轮区块确认。也就是如果这两种情况发生了,A验证者点对点直接发送签名和凭证没有被正在生产的超级节点收到,A验证者随机广播的签名和验证没有被正在生产的超级节点收到,那就视为A验证者缺席了此轮区块确认,无法参与此轮区块生产的获奖者挑选,A会被扣除5%的保证金,这5%的保证金是此轮的验证者奖励,而A验证者会因为保证金不足而被剔除验证者资格,直到A重新提交保证金获得验证者资格,才能在下一轮区块周期参与验证工作和获得验证奖励。不管A验证者是因为什么问题而无法参与验证,A验证者的缺席会对最小凭证的选取造成影响,因为最小凭证会因为验证者的缺席与否发生变化。Verifiers are forced to be online and are required to participate in each round of block confirmation, but the system will not go down due to problems with the verifier, but will continue to operate stably. In the existing network state, one second is enough time for all nodes to complete the synchronization of the same certificate. During the verification process, the signature confirmation and certificate of A verifier are not received by the super node being produced within one second. If it arrives, it will be deemed that A verifier is absent from this round of block confirmation. That is to say, if these two situations happen, the signature and certificate sent directly by A verifier point-to-point are not received by the super node in production, and the signature and verification randomly broadcast by A verifier are not received by the super node in production, then It is considered that verifier A is absent from this round of block confirmation and unable to participate in the winner selection of this round of block production. A will be deducted 5% of the deposit, which is the verifier reward for this round, and A verifier The applicant will be removed from the validator qualification due to insufficient deposit, and will not be able to participate in the verification work and obtain verification rewards in the next round of block cycle until A resubmits the deposit to obtain the validator qualification. No matter what the problem is that verifier A is unable to participate in the verification, the absence of verifier A will affect the selection of the minimum credential, because the minimum credential will change due to the absence of the verifier.
优选地,所述步骤S6具体包括以下步骤:Preferably, the step S6 specifically includes the following steps:
s61:验证者条件满足;s61: The verifier condition is satisfied;
s62:验证者的凭证生成;s62: Credential generation of the verifier;
s63:验证者参与验证工作;s63: The verifier participates in the verification work;
S64:获奖者的挑选和验证过程。S64: Winner selection and verification process.
在本技术方案中,基于可验证随机函数挑选获奖者的奖励分发机制,可以使VBDPOS共识机制的每一轮验证者奖励分配都是随机的、不可预测的,从而对于验证者而言,奖励分配是公平的。此外每一轮区块验证奖励都随机分配有两个优点,一是在奖励上的直观,每一轮的区块验证奖励都是固定数额,不会因为验证者数量增加而减少。二是完全随机分配奖励是自带时间属性的平均分配,验证者不会因为参与区块验证而没被抽中为获奖者就不再参与区块验证,因为只要参与验证的时间足够长,轮数足够多,持续参与,根据大数定律,验证者被抽中为获奖者的频率会接近概率。In this technical solution, the reward distribution mechanism for selecting winners based on a verifiable random function can make each round of the verifier reward distribution of the VBDPOS consensus mechanism random and unpredictable, so that for the verifier, the reward distribution is fair. In addition, each round of block verification rewards is randomly distributed, which has two advantages. One is the intuitiveness of the rewards. The block verification rewards for each round are a fixed amount and will not decrease due to the increase in the number of verifiers. The second is that the completely random allocation of rewards is an average distribution with its own time attribute. The verifier will not participate in the block verification because he is not selected as the winner because he participates in the block verification. If there are enough numbers and continuous participation, according to the law of large numbers, the frequency of validators being selected as winners will be close to the probability.
优选地,在步骤s61中,在一个区块周期开始时,备用节点需满足以下条件才能成为验证者的资格,条件如下:Preferably, in step s61, at the beginning of a block period, the standby node must meet the following conditions to become a validator, and the conditions are as follows:
a:备用节点获取的票数权重须大于系统X%的总票数,X%为实时计算的能领取100EOS奖励的最低票数权重;a: The weight of votes obtained by the standby node must be greater than X% of the total votes in the system, and X% is the minimum vote weight calculated in real time to receive 100EOS rewards;
b:参加验证的备用节点需锁仓一定量的EOS保证金到特定账户;b: The standby nodes participating in the verification need to lock a certain amount of EOS margin to a specific account;
c:验证者需持续和所有超级节点和其他验证者保持实时通信状态。c: The verifier needs to maintain real-time communication with all super nodes and other verifiers.
在本技术方案中,不满足条件的备用节点,即使参与了验证过程(发送签名和凭证),不会被超级节点和系统认可,也无法获得奖励。票数必须有一定的要求,因为验证工作并不需要太大的门槛,从健康的共识机制这个角度而言,验证工作是为了给备用节点分配奖励的手段,为了让奖励给到有贡献的备用节点,所以要对备用节点有限定要求。In this technical solution, even if a backup node that does not meet the conditions participates in the verification process (sending signature and certificate), it will not be recognized by the super node and the system, and will not be rewarded. There must be certain requirements for the number of votes, because the verification work does not require too much threshold. From the perspective of a healthy consensus mechanism, the verification work is a means of distributing rewards to backup nodes, in order to allow rewards to be given to contributing backup nodes. , so there are limited requirements for the standby nodes.
优选地,在步骤s62中,VBDPOS共识机制对新区块达成共识的过程和现有DPOS共识机制的区别在于VBDPOS在验证这一步多了验证者资格审核和验证者参与区块验证,VBDPOS会基于当前的种子参数公布一个随机算法,就是可验证的随机函数VRF,VRF一个关键参数是用户的私钥,这个私钥只有用户本人才知道;接着,每个备用节点使用自己的私钥对种子参数签名并输入哈希函数后,得到自己的凭证;凭证通过零知识证明,可以在完全不泄露私钥的基础上,证明某个凭证的所有者拥有权;凭证包含5个特性:Preferably, in step s62, the VBDPOS consensus mechanism differs from the existing DPOS consensus mechanism in the process of reaching a consensus on the new block in that VBDPOS has more verifier qualification review and verifier participation in block verification in the verification step, and VBDPOS will be based on the current Publish a random algorithm for the seed parameter, which is the verifiable random function VRF. A key parameter of VRF is the user's private key, which is known only to the user; then, each backup node uses its own private key to sign the seed parameter And after entering the hash function, you can get your own certificate; the certificate can be proved by zero-knowledge proof, and the owner of a certain certificate can be proved on the basis of not revealing the private key at all; the certificate contains 5 characteristics:
A:种子参数是不断更新的,种子参数不可预测的,所以凭证也是不断更新,凭证是随机数;A: The seed parameters are constantly updated, and the seed parameters are unpredictable, so the credentials are also constantly updated, and the credentials are random numbers;
B.哈希函数和私钥确保每一个凭证的所有人都是特定;B. The hash function and private key ensure that the owner of each certificate is specific;
C.非对称密钥算法和零知识证明确保凭证的所有者可以证明凭证的所有权;C. Asymmetric key algorithm and zero-knowledge proof ensure that the owner of the certificate can prove the ownership of the certificate;
D.凭证不可伪造;D. Credentials cannot be forged;
E.凭证是在本地进行,需要私钥生成却又可以不需要公开私钥的同时全网验证。E. Credentials are performed locally, which requires private key generation but can be verified across the network at the same time without the need to disclose the private key.
优选地,在步骤s63中,当新区块没有公布之前,备用节点只知道自己是否是验证者,无法知道自己是否是获奖者,只有当区块完成生产和验证后,验证者才知道自己是否获得了此轮区块验证的验证奖励;在结果没出来之前,攻击者无法预测凭证,不知道哪个凭证是最小,在结果出来之后,攻击者无法更改历史。Preferably, in step s63, before the new block is announced, the standby node only knows whether it is a verifier, but cannot know whether it is a winner. Only after the block is produced and verified, the verifier knows whether it has won The verification reward for this round of block verification is obtained; before the result comes out, the attacker cannot predict the credential, and does not know which credential is the smallest. After the result comes out, the attacker cannot change the history.
优选地,在步骤s64中,负责此轮区块生产的超级节点A会将区块发送给其他超级节点和备用节点,区块发送采用随机广播和点对点传送的组合方式,所以传播延迟极低,达成共识快,事后能查证。验证过程的验证者会将此轮区块生成的凭证,区块的签名,区块,验证结果广播给所有超级节点和备用节点,新区块在确认过程中,节点会持续监听收集验证结果和凭证,并自动比较凭证大小,挑选出最小凭证,持有最小凭证的验证者就是此轮获奖的验证者,可以获得验证奖励,验证奖励不是及时分发的,根据最小凭证,获奖者虽然知道自己中奖了,但需要等到该区块成为不可逆状态后才能获得奖励。Preferably, in step s64, the supernode A responsible for this round of block production will send the block to other supernodes and backup nodes. The block transmission adopts a combination of random broadcast and point-to-point transmission, so the propagation delay is extremely low. A consensus can be reached quickly and can be verified afterwards. The verifier of the verification process will broadcast the certificate generated by this round of blocks, the signature of the block, the block, and the verification results to all super nodes and backup nodes. During the confirmation process of the new block, the nodes will continue to monitor and collect verification results and certificates , and automatically compare the size of the certificate, and select the smallest certificate. The verifier who holds the smallest certificate is the verifier who wins the award in this round, and can get the verification reward. The verification reward is not distributed in time. According to the smallest certificate, although the winner knows that he has won the prize , but you need to wait until the block becomes irreversible before you can get rewards.
优选地,所述步骤s64主要包括以下步骤:Preferably, said step s64 mainly includes the following steps:
s641:公私钥的生成;s642:签名的实现;s643:签名的验证;s644:种子参数的更新;s645:凭证的生成;s646:选出获奖者;s647:凭证的验证;s648:奖励的分发。s641: generation of public and private keys; s642: realization of signature; s643: verification of signature; s644: update of seed parameters; s645: generation of certificate; s646: selection of winners; s647: verification of certificate; .
在VBDPOS共识机制中,验证者是通过条件筛选的备用节点,验证者一定是备用节点,而备用节点不一定是验证者。系统角色说明如下,用户:发起交易,投票选出备用节点和超级节点;超级节点:收集交易信息将其打包进区块,并将区块广播给其他超级节点,通过验证后再将区块上传至区块链,获得相应的奖励;备用节点:作为超级节点的备用节点,如果在一轮区块生产开始,备用节点的票数排名进入前21,则备用节点会变成超级节点,行使超级节点的权利,完成超级节点的义务,获得超级节点的收益;验证者:是满足条件的备用节点,新增验证权力,会参与区块确认的验证,并且会参与验证奖励的分配。In the VBDPOS consensus mechanism, the verifier is a backup node that is screened by conditions, the verifier must be a backup node, and the backup node is not necessarily a verifier. The system roles are described as follows: User: Initiate transactions, vote for backup nodes and super nodes; Super nodes: collect transaction information, pack it into blocks, broadcast the blocks to other super nodes, and upload the blocks after verification Go to the blockchain and get corresponding rewards; Standby node: As a spare node of a super node, if the number of votes of the spare node ranks in the top 21 at the beginning of a round of block production, the spare node will become a super node and exercise the super node The right to complete the obligations of the super node and obtain the benefits of the super node; the verifier: a backup node that meets the conditions, adds verification power, will participate in the verification of block confirmation, and will participate in the distribution of verification rewards.
与现有技术相比,有益效果是:Compared with the prior art, the beneficial effect is:
VBDPOS共识机制在现有DPOS共识机制的超级节点和备用节点的基础上,引入了“验证者”的角色,让符合特定要求的备用节点成为验证者,验证者的角色引入让备用节点不再闲置,而是会参与区块的验证工作,验证者可以在超级节点串通作恶攻击系统的第一时刻,通过行使验证权使系统停止运行,从而能使基于VBDPOS共识机制的系统能在第一时间阻止攻击者对系统的攻击,解决了系统里惩罚机制不及时的问题,提高了系统的安全性。通过区块确认方案设计,使得VBDPOS共识机制在提高整体安全性的基础上,同时使性能不过多降低,可以满足现有商业要求。通过基于可验证随机函数挑选获奖者的奖励分发机制,实现了奖励随机的、不可预测的、公平的分发。The VBDPOS consensus mechanism introduces the role of "verifier" on the basis of the super node and backup node of the existing DPOS consensus mechanism, so that the backup node that meets specific requirements becomes a verifier, and the introduction of the role of the verifier makes the backup node no longer idle , but will participate in the verification of the block. The verifier can stop the system by exercising the verification right at the first moment when the super node colludes to attack the system, so that the system based on the VBDPOS consensus mechanism can be blocked in the first time. The attacker's attack on the system solves the problem that the punishment mechanism in the system is not timely, and improves the security of the system. Through the design of the block confirmation scheme, the VBDPOS consensus mechanism can meet the existing commercial requirements while improving the overall security without reducing the performance too much. Through the reward distribution mechanism based on verifiable random function selection of winners, the random, unpredictable and fair distribution of rewards is realized.
通过基于可验证随机函数挑选获奖者来分配奖励,会促使备用节点参与区块的验证工作,比起现有的DPOS共识机制备用节点根据得票率就能获得奖励,验证者为了保证验证工作得到共识和认可,验证者必须时刻保持在线和设备可用,这一方面降低了无能力的备用节点利用奖励分配规则漏洞只拿奖励无能力干活的影响,另一方面对诚实并且有贡献的工作者增大了奖励,从而使当系统的超级节点出现故障时,一直在线和保持数据备份的有能力验证者能更加迅速接替故障的超级节点投入工作,使系统稳定运行。By selecting the winners based on a verifiable random function to distribute rewards, it will prompt the backup nodes to participate in the verification of the block. Compared with the existing DPOS consensus mechanism, the backup nodes can get rewards according to the vote rate, and the verifiers can achieve consensus in order to ensure the verification work. And recognition, the verifier must keep online and equipment available at all times, which reduces the impact of incompetent backup nodes using the loopholes in the reward distribution rules to only take rewards and is incapable of working, and on the other hand increases honest and contributing workers. The reward is increased, so that when the super node of the system fails, capable verifiers who are always online and maintain data backup can more quickly take over the failed super node and put it into work, making the system run stably.
现有的DPOS共识机制的投票奖励一方面并不能直接对应备用节点的贡献,其次是奖励过低,使大部分备用节点都是亏损状态,在长期亏损的情况下,备用节点会选择离开EOS,从而降低EOS系统的稳定性和分布式性能。所以VBDPOS共识机制提高了备用节点的奖励,并且通过基于可验证随机函数挑选获奖者来分配奖励,来保证奖励分配的公平性。这会促进备用节点选择为系统工作,而不是离开系统。On the one hand, the voting rewards of the existing DPOS consensus mechanism cannot directly correspond to the contribution of backup nodes. Secondly, the rewards are too low, so that most of the backup nodes are in a state of loss. In the case of long-term losses, the backup nodes will choose to leave EOS. Thereby reducing the stability and distributed performance of the EOS system. Therefore, the VBDPOS consensus mechanism increases the rewards of standby nodes, and distributes rewards by selecting winners based on verifiable random functions to ensure the fairness of reward distribution. This encourages standby nodes to choose to work for the system rather than leave it.
VBDPOS共识机制极大地提高了区块链系统的抗恶意分叉能力,VBDPOS共识机制比起现有DPOS共识机制的差别是,在区块的验证和确认这一步,不再是由超级节点完成,而是由超级节点和验证者同时参与。验证者不参与区块的生产,但参与区块的验证和确认。当超级节点作恶/不作为/串通勾结等攻击行为出现后,独立的验证者能第一时间给出“不确认”的区块签名确认,使作恶区块无法生效,从而第一时间防止系统遭受攻击,保护系统的安全和系统用户的利益。The VBDPOS consensus mechanism has greatly improved the anti-malicious fork capability of the blockchain system. The difference between the VBDPOS consensus mechanism and the existing DPOS consensus mechanism is that the verification and confirmation of the block is no longer completed by the super node. Instead, supernodes and validators participate simultaneously. Verifiers do not participate in the production of blocks, but participate in the verification and confirmation of blocks. When supernodes do evil/inaction/collusion and other attacks, independent verifiers can give "unconfirmed" block signature confirmation at the first time, so that the evil block cannot take effect, so as to prevent the system from being damaged at the first time. attack, to protect the security of the system and the interests of system users.
VBDPOS共识机制提高了系统安全性,且不对系统性能有过多影响,能投入商业使用。The VBDPOS consensus mechanism improves system security without too much impact on system performance and can be put into commercial use.
安全性能的提高往往象征着成本的付出,比如比特币系统里为了保障POW共识机制的安全性,不惜让矿工花费大量电力和设备等资源来保证比特币系统的稳定运行,不被攻击。但VBDPOS共识机制是在小幅度提高成本的同时,大幅度地提高了系统的安全性能。因为VBDPOS机制是更好地利用了已有资源,充分挖掘了备用节点的价值,相比起现有EOS的节点,VBDPOS共识机制的节点的要求和DPOS共识机制的节点要求一致,无需增加其余的硬件和设备。VBDPOS多花费的成本仅仅是通讯成本和计算成本,而通讯成本仅仅是简单的收发信息,计算成本主要是对哈希函数的计算和验证,两项成本都无需花费大量资源,使用家用计算机和家用网络都能完成,因此VBDPOS共识机制在大幅度提高安全性的时候,并没有大幅度的提高成本,仅仅是网络通讯费用和小电力成本的小幅度增加。The improvement of security performance often symbolizes the payment of costs. For example, in order to ensure the security of the POW consensus mechanism in the Bitcoin system, miners will spend a lot of resources such as electricity and equipment to ensure the stable operation of the Bitcoin system and not be attacked. However, the VBDPOS consensus mechanism greatly improves the security performance of the system while slightly increasing the cost. Because the VBDPOS mechanism makes better use of existing resources and fully taps the value of spare nodes. Compared with the existing EOS nodes, the requirements of the nodes of the VBDPOS consensus mechanism are consistent with those of the DPOS consensus mechanism, and there is no need to add the rest hardware and equipment. The extra cost of VBDPOS is only the communication cost and calculation cost, and the communication cost is simply sending and receiving information, and the calculation cost is mainly the calculation and verification of the hash function. Both costs do not need to spend a lot of resources. Using a home computer and home The network can be completed, so when the VBDPOS consensus mechanism greatly improves the security, it does not greatly increase the cost, but only a small increase in network communication costs and small electricity costs.
VBDPOS共识机制不仅具有安全性,而且它的安全性具有成长性,区块链通证的价格提高和验证者数量增多,会增加基于VBDPOS共识机制的区块链系统的安全性,通证价格的提高会直接提高VBDPOS抗恶意分叉能力,也会吸引更多验证者,从而间接提高VBDPOS抗恶意分叉能力,因此VBDPOS共识机制比起现有的DPOS共识机制不仅具备更高的安全性能,而且安全性具有更高的成长性。The VBDPOS consensus mechanism is not only safe, but also has growth potential. The increase in the price of the blockchain token and the increase in the number of verifiers will increase the security of the blockchain system based on the VBDPOS consensus mechanism, and the price of the token will increase. The improvement will directly improve the ability of VBDPOS to resist malicious forks, and will also attract more verifiers, thereby indirectly improving the ability of VBDPOS to resist malicious forks. Therefore, the VBDPOS consensus mechanism not only has higher security performance than the existing DPOS consensus mechanism, but also Security has higher growth potential.
附图说明Description of drawings
图1是本发明基于可验证随机函数分配验证者奖励的异步BFT&DPOS共识机制的流程图;Fig. 1 is a flowchart of the asynchronous BFT&DPOS consensus mechanism of the present invention based on verifiable random function distribution of validator rewards;
图2是本发明中VBDPOS共识机制区块确认流程图;Fig. 2 is a block confirmation flow chart of the VBDPOS consensus mechanism in the present invention;
图3是本发明中基于VRF挑选获奖者的逻辑流程图;Fig. 3 is the logical flowchart of selecting winners based on VRF among the present invention;
图4是本发明实施例中基于可验证函数挑选获奖者的流程图。Fig. 4 is a flowchart of selecting winners based on verifiable functions in an embodiment of the present invention.
具体实施方式Detailed ways
附图仅用于示例性说明,不能理解为对本专利的限制;为了更好说明本实施例,附图某些部件会有省略、放大或缩小,并不代表实际产品的尺寸;对于本领域技术人员来说,附图中某些公知结构及其说明可能省略是可以理解的。附图中描述位置关系仅用于示例性说明,不能理解为对本专利的限制。The accompanying drawings are for illustrative purposes only, and should not be construed as limitations on this patent; in order to better illustrate this embodiment, certain components in the accompanying drawings will be omitted, enlarged or reduced, and do not represent the size of the actual product; for those skilled in the art It is understandable that some well-known structures and descriptions thereof may be omitted in the drawings. The positional relationship described in the drawings is for illustrative purposes only, and should not be construed as a limitation on this patent.
本发明实施例的附图中相同或相似的标号对应相同或相似的部件;在本发明的描述中,需要理解的是,若有术语“上”、“下”、“左”、“右”“长”“短”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此附图中描述位置关系的用语仅用于示例性说明,不能理解为对本专利的限制,对于本领域的普通技术人员而言,可以根据具体情况理解上述术语的具体含义。In the drawings of the embodiments of the present invention, the same or similar symbols correspond to the same or similar components; The orientation or positional relationship indicated by "long" and "short" are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific Orientation, construction and operation in a specific orientation, so the terms describing the positional relationship in the drawings are for illustrative purposes only, and should not be construed as limitations on this patent. For those of ordinary skill in the art, it can be understood according to specific circumstances The specific meaning of the above terms.
下面通过具体实施例,并结合附图,对本发明的技术方案作进一步的具体描述:Below by specific embodiment, in conjunction with accompanying drawing, the technical solution of the present invention is described in further detail:
实施例1Example 1
如图1所示,一种基于可验证随机函数分配验证者奖励的异步BFT&DPOS共识机制,包括以下步骤:As shown in Figure 1, an asynchronous BFT&DPOS consensus mechanism that distributes verifier rewards based on verifiable random functions includes the following steps:
S1:系统初始化,在VBDPOS共识机制里,想要成为节点候选人的申请人通过提交设备、设施、人员资料说明和证明,候选人通过申请后成为节点;S1: System initialization. In the VBDPOS consensus mechanism, the applicant who wants to become a node candidate submits equipment, facilities, personnel information and proof, and the candidate becomes a node after passing the application;
S2:选出超级节点,代币持有者通过投票系统对各个节点候选人进行投票,根据票数排名选出票数最高的21个节点为超级节点,每生产252个区块为一个区块周期,每一个区块周期开始时,都会实时更新投票数,对超级节点和验证者排名进行更新;S2: Select super nodes. Token holders vote for each node candidate through the voting system. According to the ranking of votes, the 21 nodes with the highest number of votes are selected as super nodes. Every 252 blocks are produced as a block cycle. At the beginning of each block cycle, the number of votes will be updated in real time, and the ranking of super nodes and verifiers will be updated;
S3:选出验证者,当备用节点满足以下的三个条件,即可申请成为验证者,参与系统的区块验证和确认工作;三个条件为:备用节点获取的票数权重须大于系统X%的总票数,X%为根据网络得票率实时计算的能领取100EOS奖励的最低票数权重;参与验证的备用节点需锁仓一定数量的EOS保证金到特定账户,保证金提交的特定账户可以是权威机构的指定账户,或者由智能合约保证的特定账户;验证者需持续和所有超级节点和其他验证者保持实时通信状态;S3: Select a validator. When the standby node meets the following three conditions, it can apply to become a validator and participate in the block verification and confirmation of the system; the three conditions are: the weight of votes obtained by the standby node must be greater than X% of the system X% is the weight of the minimum number of votes that can receive 100 EOS rewards calculated in real time based on the vote rate of the network; the backup nodes participating in the verification need to lock a certain amount of EOS deposits to a specific account, and the specific account submitted by the deposit can be an authoritative organization Designated account, or a specific account guaranteed by a smart contract; the verifier needs to maintain real-time communication with all super nodes and other verifiers;
S4:区块的产生,与异步BFT-DPOS共识机制一致,在一轮区块生产过程中,超级节点会按照规定的算法安排好顺序生产区块,当前负责出块的超级节点会收集交易信息将其打包进区块,并将打包好的区块广播给其他超级节点和验证者验证,在等待区块确认的过程中,会同时产生新区块;如果一个节点在最近的24个小时内都没有产生区块,那么它将被移出超级节点的候选名单;S4: The generation of blocks is consistent with the asynchronous BFT-DPOS consensus mechanism. During a round of block production, the supernodes will arrange the production of blocks in accordance with the prescribed algorithm, and the current supernodes responsible for producing blocks will collect transaction information Pack it into a block, and broadcast the packed block to other super nodes and verifiers for verification. While waiting for block confirmation, a new block will be generated at the same time; If no block is generated, it will be removed from the super node candidate list;
S5:区块的确认,其他超级节点和验证者会对新区块进行验证,并把验证和签名结果广播,当负责出块的超级节点在广播后会持续监听网络,收集到15个超级节点的签名确认和超过2/3验证者的签名确认和凭证后,超级节点和验证者会根据不同的情况,按照VBDPOS共识机制的区块确认方案,来做出不用的选择;S5: Confirmation of the block. Other super nodes and verifiers will verify the new block, and broadcast the verification and signature results. When the super node in charge of block production will continue to monitor the network after broadcasting, the 15 super nodes will be collected. After the signature confirmation and signature confirmation and credentials of more than 2/3 verifiers, super nodes and verifiers will make different choices according to the block confirmation scheme of the VBDPOS consensus mechanism according to different situations;
S6:奖励的分配,根据基于可验证随机函数挑选获奖者的奖励分发机制,每一轮区块确认完成后,系统内的节点都会比较出一个最小凭证,对最小凭证达成共识,而持有最小凭证的验证者即是此轮区块的获奖者,可以获得这轮区块的验证奖励;S6: The distribution of rewards, according to the reward distribution mechanism based on verifiable random function selection of winners, after each round of block confirmation, the nodes in the system will compare a minimum certificate, reach a consensus on the minimum certificate, and hold the minimum The verifier of the certificate is the winner of this round of blocks, and can get the verification reward of this round of blocks;
S7:超级节点的切换,在区块的产生过程中,如果属于A超级节点的12个区块内,则上一个区块没确认时,A超级节点便会开始生产下一个区块,因为A超级节点可以相信自己没有作假。但如果A超级节点生产完12个区块,轮到B超级节点生产区块时,B超级节点会等到自己确认A超级节点的第12个区块已经获得其他15个超级节点和验证者确认后才会接着生产区块。S7: Switching of super nodes, in the process of block generation, if it belongs to the 12 blocks of A super node, when the previous block is not confirmed, A super node will start to produce the next block, because A Super nodes can believe that they have not cheated. But if A supernode has produced 12 blocks, when it is the turn of B supernode to produce blocks, B supernode will wait until it confirms that the 12th block of A supernode has been confirmed by other 15 supernodes and verifiers Blocks will then be produced.
其中,如图2所示,在步骤S5中,设所有验证者数量为Nall,2/3验证者数量为N2/3,区块高度为第r轮,第r轮产生的区块为B1,第r+1轮产生的区块为B2,第r轮的种子参数为Qr,负责出块的超级节点为A超级节点,设某个时刻A超级节点收到的验证者签名和凭证数量为X,VBDPOS区块的确认具体步骤如下:Among them, as shown in Figure 2, in step S5, set the number of all verifiers to be Nall , the number of 2/3 verifiers to be N2/3 , the block height to be the rth round, and the block generated in the rth round to be B1, the block generated in the r+1 round is B2, the seed parameter of the r round is Qr , the super node responsible for block production is A super node, and the validator signature and certificate received by A super node at a certain time The quantity is X, and the specific steps to confirm the VBDPOS block are as follows:
s51:区块、种子参数的生产与广播,第r-1轮的最小凭证Qr,即为第r轮的种子参数Qr,在第r轮区块生产过程中,超级节点会按照规定的算法安排好顺序生产区块,当前负责出块的超级节点会收集交易信息将其打包进区块,并将打包好的区块B1和此轮区块的种子参数Qr,广播给其他超级节点和验证者验证,在等待区块确认的过程中,会同时产生新区块B2;s51: Production and broadcasting of blocks and seed parameters. The minimum credential Qr of round r-1 is the seed parameter Qr of round r. During the block production process of round r, super nodes will The algorithm arranges the blocks to be produced sequentially, and the current supernode responsible for producing blocks will collect transaction information and package it into a block, and broadcast the packaged block B1 and the seed parameter Qr of this round of blocks to other supernodes Verified with the verifier, while waiting for the block confirmation, a new block B2 will be generated at the same time;
s52:区块的验证与凭证的生成,系统里的超级节点和验证者时刻在线,监听着网络,当他们收到新区块B1和种子参数Qr后,首先会根据基于可验证随机函数挑选获奖者的算法流程生成各自的凭证;其次各自独立对区块B1进行验证,确保交易信息无误和无作假后。s52: Block verification and certificate generation. The super nodes and verifiers in the system are always online and monitor the network. When they receive the new block B1 and the seed parameter Qr , they will first select winners based on a verifiable random function. The algorithm process of the previous party generates their own vouchers; secondly, each independently verifies the block B1 to ensure that the transaction information is correct and without fraud.
每一个超级节点和验证者会把第r轮的区块B1和各自的「签名+凭证」在网络里广播;Each super node and validator will broadcast the r-th round block B1 and their respective "signature + certificate" in the network;
s53:区块B1得到系统确认,A超级节点在广播区块B1后会持续监听网络,当收集到超过15个超级节点的签名确认和超过2/3验证者的签名确认和凭证后,即可视为区块B1得到了系统确认,超级节点会将区块B1添加到区块链上,将之前生产好的第r+1轮的区块B2和种子参数Qr+1广播,进入第r+1轮的区块确认;区块B1得到系统确认,因为网络延迟的缘故,会有两种不同的处理方式,得到二种不同的处理结果,确保系统正常运行,延迟被控制在一秒以内;A超级节点会时刻判断收集到的超级节点的签名确认数量,一旦超级节点签名确认数量超过(包含)15个,A超级节点会进入计时状态,并判断收集到的验证者的签名确认数量。s53: Block B1 is confirmed by the system. A supernode will continue to monitor the network after broadcasting block B1. After collecting the signature confirmation of more than 15 supernodes and the signature confirmation and credentials of more than 2/3 verifiers, it can As the block B1 has been confirmed by the system, the super node will add the block B1 to the blockchain, broadcast the previously produced block B2 and the seed parameter Qr+1 of the r+1 round, and enter the r+1 round +1 round of block confirmation; block B1 is confirmed by the system, because of network delay, there will be two different processing methods, and two different processing results will be obtained to ensure the normal operation of the system, and the delay is controlled within one second ;A supernode will always judge the number of signature confirmations collected by supernodes. Once the number of signature confirmations of supernodes exceeds (including) 15, A supernodes will enter the timing state and judge the number of signature confirmations collected from verifiers.
另外,步骤s53具体包括:In addition, step s53 specifically includes:
1)在进入计时状态时,如果X=Nall,A超级节点会自动比较所有验证者的凭证大小,得出一个最小凭证,第r轮的最小凭证即为第r+1轮的种子参数Qr+1,A超级节点会将区块B1添加到区块链上,将之前生产好的第r+1轮的区块B2和种子参数Qr+1广播,进入第r+1轮的区块确认;1) When entering the timing state, if X=Nall , the A super node will automatically compare the size of the certificates of all verifiers to obtain a minimum certificate, and the minimum certificate of the r round is the seed parameter Q of the r+1 roundr+1 , A super node will add block B1 to the blockchain, broadcast the previously produced block B2 of the r+1 round and the seed parameter Qr+1 , and enter the area of the r+1 round block confirmation;
2)在进入计时状态时,如果N2/3<X<Nall,A超级节点会等待一秒,在一秒计时的任意时刻收集齐Nall个验证者签名数量,A超级节点会自动比较所有验证者的凭证大小,得出一个最小凭证,第r轮的最小凭证即为第r+1轮的种子参数Qr+1,接着A超级节点会将区块B1添加到区块链上,将之前生产好的第r+1轮的区块B2和种子参数Qr+1广播,进入第r+1轮的区块确认;2) When entering the timing state, if N2/3 <X<Nall , A supernode will wait for one second, and collect Nall validator signatures at any time of one second, and A supernode will automatically compare The credential size of all verifiers can be used to obtain a minimum credential. The minimum credential of the r round is the seed parameter Qr+1 of the r+1 round, and then the A super node will add the block B1 to the blockchain. Broadcast the previously produced block B2 of the r+1 round and the seed parameter Qr+1 , and enter the block confirmation of the r+1 round;
3)在进入计时状态时,如果X<N2/3,A超级节点会等待一秒,在一秒计时后未收集齐Nall个验证者签名数量,但在一秒计时后结算时,已收集验证者签名数量超过(包含)N2/3,A超级节点会自动比较已收集的验证者的凭证大小,得出一个最小凭证,第r轮的最小凭证即为第r+1轮的种子参数Qr+1,接着A超级节点会将区块B1添加到区块链上,将之前生产好的第r+1轮的区块B2和种子参数Qr+1’广播,进入第r+1轮的区块确认。3) When entering the timing state, if X<N2/3 , A super node will wait for one second, and has not collected Nall validator signatures after one second timing, but when it is settled after one second timing, it has If the number of collected verifier signatures exceeds (includes) N2/3 , the A supernode will automatically compare the size of the collected verifier’s certificates to obtain a minimum certificate, and the minimum certificate of the r round is the seed of the r+1 round Parameter Qr+1 , then A super node will add block B1 to the blockchain, and broadcast block B2 and seed parameter Qr+1 ' of the r+1 round produced before, and enter
4)在进入计时状态时,如果X<N2/3,A超级节点会等待一秒,在一秒计时后未收集齐N2/3个验证者签名数量,则会视为区块链系统出现了问题,验证者行使了验证权使区块无法确认,或者验证者遭受了攻击,区块停止生产。4) When entering the timing state, if X<N2/3 , A super node will wait for one second, and after one second of timing, it will not collect the number of signatures of N2/3 verifiers, it will be regarded as the emergence of the blockchain system If there is a problem, the validator has exercised the verification right to make the block unconfirmable, or the validator has been attacked, and the production of the block stops.
在本实施例中,在区块的确认这一步,引入验证者后,区块的确认由之前的只需15个超级节点验证和确认,变成了需要15个超级节点和超过2/3验证者验证和确认,比起现有的基于DPOS共识机制的系统,基于VBDPOS共识机制的系统的安全性大大提高了,问题在于当前区块需要的验证和确认数量增多,会影响区块链系统里的下一个区块的产生(每一个区块都是在上一个区块基础上产生的),所以VBDPOS共识机制里,新设计了确认区块的方案,使VBDPOS共识机制在提高了系统安全性的基础上,使系统的性能不会受到过多的印象,因为在方案设计里,系统正常运行时,延迟被控制在一秒之内,而这个出块效率在区块链领域,可以满足商业需求,足以投入商业使用。In this embodiment, in the step of block confirmation, after the introduction of verifiers, the confirmation of the block has changed from requiring only 15 super nodes to verify and confirm, to requiring 15 super nodes and more than 2/3 verification Compared with the existing system based on DPOS consensus mechanism, the security of the system based on VBDPOS consensus mechanism is greatly improved. The problem is that the number of verification and confirmation required by the current block increases, which will affect the blockchain system. The generation of the next block (each block is generated on the basis of the previous block), so in the VBDPOS consensus mechanism, a new scheme for confirming blocks is designed, so that the VBDPOS consensus mechanism can improve system security Based on this, the performance of the system will not be too impressed, because in the scheme design, when the system is running normally, the delay is controlled within one second, and this efficiency of block generation in the blockchain field can satisfy business demand, sufficient for commercial use.
验证者是强制在线的和强制要求参与每一轮的区块确认的,但系统不会因为验证者出现问题而宕机,而是会继续稳定运行。在现有的网络状态中,一秒是足够所有节点对同一个凭证同步完毕的时间,在参与验证的过程中,A验证者的签名确认和凭证在一秒内没有被正在生产的超级节点收到,就会视作A验证者缺席此轮区块确认。也就是如果这两种情况发生了,A验证者点对点直接发送签名和凭证没有被正在生产的超级节点收到,A验证者随机广播的签名和验证没有被正在生产的超级节点收到,那就视为A验证者缺席了此轮区块确认,无法参与此轮区块生产的获奖者挑选,A会被扣除5%的保证金,这5%的保证金是此轮的验证者奖励,而A验证者会因为保证金不足而被剔除验证者资格,直到A重新提交保证金获得验证者资格,才能在下一轮区块周期参与验证工作和获得验证奖励。不管A验证者是因为什么问题而无法参与验证,A验证者的缺席会对最小凭证的选取造成影响,因为最小凭证会因为验证者的缺席与否发生变化。Verifiers are forced to be online and are required to participate in each round of block confirmation, but the system will not go down due to problems with the verifier, but will continue to operate stably. In the existing network state, one second is enough time for all nodes to complete the synchronization of the same certificate. During the verification process, the signature confirmation and certificate of A verifier are not received by the super node being produced within one second. If it arrives, it will be deemed that A verifier is absent from this round of block confirmation. That is to say, if these two situations happen, the signature and certificate sent directly by A verifier point-to-point are not received by the super node in production, and the signature and verification randomly broadcast by A verifier are not received by the super node in production, then It is considered that verifier A is absent from this round of block confirmation and unable to participate in the winner selection of this round of block production. A will be deducted 5% of the deposit, which is the verifier reward for this round, and A verifier The applicant will be removed from the validator qualification due to insufficient deposit, and will not be able to participate in the verification work and obtain verification rewards in the next round of block cycle until A resubmits the deposit to obtain the validator qualification. No matter what the problem is that verifier A is unable to participate in the verification, the absence of verifier A will affect the selection of the minimum credential, because the minimum credential will change due to the absence of the verifier.
另外,如图3所示,步骤S6具体包括以下步骤:In addition, as shown in Figure 3, step S6 specifically includes the following steps:
s61:验证者条件满足;s61: The verifier condition is satisfied;
s62:验证者的凭证生成;s62: Credential generation of the verifier;
s63:验证者参与验证工作;s63: The verifier participates in the verification work;
S64:获奖者的挑选和验证过程。S64: Winner selection and verification process.
在本实施例中,基于可验证随机函数挑选获奖者的奖励分发机制,可以使VBDPOS共识机制的每一轮验证者奖励分配都是随机的、不可预测的,从而对于验证者而言,奖励分配是公平的。此外每一轮区块验证奖励都随机分配有两个优点,一是在奖励上的直观,每一轮的区块验证奖励都是固定数额,不会因为验证者数量增加而减少。二是完全随机分配奖励是自带时间属性的平均分配,验证者不会因为参与区块验证而没被抽中为获奖者就不再参与区块验证,因为只要参与验证的时间足够长,轮数足够多,持续参与,根据大数定律,验证者被抽中为获奖者的频率会接近概率。In this embodiment, the reward distribution mechanism for selecting winners based on a verifiable random function can make each round of verifier reward distribution of the VBDPOS consensus mechanism random and unpredictable, so that for the verifier, the reward distribution is fair. In addition, each round of block verification rewards is randomly distributed, which has two advantages. One is the intuitiveness of the rewards. The block verification rewards for each round are a fixed amount and will not decrease due to the increase in the number of verifiers. The second is that the completely random allocation of rewards is an average distribution with its own time attribute. The verifier will not participate in the block verification because he is not selected as the winner because he participates in the block verification. If there are enough numbers and continuous participation, according to the law of large numbers, the frequency of validators being selected as winners will be close to the probability.
其中,在步骤s61中,在一个区块周期开始时,备用节点需满足以下条件才能成为验证者的资格,条件如下:Among them, in step s61, at the beginning of a block period, the standby node must meet the following conditions to become a validator, and the conditions are as follows:
a:备用节点获取的票数权重须大于系统X%的总票数,X%为实时计算的能领取100EOS奖励的最低票数权重;a: The weight of votes obtained by the standby node must be greater than X% of the total votes in the system, and X% is the minimum vote weight calculated in real time to receive 100EOS rewards;
b:参加验证的备用节点需锁仓一定量的EOS保证金到特定账户;b: The standby nodes participating in the verification need to lock a certain amount of EOS margin to a specific account;
c:验证者需持续和所有超级节点和其他验证者保持实时通信状态。c: The verifier needs to maintain real-time communication with all super nodes and other verifiers.
在本实施例中,不满足条件的备用节点,即使参与了验证过程(发送签名和凭证),不会被超级节点和系统认可,也无法获得奖励。票数必须有一定的要求,因为验证工作并不需要太大的门槛,从健康的共识机制这个角度而言,验证工作是为了给备用节点分配奖励的手段,为了让奖励给到有贡献的备用节点,所以要对备用节点有限定要求。In this embodiment, a backup node that does not meet the conditions, even if it participates in the verification process (sending signatures and certificates), will not be recognized by the super node and the system, and will not be able to obtain rewards. There must be certain requirements for the number of votes, because the verification work does not require too much threshold. From the perspective of a healthy consensus mechanism, the verification work is a means of distributing rewards to backup nodes, in order to allow rewards to be given to contributing backup nodes. , so there are limited requirements for the standby nodes.
另外,在步骤s62中,VBDPOS共识机制对新区块达成共识的过程和现有DPOS共识机制的区别在于VBDPOS在验证这一步多了验证者资格审核和验证者参与区块验证,VBDPOS会基于当前的种子参数公布一个随机算法,就是可验证的随机函数VRF,VRF一个关键参数是用户的私钥,这个私钥只有用户本人才知道;接着,每个备用节点使用自己的私钥对种子参数签名并输入哈希函数后,得到自己的凭证;凭证通过零知识证明,可以在完全不泄露私钥的基础上,证明某个凭证的所有者拥有权;凭证包含5个特性:In addition, in step s62, the difference between the VBDPOS consensus mechanism and the existing DPOS consensus mechanism in the process of reaching a consensus on the new block is that VBDPOS has more verifier qualification review and verifier participation in block verification in the verification step, VBDPOS will be based on the current The seed parameter publishes a random algorithm, which is a verifiable random function VRF. A key parameter of VRF is the user's private key, which is known only to the user; then, each standby node signs the seed parameter with its own private key and After inputting the hash function, you can get your own certificate; the certificate can be proved by zero-knowledge proof, and the owner of a certain certificate can be proved on the basis of not revealing the private key at all; the certificate contains 5 characteristics:
A:种子参数是不断更新的,种子参数不可预测的,所以凭证也是不断更新,凭证是随机数;A: The seed parameters are constantly updated, and the seed parameters are unpredictable, so the credentials are also constantly updated, and the credentials are random numbers;
B.哈希函数和私钥确保每一个凭证的所有人都是特定;B. The hash function and private key ensure that the owner of each certificate is specific;
C.非对称密钥算法和零知识证明确保凭证的所有者可以证明凭证的所有权;C. Asymmetric key algorithm and zero-knowledge proof ensure that the owner of the certificate can prove the ownership of the certificate;
D.凭证不可伪造;D. Credentials cannot be forged;
E.凭证是在本地进行,需要私钥生成却又可以不需要公开私钥的同时全网验证。E. Credentials are performed locally, which requires private key generation but can be verified across the network at the same time without the need to disclose the private key.
其中,在步骤s63中,当新区块没有公布之前,备用节点只知道自己是否是验证者,无法知道自己是否是获奖者,只有当区块完成生产和验证后,验证者才知道自己是否获得了此轮区块验证的验证奖励;在结果没出来之前,攻击者无法预测凭证,不知道哪个凭证是最小,在结果出来之后,攻击者无法更改历史。Among them, in step s63, before the new block is announced, the standby node only knows whether it is a verifier, but cannot know whether it is a winner. Only when the block is produced and verified, the verifier knows whether it has won The verification reward for this round of block verification; before the result comes out, the attacker cannot predict the certificate, and does not know which certificate is the smallest. After the result comes out, the attacker cannot change the history.
另外,在步骤s64中,负责此轮区块生产的超级节点A会将区块发送给其他超级节点和备用节点,区块发送采用随机广播和点对点传送的组合方式,所以传播延迟极低,达成共识快,事后能查证。验证过程的验证者会将此轮区块生成的凭证,区块的签名,区块,验证结果广播给所有超级节点和备用节点,新区块在确认过程中,节点会持续监听收集验证结果和凭证,并自动比较凭证大小,挑选出最小凭证,持有最小凭证的验证者就是此轮获奖的验证者,可以获得验证奖励,验证奖励不是及时分发的,根据最小凭证,获奖者虽然知道自己中奖了,但需要等到该区块成为不可逆状态后才能获得奖励。In addition, in step s64, the supernode A responsible for this round of block production will send the block to other supernodes and backup nodes. The block transmission adopts a combination of random broadcast and point-to-point transmission, so the propagation delay is extremely low, achieving The consensus is fast and can be verified afterwards. The verifier of the verification process will broadcast the certificate generated by this round of blocks, the signature of the block, the block, and the verification results to all super nodes and backup nodes. During the confirmation process of the new block, the nodes will continue to monitor and collect verification results and certificates , and automatically compare the size of the certificate, and select the smallest certificate. The verifier who holds the smallest certificate is the verifier who wins the award in this round, and can get the verification reward. The verification reward is not distributed in time. According to the smallest certificate, although the winner knows that he has won the prize , but you need to wait until the block becomes irreversible before you can get rewards.
另外,如图4所示,步骤s64主要包括以下步骤:In addition, as shown in Figure 4, step s64 mainly includes the following steps:
s641:公私钥的生成,验证者A通过椭圆曲线加密ECC算法生成私钥SK与公钥PK;s641: Generation of public and private keys, verifier A generates private key SK and public key PK through elliptic curve encryption ECC algorithm;
s642:签名的实现,将区块A输入SHA256哈希函数输出哈希摘要H(A),再对哈希摘要使用私钥签名Sig(H(A)),此处得到对区块A的签名。验证者将「区块A+签名Sig(H(A))」发送给其他节点。s642: Signature implementation, input the block A into the SHA256 hash function to output the hash digest H(A), and then use the private key to sign Sig(H(A)) on the hash digest, here the signature for block A is obtained . The verifier sends "block A + signature Sig(H(A))" to other nodes.
s643:签名的验证,其他节点有验证者的公钥PK,得到区块A和签名Sig(H(A))后,将「公钥PK+区块A+签名Sig(H(A))」输入验证函数,根据数字签名的原理,即可得到验证结果;s643: Verification of the signature, other nodes have the public key PK of the verifier, and after obtaining the block A and the signature Sig(H(A)), input the "public key PK+block A+signature Sig(H(A))" for verification Function, according to the principle of digital signature, you can get the verification result;
s644:种子参数的更新,第一轮的种子参数为由随机算法(例如SHA-256)更新的随机数。此后每一轮的区块生产过程会有一个不断更新的参数Q,称为种子参数,种子参数本质是由0和1组成的长度为256位的字符串,是输入通过SHA-256哈希函数后的输出哈希值,种子参数是不断更新的,种子参数是不可预测的。种子参数Qr的生成就是对应可验证随机函数里的生成随机数输出,公式如下:s644: update of the seed parameter, the seed parameter of the first round is a random number updated by a random algorithm (such as SHA-256). Thereafter, each round of block production process will have a continuously updated parameter Q, called the seed parameter. The essence of the seed parameter is a 256-bit string composed of 0 and 1, which is input through the SHA-256 hash function After the output hash value, the seed parameter is constantly updated, and the seed parameter is unpredictable. The generation of the seed parameter Qr corresponds to the output of the generated random number in the verifiable random function. The formula is as follows:
Qr=H(SIGA(Qr-1,r)),r>1Qr =H(SIGA (Qr-1 ,r)), r>1
s645:凭证的生成,通过可验证随机函数生成验证者A的独一无二的凭证。在第r轮的区块验证过程中,验证者A使用自己的私钥对上一轮种子参数Qr-1和轮数r进行签名,签名后得到SigA(Qr-1,r),签名本质上是使用私钥对Qr-1和r串联后字符串进行加密。将签名SigA(Qr-1,r)通过函数转换生成零知识证明字节串PROOFA,PROOF输入哈希函数得到用户A的凭证H(SigA(Qr-1,r))。s645: Credential generation, which generates the unique credential of verifier A through a verifiable random function. During the r-th round of block verification, verifier A uses his private key to sign the previous round of seed parameters Qr-1 and round number r, and obtains SigA(Qr-1 , r) after signing, and the signature Essentially, the private key is used to encrypt the concatenated string of Qr-1 and r. The signature SigA(Qr-1 , r) is converted by a function to generate a zero-knowledge proof byte string PROOFA, and PROOF is input into the hash function to obtain user A's credential H(SigA(Qr-1 , r)).
1.凭证是一个介于0和1之间的随机256位数字的二进制展开,不同用户的凭证不可能相同。1. The credential is a binary expansion of a random 256-bit number between 0 and 1, and the credential of different users cannot be the same.
2.种子参数在机制的设计里是随机数,在最终验证结果出来之前,没人知道下一轮的种子参数是多少。2. The seed parameter is a random number in the design of the mechanism. Before the final verification result comes out, no one knows what the seed parameter will be for the next round.
3.零知识证明PROOFA一是用来生成凭证,二是用来给其他人验证凭证所有权。3. Zero-knowledge proof PROOFA is used to generate certificates, and the other is to verify the ownership of certificates to others.
4.第r轮,A的凭证H(SigA(Qr-1,r))生成后不会马上公布,而是会跟随第r轮区块的验证一起广播。4. In round r, A's certificate H(SigA(Qr-1 , r)) will not be announced immediately after it is generated, but will be broadcast along with the verification of the block in round r.
s646:选出获奖者,由凭证构建的2进制小数0.H(SigA(Qr-1,r))(也就是将凭证字符串写到小数点后)在0和1之间均匀分布,在一轮验证过程中,资格验证里要求验证者在线,因此每个验证者最后都会收到其他所有验证者在第r轮的凭证,大小对比后凭证最小者,即为第r轮的达成共识的“获奖者”。s646: Winners are selected, and the binary decimal 0.H(SigA(Qr-1 , r)) (that is, the voucher string is written after the decimal point) constructed by the voucher is evenly distributed between 0 and 1, During a round of verification, the verifier is required to be online in the qualification verification, so each verifier will finally receive the credentials of all other verifiers in the r round, and the one with the smallest credential after the size comparison is the consensus reached in the r round "winners".
s647:凭证的验证,在第r轮,其他验证者收到验证者A的凭证和A给出的PROOFA后,其他验证者会对PROOFA进行验证,如果使用经过数字证书保障的验证者A的公钥解密验证者A给出的PROOFA,得到的结果与种子参数Qr-1一致,说明验证通过,唯一且经过验证的PROOFA得出的凭证H(SigA(Qr-1,r))是唯一的,且所有权能被证明属于验证者A,凭证不可伪造且因哈希函数的特性可被快速验证。s647: Credential verification. In round r, after other verifiers receive the verifier A’s credential and the PROOFA given by A, other verifiers will verify the PROOFA. The key decrypts the PROOFA given by the verifier A, and the result obtained is consistent with the seed parameter Qr-1 , indicating that the verification is passed, and the unique and verified certificate H(SigA(Qr-1 , r)) obtained by the verified PROOFA is the only , and ownership can be proven to belong to verifier A, the certificate cannot be forged and can be quickly verified due to the characteristics of the hash function.
s648:奖励的分发,负责出块的超级节点和验证者会保持实时通信,由于超级节点和验证者是实时点对点交流,因此出块的超级节点会最快收集验证者的签名确认和凭证,会率先给出排名,之后随机广播的「签名+凭证」会被其他超级节点和验证者陆续确认。系统和节点会通过智能合约自动收集,自动验证,自动分配本轮验证的奖励,奖励会在第r轮区块成为不可逆状态后由智能合约自动分发。r-1轮获奖者的凭证就是下一轮的种子参数Qr。s648: For the distribution of rewards, the supernode responsible for generating blocks and the verifier will maintain real-time communication. Since the supernode and the verifier communicate in real time point-to-point, the supernode that generates the block will collect the signature confirmation and certificate of the verifier as soon as possible. The ranking is first given, and then the randomly broadcast "signature + certificate" will be confirmed by other super nodes and verifiers one after another. The system and nodes will automatically collect, verify, and distribute the rewards for this round of verification through smart contracts. The rewards will be automatically distributed by smart contracts after the block in the rth round becomes irreversible. The credential of the r-1 round winners is the seed parameter Qr for the next round.
显然,本发明的上述实施例仅仅是为清楚地说明本发明所作的举例,而并非是对本发明的实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明权利要求的保护范围之内。Apparently, the above-mentioned embodiments of the present invention are only examples for clearly illustrating the present invention, rather than limiting the implementation of the present invention. For those of ordinary skill in the art, other changes or changes in different forms can be made on the basis of the above description. It is not necessary and impossible to exhaustively list all the implementation manners here. All modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the claims of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911049650.4ACN110855432B (en) | 2019-10-31 | 2019-10-31 | Asynchronous BFT & DPOS consensus mechanism for assigning verifier rewards based on verifiable random functions |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911049650.4ACN110855432B (en) | 2019-10-31 | 2019-10-31 | Asynchronous BFT & DPOS consensus mechanism for assigning verifier rewards based on verifiable random functions |
| Publication Number | Publication Date |
|---|---|
| CN110855432A CN110855432A (en) | 2020-02-28 |
| CN110855432Btrue CN110855432B (en) | 2023-03-14 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911049650.4AActiveCN110855432B (en) | 2019-10-31 | 2019-10-31 | Asynchronous BFT & DPOS consensus mechanism for assigning verifier rewards based on verifiable random functions |
| Country | Link |
|---|---|
| CN (1) | CN110855432B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111047330B (en)* | 2020-03-18 | 2020-09-22 | 杭州智块网络科技有限公司 | Verification bonus awarding method and device for blocks |
| CN111600709B (en)* | 2020-05-26 | 2023-03-14 | 牛津(海南)区块链研究院有限公司 | Verifiable random number generation method and device |
| WO2022010004A1 (en)* | 2020-07-07 | 2022-01-13 | 라인플러스 주식회사 | Random sampling bft consensus method and system, and computer program |
| CN112101940A (en)* | 2020-09-16 | 2020-12-18 | 上海万向区块链股份公司 | Random verifiable sample selection system implemented with block chains |
| CN112398930B (en)* | 2020-11-04 | 2025-02-25 | 深圳前海微众银行股份有限公司 | Blockchain consensus method, node equipment, system and storage medium |
| CN112511338A (en)* | 2020-11-09 | 2021-03-16 | 迅鳐成都科技有限公司 | Block chain consensus network dynamic recovery method, electronic device, system and medium |
| CN113300889A (en)* | 2020-12-31 | 2021-08-24 | 恬家(上海)信息科技有限公司 | Method for adjusting link width and block link network system |
| CN113111373B (en)* | 2021-05-13 | 2022-06-07 | 北京邮电大学 | Random number generation method of VBFT (visual basic FT) consensus mechanism and consensus mechanism system |
| CN115643043B (en)* | 2022-09-09 | 2024-04-19 | 北京航空航天大学 | A cross-chain consensus election method and system based on verification delay function |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109165092B (en)* | 2018-07-10 | 2021-07-20 | 矩阵元技术(深圳)有限公司 | Consensus method, device and system based on effective computing power contribution |
| CN109039713B (en)* | 2018-07-16 | 2021-06-18 | 夸克链科技(深圳)有限公司 | A blockchain consensus device and algorithm |
| CN109639837B (en)* | 2019-01-31 | 2021-04-06 | 东南大学 | Blockchain DPoS Consensus Method Based on Trust Mechanism |
| Publication number | Publication date |
|---|---|
| CN110855432A (en) | 2020-02-28 |
| Publication | Publication Date | Title |
|---|---|---|
| CN110855432B (en) | Asynchronous BFT & DPOS consensus mechanism for assigning verifier rewards based on verifiable random functions | |
| Bhaskar et al. | Bitcoin mining technology | |
| CN111988137B (en) | DPoS (dual port service) consensus method and system based on threshold signature and fair reward | |
| Nguyen et al. | Proof-of-stake consensus mechanisms for future blockchain networks: fundamentals, applications and opportunities | |
| KR102409819B1 (en) | Distributed transaction propagation and verification system | |
| CN110351067B (en) | Block chain consensus method for master-slave multi-chains | |
| CN109842606B (en) | Block chain consensus algorithm and system based on consistent Hash algorithm | |
| Sharma et al. | Cryptocurrency mechanisms for blockchains: models, characteristics, challenges, and applications | |
| Sun et al. | Rtchain: A reputation system with transaction and consensus incentives for e-commerce blockchain | |
| Merlini et al. | On public decentralized ledger oracles via a paired-question protocol | |
| CN106920097A (en) | A kind of generation time block chain method of Quantum Chain common recognition agreement | |
| Bai et al. | On parallel mechanism of consortium blockchain: Take pov as an example | |
| CN110889793A (en) | Block chain-based digital lottery issuing method and block chain link points | |
| Himanshu | An overview of blockchain technology: Architecture and consensus protocols | |
| Wang et al. | Consensus algorithm based on verifiable randomness | |
| CN118138301A (en) | Block chain consensus method based on credibility and banzhaf indexes | |
| Cheng et al. | A new hybrid consensus protocol: Deterministic proof of work | |
| CN117395007A (en) | Block chain consensus method, system and terminal based on publicly verifiable random numbers | |
| Nguyen-Van et al. | A system for scalable decentralized random number generation | |
| Mahmood et al. | Survey of consensus protocols | |
| Wu et al. | Multimaster node byzantine fault-tolerant consensus algorithm based on consistent hash algorithm | |
| Thai et al. | A scalable semi-permissionless blockchain framework | |
| Qi et al. | Linsbft: Linear-communication one-step bft protocol for public blockchains | |
| Zhang et al. | Gemini-chain: A regulatable digital currency model based on blockchain | |
| CN119254773B (en) | Improved alliance chain consensus method and system based on contribution degree and grouping |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB03 | Change of inventor or designer information | Inventor after:Jiang Li Inventor after:Huang Jun Inventor after:Chen Bin Inventor after:Chen Meiyun Inventor after:Liu Yi Inventor after:Yang Chao Inventor after:Xie Shengli Inventor before:Huang Jun Inventor before:Jiang Li Inventor before:Chen Bin Inventor before:Chen Meiyun Inventor before:Liu Yi Inventor before:Yang Chao Inventor before:Xie Shengli | |
| CB03 | Change of inventor or designer information | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |