WO2020082213A1 - Network expandability blockchain implementation method - Google Patents

Network expandability blockchain implementation method Download PDF

Info

Publication number
WO2020082213A1
WO2020082213A1 PCT/CN2018/111248 CN2018111248W WO2020082213A1 WO 2020082213 A1 WO2020082213 A1 WO 2020082213A1 CN 2018111248 W CN2018111248 W CN 2018111248W WO 2020082213 A1 WO2020082213 A1 WO 2020082213A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
network
shard
reputation
consensus
Prior art date
Application number
PCT/CN2018/111248
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 深圳市哈希树科技有限公司
Priority to PCT/CN2018/111248 priority Critical patent/WO2020082213A1/en
Publication of WO2020082213A1 publication Critical patent/WO2020082213A1/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 present invention relates to the field of blockchain technology, and in particular to a network scalability blockchain implementation method.
  • Blockchain is an open distributed ledger system, and multiple participants jointly maintain a set of ledger through a consensus mechanism.
  • any electronic computer in the world can access the bitcoin network without authorization; each bitcoin node has a complete unified public account book backup of the entire network, recording all bitcoin transaction information
  • the information needs to be synchronized to every node in the network, and the account books on all nodes can verify the behavior of this transaction and update it in time.
  • the distribution of accounting rights is carried out through a consensus mechanism.
  • the more common blockchain consensus mechanisms include Proof of Work (POW), Proof of Stake (POS) and other methods, in which Proof of Work (POW) calculates a random number that meets the rules through hash operations and enumeration To obtain the accounting right of the current cycle, and all nodes are stored together after the entire network is verified.
  • the advantage of proof-of-work (POW) is that it is completely decentralized, and all network nodes can enter and leave the network arbitrarily; the disadvantage is that it requires a lot of computing resources to obtain accounting rights, and the consensus period is long, and it cannot be used on a large scale.
  • Proof-of-stake is also a very representative method of allocating accounting rights.
  • network nodes attach their own addresses to the block network to prove the proportion of their corresponding equity.
  • the node uses the private key corresponding to the address to sign the block information to prove that it indeed owns the asset corresponding to the address. If a person has more rights and interests in the network, then under the assumption of a rational person, he will more actively maintain the normal operation of the network, so in the long run, the expected accounting right ratio of a node should be related to the rights and interests it holds. The proportions are equal.
  • the shortcomings of proof-of-stake are also obvious. First of all, it will lead to the tendency of centralization of the network; secondly, the current proof-of-stake mechanism cannot resist the attack of computing power. A user with less equity can get much higher than his equity by investing a lot of computing power Proportionate accounting rights.
  • the traditional public blockchain is very weak in scalability and slow in transaction processing, which brings many inconveniences to the user experience.
  • the purpose of the embodiments of the present invention is to provide a network scalability block chain implementation method to solve the technical problem that the traditional public blockchain network scalability is very weak.
  • an embodiment of the present invention provides a network scalability blockchain implementation method, which includes: all verification nodes will be assigned to different groups at the beginning of each round of consensus cycle Form a number of shards; each shard elects a leader with a positive correlation probability based on the credit scores of the nodes in the corresponding group generated by historical behavior; the transaction initiator sends a transaction to the shard responsible for processing the transaction, and then the shard runs Based on the consensus synchronization algorithm led by shards, generate transaction blocks and reputation blocks; based on the behavior of all the validators in the consensus, all network verification nodes calculate the reputation score through the reputation evaluation mechanism and reach consensus on the reputation score; calculate in the reputation score After completion, the network verification node uses a common signature to generate the reputation block, which includes a reputation score, a list of confirmed transaction blocks, previous reputation blocks, and a common signature; and at the end of each consensus cycle , Each sharding group generates a status block, which records transaction blockchain and reputation blockchain
  • the verification node uses the hash value of the state block of the previous consensus cycle to generate a random number to introduce randomness, and then the verification node is randomly allocated to each shard.
  • the verification node higher than the median of the credit score ranking becomes the shard leader with the probability that the credit score is positively correlated.
  • each transaction has a unique identifier, an input UTXO list and an output UTXO list; all network verification nodes send the transaction to the shard responsible for input UTXO, and output the UTXO listed in these transactions.
  • the consensus synchronization algorithm based on the shard leadership, for the shard i, it is used to verify the transaction whose ID is divided by the remainder of the shard group number plus 1 plus 1.
  • the consensus synchronization algorithm based on shard leadership includes: the on-chip leader sends a list signature containing the transaction ID to all nodes on the chip; each network verification node checks the transactions in the transaction list ID and decide whether to accept, reject or fail to confirm the transaction; the network verification node will sign their decision and pass it to the on-chip leader; the leader generates a transaction block after collecting the decision of the verification node, the transaction block contains all network verifiers The signature of the leader and the signature of the leader; each network verification node checks the information of the relevant block; if more than half of the verification nodes issue an alarm, then the on-chip leader will be removed from the network, and the segment will regenerate the leader; when several A transaction block is generated, and no alarm is received, the network verification node will calculate the reputation value of the corresponding node, and generate a reputation block after co-signing.
  • the input shard sends the transaction list and the transaction decision list to the relevant output shard and other input shards.
  • the transaction decision list of the network verification node contains multiple signatures, and each signature is used to sign a subset of the transaction list, and the transactions in a subset are sent to the same output fragment to reduce the bandwidth cost.
  • the consensus synchronization algorithm based on sharding leadership uses parallel processing. If different transactions do not conflict with each other, the transactions will be processed in parallel in different blocks; the parallel processing method includes: each transaction list The transaction decision list and transaction block contain the number of iterations used to indicate the consensus period of the round; and the leader can send a new transaction list once it receives all the transaction decisions of the previous round from the network verification node.
  • the formula for calculating the reputation score is:
  • l is the number of transactions generated after the reputation block in the previous reputation evaluation cycle
  • T (j) is the transaction amount of transaction j
  • S (j) is the scaling factor of transaction j, which is used to differentially reward or punish verification nodes Behavior; in the reputation score calculation, different scaling factors are set for different behaviors, so that the punishment for dishonest behavior is greater than the reward for honest behavior. For "unknown" decisions, the network verification node will neither obtain reputation scores nor lose reputation fraction.
  • the embodiment of the present invention proposes a parallel chain structure, which separates the transaction and the consensus into two chains to improve the scalability of the blockchain network; the consensus part is carried out on the reputation chain, and the reputation chain network focuses on security to take appropriate Speed supports high-speed transactions in the trading chain network;
  • the embodiment of the present invention uses a reputation evaluation mechanism to enhance the security and incentives of the blockchain network.
  • the reputation consensus mechanism based on the historical performance of the nodes selects network nodes with honesty and excellent processing performance, while giving them more Expect network contributions and rewards; on the other hand, it is easier to find potential network spoilers and malicious nodes and remove them from the network in time to ensure the security of the blockchain network.
  • an embodiment of the present invention proposes a network sharding method based on the reputation evaluation mechanism. After the network is sliced, honest and excellent nodes have a greater chance of becoming shard leaders, thereby achieving high network throughput At the same time, it does not reduce the security of the blockchain network.
  • FIG. 1 is a flowchart of a method for implementing network scalability blockchain provided by an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a blockchain network system for a network scalability blockchain implementation method provided by an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a data structure of a reputation block (RB) and a status block (SB) and a multi-party signature in a synchronization process in a method for implementing network scalability blockchain provided by an embodiment of the present invention
  • TxList a transaction list
  • TxDec a transaction decision list
  • TxDecSet a transaction decision list
  • Sharding technology is currently one of the most promising directions for improving the scalability of blockchains.
  • the current sharding technology is mainly divided into: network sharding, which refers to the use of randomness, the network randomly extracts nodes to form fragments to prevent malicious nodes from overfilling a single shard; transaction sharding, in a UTXO-based system, the system sends The address of the author is assigned a shard to ensure that two double-spend transactions will be verified in the same shard.
  • the system can easily detect double-spend transactions without any cross-shard communication; state sharding, in In the case of state sharding, each shard only retains a part of the state, which is the most difficult solution for sharding technology.
  • a method for implementing network scalability blockchain includes: sharding and leadership election, consensus synchronization based on sharding leadership, reputation evaluation mechanism, and global synchronization algorithm.
  • the embodiment of the present invention builds a consensus mechanism through the reputation evaluation mechanism, based on which network segmentation is performed, the scalability of the blockchain network is improved, and the transaction processing speed of the network is improved.
  • FIG. 2 it is a schematic structural diagram of a blockchain network system for a network scalability blockchain implementation method provided by an embodiment of the present invention.
  • these two parts are included in the reputation mechanism designed by the embodiment of the present invention; the consensus ends, and finally the related transactions are packaged into the blockchain network synchronously globally.
  • the sharding algorithm includes:
  • Random sequence Among them, e represents the e-th consensus cycle, SBH represents the hash value of each verification node status block, and k represents the k-th verification node;
  • Cumulative reputation score set Among them, w represents the cumulative reputation score calculation period, r represents the cumulative reputation score of each verification node, and k represents the kth verification node;
  • sort means that the elements in the cumulative reputation score set R w Sort by largest to smallest;
  • the leadership election algorithm of the leadership election mechanism includes:
  • rm the median of the cumulative reputation scores of all the verification nodes included in c n ;
  • the leadership election algorithm ends the cycle.
  • the transaction initiator sends a transaction (tx) to the shard responsible for processing the transaction, and then the shard runs the consensus synchronization algorithm based on the shard leader to generate transaction blocks and reputation blocks; in addition,
  • tx a transaction
  • the embodiment of the present invention uses an atomic cross-slice mechanism to ensure that double spending does not occur.
  • each transaction (tx) will have a unique identifier, input UTXO list and output UTXO list; all network verification nodes send the transaction to the shard responsible for input UTXO, And output the UTXO listed in these transactions.
  • UTXO UnspentTransactionOutputs
  • shard i in the embodiment of the present invention, it will be used to verify the transaction where the transaction ID is divided by the remainder of the number of shard groups plus one and is i. Since the input of UTXO may come from different shards, the implementation method involved in the embodiments of the present invention can handle intra-slice and cross-slice transactions.
  • the consensus synchronization algorithm based on shard leadership includes: the on-chip leader (shard leader l j ) signs the list containing the transaction ID (TxList, Sig lj is the shard leader l j Signature) is sent to all nodes in the slice (shard member V i ); each network verification node checks the transaction ID in the transaction list and decides whether to accept, reject or fail to confirm the transaction; the network verification node signs their decision (TxDec, Sig i is the signature of each network verification node) and then passed to the on-chip leader; the leader generates a transaction block after collecting the decision of the verification node, the transaction block contains the signatures of all network verifiers (sig 1 , sig 2 ... Sig i ... sig m ) and the signature of the leader Each network verification node checks the information of the relevant block; referring to Figure 3, if more than half of the verification nodes issue an alarm, the on-chip leader will be removed
  • the input shard sends the transaction list (TxList) and the transaction decision list (TxDecSet) to the relevant output shard and other input shards .
  • the transaction decision list (TxDecSet) of the network verification node contains multiple signatures sig 1 , sig 2 ... sig i ... sig m , and each signature is used to Sign a subset of the transaction list, and the transactions in a subset are sent to the same output shard to reduce bandwidth costs; for a cross-shard transaction, if the relevant UTXO is not used or locked, the shard will be accepted , Otherwise the transaction will be rejected; both the input shard and the output shard will lock the relevant UTXO; when receiving the proof of acceptance of the transaction decision list containing the input UTXO from all relevant input shards, the output shard will be on the transaction block Add the transaction; when the input shard receives proof of acceptance from another related input shard, the related transaction and its UTXO will be released; and if one of the input shards rejects the transaction,
  • the consensus synchronization algorithm based on sharding uses parallel processing. If different transactions do not conflict with each other, transactions will be processed in parallel in different blocks. ; More specifically, the method of parallel processing includes: each transaction list, transaction decision list, and transaction block contains the number of iterations used to indicate the round of consensus cycle; and once the leader receives the previous round from the network verification node You can send a new list of transactions when all transactions are decided. Recalling the consensus protocol in the embodiment of the present invention, since the synchronization protocol is adopted, it ensures that before receiving the transaction list of the current round, most honest nodes have completed the work of sending the previous round of transaction decision list to the leader. Therefore, the network verification node can determine whether the new transaction list is valid.
  • the reputation evaluation mechanism which effectively supports the aforementioned sharding and consensus synchronization scheme. Based on the consensus of the behavior of all validators, all network verification nodes calculate the reputation score through the reputation evaluation mechanism and reach consensus on the reputation score. Through cumulative reputation evaluation, the sharding and leadership election mechanism can be more secure and efficient. For an intra-segment transaction, after the end of the consensus period, the reputation score in the shard can be calculated separately and uniformly by all shard members based on the transaction conclusion set and transaction block, and the reputation score mechanism can be pluggable as needed. , The formula for calculating the reputation score is:
  • l is the number of transactions generated after the reputation block in the previous reputation evaluation cycle
  • T (j) is the transaction amount of transaction j
  • S (j) is the scaling factor of transaction j, used to differentially reward or punish the verification node behavior.
  • the network verification node uses a common signature to generate the reputation block, the reputation block includes a reputation score, a list of confirmed transaction blocks, previous reputation blocks and Sign together.
  • the generation of the reputation block is run by the block leader and the network verification node in two consecutive rounds, including announcement and commitment, challenge and response to the hash message signature of the reputation block of the previous cycle, and these signatures include consent
  • the number of block verifiers and identity information, and the other shards to check the collective signature if more than half of the network verification nodes sign on the block, then accept the transaction block; the reputation block provides evidence that more than half of the network verification nodes Accept transaction blocks.
  • sharding will pack reputation blocks into the reputation chain.
  • each shard group At the end of each consensus cycle, each shard group generates a status block, packages the transaction blockchain and reputation blockchain records, and then the network verification node is based on the status area from all shards Block, synchronize and update the stored reputation value, and the next consensus cycle begins after the end.
  • the network verification node uses a multi-party signature to generate the status block, and the network verification node uses a proof-of-work method to generate randomness in the status block The number is used for sharding and leadership elections in the next consensus cycle.

Abstract

Disclosed is a network expandability blockchain implementation method. The implementation method comprises: a segment and leadership election, consensus synchronization based on segment leadership, a reputation evaluation mechanism and a global synchronization algorithm. The embodiment of the present invention proposes a parallel chain structure, separating transaction and consensus into two chains, so as to improve the expandability of a blockchain network. The consensus part is performed in a reputation chain, and a reputation chain network pays attention to the security to support the high-speed transaction of a transaction chain network with the appropriate speed. Based on the advantages of the reputation evaluation mechanism, the embodiment of the present invention proposes a network slicing method based on the reputation evaluation mechanism. After the network slicing, the nodes with honesty and excellent performance are more likely to become the leader of the segment, thereby implementing the high throughput of the network without reducing the security of the blockchain network.

Description

一种网络可扩展性区块链实现方法Method for implementing network scalability block chain 技术领域Technical field
本发明涉及区块链技术领域,具体涉及一种网络可扩展性区块链实现方法。The present invention relates to the field of blockchain technology, and in particular to a network scalability blockchain implementation method.
背景技术Background technique
区块链是一个公开的分布式账本系统,由多个参与方通过共识机制共同维护一套账本。以比特币系统为例,全球任意一台电子计算机无须授权,都可以接入比特币网络;每一个比特币节点都又一份完整的全网统一的公共账簿备份,记录着所有比特币交易信息,任何一个节点进行交易都需要将信息同步至网络种的每一个节点,所有节点上的账簿都能验证这一笔交易的行为并及时更新。在区块链网络中,记账权的分配是通过共识机制的方式进行。目前比较常见的区块链共识机制包括工作量证明(POW)、权益证明(POS)等方式,其中工作量证明(POW)通过哈希运算和枚举的方式,计算出一个满足规则的随机数,获得本轮周期的记账权,全网验证后所有节点一起存储。工作量证明(POW)的优点是完全去中心化,所有网络节点可以任意进出网络;缺点是需要消耗大量的计算资源以获得记账权,达成共识的周期较长,无法大规模商用。Blockchain is an open distributed ledger system, and multiple participants jointly maintain a set of ledger through a consensus mechanism. Taking the bitcoin system as an example, any electronic computer in the world can access the bitcoin network without authorization; each bitcoin node has a complete unified public account book backup of the entire network, recording all bitcoin transaction information For any node to conduct a transaction, the information needs to be synchronized to every node in the network, and the account books on all nodes can verify the behavior of this transaction and update it in time. In the blockchain network, the distribution of accounting rights is carried out through a consensus mechanism. At present, the more common blockchain consensus mechanisms include Proof of Work (POW), Proof of Stake (POS) and other methods, in which Proof of Work (POW) calculates a random number that meets the rules through hash operations and enumeration To obtain the accounting right of the current cycle, and all nodes are stored together after the entire network is verified. The advantage of proof-of-work (POW) is that it is completely decentralized, and all network nodes can enter and leave the network arbitrarily; the disadvantage is that it requires a lot of computing resources to obtain accounting rights, and the consensus period is long, and it cannot be used on a large scale.
权益证明(POS)也是目前非常有代表性的一种分配记账权的方法,网络节点在产生新区块记账的同时,将自己的地址附在区块网络中,证明其占有的相应权益比重,节点同时用该地址对应的私钥对该区块信息签名,用以证明其确实拥有该地址对应的资产。如果一个人在网络种占有的权益越多,那么在理性人的假设下他将更加积极地维护网络的正常运行,因此长久看来,一个节点的期望记账权比例,应当与其所占有的 权益比例相等。权益证明的缺点也很明显,首先这会导致网络的中心化倾向;其次,目前的权益证明机制无法抵御算力攻击,一个权益比较少的用户,可以通过投入大量算力获得远高于其权益比例的记账权。Proof-of-stake (POS) is also a very representative method of allocating accounting rights. When generating new block accounting, network nodes attach their own addresses to the block network to prove the proportion of their corresponding equity. At the same time, the node uses the private key corresponding to the address to sign the block information to prove that it indeed owns the asset corresponding to the address. If a person has more rights and interests in the network, then under the assumption of a rational person, he will more actively maintain the normal operation of the network, so in the long run, the expected accounting right ratio of a node should be related to the rights and interests it holds. The proportions are equal. The shortcomings of proof-of-stake are also obvious. First of all, it will lead to the tendency of centralization of the network; secondly, the current proof-of-stake mechanism cannot resist the attack of computing power. A user with less equity can get much higher than his equity by investing a lot of computing power Proportionate accounting rights.
由于传统公共区块链可扩展性非常弱,交易处理缓慢,给用户体验带来了诸多不便。The traditional public blockchain is very weak in scalability and slow in transaction processing, which brings many inconveniences to the user experience.
发明内容Summary of the invention
本发明实施例的目的在于提供一种网络可扩展性区块链实现方法,用以解决传统公共区块链网络可扩展性非常弱的技术问题。The purpose of the embodiments of the present invention is to provide a network scalability block chain implementation method to solve the technical problem that the traditional public blockchain network scalability is very weak.
为实现上述目的,本发明实施例提供了一种网络可扩展性区块链实现方法,所述实现方法包括:所有的验证节点在每一轮共识周期开始的时候将被分配到不同的组中形成若干分片;每个分片根据对应组中节点的由历史行为产生的信誉积分以正相关的概率选举出领导;交易发起者向负责处理该交易的分片发送交易,随后该分片运行基于分片领导的共识同步算法,生成交易区块和信誉区块;基于共识所有验证者的行为,所有网络验证节点均通过信誉评价机制进行信誉评分计算并针对信誉分数达成共识;在信誉评分计算完成后,网络验证节点使用共同签名生成所述信誉区块,所述信誉区块包含信誉评分、已确认的交易区块列表、先前的信誉区块和共同签名;及在每一个共识周期结束时,每个分片组均生成一个状态区块,将交易区块链和信誉区块链的记录打包,随后网络验证节点基于来自所有分片的状态区块,同步和更新存储的信誉值,结束之后开始下一个共识周期。To achieve the above purpose, an embodiment of the present invention provides a network scalability blockchain implementation method, which includes: all verification nodes will be assigned to different groups at the beginning of each round of consensus cycle Form a number of shards; each shard elects a leader with a positive correlation probability based on the credit scores of the nodes in the corresponding group generated by historical behavior; the transaction initiator sends a transaction to the shard responsible for processing the transaction, and then the shard runs Based on the consensus synchronization algorithm led by shards, generate transaction blocks and reputation blocks; based on the behavior of all the validators in the consensus, all network verification nodes calculate the reputation score through the reputation evaluation mechanism and reach consensus on the reputation score; calculate in the reputation score After completion, the network verification node uses a common signature to generate the reputation block, which includes a reputation score, a list of confirmed transaction blocks, previous reputation blocks, and a common signature; and at the end of each consensus cycle , Each sharding group generates a status block, which records transaction blockchain and reputation blockchain Packet, then the network node based on the authentication, synchronization and update the stored credit value from all slice state blocks, the end of the next cycle begins a consensus.
优选地,所述验证节点使用前一个共识周期的状态区块的哈希值来产生随机数从而引入随机性,随后验证节点被随机分配到各个分片中。Preferably, the verification node uses the hash value of the state block of the previous consensus cycle to generate a random number to introduce randomness, and then the verification node is randomly allocated to each shard.
优选地,所述领导的选举机制中,高于信誉积分排序中位数的验证节点以信誉积分正相关的概率成为分片领导。Preferably, in the election mechanism of the leader, the verification node higher than the median of the credit score ranking becomes the shard leader with the probability that the credit score is positively correlated.
优选地,每笔交易具有唯一标识,输入UTXO列表和输出UTXO列 表;所有网络验证节点均将交易发送到负责输入UTXO的分片,并输出这些交易中列出的UTXO。Preferably, each transaction has a unique identifier, an input UTXO list and an output UTXO list; all network verification nodes send the transaction to the shard responsible for input UTXO, and output the UTXO listed in these transactions.
优选地,在所述基于分片领导的共识同步算法中,对于分片i,用来验证交易ID除以分片组数的余数加1后为i的交易。Preferably, in the consensus synchronization algorithm based on the shard leadership, for the shard i, it is used to verify the transaction whose ID is divided by the remainder of the shard group number plus 1 plus 1.
优选地,对于片内交易,所述基于分片领导的共识同步算法包括:片内的领导将包含交易ID的列表签名发送给所有片内的节点;每一个网络验证节点检查交易列表中的交易ID并决定接受、拒绝还是无法确认该笔交易;网络验证节点将他们的决定签名后传递给片内领导;领导在收集验证节点的决定后产生交易区块,该交易区块包含所有网络验证者的签名和领导的签名;每一个网络验证节点对相关区块的信息进行检查;如果超过半数验证节点发出警报,那么片内领导将会被剔除出网络,同时该分片重新产生领导;当若干个交易区块产生,并且没有收到警报,网络验证节点将计算相应节点的信誉值,共同签名后生成信誉区块。Preferably, for on-chip transactions, the consensus synchronization algorithm based on shard leadership includes: the on-chip leader sends a list signature containing the transaction ID to all nodes on the chip; each network verification node checks the transactions in the transaction list ID and decide whether to accept, reject or fail to confirm the transaction; the network verification node will sign their decision and pass it to the on-chip leader; the leader generates a transaction block after collecting the decision of the verification node, the transaction block contains all network verifiers The signature of the leader and the signature of the leader; each network verification node checks the information of the relevant block; if more than half of the verification nodes issue an alarm, then the on-chip leader will be removed from the network, and the segment will regenerate the leader; when several A transaction block is generated, and no alarm is received, the network verification node will calculate the reputation value of the corresponding node, and generate a reputation block after co-signing.
优选地,对于跨片交易,所述基于分片领导的共识同步算法中,输入分片将交易列表和交易决定列表发送到相关的输出分片和另外的输入分片。Preferably, for cross-shard transactions, in the consensus synchronization algorithm based on shard leadership, the input shard sends the transaction list and the transaction decision list to the relevant output shard and other input shards.
优选地,所述网络验证节点的交易决定列表包含多个签名,每个签名都用于签署交易列表的一个子集,一个子集中的交易被发送到相同的输出分片以降低带宽成本。Preferably, the transaction decision list of the network verification node contains multiple signatures, and each signature is used to sign a subset of the transaction list, and the transactions in a subset are sent to the same output fragment to reduce the bandwidth cost.
优选地,所述基于分片领导的共识同步算法采用并行处理的方式,如果不同的交易彼此不冲突,则将在不同的块中并行处理事务;所述并行处理的方法包括:每个交易列表、交易决定列表和交易区块包含用于指示该轮共识周期的迭代次数;及领导者一旦从网络验证节点接收到前一轮的所有交易决定,就可以发送新的交易列表。Preferably, the consensus synchronization algorithm based on sharding leadership uses parallel processing. If different transactions do not conflict with each other, the transactions will be processed in parallel in different blocks; the parallel processing method includes: each transaction list The transaction decision list and transaction block contain the number of iterations used to indicate the consensus period of the round; and the leader can send a new transaction list once it receives all the transaction decisions of the previous round from the network verification node.
优选地,所述信誉评分计算的公式为:Preferably, the formula for calculating the reputation score is:
Figure PCTCN2018111248-appb-000001
Figure PCTCN2018111248-appb-000001
其中,l为前一个信誉评价周期信誉区块之后生成的交易数量;T(j) 为交易j的交易额;S(j)为交易j的缩放因子,用于差异地奖励或惩罚验证节点的行为;所述信誉评分计算中为不同的行为设置不同的缩放因子,使不诚实行为的惩罚大于诚实行为的奖励,对于“未知”决策,网络验证节点既不会获得信誉分数也不会损失信誉分数。Among them, l is the number of transactions generated after the reputation block in the previous reputation evaluation cycle; T (j) is the transaction amount of transaction j; S (j) is the scaling factor of transaction j, which is used to differentially reward or punish verification nodes Behavior; in the reputation score calculation, different scaling factors are set for different behaviors, so that the punishment for dishonest behavior is greater than the reward for honest behavior. For "unknown" decisions, the network verification node will neither obtain reputation scores nor lose reputation fraction.
本发明实施例具有如下优点:The embodiments of the present invention have the following advantages:
1)本发明实施例提出并行链的结构,将交易和共识分离为两条链,以提高区块链网络的可扩展性;共识部分在信誉链进行,信誉链网络关注安全性,以适当的速度支撑交易链网络的高速交易;1) The embodiment of the present invention proposes a parallel chain structure, which separates the transaction and the consensus into two chains to improve the scalability of the blockchain network; the consensus part is carried out on the reputation chain, and the reputation chain network focuses on security to take appropriate Speed supports high-speed transactions in the trading chain network;
2)本发明实施例使用信誉评价机制来增强区块链网络的安全性和提高激励,基于节点历史表现的信誉共识机制一方面筛选出诚实和处理性能优异的网络节点,同时给予它们更多的期望网络贡献和奖励;另一方面更容易发现潜在的网络破坏者和恶意节点并及时将其剔除网络,确保区块链网络的安全性。2) The embodiment of the present invention uses a reputation evaluation mechanism to enhance the security and incentives of the blockchain network. On the one hand, the reputation consensus mechanism based on the historical performance of the nodes selects network nodes with honesty and excellent processing performance, while giving them more Expect network contributions and rewards; on the other hand, it is easier to find potential network spoilers and malicious nodes and remove them from the network in time to ensure the security of the blockchain network.
3)基于信誉评价机制的各项优点,本发明实施例提出基于信誉评价机制的网络分片方法,网络切片后诚实和性能优异的节点有更大几率成为分片的领导,从而实现网络高吞吐量的同时不降低区块链网络的安全性。3) Based on the advantages of the reputation evaluation mechanism, an embodiment of the present invention proposes a network sharding method based on the reputation evaluation mechanism. After the network is sliced, honest and excellent nodes have a greater chance of becoming shard leaders, thereby achieving high network throughput At the same time, it does not reduce the security of the blockchain network.
附图说明BRIEF DESCRIPTION
图1为本发明实施例提供的一种网络可扩展性区块链实现方法的流程图;1 is a flowchart of a method for implementing network scalability blockchain provided by an embodiment of the present invention;
图2为本发明实施例提供的一种网络可扩展性区块链实现方法的区块链网络系统结构示意图;2 is a schematic structural diagram of a blockchain network system for a network scalability blockchain implementation method provided by an embodiment of the present invention;
图3为本发明实施例提供的一种网络可扩展性区块链实现方法中信誉区块(RB)和状态区块(SB)的数据结构以及多方签名在同步过程中的工作方式示意图;3 is a schematic diagram of a data structure of a reputation block (RB) and a status block (SB) and a multi-party signature in a synchronization process in a method for implementing network scalability blockchain provided by an embodiment of the present invention;
图4为本发明实施例提供的一种网络可扩展性区块链实现方法中交 易列表(TxList)、交易决定(TxDec)和交易决定列表(TxDecSet)的数据结构示意图。4 is a schematic diagram of the data structure of a transaction list (TxList), a transaction decision (TxDec), and a transaction decision list (TxDecSet) in a method for implementing network scalability blockchain provided by an embodiment of the present invention.
具体实施方式detailed description
以下由特定的具体实施例说明本发明的实施方式,熟悉此技术的人士可由本说明书所揭露的内容轻易地了解本发明的其他优点及功效。The following describes the implementation of the present invention by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification.
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、接口、技术之类的具体细节,以便透彻理解本发明。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本发明。在其它情况中,省略对众所周知的系统、电路以及方法的详细说明,以免不必要的细节妨碍本发明的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures, interfaces, and technologies are proposed so as to thoroughly understand the present invention. However, those skilled in the art should understand that the present invention can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, circuits, and methods are omitted to avoid unnecessary details hindering the description of the present invention.
实施例1Example 1
分片技术是目前提高区块链可扩展性最有前景的方向之一。通过将网络上的交易分为不同碎片,网络上的每个节点只需处理一小部分的交易,与其他网络节点并行验证交易,即可完成大量工作。目前的分片技术主要分为:网络分片,是指利用随机性,网络随机抽取节点形成碎片,来防止恶意节点过度填充单个片;交易分片,在一个基于UTXO的系统内,系统根据发送者的地址分配一个分片以确保两笔双花交易将在相同的分片中得到验证,系统可以很容易地检测到双花交易,而不需要进行任何跨片的通信;状态分片,在状态分片的情况下,每个碎片只保留状态的一部分,这是分片技术最难实现的一种方案。Sharding technology is currently one of the most promising directions for improving the scalability of blockchains. By dividing the transactions on the network into different fragments, each node on the network only needs to process a small part of the transactions and verify the transactions in parallel with other network nodes to complete a large amount of work. The current sharding technology is mainly divided into: network sharding, which refers to the use of randomness, the network randomly extracts nodes to form fragments to prevent malicious nodes from overfilling a single shard; transaction sharding, in a UTXO-based system, the system sends The address of the author is assigned a shard to ensure that two double-spend transactions will be verified in the same shard. The system can easily detect double-spend transactions without any cross-shard communication; state sharding, in In the case of state sharding, each shard only retains a part of the state, which is the most difficult solution for sharding technology.
参考图1所示,本发明实施例提供的一种网络可扩展性区块链实现方法包括:分片和领导选举、基于分片领导的共识同步、信誉评价机制和全局同步算法。本发明实施例通过信誉评价机制构建一种共识机制,基于此进行网络分片,提高区块链网络的可扩展性,提网络的交易处理速度。Referring to FIG. 1, a method for implementing network scalability blockchain provided by an embodiment of the present invention includes: sharding and leadership election, consensus synchronization based on sharding leadership, reputation evaluation mechanism, and global synchronization algorithm. The embodiment of the present invention builds a consensus mechanism through the reputation evaluation mechanism, based on which network segmentation is performed, the scalability of the blockchain network is improved, and the transaction processing speed of the network is improved.
参考图2,为本发明实施例提供的一种网络可扩展性区块链实现方法 的区块链网络系统结构示意图。首先进行分片和领导选举,随后共识同步,同时这两部分被包含在本发明实施例设计的信誉机制中;共识结束,最后将相关交易全局同步打包进区块链网络。Referring to FIG. 2, it is a schematic structural diagram of a blockchain network system for a network scalability blockchain implementation method provided by an embodiment of the present invention. First conduct sharding and leadership elections, and then consensus synchronization. At the same time, these two parts are included in the reputation mechanism designed by the embodiment of the present invention; the consensus ends, and finally the related transactions are packaged into the blockchain network synchronously globally.
分片和领导选举,在这个过程中,所有的验证节点在每一轮共识周期开始的时候将被分配到不同的组中形成若干分片,每个分片组会选择该组的领导。具体过程如下:当新一个新的共识周期e开始的时候,所有的验证节点被分配到不同的组中并根据组中节点由历史行为产生的信誉积分以正相关的概率选举出领导。特别地,验证节点使用前一个状态区块的哈希值来产生随机数从而引入随机性,随后,节点被随机地分配到各个分片中。Sharding and leader election. In this process, all the verification nodes will be assigned to different groups at the beginning of each consensus cycle to form a number of shards. Each sharding group will choose the leader of the group. The specific process is as follows: when a new consensus cycle e starts, all the verification nodes are assigned to different groups and the leader is elected with a positive correlation probability based on the credit scores generated by the historical behavior of the nodes in the group. In particular, the verification node uses the hash value of the previous state block to generate a random number to introduce randomness, and then the node is randomly allocated to each shard.
进一步地,所述验证节点被随机分配过程中通过分片算法确保每个分片的总信誉值基本相等,所述分片算法包括:Further, during the random assignment of the verification nodes, a sharding algorithm is used to ensure that the total reputation value of each shard is substantially equal. The sharding algorithm includes:
输入:Enter:
随机序列:
Figure PCTCN2018111248-appb-000002
其中,e表示第e个共识周期,SBH表示每个验证节点状态区块的哈希值,k表示第k个验证节点;
Random sequence:
Figure PCTCN2018111248-appb-000002
Among them, e represents the e-th consensus cycle, SBH represents the hash value of each verification node status block, and k represents the k-th verification node;
累计信誉分数集:
Figure PCTCN2018111248-appb-000003
其中,w表示累计信誉分数计算时期,r表示每个验证节点的累计信誉分数,k表示第k个验证节点;
Cumulative reputation score set:
Figure PCTCN2018111248-appb-000003
Among them, w represents the cumulative reputation score calculation period, r represents the cumulative reputation score of each verification node, and k represents the kth verification node;
输出:Output:
分片成员总集:C={c 1,c 2,…,c n},其中,n表示第n个分片,c表示每个分片的成员集; Total set of shard members: C = {c 1 , c 2 , ..., c n }, where n represents the n-th shard and c represents the member set of each shard;
分片领导集:L={l 1,l 2,…,l n},其中,n表示第n个分片,l表示每个分片的领导; Shard leader set: L = {l 1 , l 2 , ..., l n }, where n represents the nth shard and l represents the leader of each shard;
初始化,
Figure PCTCN2018111248-appb-000004
其中,i从1到n进行循环;
initialization,
Figure PCTCN2018111248-appb-000004
Among them, i loops from 1 to n;
循环中以Seed e为随机生成器RNG; Use Seed e as a random generator RNG in the loop;
将累计信誉分数集R w中的元素
Figure PCTCN2018111248-appb-000005
按照从大到小进行排序形成累计信誉分数排序集R sort
The elements in the cumulative reputation score set R w
Figure PCTCN2018111248-appb-000005
Sort from largest to smallest to form a cumulative reputation score sorting set R sort :
Figure PCTCN2018111248-appb-000006
其中,sort表示将累计信誉分数集R w 中的元素
Figure PCTCN2018111248-appb-000007
按照从大到小进行排序;
Figure PCTCN2018111248-appb-000006
Among them, sort means that the elements in the cumulative reputation score set R w
Figure PCTCN2018111248-appb-000007
Sort by largest to smallest;
对于R sort中的每一个
Figure PCTCN2018111248-appb-000008
执行:
For each of R sort
Figure PCTCN2018111248-appb-000008
carried out:
寻找一个序列{t 1,t 2,…,t j},形成C的子集
Figure PCTCN2018111248-appb-000009
并满足:
Find a sequence {t 1 , t 2 , ..., t j } to form a subset of C
Figure PCTCN2018111248-appb-000009
And meet:
Figure PCTCN2018111248-appb-000010
中的最小值;
Figure PCTCN2018111248-appb-000010
Minimum value
从随机生成器RNG中产生一个随机整数x;Generate a random integer x from the random generator RNG;
将与每个
Figure PCTCN2018111248-appb-000011
相对应的验证节点v g分配给
Figure PCTCN2018111248-appb-000012
其中,u=x除以j的余数+1;
Will work with each
Figure PCTCN2018111248-appb-000011
The corresponding verification node v g is assigned to
Figure PCTCN2018111248-appb-000012
Where u = x divided by the remainder of j + 1;
直到所有验证节点被随机分配后结束循环。The loop ends until all verification nodes are randomly assigned.
另外,领导的选举机制设计中,高于信誉积分排序中位数的验证节点以信誉积分正相关的概率成为分片领导。具体地,所述领导的选举机制的领导选举算法包括:In addition, in the design of the leadership's election mechanism, the verification node higher than the median of the credit score ranking becomes the shard leader with the probability that the credit score is positively correlated. Specifically, the leadership election algorithm of the leadership election mechanism includes:
对于分片成员总集C中的每一个元素c n,执行: For each element c n in the shard member total set C, execute:
rm=包含在c n中的所有验证节点累计信誉分数的中位数; rm = the median of the cumulative reputation scores of all the verification nodes included in c n ;
对于包含在c n中每一个验证节点v j,执行: For each verification node v j included in c n , execute:
如果,
Figure PCTCN2018111248-appb-000013
则,从随机生成器RNG中生成一个随机浮点数:
in case,
Figure PCTCN2018111248-appb-000013
Then, generate a random floating-point number from the random generator RNG:
Figure PCTCN2018111248-appb-000014
Figure PCTCN2018111248-appb-000014
如果,
Figure PCTCN2018111248-appb-000015
则,p i,j=+∞
in case,
Figure PCTCN2018111248-appb-000015
Then, p i, j = + ∞
当p i,m=(p i,1,p i,2,…p i,j)中的最小值时,l n=v mWhen p i, m = the minimum value in (p i, 1 , p i, 2 , ... p i, j ), l n = v m ;
一个c n执行结束; A c n execution ends;
直到遍历分片成员总集C中每一个元素,分片成员总集C结束执行循环;Until each element in the shard member ensemble C is traversed, the shard member ensemble C ends the execution loop;
领导选举算法结束循环。The leadership election algorithm ends the cycle.
基于分片领导的共识同步,交易发起者向负责处理该交易的分片发送交易(tx),随后该分片运行基于分片领导的共识同步算法,生成交易区块和信誉区块;此外,对于跨片交易,本本发明实施例中采用了原子性的跨片机制,以确保不出现双花。Based on the consensus synchronization of the shard leader, the transaction initiator sends a transaction (tx) to the shard responsible for processing the transaction, and then the shard runs the consensus synchronization algorithm based on the shard leader to generate transaction blocks and reputation blocks; in addition, For cross-slice transactions, the embodiment of the present invention uses an atomic cross-slice mechanism to ensure that double spending does not occur.
参考图4,与比特币类似,在本发明实施例中每笔交易(tx)将具有 唯一标识,输入UTXO列表和输出UTXO列表;所有网络验证节点均将交易发送到负责输入UTXO的分片,并输出这些交易中列出的UTXO,UTXO(UnspentTransactionOutputs)是比特币交易的基本单位,是未花费的交易输出,它是比特币交易生成及验证的一个核心概念。对于分片i,在本发明实施例中,它将用来验证交易ID除以分片组数的余数加1后为i的交易。由于UTXO的输入可能来自不同的分片,本发明实施例中涉及到的实现方法能够处理片内和跨片交易。Referring to FIG. 4, similar to Bitcoin, in the embodiment of the present invention, each transaction (tx) will have a unique identifier, input UTXO list and output UTXO list; all network verification nodes send the transaction to the shard responsible for input UTXO, And output the UTXO listed in these transactions. UTXO (UnspentTransactionOutputs) is the basic unit of bitcoin transactions and is the unspent transaction output. It is a core concept of bitcoin transaction generation and verification. For shard i, in the embodiment of the present invention, it will be used to verify the transaction where the transaction ID is divided by the remainder of the number of shard groups plus one and is i. Since the input of UTXO may come from different shards, the implementation method involved in the embodiments of the present invention can handle intra-slice and cross-slice transactions.
参考图4,对于片内交易,所述基于分片领导的共识同步算法包括:片内的领导(分片领导l j)将包含交易ID的列表签名(TxList,Sig lj为分片领导l j的签名)发送给所有片内的节点(分片成员V i);每一个网络验证节点检查交易列表中的交易ID并决定接受、拒绝还是无法确认该笔交易;网络验证节点将他们的决定签名(TxDec,Sig i为各个网络验证节点的签名)后传递给片内领导;领导在收集验证节点的决定后产生交易区块,该交易区块包含所有网络验证者的签名(sig 1、sig 2…sig i…sig m)和领导的签名
Figure PCTCN2018111248-appb-000016
每一个网络验证节点对相关区块的信息进行检查;参考图3,如果超过半数验证节点发出警报,那么片内领导将会被剔除出网络,同时该分片重新产生领导;当若干个交易区块产生,并且没有收到警报,网络验证节点将计算相应节点的信誉值,共同签名后生成信誉区块。
Referring to FIG. 4, for on-chip transactions, the consensus synchronization algorithm based on shard leadership includes: the on-chip leader (shard leader l j ) signs the list containing the transaction ID (TxList, Sig lj is the shard leader l j Signature) is sent to all nodes in the slice (shard member V i ); each network verification node checks the transaction ID in the transaction list and decides whether to accept, reject or fail to confirm the transaction; the network verification node signs their decision (TxDec, Sig i is the signature of each network verification node) and then passed to the on-chip leader; the leader generates a transaction block after collecting the decision of the verification node, the transaction block contains the signatures of all network verifiers (sig 1 , sig 2 … Sig i … sig m ) and the signature of the leader
Figure PCTCN2018111248-appb-000016
Each network verification node checks the information of the relevant block; referring to Figure 3, if more than half of the verification nodes issue an alarm, the on-chip leader will be removed from the network and the shard will regenerate the leader; when there are several transaction areas When the block is generated and no alarm is received, the network verification node will calculate the reputation value of the corresponding node and generate a reputation block after co-signing.
参考图4,对于跨片交易,所述基于分片领导的共识同步算法中,输入分片将交易列表(TxList)和交易决定列表(TxDecSet)发送到相关的输出分片和另外的输入分片。Referring to FIG. 4, for cross-shard transactions, in the consensus synchronization algorithm based on shard leadership, the input shard sends the transaction list (TxList) and the transaction decision list (TxDecSet) to the relevant output shard and other input shards .
值得一提的是,无论是片内交易或跨片交易,所述网络验证节点的交易决定列表(TxDecSet)包含多个签名sig 1、sig 2…sig i…sig m,每个签名都用于签署交易列表的一个子集,一个子集中的交易被发送到相同的输出分片以降低带宽成本;对于某个跨片分片的交易,如果相关UTXO未被使用或锁定,则分片将接受,否则将拒绝该交易;输入分片和输出分片都将锁定相关UTXO;当收到包含来自所有相关输入分片的输入 UTXO的交易决定列表的接受证明时,输出分片在交易区块上添加该交易;当输入分片从另外的相关输入分片收到接受证明时,将释放相关交易及其UTXO;及如果其中一个输入分片拒绝该交易,则相关的输入和输出分片将中止交易。 It is worth mentioning that, whether it is an on-chip transaction or a cross-chip transaction, the transaction decision list (TxDecSet) of the network verification node contains multiple signatures sig 1 , sig 2 … sig i … sig m , and each signature is used to Sign a subset of the transaction list, and the transactions in a subset are sent to the same output shard to reduce bandwidth costs; for a cross-shard transaction, if the relevant UTXO is not used or locked, the shard will be accepted , Otherwise the transaction will be rejected; both the input shard and the output shard will lock the relevant UTXO; when receiving the proof of acceptance of the transaction decision list containing the input UTXO from all relevant input shards, the output shard will be on the transaction block Add the transaction; when the input shard receives proof of acceptance from another related input shard, the related transaction and its UTXO will be released; and if one of the input shards rejects the transaction, the related input and output shard will be aborted transaction.
为了进一步提高本发明实施例公开的实现方法的交易处理能力,所述基于分片领导的共识同步算法采用并行处理的方式,如果不同的交易彼此不冲突,则将在不同的块中并行处理事务;更具体地,所述并行处理的方法包括:每个交易列表、交易决定列表和交易区块包含用于指示该轮共识周期的迭代次数;及领导者一旦从网络验证节点接收到前一轮的所有交易决定,就可以发送新的交易列表。回顾本发明实施例中的共识协议,由于采用同步协议,它保证在接收当前轮次的交易列表之前,多数诚实节点已完成将前一轮的交易决定列表发送给领导者的工作。因此,网络验证节点可以确定新的交易列表是否有效。In order to further improve the transaction processing capability of the implementation method disclosed in the embodiment of the present invention, the consensus synchronization algorithm based on sharding uses parallel processing. If different transactions do not conflict with each other, transactions will be processed in parallel in different blocks. ; More specifically, the method of parallel processing includes: each transaction list, transaction decision list, and transaction block contains the number of iterations used to indicate the round of consensus cycle; and once the leader receives the previous round from the network verification node You can send a new list of transactions when all transactions are decided. Recalling the consensus protocol in the embodiment of the present invention, since the synchronization protocol is adopted, it ensures that before receiving the transaction list of the current round, most honest nodes have completed the work of sending the previous round of transaction decision list to the leader. Therefore, the network verification node can determine whether the new transaction list is valid.
信誉评价机制,信誉评价机制有力地支持了前述的分片、共识同步方案。基于共识所有验证者的行为,所有网络验证节点均通过信誉评价机制进行信誉评分计算并针对信誉分数达成共识。通过累积信誉评价,分片和领导选举机制可以更加安全和高效。对一个片内交易,在共识周期结束之后,分片中的信誉分数可以由所有分片成员根据交易结论集和交易区块单独和一致地计算,信誉分数的机制可以根据需要进行可插拔设计,所述信誉评分计算的公式为:The reputation evaluation mechanism, which effectively supports the aforementioned sharding and consensus synchronization scheme. Based on the consensus of the behavior of all validators, all network verification nodes calculate the reputation score through the reputation evaluation mechanism and reach consensus on the reputation score. Through cumulative reputation evaluation, the sharding and leadership election mechanism can be more secure and efficient. For an intra-segment transaction, after the end of the consensus period, the reputation score in the shard can be calculated separately and uniformly by all shard members based on the transaction conclusion set and transaction block, and the reputation score mechanism can be pluggable as needed. , The formula for calculating the reputation score is:
Figure PCTCN2018111248-appb-000017
Figure PCTCN2018111248-appb-000017
其中,l为前一个信誉评价周期信誉区块之后生成的交易数量;T(j)为交易j的交易额;S(j)为交易j的缩放因子,用于差异地奖励或惩罚验证节点的行为。Among them, l is the number of transactions generated after the reputation block in the previous reputation evaluation cycle; T (j) is the transaction amount of transaction j; S (j) is the scaling factor of transaction j, used to differentially reward or punish the verification node behavior.
所述信誉评分计算中为不同的行为设置不同的缩放因子,使不诚实行为的惩罚大于诚实行为的奖励。由于非法交易被通过比被抛弃更加危险,因此,如果某个网络验证节点给出“是”而其他大多数给出“否”, 则网络验证节点将被给予更多的惩罚。对于“未知”决策,网络验证节点既不会获得信誉分数也不会损失信誉分数,因为这些验证节点通常具有较低的性能,无法及时通信(CPU、硬盘和带宽等)。In the reputation score calculation, different scaling factors are set for different behaviors, so that the punishment for dishonest behavior is greater than the reward for honest behavior. Because illegal transactions are more dangerous than being rejected, if a certain network verification node gives “Yes” and most others give “No”, the network verification node will be given more punishment. For "unknown" decisions, network verification nodes will neither obtain reputation scores nor lose reputation scores, because these verification nodes usually have lower performance and cannot communicate in time (CPU, hard disk, bandwidth, etc.).
参考图3,图中:
Figure PCTCN2018111248-appb-000018
为第e-1个共识周期的分片c 1的信誉区块,
Figure PCTCN2018111248-appb-000019
为第e个共识周期的分片c 1的诚实节点信誉区块,
Figure PCTCN2018111248-appb-000020
为第e个共识周期的分片c 1的恶意节点/潜在恶意节点信誉区块,
Figure PCTCN2018111248-appb-000021
为分片c 1的诚实节点状态区块,
Figure PCTCN2018111248-appb-000022
为分片c 1的恶意节点/潜在恶意节点状态区块,TB为诚实节点交易区块,TB′为恶意节点/潜在恶意节点交易区块,Nonce在密码学中是一个只被使用一次的任意或非重复的随机数值,在信誉评分计算完成后,网络验证节点使用共同签名生成所述信誉区块,所述信誉区块包含信誉评分、已确认的交易区块列表、先前的信誉区块和共同签名。具体而言,所述信誉区块的生成由区块领导和网络验证节点运行两个连续轮次,包括公布和承诺,挑战和响应先前一周期信誉区块的散列消息签名,这些签名包含同意块的验证者的数量和身份信息,另外的分片检查集体签名,如果超过一半的网络验证节点在块上签名,则接受交易区块;所述信誉区块提供证据证明超过一半的网络验证节点接受交易区块。在一个共识周期中,分片会将信誉区块打包进信誉链中。
Refer to Figure 3, in the figure:
Figure PCTCN2018111248-appb-000018
Is the reputation block of shard c 1 in the e-1th consensus cycle,
Figure PCTCN2018111248-appb-000019
Is the honest node reputation block of shard c 1 in the e-th consensus cycle,
Figure PCTCN2018111248-appb-000020
Is the reputation block of malicious node / potentially malicious node of slice c 1 of the e-th consensus cycle,
Figure PCTCN2018111248-appb-000021
Is the honest node state block of shard c 1 ,
Figure PCTCN2018111248-appb-000022
It is a malicious node / potentially malicious node status block of shard c 1 , TB is an honest node transaction block, and TB ′ is a malicious node / potential malicious node transaction block. Nonce is an arbitrary one used only once in cryptography. Or a non-repetitive random value, after the reputation score calculation is completed, the network verification node uses a common signature to generate the reputation block, the reputation block includes a reputation score, a list of confirmed transaction blocks, previous reputation blocks and Sign together. Specifically, the generation of the reputation block is run by the block leader and the network verification node in two consecutive rounds, including announcement and commitment, challenge and response to the hash message signature of the reputation block of the previous cycle, and these signatures include consent The number of block verifiers and identity information, and the other shards to check the collective signature, if more than half of the network verification nodes sign on the block, then accept the transaction block; the reputation block provides evidence that more than half of the network verification nodes Accept transaction blocks. In a consensus cycle, sharding will pack reputation blocks into the reputation chain.
全局同步算法,在每一个共识周期结束时,每个分片组均生成一个状态区块,将交易区块链和信誉区块链的记录打包,随后网络验证节点基于来自所有分片的状态区块,同步和更新存储的信誉值,结束之后开始下一个共识周期。为了减少整个区块链节点相互沟通的巨大网络开销,所述网络验证节点使用多方签名的方式来生成所述状态区块,所述网络验证节点使用工作量证明的方式在状态区块中生成随机数用于下一个共识周期的分片和领导选举。Global synchronization algorithm, at the end of each consensus cycle, each shard group generates a status block, packages the transaction blockchain and reputation blockchain records, and then the network verification node is based on the status area from all shards Block, synchronize and update the stored reputation value, and the next consensus cycle begins after the end. In order to reduce the huge network overhead for the entire blockchain node to communicate with each other, the network verification node uses a multi-party signature to generate the status block, and the network verification node uses a proof-of-work method to generate randomness in the status block The number is used for sharding and leadership elections in the next consensus cycle.
虽然,上文中已经用一般性说明及具体实施例对本发明作了详尽的描述,但在本发明基础上,可以对之作一些修改或改进,这对本领域技术人员而言是显而易见的。因此,在不偏离本发明精神的基础上所做的这些修改或改进,均属于本发明要求保护的范围。Although the present invention has been described in detail above with general description and specific embodiments, it can be modified or improved on the basis of the present invention, which is obvious to those skilled in the art. Therefore, these modifications or improvements made on the basis of not deviating from the spirit of the present invention belong to the scope claimed by the present invention.

Claims (10)

  1. 一种网络可扩展性区块链实现方法,其特征在于,所述实现方法包括:A network scalability block chain implementation method, characterized in that the implementation method includes:
    所有的验证节点在每一轮共识周期开始的时候将被分配到不同的组中形成若干分片;All verification nodes will be assigned to different groups to form several shards at the beginning of each round of consensus;
    每个分片根据对应组中节点的由历史行为产生的信誉积分以正相关的概率选举出领导;Each shard elects a leader with a positive correlation probability based on the credit scores of historical behaviors of the nodes in the corresponding group;
    交易发起者向负责处理该交易的分片发送交易,随后该分片运行基于分片领导的共识同步算法,生成交易区块和信誉区块;The transaction initiator sends the transaction to the shard responsible for processing the transaction, and then the shard runs a consensus synchronization algorithm based on the shard leader to generate transaction blocks and reputation blocks;
    基于共识所有验证者的行为,所有网络验证节点均通过信誉评价机制进行信誉评分计算并针对信誉分数达成共识;Based on the behavior of all validators in the consensus, all network verification nodes calculate the reputation score through the reputation evaluation mechanism and reach consensus on the reputation score;
    在信誉评分计算完成后,网络验证节点使用共同签名生成所述信誉区块,所述信誉区块包含信誉评分、已确认的交易区块列表、先前的信誉区块和共同签名;及After the reputation score calculation is completed, the network verification node uses a common signature to generate the reputation block, the reputation block includes a reputation score, a list of confirmed transaction blocks, a previous reputation block, and a common signature; and
    在每一个共识周期结束时,每个分片组均生成一个状态区块,将交易区块链和信誉区块链的记录打包,随后网络验证节点基于来自所有分片的状态区块,同步和更新存储的信誉值,结束之后开始下一个共识周期。At the end of each consensus cycle, each shard group generates a status block, packages the transaction blockchain and reputation blockchain records, and then the network verification node based on the status blocks from all shards, synchronizes and Update the stored reputation value and start the next consensus cycle after the end.
  2. 根据权利要求1所述的一种网络可扩展性区块链实现方法,其特征在于,所述验证节点使用前一个共识周期的状态区块的哈希值来产生随机数从而引入随机性,随后验证节点被随机分配到各个分片中。The method for implementing network scalability blockchain according to claim 1, wherein the verification node uses the hash value of the state block of the previous consensus cycle to generate a random number to introduce randomness, and then Verification nodes are randomly assigned to each shard.
  3. 根据权利要求1所述的一种网络可扩展性区块链实现方法,其特征在于,所述领导的选举机制中,高于信誉积分排序中位数的验证节点以信誉积分正相关的概率成为分片领导。A method for implementing network scalability blockchain according to claim 1, characterized in that, in the leadership's election mechanism, the verification node higher than the median of the credit score ranking becomes the probability of positive correlation of the credit score becomes Sharding leadership.
  4. 根据权利要求1所述的一种网络可扩展性区块链实现方法,其特征在于,每笔交易具有唯一标识,输入UTXO列表和输出UTXO列表;所有网络验证节点均将交易发送到负责输入UTXO的分片,并输出这些 交易中列出的UTXO。A method for implementing network scalability blockchain according to claim 1, characterized in that each transaction has a unique identifier, input UTXO list and output UTXO list; all network verification nodes send the transaction to the input UTXO And output the UTXO listed in these transactions.
  5. 根据权利要求1所述的一种网络可扩展性区块链实现方法,其特征在于,在所述基于分片领导的共识同步算法中,对于分片i,用来验证交易ID除以分片组数的余数加1后为i的交易。A method for implementing network scalability blockchain according to claim 1, wherein in the consensus synchronization algorithm based on shard leadership, for shard i, it is used to verify the transaction ID divided by the shard The remainder of the group number is increased by 1 for the transaction of i.
  6. 根据权利要求5所述的一种网络可扩展性区块链实现方法,其特征在于,对于片内交易,所述基于分片领导的共识同步算法包括:A method for implementing network scalability blockchain according to claim 5, characterized in that, for on-chip transactions, the consensus synchronization algorithm based on shard leadership includes:
    片内的领导将包含交易ID的列表签名发送给所有片内的节点;The leader in the chip sends the list signature containing the transaction ID to all nodes in the chip;
    每一个网络验证节点检查交易列表中的交易ID并决定接受、拒绝还是无法确认该笔交易;Each network verification node checks the transaction ID in the transaction list and decides whether to accept, reject or fail to confirm the transaction;
    网络验证节点将他们的决定签名后传递给片内领导;The network verification node will sign their decision and pass it to the on-chip leader;
    领导在收集验证节点的决定后产生交易区块,该交易区块包含所有网络验证者的签名和领导的签名;The leader generates a transaction block after collecting the decision of the verification node. The transaction block contains the signatures of all network verifiers and the signature of the leader;
    每一个网络验证节点对相关区块的信息进行检查;Each network verification node checks the relevant block information;
    如果超过半数验证节点发出警报,那么片内领导将会被剔除出网络,同时该分片重新产生领导;If more than half of the verification nodes issue an alarm, the on-chip leader will be removed from the network, and the shard will regenerate the leader;
    当若干个交易区块产生,并且没有收到警报,网络验证节点将计算相应节点的信誉值,共同签名后生成信誉区块。When several transaction blocks are generated and no alert is received, the network verification node will calculate the reputation value of the corresponding node and generate a reputation block after co-signing.
  7. 根据权利要求5所述的一种网络可扩展性区块链实现方法,其特征在于,对于跨片交易,所述基于分片领导的共识同步算法中,输入分片将交易列表和交易决定列表发送到相关的输出分片和另外的输入分片。A method for implementing network scalability blockchain according to claim 5, characterized in that, for cross-shard transactions, in the consensus synchronization algorithm based on shard leadership, input shards will be a transaction list and a transaction decision list Send to the relevant output shard and another input shard.
  8. 根据权利要求6或7所述的一种网络可扩展性区块链实现方法,其特征在于,所述网络验证节点的交易决定列表包含多个签名,每个签名都用于签署交易列表的一个子集,一个子集中的交易被发送到相同的输出分片以降低带宽成本。A method for implementing network scalability blockchain according to claim 6 or 7, wherein the transaction decision list of the network verification node contains multiple signatures, and each signature is used to sign a transaction list In a subset, transactions in a subset are sent to the same output shard to reduce bandwidth costs.
  9. 根据权利要求6或7所述的一种网络可扩展性区块链实现方法,其特征在于,所述基于分片领导的共识同步算法采用并行处理的方式,如果不同的交易彼此不冲突,则将在不同的块中并行处理事务;所述并 行处理的方法包括:A method for implementing network scalability blockchain according to claim 6 or 7, characterized in that the consensus synchronization algorithm based on shard leadership adopts parallel processing, if different transactions do not conflict with each other, then Transactions will be processed in parallel in different blocks; the parallel processing method includes:
    每个交易列表、交易决定列表和交易区块包含用于指示该轮共识周期的迭代次数;及Each transaction list, transaction decision list, and transaction block contains the number of iterations used to indicate the round of consensus cycles; and
    领导者一旦从网络验证节点接收到前一轮的所有交易决定,就可以发送新的交易列表。Once the leader receives all the transaction decisions of the previous round from the network verification node, it can send a new transaction list.
  10. 根据权利要求1所述的一种网络可扩展性区块链实现方法,其特征在于,所述信誉评分计算的公式为:A method for implementing network scalability blockchain according to claim 1, wherein the formula for calculating the reputation score is:
    Figure PCTCN2018111248-appb-100001
    Figure PCTCN2018111248-appb-100001
    其中,l为前一个信誉评价周期信誉区块之后生成的交易数量;Among them, l is the number of transactions generated after the reputation block in the previous reputation evaluation cycle;
    T(j)为交易j的交易额;S(j)为交易j的缩放因子,用于差异地奖励或惩罚验证节点的行为;T (j) is the transaction amount of transaction j; S (j) is the scaling factor of transaction j, used to differentially reward or punish the behavior of the verification node;
    所述信誉评分计算中为不同的行为设置不同的缩放因子,使不诚实行为的惩罚大于诚实行为的奖励,对于“未知”决策,网络验证节点既不会获得信誉分数也不会损失信誉分数。In the reputation score calculation, different scaling factors are set for different behaviors, so that the punishment for dishonest behavior is greater than the reward for honest behavior. For "unknown" decisions, the network verification node will neither obtain reputation score nor lose reputation score.
PCT/CN2018/111248 2018-10-22 2018-10-22 Network expandability blockchain implementation method WO2020082213A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/111248 WO2020082213A1 (en) 2018-10-22 2018-10-22 Network expandability blockchain implementation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/111248 WO2020082213A1 (en) 2018-10-22 2018-10-22 Network expandability blockchain implementation method

Publications (1)

Publication Number Publication Date
WO2020082213A1 true WO2020082213A1 (en) 2020-04-30

Family

ID=70330792

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/111248 WO2020082213A1 (en) 2018-10-22 2018-10-22 Network expandability blockchain implementation method

Country Status (1)

Country Link
WO (1) WO2020082213A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111612466A (en) * 2020-01-17 2020-09-01 厦门潭宏信息科技有限公司 Consensus and resource transmission method, device and storage medium
CN112346708A (en) * 2020-11-11 2021-02-09 上海科技大学 Method for improving block chain throughput by using zturk low-delay modular square algorithm
CN112733202A (en) * 2021-01-11 2021-04-30 杭州复杂美科技有限公司 Parallel chain supervision consensus method, computer device and storage medium
CN113487400A (en) * 2021-06-04 2021-10-08 长春工业大学 Financial credit consensus method based on honesty bidirectional selection

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453286A (en) * 2016-09-27 2017-02-22 北京天德科技有限公司 Reputation method and system based on block chain
US9703986B1 (en) * 2015-05-13 2017-07-11 Anonyome Labs, Inc. Decentralized reputation service for synthetic identities
CN108122165A (en) * 2017-12-15 2018-06-05 北京中电普华信息技术有限公司 A kind of block chain common recognition method and system
US9990418B1 (en) * 2017-05-19 2018-06-05 2020 Ip Llc System and method for creating an opinion and behavioral data economy
CN108492103A (en) * 2018-02-07 2018-09-04 北京大学深圳研究生院 A kind of alliance's block chain common recognition method
CN108632362A (en) * 2018-04-12 2018-10-09 北京天德科技有限公司 A kind of method that privately owned block chain builds the election of block node
CN108667632A (en) * 2018-04-19 2018-10-16 阿里巴巴集团控股有限公司 Based on the credit record sharing method and device of block chain, electronic equipment
CN109544334A (en) * 2018-10-22 2019-03-29 绿州蔚来(深圳)控股有限公司 A kind of network scalability block chain implementation method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9703986B1 (en) * 2015-05-13 2017-07-11 Anonyome Labs, Inc. Decentralized reputation service for synthetic identities
CN106453286A (en) * 2016-09-27 2017-02-22 北京天德科技有限公司 Reputation method and system based on block chain
US9990418B1 (en) * 2017-05-19 2018-06-05 2020 Ip Llc System and method for creating an opinion and behavioral data economy
CN108122165A (en) * 2017-12-15 2018-06-05 北京中电普华信息技术有限公司 A kind of block chain common recognition method and system
CN108492103A (en) * 2018-02-07 2018-09-04 北京大学深圳研究生院 A kind of alliance's block chain common recognition method
CN108632362A (en) * 2018-04-12 2018-10-09 北京天德科技有限公司 A kind of method that privately owned block chain builds the election of block node
CN108667632A (en) * 2018-04-19 2018-10-16 阿里巴巴集团控股有限公司 Based on the credit record sharing method and device of block chain, electronic equipment
CN109544334A (en) * 2018-10-22 2019-03-29 绿州蔚来(深圳)控股有限公司 A kind of network scalability block chain implementation method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WANG, XING ET AL.: "Blockchain System for Creating Digital Assets Based on Reputation Value", NETINFO SECURITY, vol. 18, no. 5, 31 May 2018 (2018-05-31), pages 59 - 65, XP055707474, ISSN: 1671-1122, DOI: 20190703211308A *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111612466A (en) * 2020-01-17 2020-09-01 厦门潭宏信息科技有限公司 Consensus and resource transmission method, device and storage medium
CN112346708A (en) * 2020-11-11 2021-02-09 上海科技大学 Method for improving block chain throughput by using zturk low-delay modular square algorithm
CN112346708B (en) * 2020-11-11 2023-07-21 上海科技大学 Method for improving throughput of blockchain by using Sizt low-delay modulus squaring algorithm
CN112733202A (en) * 2021-01-11 2021-04-30 杭州复杂美科技有限公司 Parallel chain supervision consensus method, computer device and storage medium
CN112733202B (en) * 2021-01-11 2022-09-13 杭州复杂美科技有限公司 Parallel chain supervision consensus method, computer device and storage medium
CN113487400A (en) * 2021-06-04 2021-10-08 长春工业大学 Financial credit consensus method based on honesty bidirectional selection
CN113487400B (en) * 2021-06-04 2022-10-11 长春工业大学 Financial credit consensus method based on honesty bidirectional selection

Similar Documents

Publication Publication Date Title
CN109544334B (en) Method for realizing network extensible block chain
KR101950912B1 (en) Verification system and method for transaction based block chain
WO2020082213A1 (en) Network expandability blockchain implementation method
AU2020200149B2 (en) Methods and apparatus for a distributed database within a network
CN109150972B (en) Working method of consensus mechanism of double-layer partitioned efficient block chain
JP7211943B2 (en) Method and Apparatus for Distributed Database Enabling Deletion of Events
CN110800005B (en) Split, licensed and distributed ledger
Baird The swirlds hashgraph consensus algorithm: Fair, fast, byzantine fault tolerance
Debus Consensus methods in blockchain systems
Robinson et al. Atomic crosschain transactions for ethereum private sidechains
JP2023018005A (en) Block chain for general calculation
CN109815373B (en) Data storage control method and device, server and readable storage medium
JP7319961B2 (en) Computer-implemented systems and methods related to binary blockchains forming a pair of coupled blockchains
CN111445334A (en) Aggregation signature method and device for block chain system and storage medium
CN110363527A (en) Card, monitoring and managing method and device are deposited based on block chain
KR102537774B1 (en) Systems and methods that provide specialized proof of confidential knowledge
Yadav et al. A comparative study on consensus mechanism with security threats and future scopes: Blockchain
Sun et al. Rtchain: A reputation system with transaction and consensus incentives for e-commerce blockchain
CN106920097A (en) A kind of generation time block chain method of Quantum Chain common recognition agreement
Zaman et al. Proof of sincerity: A new lightweight consensus approach for mobile blockchains
Aluko et al. Proof-of-reputation: an alternative consensus mechanism for blockchain systems
Hsueh et al. EPoW: Solving blockchain problems economically
US20220278854A1 (en) Unity Protocol Consensus
Masood et al. Consensus algorithms in distributed ledger technology for open environment
JP7073240B2 (en) Blockchain management system, blockchain management method and blockchain management program

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: 18937975

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 16/06/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18937975

Country of ref document: EP

Kind code of ref document: A1