CN106878000B - Alliance chain consensus method and system - Google Patents

Alliance chain consensus method and system Download PDF

Info

Publication number
CN106878000B
CN106878000B CN201710128348.2A CN201710128348A CN106878000B CN 106878000 B CN106878000 B CN 106878000B CN 201710128348 A CN201710128348 A CN 201710128348A CN 106878000 B CN106878000 B CN 106878000B
Authority
CN
China
Prior art keywords
consensus
node
accounting
white list
rule
Prior art date
Application number
CN201710128348.2A
Other languages
Chinese (zh)
Other versions
CN106878000A (en
Inventor
姚前
徐忠
张一锋
Original Assignee
中钞信用卡产业发展有限公司杭州区块链技术研究院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中钞信用卡产业发展有限公司杭州区块链技术研究院 filed Critical 中钞信用卡产业发展有限公司杭州区块链技术研究院
Priority to CN201710128348.2A priority Critical patent/CN106878000B/en
Publication of CN106878000A publication Critical patent/CN106878000A/en
Application granted granted Critical
Publication of CN106878000B publication Critical patent/CN106878000B/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0227Filtering policies
    • H04L63/0263Rule management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to network resources
    • H04L63/101Access control lists [ACL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communication
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communication the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Abstract

The invention discloses a alliance chain consensus system, which comprises: the consensus node management contract module updates a consensus node white list according to consensus node modification operation sent by an administrator; the consensus rule intelligent contract module is used for acquiring hash values corresponding to all consensus nodes in the updated consensus node white list, sequencing the hash values according to a preset sequencing rule to obtain a bookkeeping sequence, and determining bookkeeping nodes in the current block according to the bookkeeping sequence; the hash value is a numerical value obtained by calculating the public key address of the consensus node by using a hash algorithm; the consensus confirmation module is used for performing consensus confirmation on the block data after the block data is submitted by the current block accounting node; the system performs consensus on the number of the consensus nodes and the accounting sequence, and can dynamically adjust the accounting sequence when the consensus nodes change; the invention also discloses a alliance chain consensus method, which has the beneficial effects.

Description

Alliance chain consensus method and system

Technical Field

The invention relates to the technical field of data processing, in particular to a alliance chain consensus method and system.

Background

Generally, when multiple hosts in a network cooperate to form a network cluster through asynchronous communication, the asynchronous network is unreliable by default, and a mechanism is needed to copy the state between the unreliable hosts to ensure that the state of each host eventually reaches the same consistency state, so as to achieve consensus.

Specifically, in a block chain network, a new uncertain factor, namely a problem of a malicious node, is introduced to the consensus problem. A malicious node may intentionally send erroneous data, spurious data (collectively referred to as spurious data), or even the same spurious data in conjunction with multiple malicious nodes. Once a malicious node exceeds some threshold (e.g., 50%) of the total nodes, the system may reach a false consensus, resulting in a significant error.

The public blockchain generally adopts a POW consensus algorithm, i.e., a workload certification scheme. The basic idea behind this consensus scheme is that the achievement of consensus for each block of data (i.e., block) that needs to be agreed upon requires the attachment of a proof of workload, which is usually a cryptographically difficult problem, but the verification of the correctness of the answer is straightforward. For example, if a node a on a public blockchain node wants to apply for consensus on a data block b, it needs to perform a series of cryptographic calculations on b, and finally obtains a result h, which sends (b, h) to the blockchain. Other nodes may also submit their own (b, h)' at the same time, and the node receiving the data will only recognize b with the highest computational difficulty, thus achieving the POW consensus. POW consensus generates a large amount of computational waste, with electricity costs of up to tens of millions of dollars per year spent on bitcoin POWs. The reason why the public chain adopts the POW is mainly that the access of the participating nodes is not monitored, and the POW consensus algorithm is not needed to be adopted for the alliance chain.

A rotation accounting scheme can be adopted in the alliance chain, namely N participating nodes are provided, block data are submitted sequentially in a certain preset sequence from the first node, and as long as blocks are generated by the nodes in turn, other nodes perform consensus confirmation after the authenticity of the data in the blocks is checked. However, the problem is that the number of participating nodes N may change at any time, and the online time of each node is unstable, so how to dynamically adjust the accounting sequence when the nodes change is a difficult problem.

Disclosure of Invention

The invention aims to provide a alliance chain consensus system and a alliance chain consensus method, which can perform consensus on the number of consensus nodes and the accounting sequence, and can dynamically adjust the accounting sequence when the consensus nodes change.

To solve the above technical problem, the present invention provides a federation chain consensus system, comprising:

the consensus node management contract module is used for updating a consensus node white list according to consensus node modification operation sent by an administrator;

the consensus rule intelligent contract module is used for acquiring hash values corresponding to all consensus nodes in an updated consensus node white list, sequencing the hash values according to a preset sequencing rule to obtain a bookkeeping sequence, and determining current block bookkeeping nodes according to the bookkeeping sequence; the hash value is a numerical value obtained by calculating the public key address of the consensus node by using a hash algorithm;

and the consensus confirming module is used for carrying out consensus confirmation on the block data after the block data is submitted by the current block accounting node.

Optionally, the consensus rule intelligent contract module includes:

the current block accounting node determining unit is used for determining the current block accounting node by adding 1 to the accounting sequence of the previous block accounting node after the current block accounting node finishes accounting;

and the judging unit is used for judging whether the accounting node of the current block starts accounting within a preset time by using a timeout rule, and if not, adding 1 to the accounting sequence of the accounting node of the current block to determine a new accounting node of the current block.

Optionally, the consensus rule intelligent contract module further includes:

the consensus rule modifying unit is used for modifying the rule in the consensus rule intelligent contract and synchronizing the consensus rule intelligent contract to each participant in the alliance chain after the consensus is achieved; wherein the rules include the timeout rule and the predetermined sort rule.

Optionally, the scheme further includes:

and the initialization module is used for determining an initial administrator and a preset number of consensus nodes.

Optionally, the contract module for managing consensus node further includes:

and the administrator white list maintenance unit is used for updating the administrator white list according to the administrator modifying operation sent by the initial administrator.

Optionally, the scheme further includes:

and the synchronization node white list generation module is used for generating and issuing a synchronization node white list with network connection and data synchronization authority.

Optionally, the scheme further includes:

the node white list configuration module is used for determining a node white list configuration file according to the selection operation of an administrator on the synchronous node white list and the consensus node white list; wherein the node white list configuration file is used for recording the nodes which allow the network communication of the connection, the data synchronization and the alliance chain accounting.

Optionally, the consensus confirmation module specifically performs consensus confirmation on the block data by using a dynamic PBFT consensus algorithm according to the updated consensus node white list after the block data is submitted by the current block accounting node.

The invention also provides a alliance chain consensus method, which comprises the following steps:

updating a white list of the consensus node according to the consensus node modification operation sent by an administrator;

acquiring a hash value corresponding to each consensus node in the updated consensus node white list; the hash value is a numerical value obtained by calculating the public key address of the consensus node by using a hash algorithm;

sorting the hash values according to a preset sorting rule to obtain a billing order;

determining a current block accounting node according to the accounting sequence;

and after submitting the block data, the current block accounting node performs consensus confirmation on the block data.

Optionally, after submitting the block data, the current block accounting node performs consensus confirmation on the block data, including:

and after the current block accounting node submits the block data, performing consensus confirmation on the block data by utilizing a dynamic PBFT consensus algorithm according to the updated consensus node white list.

The invention provides a alliance chain consensus system, which comprises: the consensus node management contract module updates a consensus node white list according to consensus node modification operation sent by an administrator; the consensus rule intelligent contract module is used for acquiring hash values corresponding to all consensus nodes in the updated consensus node white list, sequencing the hash values according to a preset sequencing rule to obtain a bookkeeping sequence, and determining bookkeeping nodes in the current block according to the bookkeeping sequence; the hash value is a numerical value obtained by calculating the public key address of the consensus node by using a hash algorithm; and the consensus confirmation module is used for performing consensus confirmation on the block data after the block data is submitted by the current block accounting node.

Therefore, the system identifies the number of the identified nodes and the accounting sequence, can dynamically adjust the accounting sequence when the identified nodes change, and achieves high flexibility and high reliability of the system; the invention also provides a alliance chain consensus method, which has the beneficial effects and is not repeated herein.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.

Fig. 1 is a block diagram illustrating a federation chain consensus system according to an embodiment of the present invention;

fig. 2 is a flowchart of a federation chain consensus method according to an embodiment of the present invention.

Detailed Description

The core of the invention is to provide a alliance chain consensus system and a alliance chain consensus method, which can perform consensus on the number of consensus nodes and the accounting sequence and can dynamically adjust the accounting sequence when the consensus nodes change.

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 some, but not all, embodiments of the present invention. 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 terms appearing in the present embodiment are explained below:

block chains: the distributed unified account book is characterized in that accounting contents are jointly determined by all participants, all the participants store full data, and any individual cannot tamper the data.

Consensus: block chain terminology. There is no single accounting center on the blockchain, and the ledgers are recorded jointly by the whole network, which raises a problem of how to determine whether a transaction is legal. The process of determining whether a transaction is legitimate and whether a block of packages recommended by a node is approved by everyone is called consensus. Only blocks that pass the consensus are approved by the whole network.

Federation chain: as opposed to a public chain, is one type of blockchain. It features that it has admission system and only authorized participators can join it. Correspondingly, the alliance chain has two roles of a supervisor and a common participant.

Block chain transaction: or transaction for short, refers to a piece of information sent by a participant, and sends the information to the content on the block chain after the information is digitally signed by using a private key of the participant. Typically the transaction comprises a payment transaction or a smart contract creation, invocation transaction.

Intelligent contract: a piece of program code on the blockchain specifies the rights and obligations of the contractual associate and the terms of the action. Contract associates confirm smart contracts by sending blockchain transactions, paying for digital currency that the contracts may require, invoking functions specified by the smart contracts, and so forth.

Account address: an account on the blockchain network usually appears in a form of some variation of a public key of some asymmetric key, and only a private key corresponding to the address is held to obtain the authority to operate the account.

Intelligent contract address: the virtual account corresponding to the intelligent contract is different from the common account address, and the intelligent contract address does not have a corresponding operation private key, which is defined by contract codes and can have operation authority.

Digital currency: payable, accumulable, divisible consolidated numerical information on the blockchain for currency circulation on the blockchain is held by the aforementioned account address or smart contract address. Legal digital currency: digital currency issued by a central government agency.

Digital assets: the transferable digital information on the blockchain, which often corresponds to some real world entity, is held by the aforementioned account address or smart contract address.

Creating a new appearance block: the first piece of data in the block chain often records the underlying predetermined information, such as managing account addresses and permissions.

Block discharging: accounting (submitting block content and consensus offers at the same time).

And (4) block discharging: and (4) pre-promised accounting nodes.

Block height: the sequence number of the blocks on the block chain.

round: different interaction phases within a block period are output once.

The embodiment provides a scheme for achieving the bookkeeping consensus on the alliance chain on the premise that the number of the consensus nodes participating in the bookkeeping is dynamically changed, the online time of the consensus nodes is not fixed, and the data accuracy of the consensus nodes cannot be guaranteed. Referring to fig. 1 in detail, fig. 1 is a block diagram illustrating a federation chain consensus system according to an embodiment of the present invention; the system may include:

the consensus node management contract module 100 is configured to update the consensus node white list according to a consensus node modification operation sent by an administrator.

As a federation chain, it is necessary to ensure that a supervisor, i.e., an administrator, has a certain authority to manage the consensus node, for example, add a new consensus node and delete a consensus node. The consensus node management contract module 100 mainly implements the modification of the consensus node by the administrator, wherein the consensus node modification operation may include deleting the consensus node operation, adding the consensus node operation, suspending the consensus node operation, and the like. This embodiment is not limited to this. And recording the latest consensus node by using the consensus node white list. Namely, a supervisor (in this embodiment, an administrator) is introduced to manage access admission to and from a common node on the federation chain. A consensus node here is understood to be a node with accounting functionality in a federation chain.

In this embodiment, the consensus node modification operation sent by the administrator can modify the consensus node white list, and the content of the consensus node modification operation can be set in the consensus node management contract. Namely, the consensus node management contract correspondingly specifies the consensus node white list. The management of the consensus nodes is realized by adopting a contract mode, and the safety and consistency can be ensured. And the modification authority of the administrator can be increased, deleted and suspended. The consensus node management contract can be built in the creation block to maintain a consensus node white list. Only blocks packed with account signatures in the whitelist of consensus nodes are valid blocks.

Further, the consensus node management contract may also specify common rights, i.e. authentication functions of other nodes than the administrator. For example, whether a certain node is a consensus node may be verified, a white list of the consensus node may be obtained (the white list of the consensus node in this embodiment may be displayed in a form of a list), whether an address where a modification operation of the consensus node is initiated is an address corresponding to an administrator may be determined, and the like. That is, optionally, the consensus node management contract module may further include a right verification unit for verifying the above-mentioned functions. Through the verification, the participants of the alliance chain can verify the data issued in the alliance chain at any time, and the reliability of the system is enhanced.

Specifically, because two operations of initiation and validation are divided in actual service, for adding a consensus node, the addition and the restart are needed, and for deleting the consensus node, the pause and the deletion are needed.

The process of adding the consensus node may be: if a common node in a alliance chain is expected to become a consensus node after installation and generation, firstly, an account address of the common node needs to be submitted to an administrator, the administrator initiates a consensus node adding operation after verification is passed, after addition is finished, namely, after a consensus node white list is updated, the common node and other nodes jointly modify a local consensus node white list, and after block data synchronization is finished, accounting can be waited to participate.

The consensus rule intelligent contract module 200 is configured to obtain hash values corresponding to the consensus nodes in the updated consensus node white list, sort the hash values according to a predetermined sorting rule to obtain a billing order, and determine a current block billing node according to the billing order; the hash value is a numerical value obtained by calculating the public key address of the consensus node by using a hash algorithm.

Specifically, the consensus rule intelligent contract module 200 mainly determines the current block accounting node in order to dynamically update the accounting order. Namely, the number of the consensus nodes and the accounting sequence are consensus by using the consensus rule intelligent contract. The consensus rule intelligent contract is set by an administrator (i.e., a supervisor). The content of the specific consensus rule intelligent contract is not limited in this embodiment. The administrator can set according to the requirements of the actual federation chain, and can also perform adaptive modification and the like on the existing rules according to the actual conditions, for example, the consensus rule intelligent contract specifies the following information in detail:

1. and the list of nodes with accounting authority is the latest white list of the common knowledge nodes.

2. The longest accounting waiting time, i.e. the current block accounting node, has to perform accounting actions within this longest accounting waiting time.

3. The determination method of the current block accounting node is, in this embodiment, the current block accounting node is determined by using a hash value to perform sorting.

4. Other information related to the identified rule such as requirements for some modified rules, etc.

In this embodiment, a hash value corresponding to each common node in the updated white list of common nodes is obtained, and the hash values are sorted according to a predetermined sorting rule to obtain an accounting order. The method includes the steps of firstly determining the added or deleted consensus nodes in an updated consensus node white list, then calculating corresponding hash values, if the consensus nodes are added, adding the hash values corresponding to the added consensus nodes to corresponding positions according to a preset sequencing rule in an accounting sequence, if the consensus nodes are deleted, deleting the corresponding consensus nodes in the accounting sequence, and sequentially adjusting the accounting sequence corresponding to other consensus nodes. Or determining the added or deleted consensus nodes in the updated consensus node white list each time, then calculating the corresponding hash values, calling the hash values of other consensus nodes, and finally sequencing the hash values according to a preset sequencing rule to obtain the accounting sequence. Of course, the hash values corresponding to the common nodes in the updated white list of the common nodes may also be calculated, and the hash values are sorted according to a predetermined sorting rule to obtain the billing order. This embodiment is not limited to this. The bookkeeping sequence corresponding to each consensus node in the updated consensus node white list can be obtained according to the hash value.

The predetermined sorting rule in this embodiment may be according to a sequence of hash values from large to small, or a sequence of hash values from small to large, and the like. The present embodiment does not limit the predetermined sort rule. The determination of the billing order is made each time according to the predetermined sort rule, as long as the predetermined sort rule can be approved. After the accounting sequence is obtained, accounting is carried out in turn according to the sequence, and after the accounting is finished by the current block accounting node, the subsequent consensus node is the current block accounting node for accounting.

Further, the embodiment is to prevent the common node with a failure from being unable to perform the accounting action for a long time, thereby affecting the overall efficiency. Preferably, the consensus rule intelligent contract module may include:

the current block accounting node determining unit is used for adding 1 to the accounting sequence of the previous block accounting node to determine the current block accounting node after the current block accounting node finishes accounting;

and the judging unit is used for judging whether the accounting node of the current block starts accounting within the preset time by using the overtime rule, and if not, adding 1 to the accounting sequence of the accounting node of the current block to determine a new accounting node of the current block.

Specifically, the timeout rule sets a predetermined time, which is the longest waiting billing time. And if the current block accounting node does not execute the accounting action in the preset time, sequentially delaying to the next consensus node according to the accounting sequence, and taking the consensus node as the current accounting node.

Further, in order to ensure that each rule in the consensus rule intelligent contract can conform to the requirements of practical application. The consensus rule intelligent contract module in this embodiment may further include:

the consensus rule modifying unit is used for modifying the rule in the consensus rule intelligent contract and synchronizing the consensus rule intelligent contract to each participant in the alliance chain after the consensus is achieved; wherein the rules include a timeout rule and a predetermined sort rule.

The present embodiment does not limit the specific content of the rule in the consensus rule intelligent contract. The administrator can modify the consensus rule intelligent contract to meet the requirements of the actual application. And because formula rules are crucial to the normal operation of the system, the modification of the formula rules must be commonly known to ensure the reliability of the modification. I.e., consensus rules modify itself should also pass the consensus of the federation chain.

Specifically, when a supervisor, i.e. an administrator, needs to modify a rule in a consensus rule intelligent contract, the supervisor first calls the consensus rule intelligent contract to modify the rule, and the action needs to achieve consensus under the previous consensus rule. After consensus is achieved, each participant synchronizes to the rule change, and the new consensus rule achieves the confirmation of the whole network. By the mode, the alliance chain can add and delete nodes and modify consensus rules at any time, and high flexibility and high reliability are achieved. And the identity of the consensus node, whether consensus can be submitted or not, and the function management of authority function and the like are realized.

The consensus confirming module 300 is configured to perform consensus confirmation on the block data after the block data is submitted by the current block accounting node.

The common consensus confirmation method at present is to perform consensus confirmation on block data by using a PBFT consensus algorithm. But the PBFT consensus algorithm cannot dynamically identify the accounting order of the current new consensus node, etc. I.e. the white list of the consensus node cannot be dynamically obtained. The method aims to realize real-time reading of the consensus node list by a dynamic PBFT consensus algorithm so as to solve the problem that the security and consistency cannot be guaranteed in a traditional centralized mode. Preferably, the consensus confirmation module is specifically configured to perform consensus confirmation on the block data by using a dynamic PBFT consensus algorithm according to the updated consensus node white list after the block data is submitted by the current block accounting node. Namely, the dynamic PBFT consensus algorithm realizes the error tolerance of (n-1)/3n, wherein n is the total number of nodes.

Specifically, the implementation process of the dynamic PBFT consensus algorithm may be as follows:

1. and determining the block-out person of the current round according to the three information of the public key of the block-out person of the previous height block, the current height and the current round. People without blocks enter the pre-prepare stage. The outgoing party packaging transaction generates a new block and broadcasts a pre-prepare message (containing the block hash and the outgoing party's signature on the block hash with its own private key) and then directly enters the prepare stage.

2. The pre-prep phase. The non-blocking person receives the pre-preparation message broadcast by the blocking person, and after the block in the pre-preparation message is verified, the preparation message (containing the signature of the blocking person on the block and the signature of the node pair on the signature) is broadcast. Then the preamble stage is entered.

3. The prepare stage. After gathering 2/3 the prefix message sent by the node above for a block, a commit message is broadcast (containing the blockman's signature for the block and the signature of the node for the signature). And enters the commit stage.

4. And a commit stage. And after collecting commit messages sent by nodes above 2/3 and aiming at a certain block, adding the block into the block chain and entering the next height.

5. Any problems occur in the above three phases including waiting for a timeout, failure of signature verification, etc. The above process continues to be performed, but votes for NULL. If eventually 2/3 the nodes above all vote for NULL, then the next round is entered.

6. If a message is received that is greater than the current altitude or current round, it is stored in the message log. If a message is collected for a stage of the future round at the current altitude of the node above 2/3, then the stage of directly jumping to the round continues to wait for the message to be received.

7. If a new block is synchronized in the middle, go directly to the latest altitude, starting from round 0.

Based on the technical scheme, the alliance chain consensus system provided by the embodiment of the invention realizes consensus on the number of consensus nodes and the accounting sequence, can dynamically adjust the accounting sequence when the consensus nodes change, and realizes high flexibility and high reliability of the system; and a dynamic PBFT consensus algorithm is used for reading the consensus node list in real time, so that the problem that the safety and consistency cannot be guaranteed in a traditional centralized mode is solved.

Based on the above embodiment, the system further includes:

and the initialization module is used for determining an initial administrator and a preset number of consensus nodes.

Specifically, in the stage of generating the creation block of the federation chain, an initial administrator address (external account address) needs to be specified, that is, an initial administrator address is written, and a predetermined number of common nodes (for example, at least 3 common nodes) need to be specified.

After initialization is completed and the federation chain is normally started, the contracts are written into the founding block. Once the federation chain is operated, the contents of the foundational blocks cannot be modified, and the address of an initial administrator cannot be changed, so that the private key of the initial administrator needs to be stored very well.

Based on the above embodiment, in order to improve the work efficiency of the administrator and reduce the task amount of the initial administrator, the consensus node management contract module may further include:

and the administrator white list maintenance unit is used for updating the administrator white list according to the administrator modifying operation sent by the initial administrator.

Specifically, when the alliance-link network is created, an account address is firstly introduced to serve as an initial administrator of the system, and the initial administrator can modify an administrator white list. And only the account in the white list of the administrator can perform addition and deletion operations of the consensus node. This embodiment is not limited to this. For example, the initial administrator may later add more administrators, but not delete administrators. The consensus node management contract module maintains a consensus node white list and an administrator white list.

Based on any embodiment, the system can also manage the network authority, and any node can synchronize all data from the public network because the public chain has no node admission mechanism, and can sign a block after obtaining a certain accounting authority. In the embodiment, the network transaction is sequenced and packed into blocks by the consensus node, then broadcast to other nodes of the network, and a certain number of collected votes is determined as a legal block, and the read-only (normal) node can synchronize all original data of the alliance chain although the read-only (normal) node does not have the block, so that the consensus node and the read-only node both need strict admission management. That is, the system in this embodiment may further include:

and the synchronization node white list generation module is used for generating and issuing a synchronization node white list with network connection and data synchronization authority.

Specifically, the white list of synchronization nodes is generated and published by an administrator. Node information such as node public keys, IP addresses, ports, etc. may be included in the list of synchronized nodes to facilitate identification of the nodes by the participants.

Based on the embodiment, due to different requirements of administrators, the required white lists of the synchronization nodes and the common node are different; in order to facilitate the administrator to set the nodes required by the administrator, the system may further include:

the node white list configuration module is used for determining a node white list configuration file according to the selection operation of an administrator on the synchronous node white list and the consensus node white list; wherein the node white list configuration file is used for recording the nodes which allow the network communication, data synchronization and alliance chain accounting of the connection.

Specifically, each node has a node white list configuration file locally, and records nodes allowing network communication and data synchronization including information of a public key, an IP address, a port and the like of the node, and a node communication request which is not in the node white list configuration file is rejected. Each node operation and maintenance personnel carries out manual maintenance, selects a plurality of other nodes which the node operation and maintenance personnel wish to connect with, can configure a plurality of read-only nodes for the node operation and maintenance personnel, and undertakes the work of data analysis and the like. Therefore, the management of network layer nodes, namely the management of network connection authority is realized.

Based on the technical scheme, the alliance chain consensus system provided by the embodiment of the invention realizes consensus on the number of consensus nodes and the accounting sequence, can dynamically adjust the accounting sequence when the consensus nodes change, and realizes high flexibility and high reliability of the system; and a dynamic PBFT consensus algorithm is used for reading the consensus node list in real time, so that the problem that the security and consistency cannot be guaranteed in a traditional centralized mode is solved, the nodes of the participants are further managed from a network level and an identity level, and the management comprehensiveness and the management efficiency are improved.

In the following, the federation chain consensus method provided by the embodiment of the present invention is introduced, and the federation chain consensus method described below and the federation chain consensus system described above may be referred to correspondingly.

Referring to fig. 2, fig. 2 is a flowchart illustrating a federation chain consensus method according to an embodiment of the present invention; the method can comprise the following steps:

s100, updating a white list of the consensus node according to the consensus node modification operation sent by an administrator;

s110, acquiring a hash value corresponding to each consensus node in the updated consensus node white list; the hash value is a numerical value obtained by calculating the public key address of the consensus node by using a hash algorithm;

s120, sorting the hash values according to a preset sorting rule to obtain a billing order;

s130, determining a current block accounting node according to an accounting sequence;

and S140, after the block data is submitted by the current block accounting node, performing consensus confirmation on the block data.

Based on the above embodiment, the performing consensus confirmation on the block data after the block data is submitted by the current block accounting node may include:

and after the current block accounting node submits the block data, performing consensus confirmation on the block data by using a dynamic PBFT consensus algorithm according to the updated consensus node white list.

The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.

Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

The above provides a method and system for federation chain consensus in detail. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A federation chain consensus system, comprising:
the consensus node management contract module is used for updating a consensus node white list according to consensus node modification operation sent by an administrator;
the consensus rule intelligent contract module is used for acquiring hash values corresponding to all consensus nodes in an updated consensus node white list, sequencing the hash values according to a preset sequencing rule to obtain a bookkeeping sequence, and determining current block bookkeeping nodes according to the bookkeeping sequence; the hash value is a numerical value obtained by calculating the public key address of the consensus node by using a hash algorithm; the consensus node is a node with an accounting function;
and the consensus confirming module is used for carrying out consensus confirmation on the block data after the block data is submitted by the current block accounting node.
2. A federation chain consensus system as claimed in claim 1, wherein the consensus rules intelligent contract module comprises:
the current block accounting node determining unit is used for determining the current block accounting node by adding 1 to the accounting sequence of the previous block accounting node after the current block accounting node finishes accounting;
and the judging unit is used for judging whether the accounting node of the current block starts accounting within a preset time by using a timeout rule, and if not, adding 1 to the accounting sequence of the accounting node of the current block to determine a new accounting node of the current block.
3. A federation chain consensus system as claimed in claim 2, wherein the consensus rules intelligent contract module further comprises:
the consensus rule modifying unit is used for modifying the rule in the consensus rule intelligent contract and synchronizing the consensus rule intelligent contract to each participant in the alliance chain after the consensus is achieved; wherein the rules include the timeout rule and the predetermined sort rule.
4. A federation chain consensus system as claimed in claim 1, further comprising:
and the initialization module is used for determining an initial administrator and a preset number of consensus nodes.
5. A federation chain consensus system as claimed in claim 4, wherein the consensus node manages a contract module further comprising:
and the administrator white list maintenance unit is used for updating the administrator white list according to the administrator modifying operation sent by the initial administrator.
6. A federation chain consensus system as claimed in claim 1, further comprising:
and the synchronization node white list generation module is used for generating and issuing a synchronization node white list with network connection and data synchronization authority.
7. The federation chain consensus system of claim 6, further comprising:
the node white list configuration module is used for determining a node white list configuration file according to the selection operation of an administrator on the synchronous node white list and the consensus node white list; wherein the node white list configuration file is used for recording network communication, data synchronization and alliance chain accounting nodes allowing connection.
8. The alliance-chain consensus system of any one of claims 1-7, wherein the consensus confirmation module is specifically configured to perform consensus confirmation on the block data according to the updated consensus node white list by using a dynamic PBFT consensus algorithm after the block data is submitted by the current block billing node.
9. A federation chain consensus method, comprising:
updating a white list of the consensus node according to the consensus node modification operation sent by an administrator;
acquiring a hash value corresponding to each consensus node in the updated consensus node white list; the hash value is a numerical value obtained by calculating the public key address of the consensus node by using a hash algorithm; the consensus node is a node with an accounting function;
sorting the hash values according to a preset sorting rule to obtain a billing order;
determining a current block accounting node according to the accounting sequence;
and after submitting the block data, the current block accounting node performs consensus confirmation on the block data.
10. A federation chain consensus method as claimed in claim 9, wherein consensus confirming of block data after submission of said block data by said current block accounting node comprises:
and after the current block accounting node submits the block data, performing consensus confirmation on the block data by utilizing a dynamic PBFT consensus algorithm according to the updated consensus node white list.
CN201710128348.2A 2017-03-06 2017-03-06 Alliance chain consensus method and system CN106878000B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710128348.2A CN106878000B (en) 2017-03-06 2017-03-06 Alliance chain consensus method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710128348.2A CN106878000B (en) 2017-03-06 2017-03-06 Alliance chain consensus method and system

Publications (2)

Publication Number Publication Date
CN106878000A CN106878000A (en) 2017-06-20
CN106878000B true CN106878000B (en) 2020-02-21

Family

ID=59171109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710128348.2A CN106878000B (en) 2017-03-06 2017-03-06 Alliance chain consensus method and system

Country Status (1)

Country Link
CN (1) CN106878000B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10911461B2 (en) 2018-12-28 2021-02-02 Advanced New Technologies Co., Ltd. Parallel execution of transactions in a blockchain network based on smart contract whitelists

Families Citing this family (46)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107332701A (en) * 2017-06-26 2017-11-07 中国人民银行数字货币研究所 The method and system of management node
CN107276765B (en) * 2017-07-04 2020-05-05 中国联合网络通信集团有限公司 Processing method and device for consensus in block chain
CN107424066B (en) * 2017-07-19 2020-11-10 武汉凤链科技有限公司 Method and system for establishing consensus mechanism based on value quantity
CN107360001A (en) * 2017-07-26 2017-11-17 阿里巴巴集团控股有限公司 A kind of digital certificate management method, device and system
CN107688945B (en) * 2017-08-11 2020-04-10 杭州溪塔科技有限公司 Design method of efficient permission chain based on delay state consensus
CN107464148A (en) * 2017-08-23 2017-12-12 众安信息技术服务有限公司 A kind of intelligent contract upgrade method and system based on alliance's chain
CN107347009B (en) * 2017-08-30 2018-08-14 北京知金链网络技术有限公司 Block chain one-dimensional random number common recognition election method
CN107579848B (en) * 2017-08-30 2020-08-25 上海保险交易所股份有限公司 Method for dynamically changing consensus node in practical Byzantine fault-tolerant consensus mechanism
CN108170701A (en) * 2017-11-14 2018-06-15 北京欧链科技有限公司 The information processing method and device of block chain
CN107995270A (en) * 2017-11-24 2018-05-04 成都赤乌软件技术有限公司 A kind of method that distributed document storage is realized based on block chain
CN109886703A (en) * 2017-12-04 2019-06-14 北京红马传媒文化发展有限公司 Electronic bill information processing method, device and electronic ticket business system
CN108039948A (en) * 2017-12-05 2018-05-15 北京博晨技术有限公司 Node maitaining method, device and electronic equipment
CN108197913B (en) * 2017-12-18 2021-01-05 深圳前海微众银行股份有限公司 Payment method, system and computer readable storage medium based on block chain
CN108108967B (en) * 2017-12-29 2020-10-16 山大地纬软件股份有限公司 Multi-stage PBFT consensus system and method for complex digital assets
CN108269190A (en) * 2018-01-17 2018-07-10 深圳四方精创资讯股份有限公司 Across chain method and its system based on across chain relaying platform
CN108365993B (en) * 2018-03-09 2020-04-28 深圳前海微众银行股份有限公司 Block link point dynamic changing method, system and computer readable storage medium
CN108681963B (en) * 2018-03-29 2020-07-31 深圳市网心科技有限公司 Multi-block chain integration control method, system, electronic device and storage medium
CN108830709A (en) * 2018-04-17 2018-11-16 中车工业研究院有限公司 A kind of crowdsourcing transaction system based on block chain
CN108647523B (en) * 2018-04-28 2020-01-17 华南理工大学 Block chain-based electronic certification system and certificate storage and file recovery method
CN108848052B (en) * 2018-04-28 2020-12-18 广州西麦科技股份有限公司 Training point management method and device based on cloud computing network and storage medium
CN108712486A (en) * 2018-05-11 2018-10-26 北京奇虎科技有限公司 Proof of work method and device
CN108769163B (en) * 2018-05-16 2020-11-24 深圳前海微众银行股份有限公司 Alliance chain consensus achieving method, equipment and computer readable storage medium
CN108717630B (en) * 2018-05-19 2020-12-22 上海分布信息科技有限公司 Block output method and implementation system thereof
CN109194702A (en) * 2018-06-04 2019-01-11 平安科技(深圳)有限公司 Medical data recording method, system, computer equipment and storage medium
CN109964446A (en) * 2018-06-08 2019-07-02 北京大学深圳研究生院 A kind of common recognition method based on ballot
CN108900380B (en) * 2018-07-14 2020-07-10 上海分布信息科技有限公司 Node management method and implementation system thereof
CN109241776B (en) * 2018-08-01 2020-09-22 南京理工大学 Weighing detection data recording system and data recording method based on block chain
CN109189853A (en) * 2018-08-08 2019-01-11 众安信息技术服务有限公司 Method of data synchronization and device between a kind of block chain
CN109379396A (en) * 2018-08-23 2019-02-22 泰链(厦门)科技有限公司 Method, medium, device and the block catenary system of hard bifurcation are prevented in block catenary system
CN109688186B (en) * 2018-08-31 2021-01-08 深圳壹账通智能科技有限公司 Data interaction method, device, equipment and readable storage medium
CN109274667B (en) * 2018-09-14 2020-06-23 阿里巴巴集团控股有限公司 Copyright event evidence storing method and system based on block chain
CN109450856A (en) * 2018-10-12 2019-03-08 西安电子科技大学 Data-link information flow control system and method based on block chain
CN109376274B (en) * 2018-10-23 2020-12-22 杭州能链科技有限公司 Block output method and device based on block chain system and storage medium
CN109688199A (en) * 2018-11-28 2019-04-26 西安电子科技大学 A kind of multiple domain layering Internet of Things alliance platform chain and its sharding method, computer
CN109583903B (en) * 2018-11-28 2020-12-11 杭州复杂美科技有限公司 Block confirmation method, equipment and storage medium
CN109697217A (en) * 2018-12-06 2019-04-30 成都佰纳瑞信息技术有限公司 A kind of block chain transaction methods
CN109785130A (en) * 2018-12-17 2019-05-21 金蝶软件(中国)有限公司 Block chain is known together method, apparatus, computer equipment and storage medium at random
CN109727029A (en) * 2018-12-18 2019-05-07 杭州茂财网络技术有限公司 A kind of alliance's chain common recognition method and system
CN109510876A (en) * 2018-12-20 2019-03-22 弗洛格(武汉)信息科技有限公司 A kind of alliance's chain sharding method and corresponding alliance's chain based on PBFT
CN109660545A (en) * 2018-12-27 2019-04-19 北京新唐思创教育科技有限公司 A kind of alliance's chain common recognition method and computer storage medium
CN110046901B (en) * 2018-12-28 2020-06-30 阿里巴巴集团控股有限公司 Credibility verification method, system, device and equipment of alliance chain
CN109818932A (en) * 2018-12-28 2019-05-28 华迪计算机集团有限公司 Electronic government documents handle record generation method, apparatus and system
CN109697891A (en) * 2019-01-21 2019-04-30 苏宁易购集团股份有限公司 The open state monitoring method and system of ship automatic identification system
CN110730204A (en) * 2019-09-05 2020-01-24 阿里巴巴集团控股有限公司 Method for deleting nodes in block chain network and block chain system
CN111726370B (en) * 2020-08-21 2020-11-27 支付宝(杭州)信息技术有限公司 Method, system and device for automatically switching block chain consensus protocol
CN112100282A (en) * 2020-11-17 2020-12-18 腾讯科技(深圳)有限公司 Data synchronization method and device of alliance chain, readable medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105719185A (en) * 2016-01-22 2016-06-29 杭州复杂美科技有限公司 Block chain data comparison and consensus method
CN106357405A (en) * 2016-09-19 2017-01-25 弗洛格(武汉)信息科技有限公司 Method and system for managing data on basis of block chain technology consistency algorithms
CN106375317A (en) * 2016-08-31 2017-02-01 北京明朝万达科技股份有限公司 Block chain-based big data security authentication method and system
CN106372868A (en) * 2016-09-06 2017-02-01 联动优势科技有限公司 Verification method and apparatus for transaction data written into block chain
CN106372533A (en) * 2016-09-14 2017-02-01 中国银联股份有限公司 Block chain technology-based content storage method
CN106411503A (en) * 2016-11-28 2017-02-15 中国银行股份有限公司 Accounting method, accounting system, voting node and accounting node under block chain voting and accounting mode

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150228004A1 (en) * 2014-02-07 2015-08-13 Kristin Kaye Bednarek Smart Device Apps and Incentives For Encouraging The Creation and Sharing Electronic Lists To Imrpove Targeted Marketing While Preserving User Anonymity

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105719185A (en) * 2016-01-22 2016-06-29 杭州复杂美科技有限公司 Block chain data comparison and consensus method
CN106375317A (en) * 2016-08-31 2017-02-01 北京明朝万达科技股份有限公司 Block chain-based big data security authentication method and system
CN106372868A (en) * 2016-09-06 2017-02-01 联动优势科技有限公司 Verification method and apparatus for transaction data written into block chain
CN106372533A (en) * 2016-09-14 2017-02-01 中国银联股份有限公司 Block chain technology-based content storage method
CN106357405A (en) * 2016-09-19 2017-01-25 弗洛格(武汉)信息科技有限公司 Method and system for managing data on basis of block chain technology consistency algorithms
CN106411503A (en) * 2016-11-28 2017-02-15 中国银行股份有限公司 Accounting method, accounting system, voting node and accounting node under block chain voting and accounting mode

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10911461B2 (en) 2018-12-28 2021-02-02 Advanced New Technologies Co., Ltd. Parallel execution of transactions in a blockchain network based on smart contract whitelists

Also Published As

Publication number Publication date
CN106878000A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
Conti et al. A survey on security and privacy issues of bitcoin
Zhang et al. Security and privacy on blockchain
US10394845B2 (en) Method and system for tuning blockchain scalability for fast and low-cost payment and transaction processing
US10693658B2 (en) Methods and systems for using digital signatures to create trusted digital asset transfers
Matsumoto et al. IKP: Turning a PKI around with decentralized automated incentives
Decker et al. Bitcoin meets strong consistency
Bonneau et al. Sok: Research perspectives and challenges for bitcoin and cryptocurrencies
US10284379B1 (en) Public key infrastructure based on the public certificates ledger
Kokoris-Kogias et al. Omniledger: A secure, scale-out, decentralized ledger via sharding
US20190347657A1 (en) Resource transfer method and apparatus, storage medium, and computer device
Tomescu et al. Catena: Efficient non-equivocation via bitcoin
EP2959631B1 (en) Verification system and method with extra security for lower-entropy input records
CN107220820B (en) Resource transfers method, apparatus and storage medium
US20200067697A1 (en) Method for operating a blockchain
US20190172057A1 (en) Blockchain-implemented method and system
Lee et al. Electronic voting service using block-chain
Wu et al. A comprehensive survey of blockchain: From theory to IoT applications and beyond
CN106815764B (en) Digital asset management method and system based on alliance chain
US20180349572A1 (en) Copyright authorization management method and system
US20200389321A1 (en) Secure re-use of private key for dynamic group of nodes
JP2019511151A (en) Cryptographic method and system for secure extraction of data from blockchain
US20190130391A1 (en) Computer-implemented methods and systems for validating tokens for blockchain-based cryptocurrencies
EP2442204B1 (en) System and method for privilege delegation and control
CN107222478B (en) Software defined network control layer security mechanism construction method based on block chain
Saad et al. Exploring the attack surface of blockchain: A systematic overview

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
CB03 Change of inventor or designer information
TA01 Transfer of patent application right
CB03 Change of inventor or designer information

Inventor after: Yao Qian

Inventor after: Xu Zhong

Inventor after: Zhang Yifeng

Inventor before: Zhang Yifeng

Inventor after: Yao Qian

Inventor after: Xu Zhong

Inventor after: Zhang Yifeng

Inventor before: Zhang Yifeng

TA01 Transfer of patent application right

Effective date of registration: 20171113

Address after: Hangzhou City, Zhejiang province 310007 Xihu District Lingyin ad tower Room 903

Applicant after: Zhongchao Credit Card Industry Development Co., Ltd. Hangzhou blockchain Technology Research Institute

Address before: 100176 Beijing Daxing District Economic Development Zone, 28 Fang Fang Road 2, one floor, room 101

Applicant before: Zhongchao Credit Card Industry Development Co., Ltd. Beijing smart card technology research institute

Effective date of registration: 20171113

Address after: Hangzhou City, Zhejiang province 310007 Xihu District Lingyin ad tower Room 903

Applicant after: Zhongchao Credit Card Industry Development Co., Ltd. Hangzhou blockchain Technology Research Institute

Address before: 100176 Beijing Daxing District Economic Development Zone, 28 Fang Fang Road 2, one floor, room 101

Applicant before: Zhongchao Credit Card Industry Development Co., Ltd. Beijing smart card technology research institute

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200702

Address after: Hangzhou City, Zhejiang province 310007 Xihu District Lingyin ad tower Room 903

Co-patentee after: Shanghai Bill Exchange Co.,Ltd.

Patentee after: ZHONGCHAO CREDITCARD INDUSTRY DEVELOPMENT CO., LTD. HANGZHOU BLOCKCHAIN TECHNOLOGY Research Institute

Address before: Hangzhou City, Zhejiang province 310007 Xihu District Lingyin ad tower Room 903

Patentee before: ZHONGCHAO CREDITCARD INDUSTRY DEVELOPMENT CO., LTD. HANGZHOU BLOCKCHAIN TECHNOLOGY Research Institute