WO2020042927A1 - Blockchain public chain - Google Patents

Blockchain public chain Download PDF

Info

Publication number
WO2020042927A1
WO2020042927A1 PCT/CN2019/101041 CN2019101041W WO2020042927A1 WO 2020042927 A1 WO2020042927 A1 WO 2020042927A1 CN 2019101041 W CN2019101041 W CN 2019101041W WO 2020042927 A1 WO2020042927 A1 WO 2020042927A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
public chain
chain
nodes
public
Prior art date
Application number
PCT/CN2019/101041
Other languages
French (fr)
Chinese (zh)
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
Priority claimed from CN201811497989.6A external-priority patent/CN110868440B/en
Application filed by 白杰 filed Critical 白杰
Publication of WO2020042927A1 publication Critical patent/WO2020042927A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • This application relates to blockchain technology, and in particular, to a blockchain public chain.
  • Blockchain provides a decentralized system idea. The most fundamental principle of this idea is to create a relatively objective and non-repudiation digital environment through public consensus.
  • Blockchain public chain refers to a physical chain composed of multiple nodes that provide public services. As shown in FIG. 1, the public chain 101 includes multiple nodes, and these nodes together form a point-to-point network.
  • the blockchain is essentially a distributed public ledger. It is a data chain formed by multiple data blocks and maintained by nodes in the public chain.
  • This application provides a blockchain public chain, which can be used to solve the problem that both the public chain represented by Ethereum and the public chain represented by EOS in the prior art cannot balance their own efficiency and security. Aspects.
  • the present application provides a blockchain public chain, which includes an equity owner node with a valid address and the number of certificate holdings is not zero.
  • the public chain further includes: A public chain maintainer node selected from the nodes of the public chain at a time interval;
  • the public chain maintainer node is used to maintain public chain transactions and smart contract related public chain transactions.
  • the public chain further includes: a parachain node, which is a common node of the public chain and an access chain accessing the public chain; wherein the parachain nodes include The parachain maintainer node selected by the equity owner node from the parachain nodes;
  • the parallel chain maintainer node is configured to maintain related cross-chain transactions between the public chain and the access chain.
  • the public chain further includes: a supervisor node transformed by an equity owner node that has not been selected as the maintainer node of the public chain;
  • the supervisor node is used to detect whether the block of the blockchain is valid when receiving the blockchain of the public chain, and to store the area when the block of the blockchain is valid Block chain, when the block of the block chain is invalid, the block chain is discarded.
  • the public chain further includes: a data storage node, configured to receive a storage request sent by the equity owner node, where the storage request includes data to be stored by the equity owner node, and according to The storage request distributedly stores data to be stored by the rights owner node.
  • a data storage node configured to receive a storage request sent by the equity owner node, where the storage request includes data to be stored by the equity owner node, and according to The storage request distributedly stores data to be stored by the rights owner node.
  • the public chain further includes a public chain service provider node for providing a public chain service to the access chain.
  • the public chain service includes: querying the transactions and smart contracts of the public chain, and querying the public chain. Describe the information and transaction summary of the access chain, create sub-chains, and access applications outside the public chain.
  • the duration of the preset time interval is greater than the duration required to select the public chain maintainer node, and less than the duration required to break the public chain maintainer.
  • the equity owner node is configured to obtain candidate information of each candidate node, the candidate information includes a node identifier, candidate data, and mortgage credentials, and the node identifier is used to uniquely indicate a candidate node
  • the mortgage voucher is used to indicate the number of certificate passes paid by the candidate node, and the candidate data is a random number used to improve the randomness of the public chain maintainer node selection;
  • the public chain maintainer node is determined among the candidate nodes.
  • the equity owner node is specifically used for:
  • the candidate nodes are the public chain maintainer nodes, where k ′ is the sequence number of a group of candidate nodes in the k group of candidate nodes.
  • n the number of the candidate nodes.
  • the solution provided in this application includes an equity owner node and a public chain maintainer node in the public chain.
  • the equity owner node selects the public chain maintainer node, and the selected public chain maintainer node maintains the public chain.
  • the public chain maintainer nodes are periodically selected according to a preset time interval, the node acting as the maintainer is dynamically changing, and no fixed node is acting as the public chain maintainer node, which reduces the possibility of the public chain being breached. It can improve the security of the public chain; moreover, the maintainer node of the public chain is part of the public chain, which avoids the entire network operation of the public chain maintenance, so it can improve the efficiency of the public chain operation. Since this application takes into account both the efficiency and security aspects of the public chain, the public chain can handle highly concurrent transactions.
  • FIG. 1 is a schematic diagram showing a blockchain public chain
  • Fig. 2 is a schematic diagram showing a blockchain public chain according to an exemplary embodiment
  • Fig. 3 is a schematic diagram of a blockchain public chain according to another exemplary embodiment
  • Fig. 4 is a schematic diagram showing a blockchain public chain according to another exemplary embodiment.
  • nodes with different functional roles are jointly responsible for the operation of the public chain.
  • nodes with different functions can participate in the operation of the public chain, ensuring that all nodes can obtain benefits in the public chain network.
  • the maintenance of the public chain is achieved through the equity owner node and the public chain maintainer node in the public chain, and a better balance can be achieved between the efficiency and security of the public chain.
  • FIG. 2 illustrates a schematic diagram of a node role of a public blockchain.
  • the public chain 20 includes an equity owner node 201 and a public chain maintainer node 202.
  • the equity owner node 201 periodically selects the public chain maintainer node 202 from the nodes of the public chain 20. After selection, the nodes in the equity owner node 201 can be converted into the public chain maintainer node 202.
  • the public chain maintainer node 202 maintains public chain transactions and smart contract related public chain transactions.
  • the equity owner node 201 refers to a node that has a valid address and the number of certificate holdings is not zero. Among them, having a valid address is to ensure that the equity owner node 201 can communicate with other nodes on the public chain 20, and Zenith is a value interaction medium in the blockchain network.
  • the equity owner node 201 only has a non-zero holding amount. Only Zentong can participate in the operation of the public chain. For example, if an equity owner node A purchases services from another equity owner node B, then the equity owner node A needs to have a valid address and a certificate that can communicate with it in order to trade with the equity owner node B and purchase the equity owner Node B provides services.
  • the selected nodes are selected every preset time interval, thereby periodically changing the nodes that maintain the public chain 20, reducing the possibility of the public chain 20 being breached, and improving the public chain 20's safety.
  • the length of the preset time interval is greater than the time required to select the public chain maintainer node 202, and less than the time required to break the public chain maintainer node 202.
  • the time required to select the public chain maintainer node 202 refers to the time required to complete a public chain maintainer node 202 selection.
  • the equity owner node 201 responsible for the selection needs 5 minutes to complete a single selection. Then, when the selection interval is less than 5 minutes, the first selection has not been completed, and the equity owner node 201 has already started the second selection, resulting in the inability to successfully select the public chain maintainer node 202. Therefore, in order to ensure that the selection can be completed within a time interval, the length of the preset time interval needs to be longer than the time required to select the public chain maintainer node 202.
  • the time required to break the public chain maintainer node 202 can be determined according to the brute force cracking time of the encryption and decryption algorithm used by the public chain node, or it can be determined based on the history of the public chain node being attacked. For example, historical records show that the shortest time for a public chain node to be breached is 30 minutes, the longest time is 40 minutes, and the average time is 36 minutes. Then, if the duration of the preset time interval is greater than 40 minutes, the public chain maintainer node 202 is more likely to be broken when under attack; if the duration of the preset time interval is less than 30 minutes, the public chain maintainer node 202 It is less likely to be breached under attack.
  • the length of the preset time interval needs to be less than the time required to breach the public chain maintainer node 202.
  • the duration of the preset time interval is 5 to 30 minutes.
  • the length of the preset time interval is one hundred accounting periods.
  • the accounting period refers to the time when a block is generated.
  • the duration of the accounting period is 10 seconds, and the duration of the preset time interval is 1000 seconds.
  • the equity owner node 201 responsible for the selection triggers the selection of the smart contract.
  • Selecting a smart contract is a smart contract used to select a public chain maintainer node 202.
  • the equity owner node 201 responsible for selection may also be a public chain maintainer node in the current cycle.
  • a single selection may be performed by multiple equity owner nodes 201 at the same time, with the selection result of the equity owner node 201 that is completed first as the final result.
  • the equity owner node 201 responsible for the selection selects the public chain maintainer node according to a predetermined rule.
  • the predetermined rule may be set according to actual experience, may specify conditions to be met by candidate nodes participating in selection, may specify specific selection methods, and may also specify the number of candidate nodes.
  • the content of the predetermined rule is not specifically limited in the embodiment of the present application.
  • the predetermined rule may include: the public chain nodes are all candidate nodes to participate in the selection; or, the nodes in the public chain 20 that meet the selection conditions are selected for the candidate nodes to participate in.
  • the public chain nodes are all candidate nodes to participate in the selection, which can ensure that all nodes in the public chain 20 can participate in the selection of the public chain maintainer node 202 in order to obtain the right to maintain the public chain 20 and ensure the fair selection. Sex. For example, if the public chain 20 has 10 nodes, all 10 nodes can participate in the selection.
  • nodes satisfying the selection conditions in the public chain 20 are selected as candidate nodes.
  • the candidate conditions include at least the following: the node's data is complete, the node's resources are sufficient, and the node has more than a preset number of certificates.
  • the completeness of a node's data means that the node has full data.
  • Adequate node resources mean that the node's computing resources meet the requirements of maintaining the public chain, such as the computing frequency of the central processing unit (CPU), memory size, and disk storage space.
  • candidate nodes are restricted by the selection conditions to prevent nodes that do not have the ability to maintain the public chain from participating in the selection.
  • the candidate conditions may also include: the candidate node is a non-public chain maintainer node.
  • non-public chain maintainer nodes can become candidate nodes, avoiding one node continuously serving as the public chain maintainer node 202, and ensuring that other nodes in the public chain 20 also have the opportunity to serve as public chain maintainer nodes 202.
  • the public chain 20 has 10 nodes, and 2 public chain maintainer nodes need to be selected.
  • node A and node B serve as the maintainer nodes of the public chain.
  • select nodes Select the public chain maintainer node from the remaining 8 nodes.
  • the predetermined rule may include: randomly selecting among candidate nodes; or selecting according to the security performance of the candidate nodes; or selecting according to the credit records of the candidate nodes and the like.
  • the method of randomly selecting among candidate nodes is to ensure the fairness of the selection. For example, a public chain maintainer node is randomly selected from 10 candidate nodes, and each candidate node is selected with the same probability, thereby ensuring the fairness of the selection.
  • the selection method according to the security performance of candidate nodes can select a public chain maintainer node 202 with high security performance, reducing the possibility of the public chain maintainer node 202 being breached, thereby improving the security of the public chain.
  • a public chain maintainer node 202 is selected from the three candidate nodes. According to historical records, the times that the three nodes were breached were 0, 1, and 4, respectively. Then, the candidate node that has been breached 0 times has the highest security performance and is selected as the public chain maintainer node 202. Select according to the candidate node's credit record to avoid selecting the public chain maintainer node 202 with bad credit record.
  • the preset rules may also include a regulation on the number of candidate nodes, a regulation on the number of public chain maintainer nodes 202, and the like.
  • the examples of this application are not listed here one by one.
  • the maintenance of the public chain 20 refers to the maintenance of the blockchain of the public chain 20, including the maintenance of public chain 20 transactions, smart contract and other related public chain transactions.
  • the public chain maintainer node 202 as the node maintaining the public chain 20, needs to record the transactions of the public chain 20.
  • the transaction information recorded in each block of the blockchain not only indicates the transactions actually performed by each node, such as payment transactions and exchange transactions, but also events that occur in the public chain 20. Events that occur in the blockchain public chain are also recorded in the block in the form of transaction information, such as the selection result of the public chain maintainer node 202.
  • the transaction information indicates the selection result of the public chain maintainer node 202
  • the current public chain maintainer node writes the selection result into the block and synchronizes to all nodes.
  • the public chain maintainer node 202 has a valid address and the number of certificate holders held is not zero, the public chain maintainer node 202 still has the function of an equity owner node. Periodic public chain maintainer node. However, the current public chain maintainer node cannot become the public chain maintainer node again to ensure the fairness of the public chain.
  • the public chain provided in this application includes an equity owner node and a public chain maintainer node.
  • the equity owner node selects the public chain maintainer node, and the selected public chain maintainer node maintains the public chain.
  • the public chain maintainer nodes are periodically selected according to a preset time interval, the node acting as the maintainer is dynamically changing, and no fixed node is acting as the public chain maintainer node, which reduces the possibility of the public chain being breached. It can improve the security of the public chain; moreover, the maintainer node of the public chain is part of the public chain, which avoids the entire network operation of the public chain maintenance, so it can improve the efficiency of the public chain operation. Since this application takes into account both the efficiency and security aspects of the public chain, the public chain can handle highly concurrent transactions.
  • the embodiment of this application only introduces the selection rule of randomly selecting the public chain maintainer node 202 among the candidate nodes that meet the selection conditions, but does not cause specific predetermined rules. limited.
  • selecting the equity owner node 201 it can be selected according to different predetermined rules, which has satisfied different needs of the public chain 20.
  • the embodiments of this application are not listed here one by one.
  • the candidate conditions include: the node's data is complete, the node's resources are sufficient, and the node has more than a preset number of certificates.
  • the candidate information includes node identification, candidate data and mortgage credentials.
  • the node identifier is used to uniquely indicate a candidate node, such as a node's hash address.
  • the mortgage certificate is used to indicate the number of STOs that the candidate node pays.
  • the candidate data is a random number used to randomly select the public chain maintainer node 202 to improve the randomness of the public chain maintainer node 202 selection.
  • the equity owner node 201 randomly selects the public chain maintainer node 202 among the candidate nodes according to the candidate node's candidate data.
  • the candidate node is a node that meets the above-mentioned candidate conditions. Therefore, each of the candidate nodes meets the requirements of the node 202 serving as the public chain maintainer. Since the candidate data of each candidate node is a random number, the public chain maintainer node 202 can be randomly selected according to the candidate node's candidate data, thereby achieving the purpose of random selection.
  • the equity owner node 201 divides the candidate nodes into k groups of candidate nodes, each group including M candidate nodes.
  • the nodes calculate the mean deviation of the candidate data of each candidate node in the corresponding group of nodes according to the following relationship: Among them, ⁇ R is the deviation of the candidate node's candidate data from the corresponding group of nodes, and R represents the candidate node's candidate data. Represents the average of candidate data for this group of candidate nodes.
  • Each node of each group of candidate nodes is then sorted in ascending order from the mean difference. After sorting, select the first node in each group of candidate nodes.
  • the candidate nodes are public chain maintainer nodes 202, and k public chain maintainer nodes 202 are obtained. Among them, k ′ is a sequence number of a group of candidate nodes in the k group of candidate nodes.
  • the public chain maintainer node 202 at the current time is classified as the k + 1th candidate node. For a set of candidate nodes, when When it is greater than M, the k + 1th candidate node is selected.
  • the candidate nodes are public chain maintainer nodes 202.
  • the candidate node does not include the public chain maintainer node 202 at the current time.
  • the 15 candidate nodes are divided into 5 groups, and each group includes 3 candidate nodes. Calculate the mean deviation of the candidate data of each candidate node in the corresponding group of nodes, and then sort each group of candidate nodes from large to small according to the mean deviation.
  • the three candidate nodes are: node A, node B, and node C.
  • the candidate data is 30, 50, and 52, and the average value of the candidate node selection data is 44.
  • the mean deviations of the candidate nodes are 14, 6, and 8.
  • the results of sorting the three nodes from largest to smallest are: node A, node C, and node B.
  • the group of candidate nodes is the first group of candidate nodes, so the number of the group of candidate nodes is 1. Divide the group number 1 by the number of nodes in the group, and then round up to get the integer 1. Therefore, for the first group of candidate nodes, the sorted first node is finally selected as the public chain maintainer node 202, that is, node A is selected as the public chain maintainer node 202.
  • the second group and the third group of candidate nodes also select the sorted first node as the public chain maintainer node 202, and the fourth and fifth group of candidate nodes select the sorted second node as the public chain maintenance. ⁇ node 202.
  • n the number of candidate nodes. For example, if 1000 nodes participate in the selection of the public chain maintainer node 202, 10 candidate nodes are finally selected as the public chain maintainer node 202.
  • the public chain maintainer node After the selection is completed, the public chain maintainer node at the current moment records the node identifier and mortgage certificate of the selected public chain maintainer node 202, writes the node identifier and mortgage certificate into the block, and synchronizes to all nodes.
  • the rights owner node uses the random number of the candidate data to randomly select among the candidate nodes. Because the public chain maintainer nodes are randomly selected, it guarantees the fairness of the public chain maintainer node selection, further reducing the possibility of nodes being broken, and improving the security of the public chain.
  • FIG. 3 illustrates a schematic diagram of a node role of a public blockchain.
  • the public chain 20 includes an equity owner 201, a public chain maintainer node 202, and a parallel chain node 203.
  • the parachain node 203 includes a parachain maintainer node 2031.
  • the parallel chain node 203 is a common node of the public chain 20 and the access chain 21 that accesses the public chain 20.
  • the public chain 20 and the access chain 21 implement cross-chain through a common parachain node 203. Since the parachain node 203 is a common node, the parachain node 203 can access the network of the public chain 20 to communicate with other nodes of the public chain 20, and also can access the network of the chain 21 to communicate with other nodes of the access chain 21, This completes the cross-chain operation.
  • the nodes in the public chain 20 can be transformed into parachain nodes 203, or the nodes in the access chain 21 can be transformed into parachain nodes 203.
  • the equity owner node 201 selects the parallel chain maintainer node 2031 from the parallel chain nodes 203.
  • the method of selecting the parachain maintainer node 2031 by the equity owner node 201 may be the same as that of the public chain maintainer node 202, and the parachain maintainer node 2031 may also be selected according to the needs of the access chain 21.
  • the parachain maintainer node 2031 may be all the nodes in the parachain node 203, or may be a part of the nodes in the parachain node 203.
  • the parachain maintainer node 2031 maintains the related cross-chain transactions between the public chain 20 and the access chain 21 and maintains the parallel chain.
  • related cross-chain transactions include the public chain 20 acquiring the blockchain of access chain 21, cross-chain transactions between public chain 20 and access chain 21, and the access of access chain 21 and other accesses to public chain 20
  • Cross-chain transactions between chains and other transactions related to cross-chain The public chain 20 obtains the blockchain of the access chain 21 means that the public chain 20 obtains the information recorded by the blocks of the blockchain of the access chain 21 through the parallel chain node 203.
  • the cross-chain transaction between the public chain 20 and the access chain 21 means that the public chain 20 and the access chain 21 conduct transactions as both parties to the transaction.
  • the public chain 20 In the cross-chain transactions between the access chain 21 and other access chains that access the public chain 20, the public chain 20, as an intermediate chain of the transaction, does not participate in the actual transaction, but cross-chain through the parachain node 203
  • the transaction provides support. For example, different access links are different between different access chains, and the public chain 20 provides exchange permits. Another example is to provide access chain 21 with information about other access chains, so that access chain 21 and other access The chain realizes cross-chain transactions.
  • the parallel chain node 203 and the public chain maintainer node 202 are the same node. This node also maintains public chain transactions, smart contract-related public chain transactions, and related cross-chain transactions between the public chain and the access chain.
  • the cross-chain between the public chain and the access chain is realized through the parachain nodes, and the related cross-chain transactions between the public chain and the access chain are maintained through the parallel chain maintainer section. While the public chain is maintained by the equity owner's section and the public chain maintainer node, the cross-chain operation between the public chain and the access chain is implemented to prevent the cross-chain operation from adversely affecting the efficiency and security of the public chain.
  • the public blockchain in addition to the equity owner node, the public chain maintainer node, and the parallel chain node, it also includes a supervisor node, a data storage node, and a public chain service provider node.
  • a supervisor node for details, please refer to FIG. 4, which illustrates a schematic diagram of a node role of a public blockchain.
  • the public chain 20 includes: an equity owner 201, a public chain maintainer node 202, a parallel chain node 203, a supervisor node 204, a data storage node 205, and a public chain service provider node 206.
  • the parachain node 203 includes a parachain maintainer node 2031.
  • the supervisor node 204 is transformed from 201 points of the equity owner node that has not been selected as the public chain maintainer node 202. In the operation of the public chain, the supervisor node 204 is responsible for supervising the public chain maintainer node 202 and indirectly participates in the maintenance of the public chain. The supervisor node 204 can supervise the public chain maintainer node 202 in different ways.
  • the supervisor node 204 supervises the public chain maintainer node 202 by detecting whether the block of the blockchain is valid. When the block of the blockchain is valid, the supervisor node 204 stores the blockchain, and when the block of the blockchain is invalid, the supervisor node 204 discards the blockchain.
  • the effectiveness of the block of the blockchain requires that the number of blocks in the blockchain is greater than the blockchain stored locally by the supervisor node 204, and the transactions included in the blocks of the blockchain are all valid transactions.
  • the supervisor node 204 detects whether the public chain maintainer node 202 has an illegal operation.
  • a report information is broadcast in the public chain, and the report information is used to indicate that the public chain maintainer node 202 has an illegal operation. Accordingly, the reported public chain maintainer node 202 temporarily stops the maintenance of the public chain.
  • the supervisor node 204 can obtain a reward certificate pass; moreover, the reported public chain maintainer node 202 is removed.
  • illegal operations include: packaging illegal transactions, double-spending operations, generating illegal blocks, generating illegal transactions, tampering with the transaction status tree, tampering with the receipt status tree, tampering with the storage status tree, and tampering with the contract calculation results.
  • the public chain maintainer node A violated the transaction rules of the public chain to perform transaction-related operations
  • the supervisor node C detected the illegal operation of the public chain maintainer node A and broadcast related report information in the public chain.
  • the supervisor node C obtains the reward certificate pass.
  • the rewarded token pass can be deducted from the token pass paid when the public chain maintainer node A participates in the selection.
  • the supervisor node 204 Since the supervisor node 204 is converted from the equity owner node 201 points, the supervisor node 204 can participate in the selection of the public chain maintainer node 202 and be transformed into the public chain maintainer node 202. When the supervisor node 204 becomes the parachain node 203, it can also participate in the selection of the parachain maintainer node 2031 and be transformed into a parachain maintainer node 2031. In addition, the supervisor node 204 also supervises the parachain maintainer node 2031.
  • the data storage node 205 is a node having a distributed data storage capability.
  • the data storage node 205 stores data in the nodes of the public chain in a distributed manner, and at the same time, can quickly query and synchronize the stored data through the digest index. Therefore, the storage space of the data storage node 205 needs to be larger than a preset storage space size.
  • the preset storage size is 20GB (GigaByte).
  • the data storage node 205 receives the storage request sent by the equity owner node 201.
  • the storage request includes the data to be stored by the equity owner node 201, and then distributes the data to be stored according to the size of the data in the storage request. It is stored in each data storage node 205.
  • the equity owner node D when the equity owner node D runs an application based on the public chain, it generates 100 GB of data to be stored. However, the equity owner node D has only 5GB of storage space and cannot store 100GB of data. At this time, the equity owner node D sends a storage request to the data storage node E. Each data storage node has at least 20GB of storage space. At this time, the data storage node E stores 100 GB of data distributed to five data storage nodes, and each data storage node stores 20 GB of data.
  • the distributed storage capability is provided in the public chain 20, the storage space of each node in the public chain 20 is fully utilized, and the operating efficiency of the public chain is improved.
  • a public chain service provider node 206 is used to provide a public chain service to an access chain.
  • the public chain services include: querying the transactions and smart contracts of the public chain, querying the information and transaction summary of the access chain, creating sub-chains, and accessing the application chain outside the public chain 20.
  • the public chain server node 206 integrates the interface of the blockchain system accordingly.
  • the integrated interfaces include smart contract interfaces, application programmable interfaces, network interfaces and data interfaces.
  • Applications outside the public chain 20 can access the public chain network based on these interfaces.
  • the role division of the nodes in the public chain in the above embodiments is based on the functions of the nodes, and different functions correspond to different roles.
  • a node in the public chain has multiple functions, it can serve multiple role nodes.
  • the public chain maintainer node also has the function of an equity owner node, and can select the public chain maintainer node in the next cycle;
  • the supervisor node has a storage space larger than a preset size and can serve as a data storage node to provide data storage Service;
  • the parachain maintainer node is selected as the public chain maintainer node, and both the public chain and the parachain are maintained.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

A blockchain public chain, the public chain comprising an equity owner node that has a valid address and a non-zero number of certificate holders; further comprising: a public chain maintainer node selected by the equity owner node from nodes of the public chain at each preset time interval; and a public chain maintainer node used for maintaining transactions of the public chain and public chain affairs related to a smart contract. In the present application, the equity owner node selects the public chain maintainer node to maintain the public chain. Since the equity owner node periodically selects the public chain maintainer node according to the preset time intervals, the node acting as the maintainer is in a dynamic change, and a fixed node no longer acts as the public chain maintainer node, which reduces the possibility of the public chain being broken, and may improve the security of the public chain. Moreover, the public chain maintainer node is a part of nodes in the public chain, which thus avoids the entire network operation of public chain maintenance. Therefore, the efficiency of the public chain operation may be improved while taking into account the efficiency and security of the public chain.

Description

区块链公链Blockchain public chain
本申请要求在2018年8月28日提交中国专利局、申请号为201810986825.3、发明名称为“区块链标准应用模型及其应用方法”以及在2018年12月7日提交中国专利局、申请号为201811497989.6、发明名称为“区块链公链”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the submission of the China Patent Office on August 28, 2018, application number 201810986825.3, the invention name as "Blockchain Standard Application Model and Application Method", and the submission of the China Patent Office on December 7, 2018, application number The priority of the Chinese patent application is 201811497989.6 and the invention name is "Blockchain Public Chain", the entire contents of which are incorporated herein by reference.
技术领域Technical field
本申请涉及区块链技术,特别涉及一种区块链公链。This application relates to blockchain technology, and in particular, to a blockchain public chain.
背景技术Background technique
区块链提供了一种去除中心化的系统思想,这种思想最根本的原理就是通过公众共识的方式,创建一个相对客观的抗抵赖数字环境。区块链公链是指由多个提供公共服务的节点组成的物理链。如图1所示,公链101中包括多个节点,这些节点共同形成了一个点对点的网络。而区块链本质上是一个分布式的公共账本,是由多个数据区块形成的数据链,由公链中的节点进行维护。Blockchain provides a decentralized system idea. The most fundamental principle of this idea is to create a relatively objective and non-repudiation digital environment through public consensus. Blockchain public chain refers to a physical chain composed of multiple nodes that provide public services. As shown in FIG. 1, the public chain 101 includes multiple nodes, and these nodes together form a point-to-point network. The blockchain is essentially a distributed public ledger. It is a data chain formed by multiple data blocks and maintained by nodes in the public chain.
在现有的区块链技术中,主要有两种类型的公链。一种是以以太坊为代表的公链,公链中的每一个节点都要参与公链的维护,这种维护方式采用完全去中心化的方式,因此,当公链中节点过多、或者有接入链,例如行业链、联盟链和其它公链等,接入公链而引起跨链操作时,会导致公链运行的效率过低。如图1所示,公链101中的所有节点都参与公链的维护。另一种是以商用分布式应用区块链操作系统(Enterprise Operation System,EOS)为代表的公链,由公链中固定的21个节点作为维护的节点对公链进行维护。这种维护方式仅用部分节点维护公链,能够提高效率。但是,采用固定的、有限数量的节点维护公链的方式,会导致维护的节点被攻破的可能性增大,从而降低公链的安全性。In the existing blockchain technology, there are mainly two types of public chains. One is a public chain represented by Ethereum. Each node in the public chain must participate in the maintenance of the public chain. This maintenance method uses a completely decentralized method. Therefore, when there are too many nodes in the public chain, or There are access chains, such as industry chains, alliance chains, and other public chains. When accessing the public chain and causing cross-chain operations, the efficiency of the public chain operation will be too low. As shown in Figure 1, all nodes in the public chain 101 participate in the maintenance of the public chain. The other is a public chain represented by a commercial distributed application blockchain operating system (Enterprise, Operating System, EOS), and 21 public nodes fixed in the public chain are used as maintenance nodes to maintain the public chain. This maintenance method only uses some nodes to maintain the public chain, which can improve efficiency. However, adopting a fixed, limited number of nodes to maintain the public chain will increase the possibility of the maintained nodes being breached, thereby reducing the security of the public chain.
现有技术中,无论是以以太坊为代表的公链,还是以EOS为代表的公链,都无法兼顾自身的效率和安全性两个方面。In the prior art, no matter the public chain represented by Ethereum or the public chain represented by EOS, both of its own efficiency and security cannot be taken into account.
发明内容Summary of the Invention
本申请提供一种区块链公链,可用于解决在现有技术中无论是以以太坊为代表的公链,还是以EOS为代表的公链,都无法兼顾自身的效率和安全性两个方面的问题。This application provides a blockchain public chain, which can be used to solve the problem that both the public chain represented by Ethereum and the public chain represented by EOS in the prior art cannot balance their own efficiency and security. Aspects.
一方面,本申请提供一种区块链公链,包括具有有效地址且所持证通的数量不为零的权益所有者节点,所述公链还包括:由所述权益所有者节点每隔预设时间间隔从所述公链的节点中选取出来的公链维护者节点;On the one hand, the present application provides a blockchain public chain, which includes an equity owner node with a valid address and the number of certificate holdings is not zero. The public chain further includes: A public chain maintainer node selected from the nodes of the public chain at a time interval;
所述公链维护者节点,用于维护公链的交易、智能合约相关的公链事务。The public chain maintainer node is used to maintain public chain transactions and smart contract related public chain transactions.
可选地,所述公链还包括:平行链节点,所述平行链节点为公链与接入所述公链的接入链的共有节点;其中,所述平行链节点中,包括由所述权益所有者节点从平行链节点中选取出的平行链维护者节点;Optionally, the public chain further includes: a parachain node, which is a common node of the public chain and an access chain accessing the public chain; wherein the parachain nodes include The parachain maintainer node selected by the equity owner node from the parachain nodes;
所述平行链维护者节点,用于维护所述公链与所述接入链之间的相关跨链事务。The parallel chain maintainer node is configured to maintain related cross-chain transactions between the public chain and the access chain.
可选地,所述公链,还包括:由未被选取为所述公链维护者节点的权益所有者节点转化的监督者节点;Optionally, the public chain further includes: a supervisor node transformed by an equity owner node that has not been selected as the maintainer node of the public chain;
所述监督者节点,用于当接收所述公链的区块链时,检测所述区块链的区块是否有效,以及,当所述区块链的区块有效时,存储所述区块链,当所述区块链的区块无效时,丢弃所述区块链。The supervisor node is used to detect whether the block of the blockchain is valid when receiving the blockchain of the public chain, and to store the area when the block of the blockchain is valid Block chain, when the block of the block chain is invalid, the block chain is discarded.
可选地,所述公链,还包括:数据存储者节点,用于接收所述权益所有者节点发送的存储请求,所述存储请求包括所述权益所有者节点所要存储的数据,以及根据所述存储请求分布式存储所述权益所有者节点所要存储的数据。Optionally, the public chain further includes: a data storage node, configured to receive a storage request sent by the equity owner node, where the storage request includes data to be stored by the equity owner node, and according to The storage request distributedly stores data to be stored by the rights owner node.
可选地,所述公链,还包括:公链服务提供者节点,用于向接入链提供公链服务,所述公链服务包括:查询所述公链的交易和智能合约,查询所述接入链的信息和交易摘要,创建子链,以及接入所述公链外的应用程序。Optionally, the public chain further includes a public chain service provider node for providing a public chain service to the access chain. The public chain service includes: querying the transactions and smart contracts of the public chain, and querying the public chain. Describe the information and transaction summary of the access chain, create sub-chains, and access applications outside the public chain.
可选地,所述预设时间间隔的时长大于选取所述公链维护者节点所需的时长,以及小于攻破所述公链维护者所需的时长。Optionally, the duration of the preset time interval is greater than the duration required to select the public chain maintainer node, and less than the duration required to break the public chain maintainer.
可选地,所述权益所有者节点,用于获取每个候选节点的参选信息,所述参选信息包括节点标识,参选数据和抵押凭证,所述节点标识用于唯一指示一个候选节点,所述抵押凭证用于表示所述候选节点支付的证通数量,所述参选数据为用于提高所述公链维护者节点选取随机性的随机数;Optionally, the equity owner node is configured to obtain candidate information of each candidate node, the candidate information includes a node identifier, candidate data, and mortgage credentials, and the node identifier is used to uniquely indicate a candidate node The mortgage voucher is used to indicate the number of certificate passes paid by the candidate node, and the candidate data is a random number used to improve the randomness of the public chain maintainer node selection;
根据所述候选节点的参选数据,在所述候选节点中确定所述公链维护者节点。According to the candidate data of the candidate node, the public chain maintainer node is determined among the candidate nodes.
所述权益所有者节点,具体用于:The equity owner node is specifically used for:
将所述候选节点分为k组候选节点,每组包括M个候选节点;Classifying the candidate nodes into k groups of candidate nodes, each group including M candidate nodes;
确定所述每个候选节点的参选数据在各自对应的一组候选节点中的离均差;Determining the mean deviation of the candidate data of each candidate node in a corresponding group of candidate nodes;
根据所述离均差的大小,将每组候选节点各自的节点由大到小排序;Sort the nodes of each group of candidate nodes from large to small according to the magnitude of the mean deviation;
选取所述每组候选节点中第
Figure PCTCN2019101041-appb-000001
个候选节点为所述公链维护者节点,其中,k'为一组候选节点在所述k组候选节点中的序号。
Selecting the first node in each group of candidate nodes
Figure PCTCN2019101041-appb-000001
The candidate nodes are the public chain maintainer nodes, where k ′ is the sequence number of a group of candidate nodes in the k group of candidate nodes.
可选地,所述公链维护者节点的数量的取值范围
Figure PCTCN2019101041-appb-000002
其中,n表示所述候选节点的数量。
Optionally, the value range of the number of the public chain maintainer nodes
Figure PCTCN2019101041-appb-000002
Wherein, n represents the number of the candidate nodes.
本申请提供的方案,公链中包括权益所有者节点和公链维护者节点,由权益所有者节点选取公链维护者节点,由选取出的公链维护者节点维护公链。由于按照预设时间间隔周期性地选取公链维护者节点,使得充当维护者的节点处于动态改变中,不再由固定的节点充当公链维护者节点,降低了公链被攻破的可能性,能够提高公链的安全性;而且,公链维护者节点是公链中的部分节点,避免了公链维护的全网操作,因此能够提高公链运行的效率。由于本申请兼顾了公链的效率和安全性两个方面,使得公链能够处理高并发交易。The solution provided in this application includes an equity owner node and a public chain maintainer node in the public chain. The equity owner node selects the public chain maintainer node, and the selected public chain maintainer node maintains the public chain. Because the public chain maintainer nodes are periodically selected according to a preset time interval, the node acting as the maintainer is dynamically changing, and no fixed node is acting as the public chain maintainer node, which reduces the possibility of the public chain being breached. It can improve the security of the public chain; moreover, the maintainer node of the public chain is part of the public chain, which avoids the entire network operation of the public chain maintenance, so it can improve the efficiency of the public chain operation. Since this application takes into account both the efficiency and security aspects of the public chain, the public chain can handle highly concurrent transactions.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使 用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present application more clearly, the drawings used in the description of the embodiments are briefly introduced below. Obviously, the drawings in the following description are just some embodiments of the application. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without paying creative labor.
图1是示出的一种区块链公链的示意图;FIG. 1 is a schematic diagram showing a blockchain public chain;
图2是根据一示例性实施例示出的一种区块链公链的示意图;Fig. 2 is a schematic diagram showing a blockchain public chain according to an exemplary embodiment;
图3是根据另一示例性实施例示出的一种区块链公链的示意图;Fig. 3 is a schematic diagram of a blockchain public chain according to another exemplary embodiment;
图4是根据另一示例性实施例示出的一种区块链公链的示意图。Fig. 4 is a schematic diagram showing a blockchain public chain according to another exemplary embodiment.
具体实施方式detailed description
为使本申请的上述目的,特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above-mentioned objects, features, and advantages of the present application more comprehensible, the present invention is described in further detail below with reference to the accompanying drawings and specific embodiments.
在本申请提供的区块链公链中,通过对公链中的节点进行角色的划分,由具有不同功能角色的节点共同负责公链的运行。通过对节点的功能角色的划分,使得具有不同功能的节点都能参与到公链的运行中,保证所有节点在公链网络中都能获取收益。其中,通过公链中的权益所有者节点和公链维护者节点来实现对公链的维护,并且能够在公链的效率和安全性之间达到更好的平衡。请参考图2,其示出了一种区块链公链的节点角色的示意图。In the blockchain public chain provided by this application, by dividing the roles of nodes in the public chain, nodes with different functional roles are jointly responsible for the operation of the public chain. By dividing the functional roles of nodes, nodes with different functions can participate in the operation of the public chain, ensuring that all nodes can obtain benefits in the public chain network. Among them, the maintenance of the public chain is achieved through the equity owner node and the public chain maintainer node in the public chain, and a better balance can be achieved between the efficiency and security of the public chain. Please refer to FIG. 2, which illustrates a schematic diagram of a node role of a public blockchain.
在公链20中,包括权益所有者节点201和公链维护者节点202。权益所有者节点201周期性地从公链20的节点中选取出公链维护者节点202。经过选取,权益所有者节点201中的节点可以转化为公链维护者节点202。由公链维护者节点202维护公链的交易、智能合约相关的公链事务。其中,权益所有者节点201是指具有有效地址且所持证通的数量不为零的节点。其中,具有有效地址是为了保证权益所有者节点201能够与公链20的其它节点通信,而证通是区块链网络中的价值交互媒介,权益所有者节点201只有持有数量不为零的证通才能够参与公链的运行。例如,一个权益所有者节点A向另一个权益所有者节点B购买服务,则权益所有者节点A需要具有能够通信的有效地址和证通,才能与权益所有者节点B进行交易,购买权益所有者节点B提供服务。The public chain 20 includes an equity owner node 201 and a public chain maintainer node 202. The equity owner node 201 periodically selects the public chain maintainer node 202 from the nodes of the public chain 20. After selection, the nodes in the equity owner node 201 can be converted into the public chain maintainer node 202. The public chain maintainer node 202 maintains public chain transactions and smart contract related public chain transactions. Among them, the equity owner node 201 refers to a node that has a valid address and the number of certificate holdings is not zero. Among them, having a valid address is to ensure that the equity owner node 201 can communicate with other nodes on the public chain 20, and Zenith is a value interaction medium in the blockchain network. The equity owner node 201 only has a non-zero holding amount. Only Zentong can participate in the operation of the public chain. For example, if an equity owner node A purchases services from another equity owner node B, then the equity owner node A needs to have a valid address and a certificate that can communicate with it in order to trade with the equity owner node B and purchase the equity owner Node B provides services.
为了周期性地选取公链维护者节点202,选取节点每预设时间间隔进行一次选取,从而周期性的改变维护公链20的节点,降低公链20被攻破的可能性,提高公链20的安全性。In order to periodically select the public chain maintainer node 202, the selected nodes are selected every preset time interval, thereby periodically changing the nodes that maintain the public chain 20, reducing the possibility of the public chain 20 being breached, and improving the public chain 20's safety.
预设时间间隔的时长大于选取公链维护者节点202所需的时长,以及小于攻破公链维护者节点202所需的时长。选取公链维护者节点202所需的时长是指完成一次公链维护者节点202选取所需的时长,例如,负责选取的权益所有者节点201完成一次选取最快需要5分钟。那么,当选取的时间间隔小于5分钟时,第一次选取尚未完成,权益所有者节点201就已经开始第二次选取,导致无法顺利选出公链维护者节点202。因此,为了确保在一次时间间隔内能够完成选取,预设时间间隔的时长需要大于选取公链维护者节点202所需的时长。The length of the preset time interval is greater than the time required to select the public chain maintainer node 202, and less than the time required to break the public chain maintainer node 202. The time required to select the public chain maintainer node 202 refers to the time required to complete a public chain maintainer node 202 selection. For example, the equity owner node 201 responsible for the selection needs 5 minutes to complete a single selection. Then, when the selection interval is less than 5 minutes, the first selection has not been completed, and the equity owner node 201 has already started the second selection, resulting in the inability to successfully select the public chain maintainer node 202. Therefore, in order to ensure that the selection can be completed within a time interval, the length of the preset time interval needs to be longer than the time required to select the public chain maintainer node 202.
攻破公链维护者节点202所需的时长可以根据公链节点所使用的加解密算法暴力破解时间确定,也可以根据公链节点被攻击的历史记录确定。例如,历史记录显示公链节点被攻破的最短时长是30分钟,最长时长是40分钟,平均时长是36分钟。那么, 预设时间间隔的时长若大于40分钟,则公链维护者节点202遭受攻击时被攻破的可能性较高;若预设时间间隔的时长若小于30分钟,则公链维护者节点202遭受攻击时被攻破的可能性较低。因此,为了避免因时间间隔过长、选取频率过低,导致公链维护者节点202被攻破,预设时间间隔的时长需要小于攻破公链维护者节点202所需的时长。The time required to break the public chain maintainer node 202 can be determined according to the brute force cracking time of the encryption and decryption algorithm used by the public chain node, or it can be determined based on the history of the public chain node being attacked. For example, historical records show that the shortest time for a public chain node to be breached is 30 minutes, the longest time is 40 minutes, and the average time is 36 minutes. Then, if the duration of the preset time interval is greater than 40 minutes, the public chain maintainer node 202 is more likely to be broken when under attack; if the duration of the preset time interval is less than 30 minutes, the public chain maintainer node 202 It is less likely to be breached under attack. Therefore, in order to avoid that the public chain maintainer node 202 is breached due to the time interval being too long and the selection frequency being too low, the length of the preset time interval needs to be less than the time required to breach the public chain maintainer node 202.
在一种可能的实施方式中,预设时间间隔的时长为5至30分钟。其中,预设时间间隔的时长为一百个记账周期。该记账周期是指生成一个区块的时间。记账周期的时长为10秒,则预设时间间隔的时长为1000秒。In a possible implementation manner, the duration of the preset time interval is 5 to 30 minutes. The length of the preset time interval is one hundred accounting periods. The accounting period refers to the time when a block is generated. The duration of the accounting period is 10 seconds, and the duration of the preset time interval is 1000 seconds.
开始选取时,负责选取的权益所有者节点201触发选取智能合约。选取智能合约是用于选取公链维护者节点202的智能合约。负责选取的权益所有者节点201也可以是当前周期内的公链维护者节点。并且,一次选取可以由多个权益所有者节点201各自同时进行选取,以最先完成的权益所有者节点201的选取结果为最终结果。When the selection is started, the equity owner node 201 responsible for the selection triggers the selection of the smart contract. Selecting a smart contract is a smart contract used to select a public chain maintainer node 202. The equity owner node 201 responsible for selection may also be a public chain maintainer node in the current cycle. In addition, a single selection may be performed by multiple equity owner nodes 201 at the same time, with the selection result of the equity owner node 201 that is completed first as the final result.
在选取时,负责选取的权益所有者节点201按照预定规则选取公链维护者节点。该预定规则可以根据实际经验设定,可以规定参与选取的候选节点所要满足的条件,也可以规定具体的选取方式,还可以规定候选节点的数量。对于预定规则的内容,本申请实施例不做具体限定。In the selection, the equity owner node 201 responsible for the selection selects the public chain maintainer node according to a predetermined rule. The predetermined rule may be set according to actual experience, may specify conditions to be met by candidate nodes participating in selection, may specify specific selection methods, and may also specify the number of candidate nodes. The content of the predetermined rule is not specifically limited in the embodiment of the present application.
首先,对于参与选取的节点。预定规则可以包括:公链节点均为候选节点参与选取;或者,公链20中满足参选条件的节点为候选节点参与选取。第一种情况,公链节点均为候选节点参与选取,可以确保公链20中的所有节点都能参与公链维护者节点202的选取,以获取维护公链20的权利,保证了选取的公平性。例如,公链20有10个节点,则10个节点都可以参与选取。第二种情况,公链20中满足参选条件的节点为候选节点参与选取。其中,参选条件至少包括以下内容:节点的数据完整,节点的资源充足,以及节点有超过预设数量的证通。其中,节点的数据完整是指节点具有全量数据。节点资源充足是指节点的运算资源满足维护公链的要求,例如中央处理器(Central Processing Unit,CPU)的运算频率,内存大小和磁盘存储空间等。通过参选条件对候选节点进行限制,避免不具备公链维护能力的节点参与选取。参选条件还可以包括:候选节点为非公链维护者节点。只有非公链维护者节点可以成为候选节点,避免由一节点连续充当公链维护者节点202,并且能够确保公链20中的其它节点也有机会担任公链维护者节点202。示例性地,公链20有10个节点,需选取2个公链维护者节点。在当前时刻,由节点A和节点B充当公链维护者节点,则选取时,节点A和节点B不能成为候选节点。选取节点在剩余的8个节点中选取公链维护者节点。First, for the participating nodes. The predetermined rule may include: the public chain nodes are all candidate nodes to participate in the selection; or, the nodes in the public chain 20 that meet the selection conditions are selected for the candidate nodes to participate in. In the first case, the public chain nodes are all candidate nodes to participate in the selection, which can ensure that all nodes in the public chain 20 can participate in the selection of the public chain maintainer node 202 in order to obtain the right to maintain the public chain 20 and ensure the fair selection. Sex. For example, if the public chain 20 has 10 nodes, all 10 nodes can participate in the selection. In the second case, nodes satisfying the selection conditions in the public chain 20 are selected as candidate nodes. Among them, the candidate conditions include at least the following: the node's data is complete, the node's resources are sufficient, and the node has more than a preset number of certificates. Among them, the completeness of a node's data means that the node has full data. Adequate node resources mean that the node's computing resources meet the requirements of maintaining the public chain, such as the computing frequency of the central processing unit (CPU), memory size, and disk storage space. Candidate nodes are restricted by the selection conditions to prevent nodes that do not have the ability to maintain the public chain from participating in the selection. The candidate conditions may also include: the candidate node is a non-public chain maintainer node. Only non-public chain maintainer nodes can become candidate nodes, avoiding one node continuously serving as the public chain maintainer node 202, and ensuring that other nodes in the public chain 20 also have the opportunity to serve as public chain maintainer nodes 202. Exemplarily, the public chain 20 has 10 nodes, and 2 public chain maintainer nodes need to be selected. At the current moment, node A and node B serve as the maintainer nodes of the public chain. When selecting, node A and node B cannot become candidate nodes. Select nodes Select the public chain maintainer node from the remaining 8 nodes.
其次,对于选取方式,预定规则可以包括:在候选节点中随机选取;或者,根据候选节点的安全性能选取;或者,根据候选节点的信用记录选取等等。其中,在候选节点中随机选取的方式是为了确保选取的公平性。例如,在10个候选节点中随机选取公链维护者节点,每一个候选节点被选中的概率相同,从而能够保证选取的公平性。根据候选节点的安全性能选取的方式能够选出安全性能高的公链维护者节点202,降低公链维护者节点202被攻破的可能性,从而提高公链的安全性。例如,在3个候选节点中选取一个公链维护者节点202,根据历史记录,3个节点被攻破的次数分别为0次、1次和4次。那么,被攻破的次数为0次的候选节点的安全性能最高,被选为公 链维护者节点202。根据候选节点的信用记录选取,以避免选取出具有不良信用记录的公链维护者节点202。Secondly, for the selection method, the predetermined rule may include: randomly selecting among candidate nodes; or selecting according to the security performance of the candidate nodes; or selecting according to the credit records of the candidate nodes and the like. Among them, the method of randomly selecting among candidate nodes is to ensure the fairness of the selection. For example, a public chain maintainer node is randomly selected from 10 candidate nodes, and each candidate node is selected with the same probability, thereby ensuring the fairness of the selection. The selection method according to the security performance of candidate nodes can select a public chain maintainer node 202 with high security performance, reducing the possibility of the public chain maintainer node 202 being breached, thereby improving the security of the public chain. For example, a public chain maintainer node 202 is selected from the three candidate nodes. According to historical records, the times that the three nodes were breached were 0, 1, and 4, respectively. Then, the candidate node that has been breached 0 times has the highest security performance and is selected as the public chain maintainer node 202. Select according to the candidate node's credit record to avoid selecting the public chain maintainer node 202 with bad credit record.
此外,预设规则还可以包括对候选节点数量的规定、公链维护者节点202数量的规定等等。本申请实施例在此不一一进行列举,In addition, the preset rules may also include a regulation on the number of candidate nodes, a regulation on the number of public chain maintainer nodes 202, and the like. The examples of this application are not listed here one by one.
在选取后,被选取出的公链维护者节点202在下一次选取前,维护公链20。公链20的维护是指对公链20的区块链进行维护,包括维护公链20的交易、智能合约等相关公链事务。例如,公链维护者节点202作为维护公链20的节点,需要记录公链20的交易。区块链各个区块中记录的交易信息不仅表示各节点实际进行的交易,例如支付交易和兑换交易,还表示公链20中发生的事件。区块链公链中发生的事件也以交易信息的形式记录在区块中,例如公链维护者节点202的选取结果。当交易信息表示公链维护者节点202的选取结果时,在选取公链维护者节点202后,当前时刻的公链维护者节点,将选取结果写入区块中,并同步到所有节点。After the selection, the selected public chain maintainer node 202 maintains the public chain 20 before the next selection. The maintenance of the public chain 20 refers to the maintenance of the blockchain of the public chain 20, including the maintenance of public chain 20 transactions, smart contract and other related public chain transactions. For example, the public chain maintainer node 202, as the node maintaining the public chain 20, needs to record the transactions of the public chain 20. The transaction information recorded in each block of the blockchain not only indicates the transactions actually performed by each node, such as payment transactions and exchange transactions, but also events that occur in the public chain 20. Events that occur in the blockchain public chain are also recorded in the block in the form of transaction information, such as the selection result of the public chain maintainer node 202. When the transaction information indicates the selection result of the public chain maintainer node 202, after the public chain maintainer node 202 is selected, the current public chain maintainer node writes the selection result into the block and synchronizes to all nodes.
需要说明的是,因为被选取出的公链维护者节点202具有有效地址且所持证通的数量不为零,所以公链维护者节点202仍然具有权益所有者节点的功能,例如可以选取下一周期的公链维护者节点。但当前时刻的公链维护者节点不能再次成为公链维护者节点,以确保公链的公平性。It should be noted that because the selected public chain maintainer node 202 has a valid address and the number of certificate holders held is not zero, the public chain maintainer node 202 still has the function of an equity owner node. Periodic public chain maintainer node. However, the current public chain maintainer node cannot become the public chain maintainer node again to ensure the fairness of the public chain.
本申请提供的公链,包括权益所有者节点和公链维护者节点,由权益所有者节点选取公链维护者节点,由选取出的公链维护者节点维护公链。由于按照预设时间间隔周期性地选取公链维护者节点,使得充当维护者的节点处于动态改变中,不再由固定的节点充当公链维护者节点,降低了公链被攻破的可能性,能够提高公链的安全性;而且,公链维护者节点是公链中的部分节点,避免了公链维护的全网操作,因此能够提高公链运行的效率。由于本申请兼顾了公链的效率和安全性两个方面,使得公链能够处理高并发交易。The public chain provided in this application includes an equity owner node and a public chain maintainer node. The equity owner node selects the public chain maintainer node, and the selected public chain maintainer node maintains the public chain. Because the public chain maintainer nodes are periodically selected according to a preset time interval, the node acting as the maintainer is dynamically changing, and no fixed node is acting as the public chain maintainer node, which reduces the possibility of the public chain being breached. It can improve the security of the public chain; moreover, the maintainer node of the public chain is part of the public chain, which avoids the entire network operation of the public chain maintenance, so it can improve the efficiency of the public chain operation. Since this application takes into account both the efficiency and security aspects of the public chain, the public chain can handle highly concurrent transactions.
对于选取公链维护者节点202的预定规则,本申请实施例仅对在满足参选条件的候选节点中随机选取公链维护者节点202这一选取规则进行介绍,但并不对具体的预定规则造成限定。权益所有者节点201在进行选取时,可以根据不同预定规则进行选取,已满足公链20不同的需求。对于其它的预定规则,本申请实施例在此不一一进行列举。Regarding the predetermined rule for selecting the public chain maintainer node 202, the embodiment of this application only introduces the selection rule of randomly selecting the public chain maintainer node 202 among the candidate nodes that meet the selection conditions, but does not cause specific predetermined rules. limited. When selecting the equity owner node 201, it can be selected according to different predetermined rules, which has satisfied different needs of the public chain 20. For other predetermined rules, the embodiments of this application are not listed here one by one.
在本申请实施例中,当公链20中符合参选条件的节点参与公链维护者节点202的选取时,通过触发选取智能合约来登记自身的参选信息。权益所有者节点201通过选取智能合约获取每个候选节点的参选信息。其中,参选条件包括:节点的数据完整,节点的资源充足,以及节点有超过预设数量的证通。参选信息包括节点标识,参选数据和抵押凭证。节点标识用于唯一指示一个候选节点,例如节点的哈希(Hash)地址。抵押凭证用于指示候选节点支付的证通数量。该参选数据为用于随机选取公链维护者节点202的随机数,以提高公链维护者节点202选取的随机性。In the embodiment of the present application, when a node that meets the conditions for election in the public chain 20 participates in the selection of the public chain maintainer node 202, it triggers the selection of a smart contract to register its own election information. The equity owner node 201 obtains the candidate information of each candidate node by selecting a smart contract. Among them, the candidate conditions include: the node's data is complete, the node's resources are sufficient, and the node has more than a preset number of certificates. The candidate information includes node identification, candidate data and mortgage credentials. The node identifier is used to uniquely indicate a candidate node, such as a node's hash address. The mortgage certificate is used to indicate the number of STOs that the candidate node pays. The candidate data is a random number used to randomly select the public chain maintainer node 202 to improve the randomness of the public chain maintainer node 202 selection.
其次,权益所有者节点201根据候选节点的参选数据,在候选节点中随机选取公链维护者节点202。候选节点是符合上述参选条件的节点,因此,候选节点中的每一个节点都满足担当公链维护者节点202的要求。由于每一个候选节点的参选数据是一 随机数,因此,根据候选节点的参选数据可以随机地选取公链维护者节点202,从而达到随机选取的目的。Second, the equity owner node 201 randomly selects the public chain maintainer node 202 among the candidate nodes according to the candidate node's candidate data. The candidate node is a node that meets the above-mentioned candidate conditions. Therefore, each of the candidate nodes meets the requirements of the node 202 serving as the public chain maintainer. Since the candidate data of each candidate node is a random number, the public chain maintainer node 202 can be randomly selected according to the candidate node's candidate data, thereby achieving the purpose of random selection.
在选取时,权益所有者节点201将候选节点分为k组候选节点,每组包括M个候选节点。分组后,节点根据如下关系式计算每个候选节点的参选数据在各自对应的一组节点中的离均差:
Figure PCTCN2019101041-appb-000003
其中,ΔR为候选节点的参选数据在对应的一组节点中的离均差,R表示候选节点的参选数据,
Figure PCTCN2019101041-appb-000004
表示该组候选节点的参选数据的平均值。再将每组候选节点各自的节点按照离均差的大小,由大到小排序。排序后,选取每组候选节点中第
Figure PCTCN2019101041-appb-000005
个候选节点为公链维护者节点202,得到k个公链维护者节点202。其中,k'为一组候选节点在k组候选节点中的序号。
In the selection, the equity owner node 201 divides the candidate nodes into k groups of candidate nodes, each group including M candidate nodes. After grouping, the nodes calculate the mean deviation of the candidate data of each candidate node in the corresponding group of nodes according to the following relationship:
Figure PCTCN2019101041-appb-000003
Among them, ΔR is the deviation of the candidate node's candidate data from the corresponding group of nodes, and R represents the candidate node's candidate data.
Figure PCTCN2019101041-appb-000004
Represents the average of candidate data for this group of candidate nodes. Each node of each group of candidate nodes is then sorted in ascending order from the mean difference. After sorting, select the first node in each group of candidate nodes.
Figure PCTCN2019101041-appb-000005
The candidate nodes are public chain maintainer nodes 202, and k public chain maintainer nodes 202 are obtained. Among them, k ′ is a sequence number of a group of candidate nodes in the k group of candidate nodes.
在另一实施例中,当侯选节点中有当前时刻的公链维护者节点202时,将当前时刻的公链维护者节点202归为第k+1组候选节点。对于一组候选节点,当
Figure PCTCN2019101041-appb-000006
大于M时,选取第k+1组候选节点中的第
Figure PCTCN2019101041-appb-000007
个候选节点为公链维护者节点202。
In another embodiment, when the candidate node has a public chain maintainer node 202 at the current time, the public chain maintainer node 202 at the current time is classified as the k + 1th candidate node. For a set of candidate nodes, when
Figure PCTCN2019101041-appb-000006
When it is greater than M, the k + 1th candidate node is selected.
Figure PCTCN2019101041-appb-000007
The candidate nodes are public chain maintainer nodes 202.
示例性地,一次选取中,有15个候选节点,且候选节点中不包括当前时刻的公链维护者节点202。将15个候选节点分为5组,每组包括3个候选节点。计算每个候选节点的参选数据在各自对应的一组节点中的离均差,再根据离均差将每组候选节点由大到小排序。在第一组候选节点中,三个候选节点为:节点A,节点B和节点C,其参选数据分别为30,50和52,该组候选节点参选数据的平均值为44,则三个候选节点的离均差为14,6和8。将三个节点根据离均差由大到小排序后的结果为:节点A、节点C、节点B。该组候选节点为第一组候选节点,因此该组候选节点的序号为1。将该组的序号1除以组中的节点数量,再向上取整,得到整数1。因此,对于第一组候选节点,最终选取排序后的第一个节点为公链维护者节点202,即选取节点A为公链维护者节点202。相应地,第二组和第三组候选节点也选取排序后的第一个节点为公链维护者节点202,第四组和第五组候选节点选取排序后的第二个节点为公链维护者节点202。For example, in one selection, there are 15 candidate nodes, and the candidate node does not include the public chain maintainer node 202 at the current time. The 15 candidate nodes are divided into 5 groups, and each group includes 3 candidate nodes. Calculate the mean deviation of the candidate data of each candidate node in the corresponding group of nodes, and then sort each group of candidate nodes from large to small according to the mean deviation. In the first group of candidate nodes, the three candidate nodes are: node A, node B, and node C. The candidate data is 30, 50, and 52, and the average value of the candidate node selection data is 44. The mean deviations of the candidate nodes are 14, 6, and 8. The results of sorting the three nodes from largest to smallest are: node A, node C, and node B. The group of candidate nodes is the first group of candidate nodes, so the number of the group of candidate nodes is 1. Divide the group number 1 by the number of nodes in the group, and then round up to get the integer 1. Therefore, for the first group of candidate nodes, the sorted first node is finally selected as the public chain maintainer node 202, that is, node A is selected as the public chain maintainer node 202. Correspondingly, the second group and the third group of candidate nodes also select the sorted first node as the public chain maintainer node 202, and the fourth and fifth group of candidate nodes select the sorted second node as the public chain maintenance.者 node 202.
k的取值为
Figure PCTCN2019101041-appb-000008
其中,n表示候选节点的数量。示例性地,1000个节点参与公链维护者节点202的选取,则最终选定10个候选节点为公链维护者节点202。
The value of k is
Figure PCTCN2019101041-appb-000008
Among them, n represents the number of candidate nodes. For example, if 1000 nodes participate in the selection of the public chain maintainer node 202, 10 candidate nodes are finally selected as the public chain maintainer node 202.
选取完成后,当前时刻的公链维护者节点,记录选取出的公链维护者节点202的节点标识和抵押凭证,将节点标识和抵押凭证写入区块中,并同步到所有节点。After the selection is completed, the public chain maintainer node at the current moment records the node identifier and mortgage certificate of the selected public chain maintainer node 202, writes the node identifier and mortgage certificate into the block, and synchronizes to all nodes.
在本申请提供的选取方案中,在选取公链维护者节点时,权利所有者节点利用参选数据这一随机数在候选节点中随机选取。由于公链维护者节点是随机选取的,保证 了公链维护者节点选取的公平性,进一步降低节点被攻破的可能性,能够提高公链的安全性。In the selection scheme provided in this application, when selecting a public chain maintainer node, the rights owner node uses the random number of the candidate data to randomly select among the candidate nodes. Because the public chain maintainer nodes are randomly selected, it guarantees the fairness of the public chain maintainer node selection, further reducing the possibility of nodes being broken, and improving the security of the public chain.
在区块链系统中,支持不同链之间的跨链是必不可少的功能。例如,公链与私链之间的跨链,不同公链之间的跨链,以及公链与联盟链之间的跨链等等。对于接入该区块链公链的其它链,本申请统称为接入链。本申请实施例提供的区块链公链,支持接入链通过平行链接入公链的方式。请参考图3,其示出了一种区块链公链的节点角色的示意图。In a blockchain system, supporting cross-chains between different chains is an essential function. For example, cross-chains between public and private chains, cross-chains between different public chains, and cross-chains between public and alliance chains. For other chains accessing the public chain of the blockchain, this application is collectively referred to as an access chain. The public blockchain of the blockchain provided in the embodiments of the present application supports the manner in which the access chain enters the public chain through parallel links. Please refer to FIG. 3, which illustrates a schematic diagram of a node role of a public blockchain.
公链20包括权益所有者201,公链维护者节点202和平行链节点203。平行链节点203中包括平行链维护者节点2031。平行链节点203为公链20与接入公链20的接入链21的共有节点。公链20和接入链21通过共有的平行链节点203实现跨链。由于平行链节点203为共有节点,平行链节点203既可以接入公链20的网络与公链20的其它节点通信,还可以接入链21的网络与接入链21的其它节点通信,以此完成跨链操作。The public chain 20 includes an equity owner 201, a public chain maintainer node 202, and a parallel chain node 203. The parachain node 203 includes a parachain maintainer node 2031. The parallel chain node 203 is a common node of the public chain 20 and the access chain 21 that accesses the public chain 20. The public chain 20 and the access chain 21 implement cross-chain through a common parachain node 203. Since the parachain node 203 is a common node, the parachain node 203 can access the network of the public chain 20 to communicate with other nodes of the public chain 20, and also can access the network of the chain 21 to communicate with other nodes of the access chain 21, This completes the cross-chain operation.
当接入链21接入公链20时,可以由公链20中的节点转化为平行链节点203,也可以由接入链21的节点转化为平行链节点203。在接入链21接入公链20后,权益所有者节点201从平行链节点203中选取出平行链维护者节点2031。权益所有者节点201选取平行链维护者节点2031的方式可以与选取公链维护者节点202的方式相同,也可以根据接入链21的需求选取平行链维护者节点2031。其中,平行链维护者节点2031可以是平行链节点203中的所有节点,也可以是平行链节点203中的部分节点。When the access chain 21 accesses the public chain 20, the nodes in the public chain 20 can be transformed into parachain nodes 203, or the nodes in the access chain 21 can be transformed into parachain nodes 203. After the access chain 21 accesses the public chain 20, the equity owner node 201 selects the parallel chain maintainer node 2031 from the parallel chain nodes 203. The method of selecting the parachain maintainer node 2031 by the equity owner node 201 may be the same as that of the public chain maintainer node 202, and the parachain maintainer node 2031 may also be selected according to the needs of the access chain 21. Among them, the parachain maintainer node 2031 may be all the nodes in the parachain node 203, or may be a part of the nodes in the parachain node 203.
选取出平行链维护者节点2031后,平行链维护者节点2031维护公链20与接入链21之间的相关跨链事务,维护平行链。其中,相关跨链事务包括公链20获取接入链21的区块链,公链20与接入链21之间的跨链交易,以及接入链21与其它接入公链20的接入链之间的跨链交易等等与跨链相关的事务。公链20获取接入链21的区块链是指公链20通过平行链节点203来获取接入链21的区块链的区块所记录的信息。公链20与接入链21之间的跨链交易,是指公链20与接入链21作为交易的双方进行交易。在接入链21与其它接入公链20的接入链之间的跨链交易中,公链20作为交易的中间链,并不参与实际的交易,而是通过平行链节点203为跨链交易提供支持,例如,不同接入链之间的证通不同,公链20提供证通兑换,又例如,向接入链21提供其它接入链的信息,以便接入链21与其它接入链实现跨链交易。After the parachain maintainer node 2031 is selected, the parachain maintainer node 2031 maintains the related cross-chain transactions between the public chain 20 and the access chain 21 and maintains the parallel chain. Among them, related cross-chain transactions include the public chain 20 acquiring the blockchain of access chain 21, cross-chain transactions between public chain 20 and access chain 21, and the access of access chain 21 and other accesses to public chain 20 Cross-chain transactions between chains and other transactions related to cross-chain. The public chain 20 obtains the blockchain of the access chain 21 means that the public chain 20 obtains the information recorded by the blocks of the blockchain of the access chain 21 through the parallel chain node 203. The cross-chain transaction between the public chain 20 and the access chain 21 means that the public chain 20 and the access chain 21 conduct transactions as both parties to the transaction. In the cross-chain transactions between the access chain 21 and other access chains that access the public chain 20, the public chain 20, as an intermediate chain of the transaction, does not participate in the actual transaction, but cross-chain through the parachain node 203 The transaction provides support. For example, different access links are different between different access chains, and the public chain 20 provides exchange permits. Another example is to provide access chain 21 with information about other access chains, so that access chain 21 and other access The chain realizes cross-chain transactions.
在一种可能的实施方式中,平行链节点203和公链维护者节点202为同一节点。该节点同时维护公链的交易、智能合约相关的公链事务,以及公链与接入链之间的相关跨链事务。In a possible implementation manner, the parallel chain node 203 and the public chain maintainer node 202 are the same node. This node also maintains public chain transactions, smart contract-related public chain transactions, and related cross-chain transactions between the public chain and the access chain.
图3实施例提供的公链中,通过平行链节点实现公链与接入链之间的跨链,再通过平行链维护者节维护公链与接入链之间的相关跨链事务。在由权益所有者节和公链维护者节点维护公链的同时,实现公链与接入链之间的跨链操作,避免跨链操作对公链的效率和安全性造成不利的影响。In the public chain provided by the embodiment of FIG. 3, the cross-chain between the public chain and the access chain is realized through the parachain nodes, and the related cross-chain transactions between the public chain and the access chain are maintained through the parallel chain maintainer section. While the public chain is maintained by the equity owner's section and the public chain maintainer node, the cross-chain operation between the public chain and the access chain is implemented to prevent the cross-chain operation from adversely affecting the efficiency and security of the public chain.
本申请实施提供的区块链公链中,除权益所有者节点、公链维护者节点和平行链 节点外,还包括监督者节点、数据存储者节点和公链服务提供者节点。具体内容,请参见图4,其示出了一种区块链公链的节点角色的示意图。In the public blockchain provided by the implementation of this application, in addition to the equity owner node, the public chain maintainer node, and the parallel chain node, it also includes a supervisor node, a data storage node, and a public chain service provider node. For details, please refer to FIG. 4, which illustrates a schematic diagram of a node role of a public blockchain.
公链20中包括:权益所有者201,公链维护者节点202,平行链节点203,监督者节点204、数据存储者节点205和公链服务提供者节点206。平行链节点203中包括平行链维护者节点2031。The public chain 20 includes: an equity owner 201, a public chain maintainer node 202, a parallel chain node 203, a supervisor node 204, a data storage node 205, and a public chain service provider node 206. The parachain node 203 includes a parachain maintainer node 2031.
监督者节点204是由未被选取为公链维护者节点202的权益所有者节201点转化而来。在公链的运行中,监督者节点204负责对公链维护者节点202进行监督,间接参与公链的维护。监督者节点204可以通过不同的方式监督公链维护者节点202。The supervisor node 204 is transformed from 201 points of the equity owner node that has not been selected as the public chain maintainer node 202. In the operation of the public chain, the supervisor node 204 is responsible for supervising the public chain maintainer node 202 and indirectly participates in the maintenance of the public chain. The supervisor node 204 can supervise the public chain maintainer node 202 in different ways.
第一种,当公链维护者节点202生成新区块时,需要将包括新区块的区块链在公链20中进行同步。在同步过程中,监督者节点204通过检测该区块链的区块是否有效,来监督公链维护者节点202。当区块链的区块有效时,监督者节点204存储区块链,当区块链的区块无效时,监督者节点204丢弃区块链。区块链的区块有效要求区块链的区块数量大于监督者节点204本地存储的区块链,且区块链的区块中包括的交易均为有效交易。First, when the public chain maintainer node 202 generates a new block, the block chain including the new block needs to be synchronized in the public chain 20. During the synchronization process, the supervisor node 204 supervises the public chain maintainer node 202 by detecting whether the block of the blockchain is valid. When the block of the blockchain is valid, the supervisor node 204 stores the blockchain, and when the block of the blockchain is invalid, the supervisor node 204 discards the blockchain. The effectiveness of the block of the blockchain requires that the number of blocks in the blockchain is greater than the blockchain stored locally by the supervisor node 204, and the transactions included in the blocks of the blockchain are all valid transactions.
第二种,监督者节点204检测公链维护者节点202是否存在非法操作。当检测到公链维护者节点202存在非法操作时,在公链中广播举报信息,该举报信息用于指示公链维护者节点202存在非法操作。相应地,被举报的公链维护者节点202暂时停止对公链的维护。当公链中的其它节点确定该举报信息准确后,监督者节点204可以获取奖励证通;而且,移除被举报的公链维护者节点202。其中,非法操作包括:打包非法交易,双花操作,生成非法区块,生成非法交易,篡改交易状态树,篡改收据状态树,篡改存储状态树,篡改合约计算结果等。例如,公链维护者节点A违反公链的交易规则进行了交易相关的操作,监督者节点C检测到了公链维护者节点A这一非法操作,并在公链中广播了相关的举报信息。当公链中的其它节点确定该举报信息准确后,监督者节点C获取到奖励证通。该奖励证通可以从公链维护者节点A参与选取时支付的证通中扣取。Second, the supervisor node 204 detects whether the public chain maintainer node 202 has an illegal operation. When an illegal operation of the public chain maintainer node 202 is detected, a report information is broadcast in the public chain, and the report information is used to indicate that the public chain maintainer node 202 has an illegal operation. Accordingly, the reported public chain maintainer node 202 temporarily stops the maintenance of the public chain. When other nodes in the public chain determine that the report information is accurate, the supervisor node 204 can obtain a reward certificate pass; moreover, the reported public chain maintainer node 202 is removed. Among them, illegal operations include: packaging illegal transactions, double-spending operations, generating illegal blocks, generating illegal transactions, tampering with the transaction status tree, tampering with the receipt status tree, tampering with the storage status tree, and tampering with the contract calculation results. For example, the public chain maintainer node A violated the transaction rules of the public chain to perform transaction-related operations, and the supervisor node C detected the illegal operation of the public chain maintainer node A and broadcast related report information in the public chain. When other nodes in the public chain determine that the report information is accurate, the supervisor node C obtains the reward certificate pass. The rewarded token pass can be deducted from the token pass paid when the public chain maintainer node A participates in the selection.
由于监督者节点204是由权益所有者节201点转化而来,因此监督者节点204可以参与公链维护者节点202的选取,转化为公链维护者节点202。当监督者节点204成为平行链节点203时,也可以参与平行链维护者节点2031的选取,转化为平行链维护者节点2031。除此之外,监督者节点204还对平行链维护者节点2031进行监督。Since the supervisor node 204 is converted from the equity owner node 201 points, the supervisor node 204 can participate in the selection of the public chain maintainer node 202 and be transformed into the public chain maintainer node 202. When the supervisor node 204 becomes the parachain node 203, it can also participate in the selection of the parachain maintainer node 2031 and be transformed into a parachain maintainer node 2031. In addition, the supervisor node 204 also supervises the parachain maintainer node 2031.
通过监督者节点204,可以使得公链维护者节点201之外的其它节点间接参与到公链的维护中,进一步提升公链运行的效率。并且由于监督者节点204的监督,避免公链维护者节点201的非法操作,提升公链的安全性。Through the supervisor node 204, other nodes than the public chain maintainer node 201 can indirectly participate in the maintenance of the public chain, further improving the efficiency of the public chain operation. And due to the supervision of the supervisor node 204, the illegal operation of the public chain maintainer node 201 is avoided, and the security of the public chain is improved.
数据存储者节点205是具有分布式数据存储能力的节点。数据存储者节点205分布式存储公链的节点中的数据,同时能够通过摘要索引对存储的数据进行快速查询和同步。因此,数据存储者节点205的储存空间需要大于预设的存储空间大小。例如,预设的存储空间大小为20GB(GigaByte)。当存储信息时,数据存储者节点205接收权益所有者节点201发送的存储请求,存储请求包括权益所有者节点201所要存储的数据,再根据存储请求中数据的大小,将所要存储的数据分布式存储到各个数据存储者节点205中。The data storage node 205 is a node having a distributed data storage capability. The data storage node 205 stores data in the nodes of the public chain in a distributed manner, and at the same time, can quickly query and synchronize the stored data through the digest index. Therefore, the storage space of the data storage node 205 needs to be larger than a preset storage space size. For example, the preset storage size is 20GB (GigaByte). When storing information, the data storage node 205 receives the storage request sent by the equity owner node 201. The storage request includes the data to be stored by the equity owner node 201, and then distributes the data to be stored according to the size of the data in the storage request. It is stored in each data storage node 205.
示例性地,权益所有者节点D在运行基于公链的一应用程序时,产生了100GB需要存储的数据。但权益所有者节点D自身只有5GB的储存空间,无法存储100GB的数据。此时,权益所有者节点D向数据存储者节点E发送存储请求。每个数据存储者节点至少有20GB的储存空间。此时,数据存储者节点E将100GB的数据分布式存储到5个数据存储者节点中,每个数据存储者节点存储20GB的数据。Exemplarily, when the equity owner node D runs an application based on the public chain, it generates 100 GB of data to be stored. However, the equity owner node D has only 5GB of storage space and cannot store 100GB of data. At this time, the equity owner node D sends a storage request to the data storage node E. Each data storage node has at least 20GB of storage space. At this time, the data storage node E stores 100 GB of data distributed to five data storage nodes, and each data storage node stores 20 GB of data.
通过数据存储者节点205,在公链20中提供分布式存储的能力,充分利用公链20中各个节点的储存空间,提高公链的运行效率。Through the data storage node 205, the distributed storage capability is provided in the public chain 20, the storage space of each node in the public chain 20 is fully utilized, and the operating efficiency of the public chain is improved.
公链服务提供者节点206,用于向接入链提供公链服务。该公链服务包括:查询公链的交易和智能合约,查询接入链的信息和交易摘要,创建子链,以及接入公链20外的应用程序链。A public chain service provider node 206 is used to provide a public chain service to an access chain. The public chain services include: querying the transactions and smart contracts of the public chain, querying the information and transaction summary of the access chain, creating sub-chains, and accessing the application chain outside the public chain 20.
将公链20外的应用程序提供接入公链20。应用程序想要接入公链20时,可以通过公链服务提供者节点206提供的智能合约进行相关程序的开发和部署,极大地缩短应用开发周期,降低部署难度,减少错误概率。同时,公链服务者节点206对区块链系统的接口做相应的整合。其中,整合的接口包括智能合约接口,应用可编程接口,网络接口和数据接口等。公链20外的应用程序可以基于这些接口接入公链的网络。Provide applications outside the public chain 20 to access the public chain 20. When an application wants to access the public chain 20, it can develop and deploy related programs through the smart contract provided by the public chain service provider node 206, which greatly shortens the application development cycle, reduces deployment difficulty, and reduces the probability of errors. At the same time, the public chain server node 206 integrates the interface of the blockchain system accordingly. Among them, the integrated interfaces include smart contract interfaces, application programmable interfaces, network interfaces and data interfaces. Applications outside the public chain 20 can access the public chain network based on these interfaces.
需要说明的是,上述实施例中对公链中节点进行角色划分是基于节点的功能,不同的功能对应不同的角色。当公链中的一个节点具有多种功能时,可以担任多个角色节点。例如,公链维护者节点同时具有权益所有者节点的功能,可以选取下一周期的公链维护者节点;监督者节点具有大于预设大小的储存空间,可以作为数据存储者节点提供数据存储的服务;平行链维护者节点被选取为公链维护者节点,同时维护公链和平行链。It should be noted that the role division of the nodes in the public chain in the above embodiments is based on the functions of the nodes, and different functions correspond to different roles. When a node in the public chain has multiple functions, it can serve multiple role nodes. For example, the public chain maintainer node also has the function of an equity owner node, and can select the public chain maintainer node in the next cycle; the supervisor node has a storage space larger than a preset size and can serve as a data storage node to provide data storage Service; the parachain maintainer node is selected as the public chain maintainer node, and both the public chain and the parachain are maintained.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily contemplate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that conform to the general principles of this disclosure and include the common general knowledge or conventional technical means in the technical field not disclosed by this disclosure. . It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise structure that has been described above and illustrated in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the disclosure is limited only by the following claims.

Claims (9)

  1. 一种区块链公链,包括具有有效地址且所持证通的数量不为零的权益所有者节点,其特征在于,所述公链还包括:由所述权益所有者节点每隔预设时间间隔从所述公链的节点中选取出来的公链维护者节点;A blockchain public chain includes an equity owner node having a valid address and the number of certificate holdings is not zero. The public chain further includes: by the equity owner node every preset time A public chain maintainer node selected from the nodes of the public chain at intervals;
    所述公链维护者节点,用于维护公链的交易、智能合约相关的公链事务。The public chain maintainer node is used to maintain public chain transactions and smart contract related public chain transactions.
  2. 根据权利要求1所述的公链,其特征在于,所述公链还包括:平行链节点,所述平行链节点为公链与接入所述公链的接入链的共有节点;其中,所述平行链节点中,包括由所述权益所有者节点从平行链节点中选取出的平行链维护者节点;The public chain according to claim 1, wherein the public chain further comprises: a parallel chain node, wherein the parallel chain node is a common node of the public chain and the access chain accessing the public chain; wherein, The parachain nodes include a parachain maintainer node selected from the parachain nodes by the equity owner node;
    所述平行链维护者节点,用于维护所述公链与所述接入链之间的相关跨链事务。The parallel chain maintainer node is configured to maintain related cross-chain transactions between the public chain and the access chain.
  3. 根据权利要求1或2所述的公链,其特征在于,所述公链,还包括:由未被选取为所述公链维护者节点的权益所有者节点转化的监督者节点;The public chain according to claim 1 or 2, wherein the public chain further comprises: a supervisor node transformed by an equity owner node that has not been selected as the maintainer node of the public chain;
    所述监督者节点,用于当接收所述公链的区块链时,检测所述区块链的区块是否有效,以及,当所述区块链的区块有效时,存储所述区块链,当所述区块链的区块无效时,丢弃所述区块链。The supervisor node is used to detect whether the block of the blockchain is valid when receiving the blockchain of the public chain, and to store the area when the block of the blockchain is valid Block chain, when the block of the block chain is invalid, the block chain is discarded.
  4. 根据权利要求3所述的公链,其特征在于,所述公链,还包括:The public chain according to claim 3, wherein the public chain further comprises:
    数据存储者节点,用于接收所述权益所有者节点发送的存储请求,所述存储请求包括所述权益所有者节点所要存储的数据,以及根据所述存储请求分布式存储所述权益所有者节点所要存储的数据。A data storage node, configured to receive a storage request sent by the equity owner node, the storage request including data to be stored by the equity owner node, and distributedly storing the equity owner node according to the storage request The data to be stored.
  5. 根据权利要求4所述的公链,其特征在于,所述公链,还包括:The public chain according to claim 4, wherein the public chain further comprises:
    公链服务提供者节点,用于向接入链提供公链服务,所述公链服务包括:查询所述公链的交易和智能合约,查询所述接入链的信息和交易摘要,创建子链,以及接入所述公链外的应用程序。A public chain service provider node is used to provide public chain services to an access chain. The public chain services include: querying transactions and smart contracts of the public chain, querying information and transaction summary of the access chain, and creating sub-chains. Chain, and access to applications outside the public chain.
  6. 根据权利要求5所述的公链,其特征在于,所述预设时间间隔的时长大于选取所述公链维护者节点所需的时长,以及小于攻破所述公链维护者所需的时长。The public chain according to claim 5, wherein the duration of the preset time interval is longer than the time required to select the maintainer node of the public chain and less than the time required to break the maintainer of the public chain.
  7. 根据权利要求6所述的公链,其特征在于:The public chain according to claim 6, characterized in that:
    所述权益所有者节点,用于获取每个候选节点的参选信息,所述参选信息包括节点标识,参选数据和抵押凭证,所述节点标识用于唯一指示一个候选节点,所述抵押凭证用于表示所述候选节点支付的证通数量,所述参选数据为用于提高所述公链维护者节点选取随机性的随机数;The equity owner node is used to obtain candidate information for each candidate node, the candidate information includes a node identifier, candidate data, and mortgage credentials, and the node identifier is used to uniquely indicate a candidate node, the mortgage The voucher is used to indicate the number of STOs paid by the candidate node, and the candidate data is a random number used to improve the randomness of the public chain maintainer node selection;
    根据所述候选节点的参选数据,在所述候选节点中确定所述公链维护者节点。According to the candidate data of the candidate node, the public chain maintainer node is determined among the candidate nodes.
  8. 根据权利要求7所述的公链,其特征在于,所述权益所有者节点,具体用于:The public chain according to claim 7, wherein the equity owner node is specifically configured to:
    将所述候选节点分为k组候选节点,每组包括M个候选节点;Classifying the candidate nodes into k groups of candidate nodes, each group including M candidate nodes;
    确定所述每个候选节点的参选数据在各自对应的一组候选节点中的离均差;Determining the mean deviation of the candidate data of each candidate node in a corresponding group of candidate nodes;
    根据所述离均差的大小,将每组候选节点各自的节点由大到小排序;Sort the nodes of each group of candidate nodes from large to small according to the magnitude of the mean deviation;
    选取所述每组候选节点中第
    Figure PCTCN2019101041-appb-100001
    个候选节点为所述公链维护者节点,其中,k'为一组候选节点在所述k组候选节点中的序号。
    Selecting the first node in each group of candidate nodes
    Figure PCTCN2019101041-appb-100001
    The candidate nodes are the public chain maintainer nodes, where k ′ is the sequence number of a group of candidate nodes in the k group of candidate nodes.
  9. 根据权利要求8所述的公链,其特征在于,所述公链维护者节点的数量的取值范围
    Figure PCTCN2019101041-appb-100002
    其中,n表示所述候选节点的数量。
    The public chain according to claim 8, wherein the value range of the number of the public chain maintainer nodes is
    Figure PCTCN2019101041-appb-100002
    Wherein, n represents the number of the candidate nodes.
PCT/CN2019/101041 2018-08-28 2019-08-16 Blockchain public chain WO2020042927A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201810986825.3 2018-08-28
CN201810986825 2018-08-28
CN201811497989.6 2018-12-07
CN201811497989.6A CN110868440B (en) 2018-08-28 2018-12-07 Block chain male chain

Publications (1)

Publication Number Publication Date
WO2020042927A1 true WO2020042927A1 (en) 2020-03-05

Family

ID=69644973

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/101041 WO2020042927A1 (en) 2018-08-28 2019-08-16 Blockchain public chain

Country Status (1)

Country Link
WO (1) WO2020042927A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918645A (en) * 2021-09-02 2022-01-11 上海柚子工道物联技术有限公司 Heterogeneous asset transaction system and method based on block chain and computer device
CN114615286A (en) * 2022-03-15 2022-06-10 上海万向区块链股份公司 Carbon-general service data circulation method and system based on cross-chain technology

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106372533A (en) * 2016-09-14 2017-02-01 中国银联股份有限公司 Block chain technology-based content storage method
CN107341660A (en) * 2017-05-27 2017-11-10 唐盛(北京)物联技术有限公司 A kind of block chain bottom common recognition mechanism and the block catenary system based on the common recognition mechanism
CN108173658A (en) * 2017-11-22 2018-06-15 中国互联网络信息中心 A kind of block chain consistency maintaining method and device
WO2018149505A1 (en) * 2017-02-17 2018-08-23 Nokia Technologies Oy Voting-consensus distributed ledger

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106372533A (en) * 2016-09-14 2017-02-01 中国银联股份有限公司 Block chain technology-based content storage method
WO2018149505A1 (en) * 2017-02-17 2018-08-23 Nokia Technologies Oy Voting-consensus distributed ledger
CN107341660A (en) * 2017-05-27 2017-11-10 唐盛(北京)物联技术有限公司 A kind of block chain bottom common recognition mechanism and the block catenary system based on the common recognition mechanism
CN108173658A (en) * 2017-11-22 2018-06-15 中国互联网络信息中心 A kind of block chain consistency maintaining method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
BAI J. ET. AL.: "The standard of blockchain applications model publication and deployment technologies research", INFORMATION AND NETWORK SECURITY, vol. 37, no. 8, 10 August 2018 (2018-08-10), pages 4 - 17 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918645A (en) * 2021-09-02 2022-01-11 上海柚子工道物联技术有限公司 Heterogeneous asset transaction system and method based on block chain and computer device
CN114615286A (en) * 2022-03-15 2022-06-10 上海万向区块链股份公司 Carbon-general service data circulation method and system based on cross-chain technology
CN114615286B (en) * 2022-03-15 2024-01-02 上海万向区块链股份公司 Cross-chain technology-based carbon universal service data flow method and system

Similar Documents

Publication Publication Date Title
CN110868440B (en) Block chain male chain
US11461310B2 (en) Distributed ledger technology
TWI694390B (en) Blockchain-based transaction processing method and device, and electronic equipment
US10884810B1 (en) Workload management using blockchain-based transaction deferrals
CN109034809B (en) Block chain generation method and device, block chain node and storage medium
US10853354B2 (en) Method of generating globally verifiable unique identifiers using a scalable interlinked blockchain structure
TWI691919B (en) Blockchain-based transaction processing method and device, and electronic equipment
US11336713B2 (en) Methods, devices and systems for a distributed coordination engine-based exchange that implements a blockchain distributed ledger
CN105630609B (en) Block chain packing storage method
US20190102163A1 (en) System and Method for a Blockchain-Supported Programmable Information Management and Data Distribution System
TW202105276A (en) Allocating virtual resource based on block chain
TWI724574B (en) Block chain-based accounting method and device, and electronic equipment
TW201945974A (en) Maintaining blocks of a blockchain in a partitioned blockchain network
TWI723357B (en) Remittance method, device, computer equipment and computer readable storage medium based on blockchain
JP2021503643A (en) Computer-readable storage media containing methods, devices, computer programs and computer programs for optimizing high-volume transaction performance on the blockchain.
JP2020530958A (en) Computer implementation systems and methods related to binary blockchains that make up a pair of combined blockchains
WO2020042927A1 (en) Blockchain public chain
WO2022134471A1 (en) Blockchain node management method and apparatus, computer device, and storage medium
CN110738783A (en) System, method, device, equipment and readable storage medium for updating voting data
WO2019243235A1 (en) Distributed ledger technology
EP4049214A1 (en) A method for analyzing data using a blockchain, a data provider and a data customer therefor
NL2026132B1 (en) Public chain of blockchain
WO2020042926A1 (en) Blockchain public chain maintenance method, device, node and blockchain public chain
CN111127151A (en) Method, equipment and medium for managing online order based on block chain
US20230121349A1 (en) Method for securing private structured databases within a public blockchain

Legal Events

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

Ref document number: 19855531

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19855531

Country of ref document: EP

Kind code of ref document: A1