CN110851537A - Consensus method based on block chain fragmentation technology - Google Patents

Consensus method based on block chain fragmentation technology Download PDF

Info

Publication number
CN110851537A
CN110851537A CN201911191908.4A CN201911191908A CN110851537A CN 110851537 A CN110851537 A CN 110851537A CN 201911191908 A CN201911191908 A CN 201911191908A CN 110851537 A CN110851537 A CN 110851537A
Authority
CN
China
Prior art keywords
block
consensus
chain
fragment
transaction
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.)
Pending
Application number
CN201911191908.4A
Other languages
Chinese (zh)
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.)
Changzhou Longxing Industrial Automation System Co Ltd
Silk Chain (changzhou) Holding Co Ltd
Original Assignee
Changzhou Longxing Industrial Automation System Co Ltd
Silk Chain (changzhou) Holding Co Ltd
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 Changzhou Longxing Industrial Automation System Co Ltd, Silk Chain (changzhou) Holding Co Ltd filed Critical Changzhou Longxing Industrial Automation System Co Ltd
Priority to CN201911191908.4A priority Critical patent/CN110851537A/en
Publication of CN110851537A publication Critical patent/CN110851537A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/278Data partitioning, e.g. horizontal or vertical partitioning

Abstract

The invention discloses a consensus method based on a block chain fragmentation technology, which comprises a single fragmentation chain consensus process and a plurality of fragmentation chain consensus processes, wherein the single fragmentation chain consensus process is based on a PoS consensus algorithm of weight and VRF, and the plurality of fragmentation chain consensus processes are based on a consensus algorithm of a tree graph; the invention perfectly solves the consensus and management of the fragment chain by combining the PoS consensus algorithm based on the weight and the VRF and the consensus algorithm based on the tree graph, leads the consensus to be executed concurrently in a fragment chain mode to improve the performance of the consensus, and introduces the block storage structure of the tree graph to solve the problem of the complete sequence among blocks.

Description

Consensus method based on block chain fragmentation technology
Technical Field
The invention belongs to the field of block chain technology application, and particularly relates to a consensus method based on a block chain fragmentation technology.
Background
In the prior art, the consensus process of a blockchain generally includes: the method comprises three steps of competing for the chance of randomly generating a block, broadcasting a new block to the whole network and verifying and storing the newly received block by other nodes, but the steps are executed in series according to the above mode, so that the performance is low; now, the computing and storage capacity of a common x86 server can easily support the verification and storage of transactions of 10000+ processed by a node per second, so that the computing and storage performance of the node is not the bottleneck of the performance of a blockchain, and sufficient hardware conditions are provided for the operation of a alliance chain system.
The fragmentation technology of the block chain mainly comprises network fragmentation, namely, a network selects nodes according to a certain rule to form fragments; the first step of implementing fragmentation is to create fragmentation, so that network fragmentation is the basis of transaction fragmentation, computation fragmentation and state fragmentation; the method comprises the following steps of (1) performing transaction fragmentation, namely allocating transactions to the same fragment processing according to a certain rule, so that the purpose of parallel processing can be achieved, and the problem of double flowers can be avoided; state fragmentation, i.e. a specific fragment only stores a partial state, rather than a complete block chain state, can reduce state storage redundancy, and is the most ideal fragmentation method, but the difficulty of the fragmentation technology is processing and managing transactions across a fragmentation chain.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a consensus method based on a block chain fragmentation technology, which solves the problem of transaction processing and management of a network fragmentation and transaction fragmentation two fragmentation technologies in a cross fragmentation chain, and specifically perfectly solves the consensus and management of the fragmentation chain by combining a PoS consensus algorithm based on weight and VRF and a consensus algorithm based on a tree diagram, so that the consensus can be executed concurrently in a fragmentation chain manner to improve the performance of the consensus, and a block storage structure of the tree diagram is introduced to solve the problem of full order among blocks.
The technical scheme adopted for solving the problems in the prior art is as follows:
the consensus method based on the block chain fragmentation technology comprises the steps that a single fragmentation chain consensus process and a plurality of fragmentation chain consensus processes are combined to realize a concurrency mechanism among a plurality of fragmentation chains, wherein the single fragmentation chain consensus process is based on a PoS consensus algorithm of weight and VRF, and the plurality of fragmentation chain consensus processes are based on a tree graph consensus algorithm; the method specifically comprises the following steps:
t1, a user constructs an execution request of a transaction, the request data comprises a signature of a sender, and a fragment identification value of the transaction is calculated according to an account address of the sender;
t2, the user submits the transaction to a node on the corresponding fragment;
t3, the fragment node confirms whether the account address of the sender of the transaction belongs to the fragment or not, and rejects the transaction request data which does not belong to the fragment; the data of the fragment enters an accepted queue;
t4, the fragment node verifies and pre-executes the data of the 'accepted' queue, and discards the data which fails in verification and pre-execution; the data passing the verification and the pre-execution enter a waiting packaging queue and complete the transaction forwarding work;
t5, if the node participating in the consensus process of the fragment chain obtains the chance of block emergence, the node executes the transaction from the waiting packaging queue, packages the transaction into a new block according to the tree map topological rule of the currently received and stored block, and broadcasts the new block to the whole network; all nodes participating in the consensus process of the fragment chain verify the new block according to a consensus algorithm;
and T6, after receiving a new block, the nodes of the rest fragment chains in the network verify the validity of the new block, execute the transaction and update the related state storage data.
Specifically, the fragment node has two different transaction queues for transaction storage: a "received" queue and a "waiting to pack" queue; the received queue is used for recording the transactions which are received by the fragmentation node; the 'waiting for packaging' queue is used for recording the transaction that the fragmentation node is verified to pass and can be packaged into a new block in the participation consensus; the forwarding work of the transaction is executed immediately after a transaction enters a queue waiting for packing; it is guaranteed that this transaction must be a valid transaction to be forwarded. Before the fragment node participates in consensus, synchronous work of blocks needs to be completed; after the fragmentation node participates in the consensus, if the fragmentation node obtains the chance of getting out of the block, the fragmentation node takes out a transaction from the waiting packaging queue according to a first-in first-out mode, executes the transaction, packages the transaction and the execution result into a new block and broadcasts the new block to the network; after receiving a new block, the fragmentation node verifies that the new block is valid and removes the transaction inside the new block from the "wait for packing" queue.
Further, the single fragment chain consensus process of the PoS consensus algorithm based on weight and VRF specifically includes: different weights in each round of consensus process of each user are calculated through the VRF algorithm of Algorand, and consensus is achieved on the blocks of a single fragment chain in a multi-round voting mode.
Further, the VRF algorithm is implemented by verifiable random functions, and a state machine is needed to store and calculate the voting weight values of different consensus phases, in order to implement 1/3 fault-tolerant capability of the whole system, the system requires the total weight value meeting 2/3 for two-step voting in the consensus process to recognize the final result of the block.
The consensus algorithm selects the user with the highest weight calculated by the VRF algorithm as the qualified block, and the block records the certification information calculated by the VRF of the user to certify the weight of the block.
The method specifically comprises the following steps:
proposal preparation phase
Each user can submit own proof of block-out proposal;
each user verifies and screens the received block output proposal certificate, and selects the qualified block output person with the largest weight;
the task of each user at this stage is to propose a new block for the whole network, wherein the height of the new block is N + 1; each user firstly confirms that a reduction confirmation voting information list meeting the total weight value more than 2/3 and a final confirmation voting information list meeting the total weight value more than 2/3, which are received by a parent block in the process of achieving consensus, are stored by the user, and the height of the parent block is N; if the information list meeting the conditions exists, calculating the weight of the user in the proposal preparation stage by using a VRF algorithm; if the calculated weight is more than 0, constructing corresponding offer certification information, packaging a plurality of transactions, offer certification information, a reduction confirmation information list and a final confirmation information list in a waiting packaging queue into a new block, wherein the block height is N +1, and submitting own offer certification information to the whole network, wherein the offer certification information comprises VRF certification information, a block outlet account address, the block height, a hash value of a block head and a signature; the VRF certification information comprises an input part and an output part of VRF calculation, wherein the input part comprises a random seed, a consensus round, a consensus stage identification value and a public key, and the output part comprises a certification item and a random seed item calculated by the VRF; wherein the random seed entry output by the VRF computation will become the random seed of the input part of its child block consensus phase computation VRF attestation information.
Each user verifies and screens the received proposal certification information, and selects the block outlet account address corresponding to the proposal certification with the largest weight as a qualified block outlet person;
this stage needs to be satisfied for a fixed duration
Figure DEST_PATH_IMAGE002
1, so that most users in the whole network can receive the proposal certification information broadcasted by the users;
reduction confirmation phase
If the self is qualified, broadcasting the new block packaged by the self to the network;
each user performs reduction confirmation voting on the block-out suggestion certificate corresponding to the self-selected qualified block-out person;
the whole network confirms a qualified block-out proposal certificate through voting so as to lead the corresponding block to have irreversible conversion;
each user calculates the weight of the user in the reduction confirmation stage by using a VRF algorithm; if the calculated weight is more than 0, constructing reduction confirmation information according to the screened proposed certification information, wherein the reduction confirmation information comprises VRF certification information, a block outlet account address, block height, a hash value of a block head and a signature, and broadcasting the reduction confirmation information to the whole network; because the reduction confirmation information contains the weight value calculated this time, the process is called voting, and the purpose of voting is to confirm that the proposed proof weight contained in a new block is approved by the total weight value exceeding 2/3 in the whole network, so that the corresponding block has irreversible conversion;
each user synchronously receives the new block and the reduction confirmation information broadcasted by other users, verifies the effectiveness of the new block and calculates the total weight of the proposal certificate pointed by the received reduction confirmation information;
this stage needs to be satisfied for a fixed duration
Figure 733181DEST_PATH_IMAGE002
2, most nodes in the whole network can receive the new block broadcasted by the node and the reduction confirmation information broadcasted by the node;
final confirmation phase
Receiving a new block corresponding to the out-block proposal certificate confirmed in the reduction confirmation stage, verifying the new block and finally confirming and voting;
the whole network confirms a new block by voting, and the final consistency is achieved on the new block.
Each user checks the total weight value calculated in the reduction confirmation stage, and if an offer proof meeting the condition that the vote is greater than 2/3 total weight value exists and a new block corresponding to the offer proof is received and confirmed to be a valid block, the weight value of the user in the final confirmation stage is calculated by using a VRF algorithm; if the calculated weight is more than 0, constructing a final confirmation message according to the screened proposed certification message, wherein the final confirmation message comprises VRF certification message, a block account address, block height, hash value and signature of a block header, and broadcasting the final confirmation message to the whole network; because the final confirmation information contains the weight value calculated this time, the process is called voting, and the purpose of voting is to confirm that the complete information contained in a new block is approved by the total weight value exceeding 2/3 in the whole network, so that the corresponding block has irreversible conversion;
each user synchronously receives the final confirmation information broadcasted by other users, and calculates the total weight of the proposal certificate pointed by the received final confirmation information;
this stage needs to be satisfied for a fixed duration
Figure 119163DEST_PATH_IMAGE002
3, most nodes in the whole network can receive the final confirmation information broadcasted by the nodes;
duration of time
Figure DEST_PATH_IMAGE004
After 3, each user looks at the total weight calculated in the final confirmation stage, and if there is a proposal proof that the vote is greater than 2/3 total weight, then adds the corresponding new tile as the final confirmed tile to the tile chain.
Further, in order to ensure the randomness of the result of each round of VRF calculation, thereby ensuring that the randomness cannot be controlled by a few malicious attackers, and improving the security of the system, the process of the lottery algorithm is based on the random seed item of the parent block, and adds two parameters, namely the consensus round at the height of the block and the consensus stage identification value at this time, to calculate the random seed required by the VRF algorithm.
Furthermore, an intelligent contract is also built in the block chain system, and is used for each user to mortgage different numbers of digital assets on the intelligent contract to obtain different weight values and become a node participating in consensus; specifically, the intelligent dating sets an upper limit and a lower limit of a mortgage so as to ensure the decentralization capacity of the network; and in the creation configuration file, the user can configure initial weight for the appointed user, thereby ensuring that the system can normally work in the initial stage.
Further, the process of consensus on multiple segment chains of the consensus algorithm based on the tree graph specifically includes:
s1, achieving consensus on the whole sequence of blocks;
s2, generating a new block.
Further, the specific process of step S1 includes: the method comprises the steps that firstly, a main chain is determined by using a GHOST protocol, namely a greedy subtree protocol, the main chain is selected, an innovation block is selected as the main chain which is confirmed currently, a next block on the main chain is selected from child blocks of the last block of the main chain which is confirmed currently in an iterative mode from the innovation block, and a selection rule is that the child block with the largest subtree is selected; a second step of determining the order of the blocks using the epoch rule of the tree graph, including determining each epoch based on each block on the main chain; the era of the block on the bifurcation is determined by the era of the main chain block generated after the block, the sequence of the blocks is determined according to the topological ordering of the father edge of the blocks, and if the topological order of the father edge is the same, the tie is broken according to the hash value of the head of the block.
Specifically, the GHOST protocol starts from the founder block and iterates to select the next block on the main chain from the child blocks, and the selection rule is to select the child block with the largest sub-tree as the main chain block.
Each new block in the tree map is generated by referring all blocks observed by itself but not yet referenced by other blocks to express the context between different blocks, in addition to selecting the last block in the main chain as its parent block.
Further, the specific process of step S2 includes: firstly, selecting the last block on the main chain as a father of the new block; the new chunk then references all chunks that have been received but have not been referenced by other chunks.
The invention has the following beneficial effects:
1. the single fragment chain is a PoS consensus method realized based on weight and VRF algorithm, and the consensus and management of the fragment chain are solved.
2. The new block proposer of a single fragment chain must "bet" the parent block belonging to the same fragment chain, that is, the new block must include the authentication explicit information list of the parent block, and include the reduction confirmation certification information list and the final confirmation certification information list to prove the validity of the parent block, that is, the total weight values of the reduction confirmation certification information list and the final confirmation certification information list both have a total weight value greater than 2/3, and such block information composition mode can effectively reduce the possibility of long-range attack by a malicious node.
3. The block consensus among the fragment chains uses the technology of the tree graph, so that the block submission and verification of each fragment chain can be executed concurrently.
4. The method is characterized in that a set of blocks with full order is uniquely determined through a parent edge and a plurality of reference edges, and the full order mode can uniquely determine the order between two blocks and the transactions contained in the two blocks
5. The full-order mode ensures the order of the affairs, thereby ensuring the reliability of the execution of the cross-chain intelligent contract.
Drawings
FIG. 1 is a schematic diagram of a main chain block and a parent edge;
FIG. 2 is a block sequence and reference edge diagram;
fig. 3 is a new block reference diagram.
Detailed Description
The present invention will be further described with reference to the following embodiments.
The embodiment provides a consensus method based on a block chain fragmentation technology, which comprises a single fragmentation chain consensus process and a plurality of fragmentation chain consensus processes, wherein the single fragmentation chain consensus process is based on a PoS consensus algorithm of weight and VRF, and the plurality of fragmentation chain consensus processes are based on a consensus algorithm of a tree graph; the method specifically comprises the following steps:
t1, a user constructs an execution request of a transaction, the request data comprises a signature of a sender, and a fragment identification value of the transaction is calculated according to an account address of the sender;
t2, the user submits the transaction to a node on the corresponding fragment;
t3, the fragment node confirms whether the account address of the sender of the transaction belongs to the fragment or not, and rejects the transaction request data which does not belong to the fragment; the data of the fragment enters an accepted queue;
t4, the fragment node verifies and pre-executes the data of the 'accepted' queue, and discards the data which fails in verification and pre-execution; the data passing the verification and the pre-execution enter a waiting packaging queue and complete the transaction forwarding work;
t5, if the node participating in the consensus process of the fragment chain obtains the chance of block emergence, the node executes the transaction from the waiting packaging queue, packages the transaction into a new block according to the tree map topological rule of the currently received and stored block, and broadcasts the new block to the whole network; all nodes participating in the consensus process of the fragment chain verify the new block according to a consensus algorithm;
and T6, after receiving a new block, the nodes of the rest fragment chains in the network verify the validity of the new block, execute the transaction and update the related state storage data.
The fragment node has two different transaction queues for transaction storage: a "received" queue and a "waiting to pack" queue; the received queue is used for recording the transactions which are received by the fragmentation node; the 'waiting for packaging' queue is used for recording the transaction that the fragmentation node is verified to pass and can be packaged into a new block in the participation consensus; the forwarding work of the transaction is executed immediately after a transaction enters a queue waiting for packing; it is guaranteed that this transaction must be a valid transaction to be forwarded. Before the fragment node participates in consensus, synchronous work of blocks needs to be completed; after the fragmentation node participates in the consensus, if the fragmentation node obtains the chance of getting out of the block, the fragmentation node takes out a transaction from the waiting packaging queue according to a first-in first-out mode, executes the transaction, packages the transaction and the execution result into a new block and broadcasts the new block to the network; after receiving a new block, the fragmentation node verifies that the new block is valid and removes the transaction inside the new block from the "wait for packing" queue.
The single fragment chain consensus process of the PoS consensus algorithm based on the weight and the VRF specifically comprises the following steps: different weights in each round of consensus process of each user are calculated through the VRF algorithm of Algorand, and consensus is achieved on the blocks of a single fragment chain in a multi-round voting mode.
The VRF algorithm is realized by a verifiable random function, a state machine is needed to calculate the voting weight values of different consensus stages, and in order to realize the 1/3 fault-tolerant capability of the whole system, the final result of the block is recognized only when the total weight value of 2/3 is met in the two-step voting in the consensus process.
The consensus algorithm selects the user with the highest weight value calculated by the drawing and signing algorithm as the qualified block, and the drawing and signing information of the user is recorded in the block to prove the weight value of the block.
The method specifically comprises the following steps:
proposal preparation phase
Each user can submit own proof of block-out proposal;
each user verifies and screens the received block output proposal certificate, and selects the qualified block output person with the largest weight;
the task of each user at this stage is to propose a new block for the whole network, wherein the height of the new block is N + 1; each user firstly confirms that a reduction confirmation voting information list meeting the total weight value more than 2/3 and a final confirmation voting information list meeting the total weight value more than 2/3, which are received by a parent block in the process of achieving consensus, are stored by the user, and the height of the parent block is N; if the information list meeting the conditions exists, calculating the weight of the user in the proposal preparation stage by using a VRF algorithm; if the calculated weight is more than 0, constructing corresponding offer certification information, packaging a plurality of transactions, offer certification information, a reduction confirmation information list and a final confirmation information list in a waiting packaging queue into a new block, wherein the block height is N +1, and submitting own offer certification information to the whole network, wherein the offer certification information comprises VRF certification information, a block outlet account address, the block height, a hash value of a block head and a signature; the VRF certification information comprises an input part and an output part of VRF calculation, wherein the input part comprises a random seed, a consensus round, a consensus stage identification value and a public key, and the output part comprises a certification item and a random seed item calculated by the VRF; wherein the random seed entry output by the VRF computation will become the random seed of the input part of its child block consensus phase computation VRF attestation information.
Each user verifies and screens the received proposal certification information, and selects the block outlet account address corresponding to the proposal certification with the largest weight as a qualified block outlet person;
this stage needs to be satisfied for a fixed duration
Figure 462682DEST_PATH_IMAGE002
1, so that most users in the whole network can receive the proposal certification information broadcasted by the users;
reduction confirmation phase
If the self is qualified, broadcasting the new block packaged by the self to the network;
each user performs reduction confirmation voting on the block-out suggestion certificate corresponding to the self-selected qualified block-out person;
the whole network confirms a qualified block-out proposal certificate through voting so as to lead the corresponding block to have irreversible conversion;
each user calculates the weight of the user in the reduction confirmation stage by using a VRF algorithm; if the calculated weight is more than 0, constructing reduction confirmation information according to the screened proposed certification information, wherein the reduction confirmation information comprises VRF certification information, a block outlet account address, block height, a hash value of a block head and a signature, and broadcasting the reduction confirmation information to the whole network; because the reduction confirmation information contains the weight value calculated this time, the process is called voting, and the purpose of voting is to confirm that the proposed proof weight contained in a new block is approved by the total weight value exceeding 2/3 in the whole network, so that the corresponding block has irreversible conversion;
each user synchronously receives the new block and the reduction confirmation information broadcasted by other users, verifies the effectiveness of the new block and calculates the total weight of the proposal certificate pointed by the received reduction confirmation information;
this stage needs to be satisfied for a fixed duration
Figure 451367DEST_PATH_IMAGE002
2, most nodes in the whole network can receive the new block broadcasted by the node and the reduction confirmation information broadcasted by the node;
final confirmation phase
Receiving a new block corresponding to the out-block proposal certificate confirmed in the reduction confirmation stage, verifying the new block and finally confirming and voting;
the whole network confirms a new block by voting, and the final consistency is achieved on the new block.
Each user checks the total weight value calculated in the reduction confirmation stage, and if an offer proof meeting the condition that the vote is greater than 2/3 total weight value exists and a new block corresponding to the offer proof is received and confirmed to be a valid block, the weight value of the user in the final confirmation stage is calculated by using a VRF algorithm; if the calculated weight is more than 0, constructing a final confirmation message according to the screened proposed certification message, wherein the final confirmation message comprises VRF certification message, a block account address, block height, hash value and signature of a block header, and broadcasting the final confirmation message to the whole network; because the final confirmation information contains the weight value calculated this time, the process is called voting, and the purpose of voting is to confirm that the complete information contained in a new block is approved by the total weight value exceeding 2/3 in the whole network, so that the corresponding block has irreversible conversion;
each user synchronously receives the final confirmation information broadcasted by other users, and calculates the total weight of the proposal certificate pointed by the received final confirmation information;
this stage needs to be satisfied for a fixed duration
Figure 734580DEST_PATH_IMAGE002
3, most nodes in the whole network can receive the final confirmation information broadcasted by the nodes;
duration of time
Figure 150518DEST_PATH_IMAGE004
After 3, each user looks at the total weight calculated in the final confirmation stage, and if there is a proposal proof that the vote is greater than 2/3 total weight, then adds the corresponding new tile as the final confirmed tile to the tile chain.
In order to ensure the randomness of the result of each round of VRF calculation, thereby ensuring that the randomness cannot be controlled by a few malicious attackers, and improving the safety of the system, the process of the lottery algorithm is based on the random seed item of the parent block, and adds two parameters, namely the consensus round at the height of the block and the identification value of the consensus stage at this time, to calculate the random seed required by the VRF algorithm.
In the block chain system, a single fragment chain is also provided with an intelligent contract, and each user mortises different numbers of digital assets on the intelligent contract to obtain different weight values and becomes a node participating in consensus; specifically, the intelligent dating sets an upper limit and a lower limit of a mortgage so as to ensure the decentralization capacity of the network; and in the creation configuration file, the user can configure initial weight for the appointed user, thereby ensuring that the system can normally work in the initial stage.
The process of consensus of multiple fragment chains based on the consensus algorithm of the tree graph specifically comprises the following steps:
s1, achieving consensus on the whole sequence of all blocks;
s2, generating a new block.
The specific process of step S1 includes:
the method comprises the steps that firstly, a main chain is determined by using a GHOST protocol, namely a greedy subtree protocol, the main chain is selected, an innovation block is selected as the main chain which is confirmed currently, a next block on the main chain is selected from child blocks of the last block of the main chain which is confirmed currently in an iterative mode from the innovation block, and a selection rule is that the child block with the largest subtree is selected; as shown in fig. 1, the solid arrows in the figure point to the parent blocks, each block has a parent edge and points to its parent block, all blocks form a tree with its parent edge, the a block has 6 nodes, the B block has 5 nodes, and the a block is the child block with the largest sub-tree; thus, the main chain is Genesis, A, C, F, H.
A second step of determining the order of the blocks using the epoch rule of the tree graph, including determining each epoch based on each block on the main chain; determining the era of the block on the bifurcation, which is determined by the era of the main chain block generated after the block, determining the sequence of the blocks according to the topological ordering of the father edge of the blocks, and breaking the tie according to the hash value of the head of the block if the topological ordering of the father edge is the same; as shown in FIG. 2, the dashed arrows point to the reference blocks, each block has multiple reference edges, the reference edges are mainly used to record and express which block is generated earlier than the current block, and block D belongs to epoch E, because D is first referenced by E, and therefore generated before E, but D is not generated before C, and therefore is generated in general order of Genesis, A, B, C, D, F, E, G, I, J, H, K.
The specific process of step S2 includes: when each new block in the tree diagram is generated, in addition to selecting the last block on the main chain as the parent block of the new block, all blocks observed by the new block but not referenced by other blocks must be referenced to express the context between different blocks; firstly, selecting the last block on the main chain as a father of the new block; the new chunk then references all chunks that have been received but have not been referenced by other chunks.
In particular, as shown in fig. 1, 2 and 3, the tree graph adopts two rules, that is, Ghost and tree graph epoch; the Ghost rule is used for determining a main chain, the epoch rule of the tree graph is used for determining the sequence of the blocks, and the whole sequence of the blocks can be realized by combining the Ghost rule and the epoch rule; if a node finds that block D is already in the system when it generates block E, and block D is not yet referenced by any other block, block E points its reference pointer to block D, i.e. a directed reference edge is added between block E and block D, indicating that D was generated before E.
Each block on the backbone defines an epoch. Which epoch a block on a bifurcation belongs to is determined by the epoch the first backbone block generated after it belongs to; for example, block D belongs to epoch E, and D is generated before E because it is referenced by E first, but D is not generated before C.
In this embodiment, the complete sequence in FIG. 3 is Genesis, A, B, C, D, F, E, G, I, J, H, K, and the new block L.
In this embodiment, the consensus and management of the fragmentation chain are perfectly solved by combining the PoS consensus algorithm based on the weight and the VRF and the consensus algorithm based on the tree diagram, the consensus can be concurrently performed in the fragmentation chain manner to improve the performance thereof, and the block storage structure of the tree diagram is introduced to solve the problem of the full order between blocks.
It should be understood that the above examples are only for clearly illustrating the technical solutions of the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection of the claims of the present invention.

Claims (8)

1. A consensus method based on a block chain fragmentation technology is characterized by comprising a single fragmentation chain consensus process and a plurality of fragmentation chain consensus processes, wherein the single fragmentation chain consensus process is based on a PoS consensus algorithm of weight and VRF, and the plurality of fragmentation chain consensus processes are based on a consensus algorithm of a tree graph; the method specifically comprises the following steps:
t1, a user constructs an execution request of a transaction, the request data comprises a signature of a sender, and a fragment identification value of the transaction is calculated according to an account address of the sender;
t2, the user submits the transaction to a node on the corresponding fragment;
t3, the fragment node confirms whether the account address of the sender of the transaction belongs to the fragment or not, and rejects the transaction request data which does not belong to the fragment; the data of the fragment enters an accepted queue;
t4, the fragment node verifies and pre-executes the data of the 'accepted' queue, and discards the data which fails in verification and pre-execution; the data passing the verification and the pre-execution enter a waiting packaging queue and complete the transaction forwarding work;
t5, if the node participating in the consensus process of the fragment chain obtains the chance of block emergence, the node executes the transaction from the waiting packaging queue, packages the transaction into a new block according to the tree map topological rule of the currently received and stored block, and broadcasts the new block to the whole network; all nodes participating in the consensus process of the fragment chain verify the new block according to a consensus algorithm;
and T6, after receiving a new block, the nodes of the rest fragment chains in the network verify the validity of the new block, execute the transaction and update the related state storage data.
2. The consensus method based on blockchain fragmentation technology as claimed in claim 1, wherein the single fragment chain consensus process of the PoS consensus algorithm based on weight and VRF specifically comprises: different weights in each round of consensus process of each user are calculated through the VRF algorithm of Algorand, and consensus is achieved on the blocks of a single fragment chain in a multi-round voting mode.
3. The consensus method based on blockchain fragmentation technology as claimed in claim 2, wherein the VRF algorithm is implemented by verifiable random functions to achieve consensus on a new block in a way of calculating total vote weights, comprising the following steps:
proposal preparation phase
Each user can submit own proof of block-out proposal;
each user verifies and screens the received block output proposal certificate, and selects the qualified block output person with the largest weight;
reduction confirmation phase
If the self is qualified, broadcasting the new block packaged by the self to the network;
each user performs reduction confirmation voting on the block-out suggestion certificate corresponding to the self-selected qualified block-out person;
the whole network confirms a qualified block-out proposal certificate through voting so as to lead the corresponding block to have irreversible conversion;
final confirmation phase
Receiving a new block corresponding to the out-block proposal certificate confirmed in the reduction confirmation stage, verifying the new block and finally confirming and voting;
the whole network confirms a new block by voting, and the final consistency is achieved on the new block.
4. The consensus method of claim 2 wherein the random seed of the parent block is used as a basis for the process of the lottery algorithm, and two parameters, i.e. the consensus round at the block height and the consensus stage identification value at this time, are added to calculate the random seed required by the VRF.
5. The consensus method based on blockchain slicing technique as claimed in claim 2, wherein an intelligent contract is further installed in the single slicing chain, and each user mortises a different number of digital assets on the intelligent contract to obtain different weight values, and becomes a node participating in consensus.
6. The consensus method based on blockchain fragmentation technology as claimed in claim 1, wherein the consensus process of multiple fragmentation chains of the tree based consensus algorithm specifically comprises:
s1, achieving consensus on the whole sequence of all blocks;
s2, generating a new block.
7. The method according to claim 6, wherein the step S1 comprises the following steps:
s11, determining a main chain by using a GHOST protocol, namely a greedy subtree protocol, wherein the method comprises the steps of selecting an innovation block as the currently confirmed main chain, iteratively selecting a next block on the main chain from child blocks of a last block of the currently confirmed main chain from the innovation block, and selecting a child block with a largest subtree according to a selection rule;
s12, determining the sequence of the blocks by using an epoch rule of the tree graph, wherein each epoch is determined based on each block on the main chain; the era of the block on the bifurcation is determined by the era of the main chain block generated after the block, the sequence of the blocks is determined according to the topological ordering of the father edge of the blocks, and if the topological order of the father edge is the same, the tie is broken according to the hash value of the head of the block.
8. The method according to claim 6, wherein the step S2 comprises the following steps: firstly, selecting the last block on the main chain as a father of the new block; the new chunk then references all chunks that have been received but have not been referenced by other chunks.
CN201911191908.4A 2019-11-28 2019-11-28 Consensus method based on block chain fragmentation technology Pending CN110851537A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911191908.4A CN110851537A (en) 2019-11-28 2019-11-28 Consensus method based on block chain fragmentation technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911191908.4A CN110851537A (en) 2019-11-28 2019-11-28 Consensus method based on block chain fragmentation technology

Publications (1)

Publication Number Publication Date
CN110851537A true CN110851537A (en) 2020-02-28

Family

ID=69606284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911191908.4A Pending CN110851537A (en) 2019-11-28 2019-11-28 Consensus method based on block chain fragmentation technology

Country Status (1)

Country Link
CN (1) CN110851537A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111445241A (en) * 2020-02-28 2020-07-24 杭州泛链科技有限公司 Hybrid consensus method and device combining POW and POS
CN111510285A (en) * 2020-03-09 2020-08-07 上海能链众合科技有限公司 Intelligent block chain consensus method based on random number
CN111526194A (en) * 2020-04-17 2020-08-11 中南大学 Block chain system parallel common mining method based on fragmentation technology
CN111586068A (en) * 2020-05-14 2020-08-25 上海简苏网络科技有限公司 Method and system for solving DPOS consensus node rights and interests potential safety hazard
CN112182113A (en) * 2020-10-23 2021-01-05 网易(杭州)网络有限公司 Block chain consensus method, system, electronic device and storage medium
CN112232619A (en) * 2020-07-27 2021-01-15 上海树图区块链研究院 Block output and sequencing method, node and block chain network system of alliance chain
CN112396357A (en) * 2021-01-12 2021-02-23 电子科技大学 Consensus method applied to personnel assessment system based on block chain
CN112468255A (en) * 2020-12-10 2021-03-09 电子科技大学 Block link point time synchronization method based on network consensus and VRF algorithm
CN112926053A (en) * 2021-01-26 2021-06-08 上海树图区块链研究院 Method and system for detecting malicious blocks in unlicensed blockchain system and P2P network
CN114650289A (en) * 2020-12-02 2022-06-21 王志诚 Method and device for block chain consensus
CN115118732A (en) * 2022-07-06 2022-09-27 重庆邮电大学 Dynamic weight-based consensus method for block chain enabling data sharing
CN116032940A (en) * 2023-02-20 2023-04-28 安徽中科晶格技术有限公司 Block chain witness consensus method, device, equipment and medium based on downtime tolerance
CN116055064A (en) * 2023-03-17 2023-05-02 安徽中科晶格技术有限公司 Method, system, medium and equipment for multi-block simultaneous consensus in block chain segmentation

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360206A (en) * 2017-03-29 2017-11-17 阿里巴巴集团控股有限公司 A kind of block chain common recognition method, equipment and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360206A (en) * 2017-03-29 2017-11-17 阿里巴巴集团控股有限公司 A kind of block chain common recognition method, equipment and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHENXING LI等: "Scaling Nakamoto Consensus to Thousands of Transactions per Second" *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111445241A (en) * 2020-02-28 2020-07-24 杭州泛链科技有限公司 Hybrid consensus method and device combining POW and POS
CN111510285A (en) * 2020-03-09 2020-08-07 上海能链众合科技有限公司 Intelligent block chain consensus method based on random number
CN111510285B (en) * 2020-03-09 2021-07-23 上海能链众合科技有限公司 Intelligent block chain consensus method based on random number
CN111526194B (en) * 2020-04-17 2021-04-23 中南大学 Block chain system parallel common mining method based on fragmentation technology
CN111526194A (en) * 2020-04-17 2020-08-11 中南大学 Block chain system parallel common mining method based on fragmentation technology
CN111586068A (en) * 2020-05-14 2020-08-25 上海简苏网络科技有限公司 Method and system for solving DPOS consensus node rights and interests potential safety hazard
CN112232619A (en) * 2020-07-27 2021-01-15 上海树图区块链研究院 Block output and sequencing method, node and block chain network system of alliance chain
CN112182113A (en) * 2020-10-23 2021-01-05 网易(杭州)网络有限公司 Block chain consensus method, system, electronic device and storage medium
CN114650289A (en) * 2020-12-02 2022-06-21 王志诚 Method and device for block chain consensus
CN112468255A (en) * 2020-12-10 2021-03-09 电子科技大学 Block link point time synchronization method based on network consensus and VRF algorithm
CN112396357A (en) * 2021-01-12 2021-02-23 电子科技大学 Consensus method applied to personnel assessment system based on block chain
CN112926053A (en) * 2021-01-26 2021-06-08 上海树图区块链研究院 Method and system for detecting malicious blocks in unlicensed blockchain system and P2P network
CN112926053B (en) * 2021-01-26 2023-11-28 上海树图区块链研究院 Method and system for detecting malicious blocks in unlicensed blockchain system and P2P network
CN115118732A (en) * 2022-07-06 2022-09-27 重庆邮电大学 Dynamic weight-based consensus method for block chain enabling data sharing
CN115118732B (en) * 2022-07-06 2024-02-27 重庆邮电大学 Dynamic weight-based consensus method for block chain enabled data sharing
CN116032940A (en) * 2023-02-20 2023-04-28 安徽中科晶格技术有限公司 Block chain witness consensus method, device, equipment and medium based on downtime tolerance
CN116032940B (en) * 2023-02-20 2023-06-06 安徽中科晶格技术有限公司 Block chain witness consensus method, device, equipment and medium based on downtime tolerance
CN116055064A (en) * 2023-03-17 2023-05-02 安徽中科晶格技术有限公司 Method, system, medium and equipment for multi-block simultaneous consensus in block chain segmentation

Similar Documents

Publication Publication Date Title
CN110851537A (en) Consensus method based on block chain fragmentation technology
Gaži et al. Proof-of-stake sidechains
Abraham et al. The blockchain consensus layer and BFT
JP7211943B2 (en) Method and Apparatus for Distributed Database Enabling Deletion of Events
JP7184959B2 (en) Method and apparatus for distributed database in network
CN106878000B (en) Alliance chain consensus method and system
Miller et al. The honey badger of BFT protocols
EP3698518B1 (en) Primary and secondary blockchain device
CN114422155B (en) Proposal consensus execution method, block chain system, device and storage medium
CN109919760A (en) Byzantine failure tolerance common recognition algorithm based on voting mechanism
Kleinrock et al. Proof-of-reputation blockchain with nakamoto fallback
CN113807851B (en) Block chain expandability realization method and system based on slicing
CN113939821A (en) System and method for non-parallel mining on a workload justification blockchain network
CN114202422A (en) Block chain fragmentation method, block chain system and cross-fragmentation transaction processing method
US20220383304A1 (en) Distributed network with consensus mechanism
Blum et al. Superlight–A permissionless, light-client only blockchain with self-contained proofs and BLS signatures
EP4004853A1 (en) Unity protocol consensus
CN116132058A (en) Block chain consensus method, apparatus, device and computer readable storage medium
CN109344623B (en) DAG-based decentralization method and terminal
KR20210127231A (en) Energized Identity based blockchain
Oh et al. Graph learning BFT: A design of consensus system for distributed ledgers
CN117251889B (en) Block chain consensus method, related device and medium
Hao et al. BitFT: An Understandable, Performant and Resource-Efficient Blockchain Consensus
Tian et al. SLChain: A secure and low‐storage pressure sharding blockchain
KR102447289B1 (en) Peer terminal and method for processing a block data at a peer terminal

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