WO2019024500A1 - 用于配置局部共识的方法和装置及计算机可读存储介质 - Google Patents

用于配置局部共识的方法和装置及计算机可读存储介质 Download PDF

Info

Publication number
WO2019024500A1
WO2019024500A1 PCT/CN2018/078301 CN2018078301W WO2019024500A1 WO 2019024500 A1 WO2019024500 A1 WO 2019024500A1 CN 2018078301 W CN2018078301 W CN 2018078301W WO 2019024500 A1 WO2019024500 A1 WO 2019024500A1
Authority
WO
WIPO (PCT)
Prior art keywords
nodes
consensus
local
instance
local consensus
Prior art date
Application number
PCT/CN2018/078301
Other languages
English (en)
French (fr)
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 MYPI2018703952A priority Critical patent/MY197399A/en
Priority to US16/311,670 priority patent/US11310047B2/en
Priority to SG11201807918PA priority patent/SG11201807918PA/en
Priority to JP2018548114A priority patent/JP6720463B2/ja
Priority to AU2018233013A priority patent/AU2018233013B2/en
Publication of WO2019024500A1 publication Critical patent/WO2019024500A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3218Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using proof of knowledge, e.g. Fiat-Shamir, GQ, Schnorr, ornon-interactive zero-knowledge proofs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0825Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/46Secure multiparty computation, e.g. millionaire problem
    • H04L2209/463Electronic voting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/102Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00 applying security measure for e-commerce

Definitions

  • the present disclosure belongs to the field of blockchain technology, and in particular, to a method for configuring a local consensus based on a blockchain, a device for configuring a local consensus based on a blockchain, and a corresponding tangible computer. Read the storage medium.
  • the Block Chain technology is a technology based on decentralized peer-to-peer network. It combines the principle of cryptography with the consensus mechanism to ensure data coherence and persistence of distributed nodes, thus realizing instant verification of information. Traceable, difficult to tamper with and unblockable, creating a shared, efficient, and secure shared value system.
  • Blockchains are usually divided into public chains, federated chains, and private chains based on access rights.
  • the public chain refers to the blockchain that anyone can access according to the agreement and participate in the consensus
  • the alliance chain refers to the blockchain whose consensus process is controlled by the pre-selected nodes
  • the private chain means that all the rights are in one organization.
  • a blockchain that is arbitrarily controlled by the organization.
  • a consensus algorithm refers to a set of protocols that are commonly operated and adhered to by multiple nodes participating in a blockchain to ensure that multiple request operations (and sometimes execution results) submitted to the blockchain can be in the blockchain. Agree between the nodes.
  • the consensus algorithms for different blockchain platforms are different, and different from the technical indicators, the different consensus algorithms are in terms of system availability, scalability, and consensus confirmation speed. There is also a big difference, there is no consensus algorithm that satisfies all scenarios. Therefore, in the actual blockchain practice, it is often necessary to select a suitable consensus algorithm according to the actual usage scenarios and technical indicators.
  • the existing blockchain platform Since the blockchain platform currently on the market basically supports a single consensus algorithm, even if the pluggable consensus module is allowed to run only one consensus algorithm at the same time, the existing blockchain platform is less flexible and Multiple different business scenarios cannot be met at the same time. In addition, in some scenarios, it is also necessary to select a subset of nodes to form a sub-chain to run a particular blockchain service, and other unrelated nodes are not allowed to receive messages. This is the case in the existing blockchain. It is still not possible on the platform.
  • a first aspect of the present disclosure proposes a method for configuring a local consensus based on a blockchain, the method comprising:
  • a local consensus instance is created for a group of nodes selected from the plurality of nodes.
  • a method for configuring a blockchain-based local consensus can select a portion of related nodes from a plurality of nodes constituting the blockchain, thereby establishing a local consensus instance between the selected nodes, and further It can be ensured that this local consensus instance can be selected by its desired consensus algorithm to optimize the network and improve the network service quality.
  • creating a local consensus instance for a group of nodes selected from the plurality of nodes further comprises:
  • All nodes in the blockchain create the local consensus instance in response to the first transaction command.
  • the administrator of the blockchain can select the set of nodes from the plurality of nodes based on the business requirements running on the local consensus instance that is to be created, thereby selecting a set of nodes A local consensus instance is established between them, and other unrelated nodes do not need or participate in the local consensus instance, which will ensure the security and privacy of communication between the nodes on the one hand, and ensure the security on the other hand.
  • the created local consensus instance is able to relatively freely choose its desired consensus algorithm.
  • the first transaction command includes information indicating a node list of the set of nodes, and a local consensus identifier specified by an administrator of the blockchain. Information and information about the consensus algorithm used by the created local consensus instance.
  • the consensus algorithm includes at least one of the following: a workload proof consensus algorithm; an equity proof consensus algorithm; a trusted equity proof consensus algorithm; a practical Byzantine fault tolerant consensus algorithm; and/or BFT-RAFT consensus algorithm.
  • the information about the consensus algorithm used by the created local consensus instance is based on the business requirements running on the local consensus instance that are to be created and the blockchain Supported consensus algorithms to determine.
  • the method further includes the local consensus instance creating one or more communication channels based on a type of consensus algorithm used by the local consensus instance. In an embodiment in accordance with the present disclosure, the method further includes the created local consensus instance initiating a message processing thread for receiving and processing messages sent by other nodes.
  • the method further includes:
  • a second transaction command for deleting the local consensus instance is broadcast to all nodes in the blockchain;
  • All nodes in the blockchain delete the local consensus instance in response to the second transaction command.
  • the administrator of the blockchain can delete the local consensus instance in time, thereby releasing the corresponding network resources, thereby optimally optimizing Utilize the blockchain network resources.
  • implementing initialization of the plurality of nodes further includes:
  • a second aspect of the present disclosure is directed to a tangible computer readable storage medium, the storage medium comprising instructions that, when executed, cause a processor of the computer to at least:
  • a local consensus instance is created for a group of nodes selected from the plurality of nodes.
  • creating a local consensus instance for a group of nodes selected from the plurality of nodes further comprises:
  • All nodes in the blockchain create the local consensus instance in response to the first transaction command.
  • the processor of the computer when the instructions are executed, the processor of the computer is further configured to:
  • a second transaction command for deleting the local consensus instance is broadcast to all nodes in the blockchain;
  • All nodes in the blockchain delete the local consensus instance in response to the second transaction command.
  • a third aspect of the present disclosure proposes an apparatus for configuring a local consensus based on a blockchain, the apparatus comprising:
  • An initialization module configured to implement initialization of a plurality of nodes
  • a local consensus configuration module configured to create a local consensus instance for a group of nodes selected from the plurality of nodes.
  • the local consensus configuration module is further configured to:
  • All nodes in the blockchain create the local consensus instance in response to the first transaction command.
  • the first transaction command includes information indicating a node list of the set of nodes, and a local consensus identifier specified by an administrator of the blockchain. Information and information about the consensus algorithm used by the created local consensus instance.
  • the consensus algorithm includes at least one of the following algorithms:
  • the information about the consensus algorithm used by the created local consensus instance is based on the business requirements running on the local consensus instance that are to be created and the blockchain Supported consensus algorithms to determine.
  • the local consensus configuration module is further configured to:
  • a second transaction command for deleting the local consensus instance is broadcast to all nodes in the blockchain;
  • All nodes in the blockchain delete the local consensus instance in response to the second transaction command.
  • a method, apparatus, and corresponding computer readable storage medium for configuring a blockchain-based local consensus are capable of selecting a portion of related nodes from a plurality of nodes constituting the blockchain, thereby A local consensus instance is established between the selected nodes, thereby ensuring that the local consensus instance can select its desired consensus algorithm to optimize the network and improve network service quality.
  • FIG. 1 is a schematic diagram of a network structure 100 of a blockchain in the prior art
  • FIG. 2 is a schematic diagram of a network structure 200 of a blockchain in accordance with the present disclosure
  • FIG. 3 is a flow diagram of a method 300 for configuring a blockchain-based local consensus in accordance with the present disclosure
  • FIG. 4 is a schematic diagram of an apparatus 400 for configuring a blockchain-based local consensus in accordance with the present disclosure
  • FIG. 5 illustrates a schematic diagram of an embodiment 500 of a plurality of local consensus implementations in accordance with the present disclosure.
  • each block of the flowchart or block diagram may represent a module, a program segment, or a portion of code, which may include one or more for implementing various embodiments. Executable instructions for the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks may also occur in a different order than that illustrated in the drawings. For example, two blocks shown in succession may in fact be executed substantially in parallel, or they can sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the flowcharts and/or block diagrams, and combinations of blocks in the flowcharts and/or block diagrams can be implemented using a dedicated hardware-based system that performs the specified functions or operations. Or can be implemented using a combination of dedicated hardware and computer instructions.
  • the blockchain platform 100 includes, but is not limited to, terminals 101, 102, 103, 104, 105, 106, 107, 108, and 109 connected by a network, wherein the terminals 101, 103, and 104 The terminals are connected to other blockchain terminals via a wireless network, and the terminals 102, 105, 106, 107, 108, and 109 are connected by a wired network and other blockchain terminals.
  • the blockchain platform currently on the market basically supports a single consensus algorithm, and even a supportable pluggable consensus module can only run a consensus algorithm at the same time. Therefore, the existing blockchain platform has poor flexibility and cannot simultaneously satisfy multiple different business scenarios.
  • the corresponding real demand is that in some scenarios, it is also necessary to select a subset of nodes to form a sub-chain to run a particular blockchain service. Other unrelated nodes are not allowed to receive messages.
  • the existing blockchain platform is still not implemented.
  • consensus algorithms selected for the specific blockchain platform are also different, and different from the technical indicators, different consensus algorithms also have larger indicators such as system availability, scalability, and consensus confirmation speed. Differences, there is no consensus algorithm that satisfies all scenarios. Therefore, in the actual blockchain practice, it is often necessary to select a suitable consensus algorithm according to the actual usage scenarios and technical indicators.
  • FIG. 2 such as in the blockchain platform illustrated in FIG. 1, now required for bank customer A (ie, node 201 as illustrated), insurance customer B (illustrated node 206) And the insurance client C (the illustrated node 208) establishes a sub-chain, that is, a local consensus instance.
  • the administrator of the blockchain can specify an identifier of the local consensus instance (for example, "reporting platform"), and select, from the nodes, the relevant nodes (ie, nodes) that need to participate in a specific service according to business requirements.
  • the blockchain administrator broadcasts a first transaction command for creating the local consensus instance to all nodes in the blockchain through any one node and all nodes in the blockchain are responsive to the The first transaction command creates the local consensus instance.
  • the first transaction command includes information indicating a list of nodes of the set of nodes (ie, the indication includes node 201 Information of 206, 208), information about the local consensus identifier specified by the administrator of the blockchain (ie, information about, for example, the "reporting platform") and the use of the local consensus instance created Information about the consensus algorithm (ie, for example, information about a practical Byzantine fault-tolerant consensus algorithm).
  • a method for configuring a blockchain-based local consensus can select a portion of related nodes from a plurality of nodes constituting the blockchain, thereby establishing a local consensus instance between the selected nodes, and further It can be ensured that this local consensus instance can be selected by its desired consensus algorithm to optimize the network and improve the network service quality.
  • the local consensus instance creates one or more communication channels based on the type of consensus algorithm used by the local consensus instance (eg, a practical Byzantine fault tolerant consensus algorithm).
  • the local consensus instance created then initiates a message processing thread for receiving and processing messages sent by other nodes.
  • a second transaction command for deleting the local consensus instance is broadcast to all nodes in the blockchain and all nodes in the block chain are responsive And deleting the local consensus instance in the second transaction command.
  • the administrator of the blockchain can delete the local consensus instance in time, thereby releasing the corresponding network resources, thereby optimally optimizing Utilize the blockchain network resources.
  • a method 300 for configuring a blockchain-based local consensus in accordance with the present disclosure is further described below with reference to FIG. 3, the method 300 comprising the steps of first implementing initialization of a plurality of nodes in method step 310; A local consensus instance is created in 320 for a group of nodes selected from a plurality of nodes.
  • method step 320 further includes selecting the set of nodes from the plurality of nodes according to a business requirement run on the local consensus instance that is to be created; via one of the plurality of nodes A node broadcasts a first transaction command for creating the local consensus instance to all nodes in the blockchain; and all nodes in the blockchain create the local consensus instance in response to the first transaction command .
  • the first transaction command includes information for indicating a node list of the set of nodes, information about a local consensus identifier specified by an administrator of the blockchain, and regarding the created local consensus instance Information about the consensus algorithm used.
  • the method step 310 further includes configuring a network address and a port for the plurality of nodes; generating a node public private key; and starting and running the node blockchain program.
  • the above consensus algorithm includes at least one of the following algorithms: a workload proof consensus algorithm; an equity proof consensus algorithm; a trusted equity proof consensus algorithm; a practical Byzantine fault tolerant consensus algorithm; and/or a BFT-RAFT consensus algorithm.
  • a workload proof consensus algorithm for example, used by Bitcoin, mostly used in the public chain
  • POS Proof Of Stake
  • POS Proof Of Stake
  • POS consensus algorithm Ethereum is trying to use, mostly in the public chain
  • the Delegated Proof of Stake::DPOS consensus algorithm is a variant of the POS consensus algorithm, mostly used in the public chain
  • the Practical Byzantine Fault Tolerance (PBFT) consensus algorithm is mostly used in the alliance chain
  • the newly proposed distributed consensus algorithm-BFT-RAFT consensus algorithm is similar to PBFT, and is mostly used in distributed systems and alliance chains.
  • the information about the consensus algorithm used by the created local consensus instance is determined according to the business requirements running on the local consensus instance to be created and the consensus algorithm supported by the blockchain. .
  • the above described configuration method can be implemented by a tangible computer readable storage medium, the storage medium including instructions that, when executed, cause a processor of the computer to at least implement initialization of a plurality of nodes and A selected one of the plurality of nodes creates a local consensus instance.
  • the processor of the computer can also be caused to select the set of nodes from the plurality of nodes according to the business requirements running on the local consensus instance that is required to be created, via the One of the plurality of nodes broadcasts a first transaction command for creating the local consensus instance to all nodes in the blockchain and all nodes in the blockchain are created in response to the first transaction command The local consensus example.
  • the above described configuration method can be implemented by a computer program product.
  • the computer program product can include a computer readable storage medium having computer readable program instructions for performing various aspects of the present disclosure.
  • the computer readable storage medium can be a tangible device that can hold and store the instructions used by the instruction execution device.
  • the computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, for example, with instructions stored thereon A raised structure in the hole card or groove, and any suitable combination of the above.
  • a computer readable storage medium as used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (eg, a light pulse through a fiber optic cable), or through a wire The electrical signal transmitted.
  • the apparatus 400 for configuring a blockchain based local consensus includes an initialization module 410 that is configured to implement initialization of a plurality of nodes.
  • apparatus 400 for configuring a blockchain-based local consensus further includes a local consensus configuration module 420 configured to create a local consensus instance for a group of nodes selected from a plurality of nodes.
  • the local consensus configuration module 420 can be further configured to select the group of nodes from the plurality of nodes according to the service requirements running on the local consensus instance to be created, and to send the node to the node through the node.
  • All nodes in the blockchain broadcast a first transaction command for creating a local consensus instance and all nodes in the blockchain create the local consensus instance in response to the first transaction command.
  • the first transaction command includes information for indicating a node list of a group of nodes, information about a local consensus identifier specified by an administrator of the blockchain, and information about a consensus algorithm used by the created local consensus instance.
  • the consensus algorithm includes at least one of the following algorithms: a workload proof consensus algorithm, an equity proof consensus algorithm, a trusted equity proof consensus algorithm, a practical Byzantine fault tolerant consensus algorithm, and/or a BFT-RAFT consensus algorithm.
  • the local consensus configuration module is further configured to: broadcast to all nodes in the blockchain after completion of a service requirement run on the local consensus instance And deleting the second transaction command of the local consensus instance; and all nodes in the blockchain deleting the local consensus instance in response to the second transaction command.
  • a method, apparatus, and corresponding computer readable storage medium for configuring a blockchain-based local consensus are capable of selecting a portion of related nodes from a plurality of nodes constituting the blockchain, thereby A local consensus instance is established between the selected nodes, thereby ensuring that the local consensus instance can select its desired consensus algorithm to optimize the network and improve network service quality.
  • Embodiment 500 of a plurality of local consensus implemented in accordance with the method proposed by the present disclosure will be further described below in conjunction with FIG.
  • the transport layer 510 is a peer-to-peer network connection layer that is responsible for maintaining the physical connections between the nodes.
  • the node layer 520 is used to maintain the network address, port, and public and private key information of each node and complete the handshake, signature, and check processing.
  • multiple channels can be created on the channel layer 530. Only the channels with the same ID can communicate with each other among the multiple nodes.
  • Each local consensus instance can dynamically create and delete channels, and the ID of each channel cannot be repeated. That is to say, the ID of each channel is unique.
  • each consensus algorithm specifies a set of nodes, creates one or more channels to communicate with corresponding channels of other nodes, and processes the received channel messages.
  • the created consensus algorithms eg, first partial consensus 541, second partial consensus 542, third partial consensus 543, and fourth local consensus 544 may be dynamically created, modified, and/or deleted.
  • the establishment of a local consensus instance consists of two phases, in which multiple node initializations are implemented in the first phase.
  • Implementing multiple node initialization includes configuring the node network address and port; generating the node public and private key and starting and running the node blockchain program.
  • a local consensus will be initiated.
  • the initiation of the local consensus includes determining the string ID of the local consensus, and the ID cannot be repeated; next, the local consensus consensus node set and the consensus algorithm are determined, and the consensus algorithm must be the platform-supported algorithm; then, an administrator is initiated to create a A local consensus transaction command, which simultaneously submits a local consensus string ID, a node set, and a consensus algorithm.
  • the local consensus instance is automatically created and started on the selected node; the newly created local consensus instance creates one or more communication channel channels for communicating with each other and the newly created local consensus start message processing thread Receive and process messages from other nodes. Finally, if the local consensus completion task needs to be stopped, it is only necessary to initiate a delete local consensus transaction command as an administrator.
  • the method can start/stop a new local consensus without re-deployment and restart, as long as the node joining the local consensus is selected, and the appropriate consensus algorithm is selected, and the new local consensus command provided by the platform is dynamically created. , use in a timely manner.
  • the specified local consensus is stopped by the stop local consensus command provided by the platform.
  • the method can simultaneously support multiple local consensus operations at the same time, and the local consensus is completely completely isolated from each other and does not affect each other: that is, the local consensus is invisible to each other, so different local consensus can choose completely different consensus at random. Algorithm with greater flexibility.
  • the local consensus supported by the method can freely choose a completely different set of nodes.
  • Each local consensus message is strictly restricted to be passed between specified node sets.
  • Other unrelated nodes will not receive consensus messages and have better privacy. . It can well meet the scenario where some nodes need to run a small range of blockchain applications, and the data privacy and security are strong.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Hardware Redundancy (AREA)
  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)
  • Small-Scale Networks (AREA)
  • Logic Circuits (AREA)
  • Multi Processors (AREA)

Abstract

本公开内容公开了用于配置基于区块链的局部共识的方法,该方法包括实现多个节点的初始化以及为从多个节点中选择的一组节点创建局部共识实例。本公开内容还公开了相应的计算机可读存储介质和用于配置基于区块链的局部共识的装置。该装置包括初始化模块,初始化模块被配置用于实现多个节点的初始化;以及局部共识配置模块,局部共识配置模块被配置用于为从多个节点中选择的一组节点创建局部共识实例。依据本公开内容的用于配置基于区块链的局部共识的方法能够从组成区块链的多个节点中选择一部分相关的节点,从而在所选择的节点之间建立局部共识实例,进而保证此局部共识实例能够选择其所期望的共识算法来实现,以优化网络,提高网络服务质量。

Description

用于配置局部共识的方法和装置及计算机可读存储介质 技术领域
本公开内容属于区块链技术领域,尤其涉及一种用于配置基于区块链的局部共识的方法、一种用于配置基于区块链的局部共识的装置以及一种相应的有形的计算机可读存储介质。
背景技术
区块链(Block Chain)技术是一种基于去中心化的对等网络的技术,其将密码学原理与共识机制相结合来保障分布式各节点的数据连贯和持续,从而实现信息即时验证、可追溯、难篡改和无法屏蔽之目的,进而创造了一套隐私、高效、安全的共享价值体系。
区块链根据访问权限通常分为公有链、联盟链和私有链。其中,公有链是指任何人都可以根据协议接入并且参与共识的区块链;联盟链是指其共识过程受到预选节点控制的区块链;私有链是指所有权限都在一个组织中,并受该组织任意控制的区块链。
共识算法是指由参与区块链的多个节点之间共同运行、遵守的一套协议,用来保证提交到区块链的请求操作(有时也包括执行结果)能在区块链的多个节点间达成一致。
在现有的区块链技术中,不同的区块链平台选择的共识算法也各有千秋,不尽相同,从技术指标来看,不同的共识算法在系统可用性,可扩展性以及共识确认速度等指标上也有较大差异,没有一个十全十美满足所有场景的共识算法。因此在实际的区块链实践中,往往是需要根据实际的使用场景和技术指标要求来选择一个合适的共识算法。
发明内容
由于目前市场上的区块链平台基本都是支持单一的共识算法,即使是支持可插拔的共识模块也只允许同时运行一个共识算法,所以现有的区块链平台的灵活性较差且不能同时满足多个不同的业务场景。另外,在某些场景下现实中也需要选择节点的一个子集组成一个子链来运行某一个特殊 的区块链业务,其他无关节点不允许接收消息,这种情况在现有的区块链平台上还无法实现。
针对上述问题,本公开内容的第一方面提出了一种用于配置基于区块链的局部共识的方法,所述方法包括:
实现多个节点的初始化;以及
为从所述多个节点中选择的一组节点创建局部共识实例。
依据本公开内容的用于配置基于区块链的局部共识的方法能够从组成所述区块链的多个节点中选择一部分相关的节点,从而在所选择的节点之间建立局部共识实例,进而能够保证此局部共识实例能够选择其所期望的共识算法来实现,以优化网络,提高网络服务质量。
在依据本公开内容的一个实施例中,为从所述多个节点中选择的一组节点创建局部共识实例进一步包括:
根据所需创建的所述局部共识实例上所运行的业务需求从所述多个节点中选择所述一组节点;
经由所述多个节点中的一个节点向所述区块链中的所有节点广播用于创建所述局部共识实例的第一交易命令;以及
所述区块链中的所有节点响应于所述第一交易命令创建所述局部共识实例。
以这样的方式,区块链的管理员能够根据所需创建的所述局部共识实例上所运行的业务需求从所述多个节点中选择所述一组节点,从而在所选择的一组节点之间建立局部共识实例,而其他无关节点则不需要也不能够参与该局部共识实例,这将一方面能够保证这一组节点之间的通信的安全性和隐私性,另一方面也能够确保所创建的局部共识实例能够相对自由地选择其所期望的共识算法。
在依据本公开内容的一个实施例中,所述第一交易命令中包括用于指示所述一组节点的节点列表的信息、关于由所述区块链的管理员指定的局部共识标识符的信息以及关于所创建的所述局部共识实例所使用的共识算法的信息。
在依据本公开内容的一个实施例中,所述共识算法包括以下算法中的 至少一种:工作量证明共识算法;权益证明共识算法;委托权益证明共识算法;实用拜占庭容错共识算法;和/或BFT-RAFT共识算法。其中,工作量证明(Proof Of Work:POW)共识算法,例如由比特币使用,多在公有链使用;权益证明(Proof Of Stake:POS)共识算法,以太坊在尝试使用,多在公有链使用;委托权益证明(Delegated Proof of Stake::DPOS)共识算法是POS共识算法的变种,多在公有链使用;实用拜占庭容错(Practical Byzantine Fault Tolerance:PBFT)共识算法,多在联盟链使用;而2014年新提出的分布式共识算法-BFT-RAFT共识算法和PBFT类似,多在分布式系统和联盟链使用。
在依据本公开内容的一个实施例中,关于所创建的所述局部共识实例所使用的共识算法的信息根据所需创建的所述局部共识实例上所运行的业务需求以及所述区块链所支持的共识算法来确定。
在依据本公开内容的一个实施例中,所述方法还包括所述局部共识实例根据所述局部共识实例所使用的共识算法的类型创建一个或多个通信信道。在依据本公开内容的一个实施例中,所述方法还包括所创建的所述局部共识实例启动用于接收并处理其他节点发来的消息的消息处理线程。
在依据本公开内容的一个实施例中,所述方法还包括:
在所述局部共识实例上所运行的业务需求完成后,向所述区块链中的所有节点广播用于删除所述局部共识实例的第二交易命令;以及
所述区块链中的所有节点响应于所述第二交易命令删除所述局部共识实例。
以这样的方式,在所述局部共识实例上所运行的业务需求完成后,该区块链的管理员便能够及时地将该局部共识实例删除,从而释放出相应的网络资源,进而最优化地利用该区块链网络资源。
在依据本公开内容的一个实施例中,实现多个节点的初始化进一步包括:
为所述多个节点配置网络地址和端口;
生成节点公私钥;以及
启动并运行节点区块链程序。
此外,本公开内容的第二方面提出了一种有形的计算机可读存储介质,所述存储介质包括指令,当所述指令被执行时,使得所述计算机的处理器至少用于:
实现多个节点的初始化;以及
为从所述多个节点中选择的一组节点创建局部共识实例。
在依据本公开内容的一个实施例中,为从所述多个节点中选择的一组节点创建局部共识实例进一步包括:
根据所需创建的所述局部共识实例上所运行的业务需求从所述多个节点中选择所述一组节点;
经由所述多个节点中的一个节点向所述区块链中的所有节点广播用于创建所述局部共识实例的第一交易命令;以及
所述区块链中的所有节点响应于所述第一交易命令创建所述局部共识实例。
在依据本公开内容的一个实施例中,当所述指令被执行时,使得所述计算机的处理器还用于:
在所述局部共识实例上所运行的业务需求完成后,向所述区块链中的所有节点广播用于删除所述局部共识实例的第二交易命令;以及
所述区块链中的所有节点响应于所述第二交易命令删除所述局部共识实例。
最后,本公开内容的第三方面提出了一种用于配置基于区块链的局部共识的装置,所述装置包括:
初始化模块,所述初始化模块被配置用于实现多个节点的初始化;以及
局部共识配置模块,所述局部共识配置模块被配置用于为从所述多个节点中选择的一组节点创建局部共识实例。
在依据本公开内容的一个实施例中,所述局部共识配置模块进一步被配置用于:
根据所需创建的所述局部共识实例上所运行的业务需求从所述多个节点中选择所述一组节点;
经由所述多个节点中的一个节点向所述区块链中的所有节点广播用于创建所述局部共识实例的第一交易命令;以及
所述区块链中的所有节点响应于所述第一交易命令创建所述局部共识实例。
在依据本公开内容的一个实施例中,所述第一交易命令中包括用于指示所述一组节点的节点列表的信息、关于由所述区块链的管理员指定的局部共识标识符的信息以及关于所创建的所述局部共识实例所使用的共识算法的信息。
在依据本公开内容的一个实施例中,所述共识算法包括以下算法中的至少一种:
工作量证明共识算法;
权益证明共识算法;
委托权益证明共识算法;
实用拜占庭容错共识算法;和/或
BFT-RAFT共识算法。
在依据本公开内容的一个实施例中,关于所创建的所述局部共识实例所使用的共识算法的信息根据所需创建的所述局部共识实例上所运行的业务需求以及所述区块链所支持的共识算法来确定。
在依据本公开内容的一个实施例中,所述局部共识配置模块进一步被配置用于:
在所述局部共识实例上所运行的业务需求完成后,向所述区块链中的所有节点广播用于删除所述局部共识实例的第二交易命令;以及
所述区块链中的所有节点响应于所述第二交易命令删除所述局部共识实例。
依据本公开内容的用于配置基于区块链的局部共识的方法、装置以及相对应的计算机可读存储介质能够从组成所述区块链的多个节点中选择一部分相关的节点,从而在所选择的节点之间建立局部共识实例,进而能够保证此局部共识实例能够选择其所期望的共识算法来实现,以优化网络,提高网络服务质量。
附图说明
结合附图并参考以下详细说明,本公开的各实施例的特征、优点及其他方面将变得更加明显,在此以示例性而非限制性的方式示出了本公开的若干实施例,在附图中:
图1为现有技术中的区块链的网络结构100的示意图;
图2为依据本公开内容的区块链的网络结构200的示意图;
图3为依据本公开内容的用于配置基于区块链的局部共识的方法300的流程图;以及
图4为依据本公开内容的用于配置基于区块链的局部共识的装置400的示意图;以及
图5示出了依据本公开内容实施的多个局部共识的实施例500的示意图。
具体实施方式
以下参考附图详细描述本公开的各个示例性实施例。附图中的流程图和框图示出了根据本公开的各种实施例的方法和系统的可能实现的体系架构、功能和操作。应当注意,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,所述模块、程序段、或代码的一部分可以包括一个或多个用于实现各个实施例中所规定的逻辑功能的可执行指令。也应当注意,在有些作为备选的实现中,方框中所标注的功能也可以按照不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,或者它们有时也可以按照相反的顺序执行,这取决于所涉及的功能。同样应当注意的是,流程图和/或框图中的每个方框、以及流程图和/或框图中的方框的组合,可以使用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以使用专用硬件与计算机指令的组合来实现。
本文所使用的术语″包括″、″包含″及类似术语应该被理解为是开放性的术语,即″包括/包含但不限于″,表示还可以包括其他内容。术语″基于″是″至少部分地基于″。术语″一个实施例″表示″至少一个实施例″;术语″另一实 施例″表示″至少一个另外的实施例″,等等。
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。对于附图中的各单元之间的连线,仅仅是为了便于说明,其表示至少连线两端的单元是相互通信的,并非旨在限制未连线的单元之间无法通信。
图1为现有技术中的区块链的网络结构100的示意图。从图1中可以看出,该区块链平台100包括但不限于通过网络连接起来的终端101、102、103、104、105、106、107、108以及109,其中,终端101、103、104通过无线网络与其他区块链终端连接,而终端102、105、106、107、108以及109通过有线网络和其他区块链终端连接。但是在这样的区块链平台上存在如下技术问题,即目前市场上的区块链平台基本都是支持单一的共识算法,即使是支持可插拔的共识模块也只允许同时运行一个共识算法,所以现有的区块链平台的灵活性较差且不能同时满足多个不同的业务场景。与之相对应的现实需求则是在某些场景下现实中也需要选择节点的一个子集组成一个子链来运行某一个特殊的区块链业务其他无关节点不允许接收消息,这种情况在现有的区块链平台上还无法实现。
此外,针对具体的区块链平台所选择的共识算法来看也是各有千秋,不尽相同,从技术指标来看,不同的共识算法在系统可用性,可扩展性以及共识确认速度等指标上也有较大差异,没有一个十全十美满足所有场景的共识算法。因此在实际的区块链实践中,往往是需要根据实际的使用场景和技术指标要求来选择一个合适的共识算法。
本公开内容的研究人员经过研究发现,在一个大的区块链平台之上,能够根据业务需求从这些节点中选择需要参加特定业务的相关节点,并且在这些相关节点之间建立局部共识实例,这样便能够保证该局部共识实例之间的通信的安全性和隐私性,此外,能够为该局部共识实例单独选择共识算法,从而使得该局部共识实例上所运行的共识算法的选择更具有针对性,进而能够优化区块链的运行。
以下参考图2来描述依据本公开内容的构思,例如在图1所示的区块链平台中,现在需要为银行客户A(即图示的节点201)、保险客户B(图示节点206)以及保险客户C(图示节点208)建立一条子链,即局部共识实例。此时,该区块链的管理员能够指定该局部共识实例的标识符(例如″ 报账平台″)、为该局部共识实例根据业务需求从这些节点中选择需要参加特定业务的相关节点(即节点201、206和208,由方框220进行表示)并且为该局部共识实例选择相对应的共识算法(例如实用拜占庭容错共识算法),不过,本领域的技术人员应当理解,此处的局部共识实例的标识符、所选择的相关节点(即节点201、206和208)以及所选择的实用拜占庭容错共识算法均是示例性的而非限制性的,在符合要求的情况下也能够选择其他节点、其他共识算法以及指定其他局部共识实例的标识符。然后,该区块链管理员通过任何一个节点向所述区块链中的所有节点广播用于创建所述局部共识实例的第一交易命令并且所述区块链中的所有节点响应于所述第一交易命令创建所述局部共识实例。如此一来,依据本公开内容的局部共识实例便已经创建完成了,从中可以看出,所述第一交易命令中包括用于指示所述一组节点的节点列表的信息(即指示包含节点201、206和208的信息)、关于由所述区块链的管理员指定的局部共识标识符的信息(即关于例如″报账平台″的信息)以及关于所创建的所述局部共识实例所使用的共识算法的信息(即例如关于实用拜占庭容错共识算法的信息)。依据本公开内容的用于配置基于区块链的局部共识的方法能够从组成所述区块链的多个节点中选择一部分相关的节点,从而在所选择的节点之间建立局部共识实例,进而能够保证此局部共识实例能够选择其所期望的共识算法来实现,以优化网络,提高网络服务质量。
在该局部共识实例创建了之后,该局部共识实例根据局部共识实例所使用的共识算法的类型(例如实用拜占庭容错共识算法)创建一个或多个通信信道。随后,所创建的所述局部共识实例启动用于接收并处理其他节点发来的消息的消息处理线程。在所述局部共识实例上所运行的业务需求完成后,向所述区块链中的所有节点广播用于删除所述局部共识实例的第二交易命令并且所述区块链中的所有节点响应于所述第二交易命令删除所述局部共识实例。以这样的方式,在所述局部共识实例上所运行的业务需求完成后,该区块链的管理员便能够及时地将该局部共识实例删除,从而释放出相应的网络资源,进而最优化地利用该区块链网络资源。
以下参考图3进一步说明依据本公开内容的用于配置基于区块链的局部共识的方法300,该方法300包括以下步骤,即首先在方法步骤310中实现多个节点的初始化;然后在方法步骤320中为从多个节点中选择的一组 节点创建局部共识实例。在一个实施例中,方法步骤320进一步包括根据所需创建的所述局部共识实例上所运行的业务需求从所述多个节点中选择所述一组节点;经由所述多个节点中的一个节点向所述区块链中的所有节点广播用于创建所述局部共识实例的第一交易命令;以及所述区块链中的所有节点响应于所述第一交易命令创建所述局部共识实例。该第一交易命令中包括用于指示所述一组节点的节点列表的信息、关于由所述区块链的管理员指定的局部共识标识符的信息以及关于所创建的所述局部共识实例所使用的共识算法的信息。其中,方法步骤310进一步包括为所述多个节点配置网络地址和端口;生成节点公私钥;以及启动并运行节点区块链程序。
上述的共识算法包括以下算法中的至少一种:工作量证明共识算法;权益证明共识算法;委托权益证明共识算法;实用拜占庭容错共识算法;和/或BFT-RAFT共识算法。其中,工作量证明(Proof Of Work:POW)共识算法,例如由比特币使用,多在公有链使用;权益证明(Proof Of Stake:POS)共识算法,以太坊在尝试使用,多在公有链使用;委托权益证明(Delegated Proof of Stake::DPOS)共识算法是POS共识算法的变种,多在公有链使用;实用拜占庭容错(Practical Byzantine Fault Tolerance:PBFT)共识算法,多在联盟链使用;而2014年新提出的分布式共识算法-BFT-RAFT共识算法和PBFT类似,多在分布式系统和联盟链使用。
更为具体地,关于所创建的所述局部共识实例所使用的共识算法的信息根据所需创建的所述局部共识实例上所运行的业务需求以及所述区块链所支持的共识算法来确定。
上述的配置方法能够通过有形的计算机可读存储介质的方式来实现,该存储介质包括指令,当所述指令被执行时,使得计算机的处理器至少用于实现多个节点的初始化以及为从所述多个节点中选择的一组节点创建局部共识实例。此外,当所述指令被执行时,还能够使得计算机的处理器根据所需创建的所述局部共识实例上所运行的业务需求从所述多个节点中选择所述一组节点、经由所述多个节点中的一个节点向所述区块链中的所有节点广播用于创建所述局部共识实例的第一交易命令以及所述区块链中的所有节点响应于所述第一交易命令创建所述局部共识实例。在依据本公开内容的一个实施例中,当所述指令被执行时,使得所述计算机的处理器还 用于在所述局部共识实例上所运行的业务需求完成后,向所述区块链中的所有节点广播用于删除所述局部共识实例的第二交易命令以及所述区块链中的所有节点响应于所述第二交易命令删除所述局部共识实例。
替代地,上述的配置方法能够通过计算机程序产品来实现。计算机程序产品可以包括计算机可读存储介质,其上载有用于执行本公开的各个方面的计算机可读程序指令。计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是但不限于电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
图4为依据本公开内容的用于配置基于区块链的局部共识的装置400的示意图。从图中可以看出,用于配置基于区块链的局部共识的装置400包括初始化模块410,该初始化模块410被配置用于实现多个节点的初始化。此外,用于配置基于区块链的局部共识的装置400还包括局部共识配置模块420,该局部共识配置模块420被配置用于为从多个节点中选择的一组节点创建局部共识实例。此外,该局部共识配置模块420还能够进一步被配置用于根据所需创建的局部共识实例上所运行的业务需求从多个节点中选择所述一组节点、经由多个节点中的一个节点向区块链中的所有节点广播用于创建局部共识实例的第一交易命令以及区块链中的所有节点响应于第一交易命令创建所述局部共识实例。该第一交易命令中包括用于指示一组节点的节点列表的信息、关于由区块链的管理员指定的局部共识标识符的信息以及关于所创建的局部共识实例所使用的共识算法的信息。共识算法包括以下算法中的至少一种:工作量证明共识算法、权益证明共识算法、委托权益证明共识算法、实用拜占庭容错共识算法、和/或BFT-RAFT 共识算法。在依据本公开内容的一个实施例中,所述局部共识配置模块进一步被配置用于:在所述局部共识实例上所运行的业务需求完成后,向所述区块链中的所有节点广播用于删除所述局部共识实例的第二交易命令;以及区块链中的所有节点响应于所述第二交易命令删除所述局部共识实例。
依据本公开内容的用于配置基于区块链的局部共识的方法、装置以及相对应的计算机可读存储介质能够从组成所述区块链的多个节点中选择一部分相关的节点,从而在所选择的节点之间建立局部共识实例,进而能够保证此局部共识实例能够选择其所期望的共识算法来实现,以优化网络,提高网络服务质量。
以下将结合图5进一步描述依据本公开内容所提出了方法所实施的多个局部共识的实施例500。从图中可以看出,在传输层510上为对等网络连接层,其负责维护节点之间的物理连接。而节点层520用于维护每个节点的网络地址、端口以及公私钥信息并且完成握手、签名、验签处理。之后,在信道层530上可以创建多个信道,在多个节点中只有ID相同的信道才可以互相通信,每个局部共识实例可以动态创建、删除信道,而每个信道的ID不能重复,也就是说每个信道的ID都是唯一的。而在共识算法层上,每个共识算法指定节点集合、创建一个或多个信道从而和其他节点的对应的信道进行通信并且处理接收到的信道消息。此外,所创建的共识算法(例如第一局部共识541、第二局部共识542、第三局部共识543以及第四局部共识544)可以被动态创建、修改和/或删除。
从网络建立的角度来看,建立局部共识实例包括两个阶段,在第一个阶段实现多个节点初始化。实现多个节点初始化包括配置节点网络地址、端口;生成节点公私钥以及启动并运行节点区块链程序。然后,在第二个阶段将会启动局部共识。而启动局部共识包括确定局部共识的字符串ID,该ID不能重复;接下来确定局部共识的参与节点集合和共识算法,注意共识算法必须是平台支持的算法;然后,以管理员身份发起一个创建局部共识交易命令,同时提交局部共识的字符串ID、节点集合、以及共识算法。该交易经过全网确认后即在被选中的节点上自动创建并启动局部共识实例;新创建的局部共识实例创建一个或多个通信信道channel用来相互通信并且新创建的局部共识启动消息处理线程,接收并处理其他节点发来的消 息。最后,如果局部共识完成任务需要停止,只需要以管理员身份发起一个删除局部共识交易命令即可。
与现有技术相比,本发明提出的方法的优点在于以下几个方面:
首先,本方法可以在无需重新部署,重新启动的情况下启动/停止一个新的局部共识,只要选择加入该局部共识的节点,并选择合适的共识算法,通过平台提供的新建局部共识命令动态创建,及时使用。在不需要时,通过平台提供的停止局部共识命令来停止指定的局部共识。
其次,本方法可以同时支持多个局部共识同时运行,并且局部共识之间逻辑上完全隔离,不会互相影响:即局部共识之间相互不可见,因此不同的局部共识可以随意选择完全不同的共识算法,具有较大的灵活性。
最后,本方法支持的局部共识可以自由选择完全不同的节点集合,每个局部共识的消息严格限制在规定的节点集合之间传递,其他无关节点不会收到共识消息,有较好的隐私性。可以很好的满足需要部分节点运行一个小范围的区块链应用的场景,数据隐私性和安全性较强。
应当注意,尽管在上文的详细描述中提及了设备的若干装置或子装置,但是这种划分仅仅是示例性而非强制性的。实际上,根据本公开的实施例,上文描述的两个或更多装置的特征和功能可以在一个装置中具体化。反之,上文描述的一个装置的特征和功能可以进一步划分为由多个装置来具体化。
以上所述仅为本公开的实施例可选实施例,并不用于限制本公开的实施例,对于本领域的技术人员来说,本公开的实施例可以有各种更改和变化。凡在本公开的实施例的精神和原则之内,所作的任何修改、等效替换、改进等,均应包含在本公开的实施例的保护范围之内。
虽然已经参考若干具体实施例描述了本公开的实施例,但是应该理解,本公开的实施例并不限于所公开的具体实施例。本公开的实施例旨在涵盖在所附权利要求的精神和范围内所包括的各种修改和等同布置。所附权利要求的范围符合最宽泛的解释,从而包含所有这样的修改及等同结构和功能。

Claims (18)

  1. 一种用于配置基于区块链的局部共识的方法,所述方法包括:
    实现多个节点的初始化;以及
    为从所述多个节点中选择的一组节点创建局部共识实例。
  2. 根据权利要求1所述的方法,其中,为从所述多个节点中选择的一组节点创建局部共识实例进一步包括:
    根据所需创建的所述局部共识实例上所运行的业务需求从所述多个节点中选择所述一组节点;
    经由所述多个节点中的一个节点向所述区块链中的所有节点广播用于创建所述局部共识实例的第一交易命令;以及
    所述区块链中的所有节点响应于所述第一交易命令创建所述局部共识实例。
  3. 根据权利要求2所述的方法,其中,所述第一交易命令中包括用于指示所述一组节点的节点列表的信息、关于由所述区块链的管理员指定的局部共识标识符的信息以及关于所创建的所述局部共识实例所使用的共识算法的信息。
  4. 根据权利要求3所述的方法,其中,所述共识算法包括以下算法中的至少一种:
    工作量证明共识算法;
    权益证明共识算法;
    委托权益证明共识算法;
    实用拜占庭容错共识算法;和/或
    BFT-RAFT共识算法。
  5. 根据权利要求3所述的方法,其中,关于所创建的所述局部共识实例所使用的共识算法的信息根据所需创建的所述局部共识实例上所运行的业务需求以及所述区块链所支持的共识算法来确定。
  6. 根据权利要求1所述的方法,其中,所述方法还包括:
    所述局部共识实例根据所述局部共识实例所使用的共识算法的类型创建一个或多个通信信道。
  7. 根据权利要求1所述的方法,其中,所述方法还包括:
    所创建的所述局部共识实例启动用于接收并处理其他节点发来的消息的消息处理线程。
  8. 根据权利要求1所述的方法,其中,所述方法还包括:
    在所述局部共识实例上所运行的业务需求完成后,向所述区块链中的所有节点广播用于删除所述局部共识实例的第二交易命令;以及
    所述区块链中的所有节点响应于所述第二交易命令删除所述局部共识实例。
  9. 根据权利要求1所述的方法,其中,实现多个节点的初始化进一步包括:
    为所述多个节点配置网络地址和端口;
    生成节点公私钥;以及
    启动并运行节点区块链程序。
  10. 一种有形的计算机可读存储介质,所述存储介质包括指令,当所述指令被执行时,使得所述计算机的处理器至少用于:
    实现多个节点的初始化;以及
    为从所述多个节点中选择的一组节点创建局部共识实例。
  11. 根据权利要求10所述的计算机可读存储介质,其中,为从所述多个节点中选择的一组节点创建局部共识实例进一步包括:
    根据所需创建的所述局部共识实例上所运行的业务需求从所述多个节点中选择所述一组节点;
    经由所述多个节点中的一个节点向所述区块链中的所有节点广播用于 创建所述局部共识实例的第一交易命令;以及
    所述区块链中的所有节点响应于所述第一交易命令创建所述局部共识实例。
  12. 根据权利要求10所述的计算机可读存储介质,其中,当所述指令被执行时,使得所述计算机的处理器还用于:
    在所述局部共识实例上所运行的业务需求完成后,向所述区块链中的所有节点广播用于删除所述局部共识实例的第二交易命令;以及
    所述区块链中的所有节点响应于所述第二交易命令删除所述局部共识实例。
  13. 一种用于配置基于区块链的局部共识的装置,所述装置包括:
    初始化模块,所述初始化模块被配置用于实现多个节点的初始化;以及
    局部共识配置模块,所述局部共识配置模块被配置用于为从所述多个节点中选择的一组节点创建局部共识实例。
  14. 根据权利要求13所述的装置,其中,所述局部共识配置模块进一步被配置用于:
    根据所需创建的所述局部共识实例上所运行的业务需求从所述多个节点中选择所述一组节点;
    经由所述多个节点中的一个节点向所述区块链中的所有节点广播用于创建所述局部共识实例的第一交易命令;以及
    所述区块链中的所有节点响应于所述第一交易命令创建所述局部共识实例。
  15. 根据权利要求14所述的装置,其中,所述第一交易命令中包括用于指示所述一组节点的节点列表的信息、关于由所述区块链的管理员指定的局部共识标识符的信息以及关于所创建的所述局部共识实例所使用的共识算法的信息。
  16. 根据权利要求15所述的装置,其中,所述共识算法包括以下算法中的至少一种:
    工作量证明共识算法;
    权益证明共识算法;
    委托权益证明共识算法;
    实用拜占庭容错共识算法;和/或
    BFT-RAFT共识算法。
  17. 根据权利要求15所述的装置,其中,关于所创建的所述局部共识实例所使用的共识算法的信息根据所需创建的所述局部共识实例上所运行的业务需求以及所述区块链所支持的共识算法来确定。
  18. 根据权利要求13所述的装置,其中,所述局部共识配置模块进一步被配置用于:
    在所述局部共识实例上所运行的业务需求完成后,向所述区块链中的所有节点广播用于删除所述局部共识实例的第二交易命令;以及
    所述区块链中的所有节点响应于所述第二交易命令删除所述局部共识实例。
PCT/CN2018/078301 2017-07-31 2018-03-07 用于配置局部共识的方法和装置及计算机可读存储介质 WO2019024500A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
MYPI2018703952A MY197399A (en) 2017-07-31 2018-03-07 Method and apparatus for configuring local consensus and computer-readable storage medium
US16/311,670 US11310047B2 (en) 2017-07-31 2018-03-07 Method and apparatus for configuring local consensus and computer-readable storage medium
SG11201807918PA SG11201807918PA (en) 2017-07-31 2018-03-07 Method and apparatus for configuring local consensus and computer-readable storage medium
JP2018548114A JP6720463B2 (ja) 2017-07-31 2018-03-07 ローカルコンセンサスを設定するための方法と装置およびコンピュータ可読記憶媒体
AU2018233013A AU2018233013B2 (en) 2017-07-31 2018-03-07 Method and apparatus for configuring local consensus and computer-readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710638187.1A CN107360248B (zh) 2017-07-31 2017-07-31 用于配置局部共识的方法和装置及计算机可读存储介质
CN201710638187.1 2017-07-31

Publications (1)

Publication Number Publication Date
WO2019024500A1 true WO2019024500A1 (zh) 2019-02-07

Family

ID=60285961

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/078301 WO2019024500A1 (zh) 2017-07-31 2018-03-07 用于配置局部共识的方法和装置及计算机可读存储介质

Country Status (8)

Country Link
US (1) US11310047B2 (zh)
JP (1) JP6720463B2 (zh)
CN (1) CN107360248B (zh)
AU (1) AU2018233013B2 (zh)
MY (1) MY197399A (zh)
SG (1) SG11201807918PA (zh)
TW (1) TWI705680B (zh)
WO (1) WO2019024500A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112511312A (zh) * 2020-11-23 2021-03-16 北京微芯区块链与边缘计算研究院 一种可组装的共识方法及系统
US11310047B2 (en) 2017-07-31 2022-04-19 Zhongan Information Technology Services Co., Ltd. Method and apparatus for configuring local consensus and computer-readable storage medium

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009824A (zh) * 2017-11-28 2018-05-08 北京博晨技术有限公司 数据共识方法、装置及电子设备
US20190238316A1 (en) * 2018-01-31 2019-08-01 Salesforce.Com, Inc. Systems, methods, and apparatuses for implementing intelligent consensus, smart consensus, and weighted consensus models for distributed ledger technologies in a cloud based computing environment
CN108810077A (zh) * 2018-04-19 2018-11-13 深圳市网心科技有限公司 区块链共识处理方法、电子装置及计算机可读存储介质
CN108596623B (zh) * 2018-05-09 2021-02-02 合肥达朴汇联科技有限公司 一种区块链共识达成方法
CN108647967B (zh) * 2018-05-10 2021-09-14 北京京东尚科信息技术有限公司 选择区块链共识机制的方法、装置以及共识节点
CN108848125B (zh) * 2018-05-22 2021-08-17 北京京东尚科信息技术有限公司 区块链中提供共识服务的方法和装置及存储介质
CN109002297B (zh) * 2018-07-16 2020-08-11 百度在线网络技术(北京)有限公司 共识机制的部署方法、装置、设备和存储介质
CN109039750B (zh) * 2018-08-13 2021-06-15 浙商银行股份有限公司 一种提升区块链应用系统多城多园区部署灾备能力的方法
CN109214795A (zh) * 2018-09-18 2019-01-15 北京物链互联科技有限公司 一种基于dag算法的区块链混合共识方法
CN109377364A (zh) * 2018-09-27 2019-02-22 中国联合网络通信集团有限公司 一种建组方法和装置、交易方法和系统
CN109995850B (zh) * 2019-03-05 2022-04-26 深圳前海微众银行股份有限公司 一种区块链系统及区块链系统的交易处理方法
CN110011814B (zh) * 2019-04-16 2019-10-15 北京艾摩瑞策科技有限公司 一种可验证的DPoS共识方法及其系统
CN110365695A (zh) * 2019-07-24 2019-10-22 中国工商银行股份有限公司 可切换共识算法的区块链数据交互方法及装置
KR20220084356A (ko) 2019-10-18 2022-06-21 디피니티 스티프텅 분산 네트워크에서의 메시징
CN111163084B (zh) * 2019-12-27 2021-11-09 清创网御(合肥)科技有限公司 一种基于动态选举和共识机制的安全存储方法
CN111340491B (zh) * 2020-02-25 2023-08-29 中国工商银行股份有限公司 一种松散耦合的区块链自主交易方法、装置和系统
CN111311415B (zh) * 2020-02-28 2023-11-24 中国工商银行股份有限公司 松散耦合的区块链交易方法、交易节点
US11461312B2 (en) * 2020-03-28 2022-10-04 Wipro Limited Method and system for performing adaptive consensus in a distributed ledger network
CN111669267B (zh) * 2020-05-15 2024-02-20 西安纸贵互联网科技有限公司 区块链的共识机制配置及背书策略配置方法
CN113691569A (zh) * 2020-05-18 2021-11-23 顺丰科技有限公司 一种基于联盟链的动态扩展的记账方法及装置
CN111402058B (zh) * 2020-05-29 2021-05-04 支付宝(杭州)信息技术有限公司 一种数据处理方法、装置、设备及介质
CN111861469A (zh) * 2020-07-27 2020-10-30 北京金山云网络技术有限公司 区块链中共识机制的处理方法、装置和电子设备
CN112565448A (zh) * 2020-12-16 2021-03-26 宁波云麟信息科技有限公司 基于区块链的电子存证节点选择方法和电子设备
CN113256297B (zh) * 2021-07-02 2021-09-14 腾讯科技(深圳)有限公司 基于区块链的数据处理方法、装置、设备及可读存储介质
CN114143021B (zh) * 2021-09-27 2022-12-06 电子科技大学 一种基于区块链的新闻信息信用积分系统
CN115118737B (zh) * 2022-08-25 2022-11-18 南京信息工程大学 一种基于节点分组的联盟链区块存储方法
CN115115458B (zh) * 2022-08-30 2022-11-18 国网区块链科技(北京)有限公司 一种基于区块链的近零碳排放园区的能源交易系统及方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105976231A (zh) * 2016-06-24 2016-09-28 深圳前海微众银行股份有限公司 基于区块链智能合约的资产管理方法及节点
CN106157142A (zh) * 2016-06-30 2016-11-23 惠众商务顾问(北京)有限公司 一种区块链共识及同步方法、系统和装置
US20170053002A1 (en) * 2015-08-18 2017-02-23 Fiserv, Inc. Generating integrated data records by correlating source data records from disparate data sources
CN106682984A (zh) * 2016-10-27 2017-05-17 上海亿账通区块链科技有限公司 基于区块链的交易事务处理方法及系统
CN107360248A (zh) * 2017-07-31 2017-11-17 众安信息技术服务有限公司 用于配置局部共识的方法和装置及计算机可读存储介质
CN107450981A (zh) * 2017-05-31 2017-12-08 阿里巴巴集团控股有限公司 一种区块链共识方法及设备

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8874776B2 (en) 2010-03-08 2014-10-28 Telcordia Technologies, Inc. Virtual ad hoc network testbeds for network-aware applications
US8874769B2 (en) * 2011-06-30 2014-10-28 Qualcomm Incorporated Facilitating group access control to data objects in peer-to-peer overlay networks
US9785697B2 (en) * 2012-06-29 2017-10-10 Telefonaktiebolaget Lm Ericsson (Publ) Methods and apparatus for implementing a distributed database
US9350550B2 (en) * 2013-09-10 2016-05-24 M2M And Iot Technologies, Llc Power management and security for wireless modules in “machine-to-machine” communications
US20160260091A1 (en) 2015-03-04 2016-09-08 THC Farmaceuticals, Inc. Universal wallet for digital currency
CN106209947B (zh) 2015-05-07 2020-08-04 中兴通讯股份有限公司 一种去中心化自治组织的数据处理方法及系统
US10402792B2 (en) * 2015-08-13 2019-09-03 The Toronto-Dominion Bank Systems and method for tracking enterprise events using hybrid public-private blockchain ledgers
WO2017173099A1 (en) * 2016-03-30 2017-10-05 Ping Identity Corporation Methods and apparatus for assessing authentication risk and implementing single sign on (sso) using a distributed consensus database
CN106656974B (zh) * 2016-10-17 2019-07-16 江苏通付盾科技有限公司 区块链的分组共识方法及系统
CN106850536B (zh) 2016-11-30 2020-01-07 北京瑞卓喜投科技发展有限公司 区块链共识方法及系统
TWM543413U (zh) * 2016-12-05 2017-06-11 Taiwan United Financial Technology Co Ltd 利用區塊鏈技術進行交易的網路借貸平台
CN106603698A (zh) * 2016-12-28 2017-04-26 北京果仁宝科技有限公司 基于dpos的区块链共识方法和节点
CN106878071B (zh) * 2017-01-25 2020-09-15 上海钜真金融信息服务有限公司 一种基于Raft算法的区块链共识机制
CN106874087A (zh) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 一种区块链智能合约定时任务调度方法
CN107018125B (zh) * 2017-02-17 2019-08-09 阿里巴巴集团控股有限公司 一种区块链系统、数据存储方法及装置
CN106789089B (zh) * 2017-02-23 2019-10-08 腾讯科技(深圳)有限公司 管理证书的方法、装置、和系统以及服务器
WO2018154713A1 (ja) * 2017-02-24 2018-08-30 日本電気株式会社 情報検証システム、情報検証装置、方法およびプログラム
WO2018220709A1 (ja) * 2017-05-30 2018-12-06 日本電気株式会社 資源管理システム、管理装置、方法およびプログラム
CN107733651B (zh) 2017-09-11 2020-06-19 联动优势科技有限公司 一种区块链生成方法、节点及系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170053002A1 (en) * 2015-08-18 2017-02-23 Fiserv, Inc. Generating integrated data records by correlating source data records from disparate data sources
CN105976231A (zh) * 2016-06-24 2016-09-28 深圳前海微众银行股份有限公司 基于区块链智能合约的资产管理方法及节点
CN106157142A (zh) * 2016-06-30 2016-11-23 惠众商务顾问(北京)有限公司 一种区块链共识及同步方法、系统和装置
CN106682984A (zh) * 2016-10-27 2017-05-17 上海亿账通区块链科技有限公司 基于区块链的交易事务处理方法及系统
CN107450981A (zh) * 2017-05-31 2017-12-08 阿里巴巴集团控股有限公司 一种区块链共识方法及设备
CN107360248A (zh) * 2017-07-31 2017-11-17 众安信息技术服务有限公司 用于配置局部共识的方法和装置及计算机可读存储介质

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11310047B2 (en) 2017-07-31 2022-04-19 Zhongan Information Technology Services Co., Ltd. Method and apparatus for configuring local consensus and computer-readable storage medium
CN112511312A (zh) * 2020-11-23 2021-03-16 北京微芯区块链与边缘计算研究院 一种可组装的共识方法及系统
CN112511312B (zh) * 2020-11-23 2023-10-17 北京微芯区块链与边缘计算研究院 一种可组装的共识方法及系统

Also Published As

Publication number Publication date
US11310047B2 (en) 2022-04-19
US20210234698A1 (en) 2021-07-29
TW201911837A (zh) 2019-03-16
TWI705680B (zh) 2020-09-21
CN107360248A (zh) 2017-11-17
JP6720463B2 (ja) 2020-07-08
CN107360248B (zh) 2020-08-25
SG11201807918PA (en) 2019-03-28
JP2019526945A (ja) 2019-09-19
AU2018233013A1 (en) 2019-02-14
AU2018233013B2 (en) 2019-12-05
MY197399A (en) 2023-06-15

Similar Documents

Publication Publication Date Title
WO2019024500A1 (zh) 用于配置局部共识的方法和装置及计算机可读存储介质
CN111045690B (zh) 区块链节点服务部署方法、装置、系统、计算设备及介质
KR102369647B1 (ko) 두 장치 간의 신뢰 확립 기법
US20210328816A1 (en) Blockchain integrated stations and automatic node adding methods and apparatuses
US11451404B2 (en) Blockchain integrated stations and automatic node adding methods and apparatuses
TW202023238A (zh) 基於區塊鏈網路的可信節點確定方法和裝置
US9917740B2 (en) Reducing internodal communications in a clustered system
US20210194890A1 (en) In a distributed computing system with untrusted entities method and apparatus for enabling coordinated executions of actions
JP6920442B2 (ja) ブロックチェーンシステムのノード間の通信を確立するための方法及びデバイス
JP2024505692A (ja) ブロックチェーンネットワークに基づくデータ処理方法、装置及びコンピュータ機器
US11595475B2 (en) Self-replicating management services for distributed computing architectures
US10218659B1 (en) Persistent connections for email web applications
JP2012507076A (ja) フェデレーションを集合させるブートストラップ
CN110992031A (zh) 数据处理方法及装置
US9906370B2 (en) Trust relationship management amongst racks in a data center
CN113259464B (zh) 组建区块链子网的方法和区块链系统
KR102294569B1 (ko) 블록체인 네트워크를 구축할 수 있는 블록체인 관리시스템
WO2023207076A1 (zh) 区块链子网的组建方法及装置
WO2023207087A1 (zh) 用于区块链的最优链路选择方法及装置和电子设备
CN110659264B (zh) 用于计算系统的业务处理方法、装置和计算系统
US20240012680A1 (en) Techniques for inter-cloud federated learning
KR102398380B1 (ko) 키 교환 방법 및 시스템
US20240171391A1 (en) Secure data ingestion with edge computing
KR20200074572A (ko) 네트워크 인터페이스 장치 및 그 제어 방법

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2018548114

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2018233013

Country of ref document: AU

Date of ref document: 20180307

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18842021

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 29.05.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18842021

Country of ref document: EP

Kind code of ref document: A1