+

CN108269090B - Consensus method and device for block chain system based on non-negotiation random drawing - Google Patents

Consensus method and device for block chain system based on non-negotiation random drawing Download PDF

Info

Publication number
CN108269090B
CN108269090B CN201810065943.0A CN201810065943A CN108269090B CN 108269090 B CN108269090 B CN 108269090B CN 201810065943 A CN201810065943 A CN 201810065943A CN 108269090 B CN108269090 B CN 108269090B
Authority
CN
China
Prior art keywords
block
node
endorsement
nodes
negotiation
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201810065943.0A
Other languages
Chinese (zh)
Other versions
CN108269090A (en
Inventor
陈�胜
李春晓
左春
蒋步云
史殿岳
徐昊
武斌
梁赓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Software of CAS
Original Assignee
Institute of Software of CAS
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 Institute of Software of CAS filed Critical Institute of Software of CAS
Priority to CN201810065943.0A priority Critical patent/CN108269090B/en
Publication of CN108269090A publication Critical patent/CN108269090A/en
Application granted granted Critical
Publication of CN108269090B publication Critical patent/CN108269090B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明提供一种基于无协商随机抽签的用于区块链系统的共识方法和装置。所述方法包括:在接收到合法的区块之后,根据全网信任证书列表确定当前具备候选资格的节点;对当前具备候选资格的节点进行无协商随机抽签,获得按顺序排列的节点序列,该序列决定了在随后的每个特定时段,拥有出块资格的唯一出块节点。在随后的每个特定时段内,出块节点发送预出块并收集背书;背书节点在接收到背书请求之后,检查预出块的合法性并对合法的预出块签名;在出块节点收集到超过50%的背书签名之后,将背书签名追加到预出块,形成正式区块,向全网广播。本发明能够防止恶意节点操纵抽签结果,确保区块链运行的安全性;另一方面,由于在每个特定时段只有唯一节点拥有出块资格,避免了竞争性的分叉,从而提高区块链系统的交易实时性。

Figure 201810065943

The present invention provides a consensus method and device for a blockchain system based on random drawing of lots without negotiation. The method includes: after receiving a legal block, determining a node currently eligible for candidacy according to a list of trust certificates of the entire network; performing a random lottery without negotiation on the node currently eligible for candidacy to obtain a sequence of nodes arranged in order, the The sequence determines the unique block producing node that is eligible to produce blocks in each specific period that follows. In each subsequent specific period, the block producing node sends the pre-produced block and collects endorsements; after receiving the endorsement request, the endorsing node checks the validity of the pre-produced block and signs the legal pre-produced block; After more than 50% of the endorsement signatures are reached, the endorsement signatures are added to the pre-produced block to form a formal block and broadcast to the entire network. The invention can prevent malicious nodes from manipulating the lottery results and ensure the security of blockchain operation; on the other hand, since only a unique node has the qualification to produce blocks in each specific period, competitive forks are avoided, thereby improving the blockchain The real-time transaction of the system.

Figure 201810065943

Description

Consensus method and device for block chain system based on non-negotiation random drawing
Technical Field
The invention relates to the technical field of block chains, in particular to a consensus method and device for a block chain system based on non-negotiation random drawing.
Background
Each node of the block chain locally maintains an account book formed by linking front and back blocks, each block records the change of the account book from the previous state to the next state, and the change is embodied as a transaction set and the sequence thereof in the block. The term "input consensus" refers to that at each node of a blockchain network, the blocks of the same height contain a consistent set of transactions and their order. Input consensus is a guarantee that the blockchain system achieves ledger consistency-if each node is consistent in an initial state and changes experienced from a previous state to a subsequent state are also consistent, then their subsequent states should also be consistent, and so on their latest states should also be consistent, thereby achieving synchronization of the distributed ledger.
To achieve input consensus between block link points (i.e., change consensus to transition from a current state to a next state), there are two approaches: firstly, the change is achieved through mutual communication negotiation among nodes; secondly, temporary negotiation is not needed, a rule is agreed and built in advance before the node, and how to change is determined by the rule. Considering the delay of network communication and the time-consuming parsing and answering of the negotiation protocol by the node, it is obvious that the latter has great advantages in achieving the real-time property of input consensus and saving the computation power. But the potential safety hazard of the non-negotiation mode is as follows: since such rules are agreed upon in advance, there is a risk of being manipulated by a human.
Disclosure of Invention
The consensus method and the device for the blockchain system based on the non-negotiation random drawing can prevent malicious nodes from manipulating the drawing result and ensure the safety of blockchain operation; on the other hand, only the unique node has block qualification in each specific time period, so that competitive bifurcation is avoided, and the transaction real-time performance of the block chain system is improved.
In a first aspect, the present invention provides a consensus method for blockchain system based on non-negotiation random drawing, where the method includes:
after a legal block is received, determining a node which is qualified as a candidate currently according to a whole network trust certificate list;
carrying out non-negotiation random drawing on the nodes with the candidate qualification at present to obtain a node sequence arranged in sequence, wherein the node sequence determines the only block outlet node with the block qualification at each subsequent specific time period;
in each subsequent specific time period, the block output node sends a pre-output block and collects endorsements;
after receiving the endorsement request, the endorsement node checks the legality of the pre-output block and signs the legal pre-output block;
after more than 50% endorsement signatures are collected by the block output node, the endorsement signatures are added to the pre-output block to form a formal block, and the formal block is broadcasted to the whole network.
Optionally, the performing a non-negotiation random drawing on the node currently having the candidate qualification to obtain a sequence of sequentially arranged nodes includes: and taking the received hash value of the legal block as a random seed, taking the set of nodes with candidate qualification as input, and executing the same formula to obtain a node sequence arranged in sequence.
Optionally, the sending the pre-out block and collecting the endorsement in each subsequent specific time period comprises:
in each subsequent specific time period, sequencing and pre-executing according to the collected transactions to obtain an effective transaction set, packaging and signing to form a pre-outgoing block, broadcasting to an endorsement node, and requesting the endorsement node to sign the pre-outgoing block;
signatures of endorsement nodes are collected.
Optionally, the method further comprises: after the block output node finishes formal block output, locally determining the node with candidate qualification in the next round, and performing non-negotiation random drawing.
Optionally, the method further comprises: after the full network node receives a formal block of a broadcast, checking the legality of the formal block;
after the validity check of the formal block is passed, sequentially executing the transactions in the formal block to complete state transition;
and locally determining the node with candidate qualification of the next round, and carrying out non-negotiation random drawing.
Optionally, the method further comprises:
and if the state migration is not finished in the block output time period, designating the next node in the node sequence as a legal block output node of the current time period.
In a second aspect, the present invention provides a consensus device for blockchain system based on non-negotiation random drawing, the device comprising:
the determining unit is used for determining the current nodes with candidate qualification according to the whole network trust certificate list after the legal blocks are received;
the first election unit carries out non-negotiation random drawing and signing on the nodes with the candidate qualification at present to obtain a node sequence arranged in sequence, wherein the node sequence determines the only block outlet node with the block qualification in each subsequent specific time period;
the pre-execution unit is used for sending a pre-output block and collecting endorsements by the output block node in each subsequent specific time period;
the endorsement unit is used for checking the legality of the pre-output block and signing the legal pre-output block after the endorsement node receives the endorsement request;
and the block output unit is used for adding the endorsement signatures to the pre-output block after the block output node collects more than 50% of the endorsement signatures to form a formal block and broadcasting the formal block to the whole network.
Optionally, the first election unit is configured to execute the same equation by taking the received hash value of the legal block as a random seed and taking the set of nodes that currently have the candidate qualification as an input, and obtain a sequence of nodes arranged in order.
Optionally, the pre-execution unit includes:
the system comprises a pre-execution module, a data processing module and a data processing module, wherein the pre-execution module is used for sequencing and pre-executing according to collected transactions to obtain an effective transaction set, forming a pre-output block after packaging and signing, broadcasting the pre-output block to an endorsement node and requesting the endorsement node to sign the pre-output block;
and the collection module is used for collecting the signature of the endorsement node.
Optionally, the apparatus further comprises:
and the second election unit is used for locally determining the node with candidate qualification in the next round after the block output unit finishes formal block output and performing non-negotiation random drawing.
Optionally, the apparatus further comprises:
the system comprises a checking unit, a judging unit and a judging unit, wherein the checking unit is used for checking the validity of a formal block after the formal block of the broadcast is received by a whole network node;
the execution unit is used for sequentially executing the transactions in the formal block after the validity check of the formal block passes and finishing the state transition;
and the third election unit is used for locally determining the node with candidate qualification in the next round and carrying out non-negotiation random drawing.
Optionally, the apparatus further comprises:
and the specifying unit is used for specifying the next node in the node sequence as a legal block output node of the current time period if the state migration is not completed in the block output time period.
According to the consensus method and device for the block chain system based on the non-negotiation random drawing, provided by the embodiment of the invention, each node elects a consistent block output node sequence based on a non-negotiation random drawing algorithm, so that input consensus among distributed nodes is achieved, transactions in blocks are executed in sequence according to an election result, and the migration of a previous state to a next state of the block chain is completed. Compared with the prior art, the invention can prevent malicious nodes from operating the drawing result and ensure the safety of block chain operation; on the other hand, only the unique node has block qualification in each specific time period, so that competitive bifurcation is avoided, and the transaction real-time performance of the block chain system is improved.
Drawings
Fig. 1 is a flowchart of a consensus method for blockchain systems based on non-negotiation random drawing according to an embodiment of the present invention;
fig. 2 is a flowchart of a consensus method for blockchain systems based on non-negotiated random drawing according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a consensus device for blockchain system based on non-negotiation random drawing according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The non-negotiation consensus mechanism adopted by the invention achieves the effect that the consensus result can not be predicted in advance by presetting and embedding a rule between the nodes and introducing unpredictable random factors on the rule. The invention adopts a negotiation-free random draw algorithm (CFRD) to realize the aim. Based on the non-negotiation random drawing algorithm, the invention provides a consensus method for a block chain system based on non-negotiation random drawing, as shown in fig. 1, the method comprises:
s11, after a legal block is received, determining a node with candidate qualification according to the whole network trust certificate list;
s12, carrying out non-negotiation random drawing on the current candidate qualified nodes to obtain a node sequence arranged in sequence, wherein the node sequence determines the only block outlet node with block qualification in each subsequent specific time period;
specifically, S11 and S12 are processes for executing the non-negotiation random drawing algorithm, and the precondition for executing the non-negotiation random drawing algorithm provided by the present invention includes: each node of the block chain networking is provided with a means for communicating with other nodes; each node maintains a whole network trust certificate list; each node that may become a candidate constantly collects the transactions that are propagated throughout the network.
The time for triggering the non-negotiation random drawing algorithm provided by the invention is as follows: after each node receives the last legal block, the next round of election of the sequence of nodes responsible for the outgoing block is triggered locally.
Optionally, the determining, according to the full-network trust certificate list, a node currently qualified as a candidate includes: after receiving the formal block, determining nodes which are qualified as candidates at present according to role configuration by taking the nodes in the network as a complete set;
the performing non-negotiation random drawing on the nodes with the current candidate qualification to obtain the node sequence arranged in sequence comprises: and taking the received hash value of the legal block as a random seed, taking the set of nodes with candidate qualification as input, and executing the same formula to obtain a node sequence arranged in sequence.
Because the hash value of the last formal block is disturbed by factors which can not be predicted in advance, such as a timestamp, a transaction set and the like, the election result can not be predicted, so that the malicious nodes are prevented from operating the election, and meanwhile, the hash value is consistent on each node, so that each node operates respectively, and the obtained election result is consistent. By achieving the input consensus without negotiation, the consensus cost can be greatly reduced, and the transaction flux and the transaction real-time performance of the blockchain system are improved.
After the non-negotiation random drawing is completed, it is decided that in the current round of block, every certain time period, a certain node must be in one of the following three roles:
out-of-block node (packer): the system is responsible for determining the transaction set and the sequence of the blocks in the current round; and sending a pre-output block and collecting endorsements, and if the endorsements with sufficient amount are collected and the formal endorsement is finished, finishing the state transition and triggering the execution of a next round of non-negotiation random drawing algorithm.
Endorsement node (Endorser): the system is responsible for checking the validity of the pre-output block sent by the Blocker, and if the pre-output block is legal, endorsement signing is carried out on the pre-output block; and receiving the formal block and checking the legality of the formal block, if the formal block passes the checking, sequentially executing the transaction in the formal block, completing state transition, and triggering the next round of execution of the non-negotiation random drawing algorithm.
Common node (Follower): and receiving the formal block and checking the legality of the formal block, if the formal block passes the checking, sequentially executing the transaction in the formal block, completing state transition, and triggering the next round of execution of the non-negotiation random drawing algorithm.
Each block output node in the sequence has a block output time period corresponding to the sequence, the time period base line is the time when the last formal block is received, each node receives the time in sequence, the time base line error between the nodes depends on the network propagation speed of the formal block, and the error is in a range capable of being pre-judged for most normal nodes, so that the system can set block output overtime time according to the pre-judgment, and the block output overtime can be realized: the block output node has enough time to finish the block output; most nodes can correctly determine the time quantum qualification of the block-righting person.
Assuming that a node currently qualified as a candidate is subjected to non-negotiation random drawing, a node sequence responsible for block outputting is obtained as [ Blocker1, Blocker2, … and blockern ], a block timeout is configured to be 1 minute, then all nodes acknowledge that the block 1 has block qualification (Blocker) at the 1 st minute, other nodes in the sequence have endorsement qualification (Endorser), and nodes not in the sequence are ordinary nodes (Follower). As shown in fig. 2, it is a flowchart of operations of the export node block 1, the endorsement node block 2 and the common node Follower.
S13, in each specific period, the block output node sends a pre-output block and collects endorsements;
optionally, the sending a pre-egress block and collecting endorsements in the egress block time period of the egress block node includes:
in each subsequent specific time period, sequencing and pre-executing according to the collected transactions to obtain an effective transaction set, packaging and signing to form a pre-outgoing block, broadcasting to an endorsement node, and requesting the endorsement node to sign the pre-outgoing block;
signatures of endorsement nodes are collected.
Within the 1 st minute, the blocker1 sorts and pre-executes the transactions it collects, obtains a sorted valid set of transactions, packages and signs them, and broadcasts them to the endorsement node.
S14, after receiving the endorsement request, the endorsement node checks the validity of the pre-output block and signs the legal pre-output block;
after receiving the endorsement request, the endorsement node verifies the validity of the sender block 1, and the verification process comprises the following steps: in contrast to the local election results, the following checks are performed:
1. whether sender blocker1 is the out-blockman elected in the round;
2. whether the current slot is an out-of-block slot of block 1;
3. whether each transaction in the package has a legal signature;
4. pre-executing each transaction in sequence, and judging whether the execution process is normal or not; whether the output result is consistent with what block 1 claims in the spine block.
If both checks pass, the endorsement node signs the block.
And S15, after the endorsement signatures of more than 50% are collected at the block output node, adding the endorsement signatures to the pre-output block to form a formal block, and broadcasting the formal block to the whole network.
The node of the block is collected to have more than 50% endorsement signature to form a formal block, and the selection result of the non-negotiation random drawing algorithm is applied in the process to prevent the attack of non-51% nodes.
Optionally, the method further comprises: after the block output node finishes formal block output, locally determining the node with candidate qualification in the next round, and performing non-negotiation random drawing.
After blocker1 completes the formal out of the block, the execution of the next round of the non-negotiated random drawing algorithm is triggered locally.
Optionally, the method further comprises: after the full network node receives a formal block of a broadcast, checking the legality of the formal block;
after the validity check of the formal block is passed, sequentially executing the transactions in the formal block to complete state transition;
and locally determining the node with candidate qualification of the next round, and carrying out non-negotiation random drawing.
After each node of the whole network receives the formal block, the following checks are performed:
1. whether sender blocker1 is the out-blockman elected in the round;
2. whether the current slot is an out-of-block slot of block 1;
3. whether the endorsement signer qualifies for endorsement;
4. whether the number of endorsement signatures meets the requirement or not.
If the checks pass, the node acknowledges the validity of the block and executes the transaction in the block to realize the transition from the former state to the latter state. Each node locally triggers the execution of the next round of the non-negotiated random drawing algorithm.
Optionally, the method further comprises: and if the state migration is not finished in the block output time period, designating the next node in the node sequence as a legal block output node of the current time period.
If the formal block output is not completed in the block output period (1 st minute) of the agreed block 1, the whole network node regards the next block output node block 2 as a legal block output node of the current period according to the block output node sequence, and so on.
In the consensus method for the blockchain system based on non-negotiation random drawing provided by the embodiment of the invention, each node elects a consistent block output node sequence based on a non-negotiation random drawing algorithm to achieve input consensus among distributed nodes, and executes transactions in a block according to an election result in sequence to complete the transition from a previous state to a next state of the blockchain. Compared with the prior art, the invention can prevent malicious nodes from operating the drawing result and ensure the safety of block chain operation; on the other hand, only the unique node has block qualification in each specific time period, so that competitive bifurcation is avoided, and the transaction real-time performance of the block chain system is improved.
An embodiment of the present invention further provides a consensus device for a blockchain system based on non-negotiation random drawing, as shown in fig. 3, where the device includes:
a determining unit 11, configured to determine, after a legal block is received, a node currently qualified as a candidate according to the whole network trust certificate list;
the first election unit 12 performs non-negotiation random drawing on the nodes with the candidate qualification at present to obtain a node sequence arranged in sequence, wherein the node sequence determines the only block-out node with the block qualification in each subsequent specific time period;
a pre-execution unit 13, configured to send a pre-outgoing block and collect endorsements by the outgoing block node in each subsequent specific time period;
an endorsement unit 14, configured to check validity of the pre-endorsement block and sign the legal pre-endorsement block after the endorsement node receives the endorsement request;
and the block output unit 15 is used for adding the endorsement signatures to the pre-output block after the block output node collects more than 50% of the endorsement signatures to form a formal block and broadcasting the formal block to the whole network.
Optionally, the first election unit is configured to execute the same equation by taking the received hash value of the legal block as a random seed and taking the set of nodes that currently have the candidate qualification as an input, and obtain a sequence of nodes arranged in order.
Optionally, the pre-execution unit 13 includes:
the system comprises a pre-execution module, a data processing module and a data processing module, wherein the pre-execution module is used for sequencing and pre-executing according to collected transactions to obtain an effective transaction set, forming a pre-output block after packaging and signing, broadcasting the pre-output block to an endorsement node and requesting the endorsement node to sign the pre-output block;
and the collection module is used for collecting the signature of the endorsement node.
Optionally, the apparatus further comprises:
and the second election unit is used for locally determining the node with candidate qualification in the next round after the block output unit finishes formal block output and performing non-negotiation random drawing.
Optionally, the apparatus further comprises:
the system comprises a checking unit, a judging unit and a judging unit, wherein the checking unit is used for checking the validity of a formal block after the formal block of the broadcast is received by a whole network node;
the execution unit is used for sequentially executing the transactions in the formal block after the validity check of the formal block passes and finishing the state transition;
and the third election unit is used for locally determining the node with candidate qualification in the next round and carrying out non-negotiation random drawing.
Optionally, the apparatus further comprises:
and the specifying unit is used for specifying the next node in the node sequence as a legal block output node of the current time period if the state migration is not completed in the block output time period.
In the consensus device for a blockchain system based on non-negotiation random drawing provided in the embodiments of the present invention, each node elects a consistent sequence of block output nodes based on a non-negotiation random drawing algorithm to achieve input consensus among distributed nodes, and executes transactions in a block in order according to an election result to complete transition from a previous state to a subsequent state of a blockchain. Compared with the prior art, the invention can prevent malicious nodes from operating the drawing result and ensure the safety of block chain operation; on the other hand, only the unique node has block qualification in each specific time period, so that competitive bifurcation is avoided, and the transaction real-time performance of the block chain system is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1.一种基于无协商随机抽签的用于区块链系统的共识方法,其特征在于,所述方法包括:1. A consensus method for a blockchain system based on random drawing of lots without negotiation, wherein the method comprises: 在接收到合法的区块之后,根据全网信任证书列表确定当前具备候选资格的节点;After receiving a legal block, determine the node currently eligible for candidacy according to the list of trust certificates of the whole network; 对当前具备候选资格的节点进行无协商随机抽签,获得按顺序排列的节点序列,所述节点序列决定了在随后的每个特定时段,拥有出块资格的唯一出块节点;其中,在进行无协商随机抽签时,以接收到的合法区块的哈希值为随机种子,以当前具备候选资格的节点的集合为输入,执行相同的算式,获得按顺序排列的节点序列;A random lottery without negotiation is performed on the nodes currently eligible for candidacy to obtain a sequence of nodes arranged in order. When negotiating a random lottery, the hash value of the received legal block is used as a random seed, and the set of nodes currently qualified as candidates is used as input, and the same formula is executed to obtain a sequence of nodes arranged in order; 在随后的每个特定时段内,出块节点发送预出块并收集背书;In each subsequent specific period, the block producing node sends pre-produced blocks and collects endorsements; 背书节点在接收到背书请求之后,检查预出块的合法性并对合法的预出块签名;After receiving the endorsement request, the endorsement node checks the legitimacy of the pre-produced block and signs the legal pre-produced block; 在出块节点收集到超过50%的背书签名之后,将背书签名追加到预出块,形成正式区块,向全网广播。After the block-producing node collects more than 50% of the endorsement signatures, it appends the endorsement signatures to the pre-produced block to form a formal block and broadcasts it to the entire network. 2.根据权利要求1所述的方法,其特征在于,所述在随后的每个特定时段内,发送预出块并收集背书包括:2. The method according to claim 1, wherein, in each subsequent specific time period, sending the pre-produced block and collecting the endorsement comprises: 在随后的每个特定时段内,根据收集的交易进行排序并预执行,获得有效的交易集合,进行打包和签名之后形成预出块,广播到背书节点,请求背书节点对所述预出块进行签名;In each subsequent specific period, the collected transactions are sorted and pre-executed to obtain a valid transaction set, packaged and signed to form a pre-produced block, broadcast to the endorsing node, and request the endorsing node to carry out the pre-produced block. sign; 收集背书节点的签名。Collect signatures of endorsing peers. 3.根据权利要求1所述的方法,其特征在于,所述方法还包括:在出块节点完成正式出块之后,在本地确定下一轮具备候选资格的节点,进行无协商随机抽签。3 . The method according to claim 1 , wherein the method further comprises: after the block producing node completes the formal block production, locally determining the nodes with the next round of candidate qualifications, and performing a random lottery without negotiation. 4 . 4.根据权利要求1所述的方法,其特征在于,所述方法还包括:在全网节点接收到广播的正式区块之后,检查所述正式区块的合法性;4. The method according to claim 1, wherein the method further comprises: checking the validity of the official block after the nodes of the entire network receive the broadcasted official block; 在正式区块的合法性检查通过之后,顺序执行正式区块中的交易,完成状态迁移;After the legality check of the formal block is passed, the transactions in the formal block are executed sequentially to complete the state transition; 在本地确定下一轮具备候选资格的节点,进行无协商随机抽签。The nodes that are eligible for the next round of candidacy are determined locally, and a random lottery without negotiation is performed. 5.根据权利要求1至4中任一项所述的方法,其特征在于,所述方法还包括:5. The method according to any one of claims 1 to 4, wherein the method further comprises: 如果在所述出块时间段内未完成状态迁移,指定所述节点序列中的下一节点作为当前时段的合法出块节点。If the state transition is not completed within the block-producing time period, the next node in the node sequence is designated as a legal block-producing node in the current period. 6.一种基于无协商随机抽签的用于区块链系统的共识装置,其特征在于,所述装置包括:6. A consensus device for a blockchain system based on random drawing of lots without negotiation, wherein the device comprises: 确定单元,用于在接收到合法的区块之后,根据全网信任证书列表确定当前具备候选资格的节点;a determining unit, configured to determine the node currently eligible for candidacy according to the network-wide trust certificate list after receiving the legal block; 第一选举单元,对当前具备候选资格的节点进行无协商随机抽签,获得按顺序排列的节点序列,所述节点序列决定了在随后的每个特定时段,拥有出块资格的唯一出块节点;其中,在进行无协商随机抽签时,以接收到的合法区块的哈希值为随机种子,以当前具备候选资格的节点的集合为输入,执行相同的算式,获得按顺序排列的节点序列;The first electoral unit conducts a non-negotiated random lottery for the nodes currently qualified for candidacy, and obtains a sequence of nodes arranged in order, and the sequence of nodes determines the unique block-producing node with block-producing qualifications in each subsequent specific period; Among them, when conducting a random lottery without negotiation, the hash value of the received legal block is used as a random seed, and the set of nodes currently qualified as candidates is used as input, and the same formula is executed to obtain a sequence of nodes arranged in order; 预执行单元,用于在随后的每个特定时段内,出块节点发送预出块并收集背书;The pre-execution unit is used for the block-producing node to send pre-produced blocks and collect endorsements in each subsequent specific period; 背书单元,用于背书节点在接收到背书请求之后,检查预出块的合法性并对合法的预出块签名;The endorsement unit is used for the endorsement node to check the validity of the pre-block and sign the legal pre-block after receiving the endorsement request; 出块单元,用于在出块节点收集到超过50%的背书签名之后,将背书签名追加到预出块,形成正式区块,向全网广播。The block generation unit is used to append the endorsement signature to the pre-production block after the block generation node collects more than 50% of the endorsement signatures to form a formal block and broadcast it to the whole network. 7.根据权利要求6所述的装置,其特征在于,所述预执行单元包括:7. The apparatus according to claim 6, wherein the pre-execution unit comprises: 预执行模块,用于根据收集的交易进行排序并预执行,获得有效的交易集合,进行打包和签名之后形成预出块,广播到背书节点,请求背书节点对所述预出块进行签名;The pre-execution module is used to sort and pre-execute the collected transactions to obtain a valid transaction set, package and sign to form a pre-produced block, broadcast to the endorsement node, and request the endorsement node to sign the pre-produced block; 收集模块,用于收集背书节点的签名。The collection module is used to collect the signatures of the endorsing nodes. 8.根据权利要求6所述的装置,其特征在于,所述装置还包括:8. The apparatus of claim 6, wherein the apparatus further comprises: 第二选举单元,用于在所述出块单元完成正式出块之后,在本地确定下一轮具备候选资格的节点,进行无协商随机抽签。The second electoral unit is configured to locally determine the nodes that are eligible for the next round of candidacy after the block generating unit completes the official block generation, and conduct a random lottery without negotiation. 9.根据权利要求6所述的装置,其特征在于,所述装置还包括:9. The apparatus of claim 6, wherein the apparatus further comprises: 检查单元,用于在全网节点接收到广播的正式区块之后,检查所述正式区块的合法性;The checking unit is used to check the legitimacy of the formal block after the whole network node receives the broadcasted formal block; 执行单元,用于在正式区块的合法性检查通过之后,顺序执行正式区块中的交易,完成状态迁移;The execution unit is used to sequentially execute the transactions in the formal block and complete the state transition after the legality check of the formal block is passed; 第三选举单元,用于在本地确定下一轮具备候选资格的节点,进行无协商随机抽签。The third electoral unit is used to locally determine the nodes that are eligible for the next round of candidacy, and conduct random lottery without negotiation. 10.根据权利要求6至9中任一项所述的装置,其特征在于,所述装置还包括:10. The device according to any one of claims 6 to 9, wherein the device further comprises: 指定单元,用于如果在所述出块时间段内未完成状态迁移,指定所述节点序列中的下一节点作为当前时段的合法出块节点。A designation unit, configured to designate the next node in the node sequence as a valid block-producing node in the current time period if the state transition is not completed within the block-producing time period.
CN201810065943.0A 2018-01-19 2018-01-19 Consensus method and device for block chain system based on non-negotiation random drawing Active CN108269090B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810065943.0A CN108269090B (en) 2018-01-19 2018-01-19 Consensus method and device for block chain system based on non-negotiation random drawing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810065943.0A CN108269090B (en) 2018-01-19 2018-01-19 Consensus method and device for block chain system based on non-negotiation random drawing

Publications (2)

Publication Number Publication Date
CN108269090A CN108269090A (en) 2018-07-10
CN108269090B true CN108269090B (en) 2021-04-20

Family

ID=62776341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810065943.0A Active CN108269090B (en) 2018-01-19 2018-01-19 Consensus method and device for block chain system based on non-negotiation random drawing

Country Status (1)

Country Link
CN (1) CN108269090B (en)

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109379396B (en) * 2018-08-23 2021-06-29 泰链(厦门)科技有限公司 Method, medium, device and block chain system for preventing hard branching phenomenon in block chain system
CN110443614B (en) 2018-09-07 2021-04-09 腾讯科技(深圳)有限公司 Node equipment deleting method and device, computer equipment and storage medium
GB2577751A (en) * 2018-10-05 2020-04-08 Dragon Infosec Ltd A consensus method and framework for a blockchain system
CN109389399A (en) * 2018-10-18 2019-02-26 深圳前海乐寻坊区块链科技有限公司 Lottery industry method, apparatus, computer equipment and storage medium based on block chain
CN109447805A (en) * 2018-10-18 2019-03-08 尚维斯 A method of dissolving new chain block group new block chain automatically
CN109376274B (en) * 2018-10-23 2020-12-22 杭州能链科技有限公司 Block output method and device based on block chain system and storage medium
CN111882745B (en) * 2018-10-26 2022-12-20 创新先进技术有限公司 Object selection method and device and electronic equipment
CN109636599A (en) * 2018-11-07 2019-04-16 广西师范大学 License block chain secret protection and monitoring and managing method based on group ranking
CN109544161B (en) * 2018-11-28 2021-05-28 连连银加信息技术有限公司 Block chain data processing method, system and equipment and serial number generation method
CN111327436B (en) * 2018-12-13 2023-04-07 北京果仁宝软件技术有限责任公司 Method, device and system for predicting block link-out block node of block
CN109636389B (en) * 2018-12-13 2020-09-22 东软集团股份有限公司 Method, device, equipment and storage medium for determining block chaining-out time
CN109785130B (en) * 2018-12-17 2021-05-28 金蝶软件(中国)有限公司 Block chain random consensus method and device, computer equipment and storage medium
CN109889519B (en) * 2019-02-18 2021-08-13 三亚京牛数字科技有限公司 Algorithm for avoiding non-cost attack in block chain consensus
CN109949034B (en) * 2019-03-06 2022-09-20 北京工业大学 Block chain consensus method based on credibility evaluation
WO2020177109A1 (en) * 2019-03-07 2020-09-10 北京建极练科技有限公司 Lot-drawing processing method, trusted chip, node, storage medium and electronic device
CN110011974B (en) * 2019-03-07 2021-08-10 港融科技有限公司 Accounting method and device of block chain, terminal and computer-readable storage medium
CN111800446B (en) * 2019-04-12 2023-11-07 北京沃东天骏信息技术有限公司 Scheduling processing method, device, equipment and storage medium
CN110264350A (en) * 2019-05-10 2019-09-20 重庆金融资产交易所有限责任公司 Bookkeeping methods, device and the computer equipment for thering is endorsement to sign based on block chain
CN110245949B (en) * 2019-06-17 2021-05-28 北京瑞策科技有限公司 Packing method and device related to block chain
CN110288479B (en) * 2019-06-28 2023-07-14 深圳市迅雷网络技术有限公司 A consensus method for blockchain data and related equipment
US11349637B2 (en) * 2019-11-04 2022-05-31 International Business Machines Corporation Random node selection for permissioned blockchain
CN111464632B (en) * 2020-03-31 2021-12-07 中国联合网络通信集团有限公司 Block chain cross-chain forwarding method and block chain link point
CN111526050B (en) * 2020-04-17 2023-09-12 昆明大棒客科技有限公司 Network deployment system, method, equipment and storage medium for block chain out-of-block node
CN114281886A (en) * 2020-11-25 2022-04-05 贵州航天云网科技有限公司 Trusted service bottom layer system construction method based on public license chain
CN112564919A (en) * 2020-12-04 2021-03-26 广东投盟科技有限公司 Identity authentication method, identity authentication equipment and computer readable storage medium
CN114266573B (en) * 2021-12-28 2025-08-22 上海万向区块链股份公司 Blockchain information asynchronous processing method and system
CN116032465A (en) * 2022-11-10 2023-04-28 北京航空航天大学 Entrusted workload evidence sharing method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445711A (en) * 2016-08-28 2017-02-22 杭州云象网络技术有限公司 Byzantine-fault-tolerant consensus method applied to block chain
CN106656974A (en) * 2016-10-17 2017-05-10 江苏通付盾科技有限公司 Block chain grouping consensus method and system
CN106878071A (en) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 A kind of block chain common recognition mechanism based on Raft algorithms
CN107124403A (en) * 2017-04-14 2017-09-01 朱清明 The generation method and computing device of common recognition block in block chain
CN107566124A (en) * 2017-08-24 2018-01-09 深圳市易成自动驾驶技术有限公司 Common recognition method for building up, block catenary system and storage medium based on lottery mechanism

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170193464A1 (en) * 2015-12-18 2017-07-06 Justin SHER Protocol utilizing bitcoin blockchain for maintaining independently proposed and approved set contents

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445711A (en) * 2016-08-28 2017-02-22 杭州云象网络技术有限公司 Byzantine-fault-tolerant consensus method applied to block chain
CN106656974A (en) * 2016-10-17 2017-05-10 江苏通付盾科技有限公司 Block chain grouping consensus method and system
CN106878071A (en) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 A kind of block chain common recognition mechanism based on Raft algorithms
CN107124403A (en) * 2017-04-14 2017-09-01 朱清明 The generation method and computing device of common recognition block in block chain
CN107566124A (en) * 2017-08-24 2018-01-09 深圳市易成自动驾驶技术有限公司 Common recognition method for building up, block catenary system and storage medium based on lottery mechanism

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Proof of luck:An efficient blockchain consensus protocol;Mitar Milutinovic 等;《SysTEX ’16:Proceedings of the 1st Workshop on System Software for Trusted Execution》;20161231;第1-6页 *
使用区块链的处理监督架构和随机授权;李吉广;《信息安全研究》;20170805;第3卷(第8期);第752-757页 *

Also Published As

Publication number Publication date
CN108269090A (en) 2018-07-10

Similar Documents

Publication Publication Date Title
CN108269090B (en) Consensus method and device for block chain system based on non-negotiation random drawing
CN109447795B (en) A Byzantine Consensus Method Supporting Fast Finality
CN109544334B (en) Method for realizing network extensible block chain
CN108492103B (en) Joint block chain consensus method
CN113098694B (en) Mixed cross-chain consensus method
CN113098689B (en) Trust establishment cross-chain consensus method, system and storage medium
CN109842606B (en) Block chain consensus algorithm and system based on consistent Hash algorithm
CN110445778B (en) A Consensus Algorithm Applied to Consortium Chain
CN111899002B (en) Method for efficiently performing cross-chain information transaction interaction in blockchain
CN112651830B (en) Blockchain consensus method applied to power resource sharing network
CN109360100A (en) Method and device for fast confirmation of transaction based on blockchain technology
CN113746858B (en) Cross-chain communication method based on verifiable random function
Sun et al. Rtchain: A reputation system with transaction and consensus incentives for e-commerce blockchain
CN113132401B (en) Block chain-based data processing method and device
US12244731B2 (en) Unity protocol consensus
CN113837758A (en) Consensus method and device for a blockchain system
CN110445795B (en) Block chain authentication uniqueness confirmation method
CN109831509B (en) Method for realizing random block output with same weight
CN110505305A (en) A block chain fragmentation method, device and block chain system
CN113657898A (en) Consensus method and system in alliance chain
CN115021946B (en) A Decentralized Currency Mixing Method Based on Ring Signature
CN115643043B (en) A cross-chain consensus election method and system based on verification delay function
CN111464538B (en) Asset transaction method and system, storage medium and asset transaction background
CN111464632B (en) Block chain cross-chain forwarding method and block chain link point
CN112950180A (en) Community certificate method and system based on alliance chain, electronic device and storage medium

Legal Events

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
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载