Distributed consensus algorithm and apparatus for rapidly generating block
AssigneesXi'an University of Posts & Telecommunications, Xi'an Anmeng Intelligent Technology Co., Ltd.
InventorsFeng Zhao, Jingyu Feng
Life of this patent
Estimating the term…
Abstract
The present disclosure discloses a distributed consensus algorithm and apparatus for rapidly generating a block. The algorithm includes: broadcasting a new transaction to all nodes (S110); collecting, by each of the nodes, the new transaction into a block (S120); evaluating a trust value of each of the nodes to obtain an evaluation result (S130); selecting honest miners according to the evaluation result (S140); obtaining negotiation rules (S150); creating, by the honest miners, a new block according to the negotiation rules, and broadcasting the new block to all the nodes (S160); and when all transactions in the nodes are valid but do not take effect, receiving the new block and adding the new block to a blockchain (S170).
Claims7
A distributed consensus method for rapidly generating a block, comprising:
- broadcasting, by a computer, a new transaction to all nodes;
- collecting, by each of the nodes, the new transaction into a block;
- evaluating, by the computer, a trust value of each of the nodes to obtain an evaluation result;
- wherein evaluating the trust value of each of the nodes to obtain the evaluation result comprises:
- obtaining, by the computer, a proposer of the block from all the nodes;
- obtaining, by the computer, a trust value of the proposer of the block;
- obtaining, by the computer, a validator of the block from all the nodes;
- obtaining, by the computer, a trust value of the validator of the block;
- and
- obtaining, by the computer, the evaluation result according to the trust values of the proposer and the validator;
- wherein a formula for obtaining, by the computer, the evaluation result according to the trust values of the proposer and the validator is:
- T
- i
- =
- θ
- *
- (
- η
- 1
- +
- η
- 2
- )
- f
- i
- +
- w
- i
- +
- 1
- -
- f
- i
- +
- w
- i
- r
- i
- +
- c
- i
- +
- 1
- ,
- wherein θ represents a trust threshold, η1 represents a system-tolerable quantity of incorrect blocks submitted by the proposer, η2 represents a system-tolerable quantity of incorrect results submitted by the validator, fi represents a quantity of incorrect blocks provided by the proposer, and wi represents a quantity of incorrect votes provided by the validator,
- selecting, by the computer, honest miners nodes according to the evaluation result;
- obtaining, by the honest miners nodes, negotiation rules;
- creating, by the honest miners nodes, a new block according to the negotiation rules, and broadcasting the new block to all the nodes;
- and
- wherein all transactions in the nodes are valid but do not take effect, accepting, by all the nodes, the new block and adding the new block to a blockchain.
A distributed consensus system for rapidly generating a block, comprising:
- a computer comprising:
- a computer processor;
- and
- a computer memory, the computer memory storing instructions that, when executed by the computer processor, cause the computer processor to execute:
- a first broadcast unit, configured to broadcast a new transaction to all nodes;
- a first collection unit, configured to enable each of the nodes to collect the new transaction into a block;
- a first obtaining unit, configured to evaluate a trust value of each of the nodes to obtain an evaluation result;
- wherein evaluating the trust value of each of the nodes to obtain the evaluation result comprises:
- obtaining a proposer of the block from all the nodes;
- obtaining a trust value of the proposer of the block;
- obtaining a validator of the block from all the nodes;
- obtaining a trust value of the validator of the block;
- and
- obtaining the evaluation result according to the trust values of the proposer and the validator;
- wherein a formula for obtaining the evaluation result according to the trust values of the proposer and the validator is:
- T
- i
- =
- θ
- *
- (
- η
- 1
- +
- η
- 2
- )
- f
- i
- +
- w
- i
- +
- 1
- -
- f
- i
- +
- w
- i
- r
- i
- +
- c
- i
- +
- 1
- ,
- wherein θ represents a trust threshold, η1 represents a system-tolerable quantity of incorrect blocks submitted by the proposer, η2 represents a system-tolerable quantity of incorrect results submitted by the validator, fi represents a quantity of incorrect blocks provided by the proposer, and wi represents a quantity of incorrect votes provided by the validator,
- a first selection unit, configured to select honest miners nodes according to the evaluation result;
- and
- honest miners nodes comprising:
- one or more honest miners nodes processors;
- and
- one or more honest miners nodes memory storing instructions that, when executed by the one or more honest miners nodes processors, cause the one or more honest miners nodes processors to execute:
- a second obtaining unit, configured to obtain negotiation rules;
- a second broadcast unit, configured to enable the honest miners nodes to create a new block according to the negotiation rules and broadcast the new block to all the nodes;
- and
- a first adding unit, configured to, wherein all transactions in the nodes are valid but do not take effect, accepting, by all the nodes, the new block and add the new block to a blockchain.
Dependencies are inferred from the claim text.