WO2020173499A1 - Public chain-based sub-blockchain construction method and system - Google Patents

Public chain-based sub-blockchain construction method and system Download PDF

Info

Publication number
WO2020173499A1
WO2020173499A1 PCT/CN2020/078669 CN2020078669W WO2020173499A1 WO 2020173499 A1 WO2020173499 A1 WO 2020173499A1 CN 2020078669 W CN2020078669 W CN 2020078669W WO 2020173499 A1 WO2020173499 A1 WO 2020173499A1
Authority
WO
WIPO (PCT)
Prior art keywords
chain
sub
network
public
voting
Prior art date
Application number
PCT/CN2020/078669
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
Application filed by 白杰 filed Critical 白杰
Publication of WO2020173499A1 publication Critical patent/WO2020173499A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Definitions

  • Public chain-based blockchain sub-chain creation method and system This application is required to be submitted to the Chinese Patent Office on February 26, 2019, the application number is 201910141900. 0, the title of the invention is "Public chain-based sub-chain construction and application deployment method” , And the priority of a Chinese patent application filed with the Chinese Patent Office on July 22, 2019 with the application number 201910663012. 5. The title of the invention is "the method and system for creating a blockchain sub-chain based on the public chain”. The reference is incorporated in this application.
  • This application relates to the field of blockchain technology, and in particular to a method and system for creating a blockchain sub-chain based on a public chain. Background technique
  • the main task of blockchain technology is to create a relatively objective non-repudiation digital environment in accordance with the requirements of the decentralized system and based on public consensus.
  • the authenticity of network information can be guaranteed. For example, if a transaction occurs in the blockchain network, the nodes in the network will generate block data recording the transaction content based on the transaction information, and complete the block data. In network broadcasting, other nodes in the network store block data at the same time, forming an unchangeable blockchain.
  • a network based on blockchain technology is called a blockchain network system.
  • the blockchain network system consists of multiple node devices forming a P2P network.
  • the blockchain network can be divided into multiple sub-networks according to different business needs, and each sub-network is called a chain, such as public chains, private chains, industry chains, and alliance chains.
  • a chain such as public chains, private chains, industry chains, and alliance chains.
  • the establishment of a new chain can first deploy nodes to form a P2P network, and then configure consensus mechanisms and smart contracts in the nodes to enable nodes to participate in the transaction process in the new chain network, and then install transaction applications to adapt to the business of the new chain If necessary, finally verify the function and mechanism of the new chain network through the online test, and complete the chain.
  • the new chain built in the above-mentioned way requires independent configuration of network equipment, and the new chain built is very likely to be different from the existing blockchain network, resulting in the new chain being built cannot be docked with the own blockchain network. And because of the need to repeatedly debug in the process of node networking and testing, the speed of building a new chain is slow.
  • This application provides a method and system for creating a blockchain sub-chain based on a public chain to solve the problem that traditional creation methods have low scalability and cannot meet various business needs.
  • this application provides a method for creating a blockchain sub-chain based on a public chain, including:
  • the nodes in the public chain network develop and deploy sub-chain contracts, and some nodes execute the sub-chain contracts to form a sub-chain network; implement compatibility tests on the sub-chain network through the test network in the public chain network;
  • the sub-chain network that has completed and passed the compatibility test, through the public chain standard voting contract, initiates the deployment of the sub-chain voting transaction, and broadcasts the voting transaction in the public chain network;
  • the nodes in the public chain network feed back voting results according to the voting transactions, and generate a candidate list of child chain nodes according to the voting results;
  • the node in the candidate list of sub-chain nodes is docked with the public chain node to complete the chain.
  • sub-chain contract is a variety of preset transaction rules, including but not limited to: sub-chain block data structure, transaction consensus mechanism, certificate communication mechanism, and algorithm mechanism; developed and deployed by nodes in the public chain network
  • steps to form a sub-chain network include:
  • the nodes in the public chain network develop and deploy the sub-chain contract, and some nodes execute the sub-chain contract, and the steps of forming the sub-chain network further include:
  • the method further includes: creating an account corresponding to the sub-chain network in the public chain network;
  • the steps of implementing a compatibility test on the sub-chain network through the test network in the public chain network include: the test network creates a test certificate pass address in the sub-chain network;
  • comparing the test block data with a predefined block data template includes:
  • the test network generates public chain block data based on public chain standards as a block data template
  • the sub-chain network generates sub-chain block data based on the sub-chain standard
  • the sub-chain network passes the compatibility test.
  • the sub-chain network that has completed and passed the compatibility test through the voting contract of the public chain standard, initiates the sub-chain deployment voting transaction including:
  • the sub-chain network initiates a voting transaction through the voting contract of the public chain standard;
  • the voting transaction includes a preset number of public chain certificates paid by the project party;
  • the sub-chain network broadcasts the voting transaction to the public chain;
  • the node that receives the voting transaction generates a voting result for the voting transaction, and the voting result includes support and opposition;
  • the method further includes:
  • connecting the node in the candidate list of sub-chain nodes with the public chain node, and the steps of completing the chaining include:
  • the feedback voting result meets the preset voting requirement
  • the statistical voting result is that the number of supported nodes is greater than or equal to the second judgment threshold, and the feedback voting result meets the preset voting requirement.
  • this application also provides a public chain-based blockchain sub-chain creation system, including a public chain network in which nodes establish a P2P network connection with each other, and the public chain network nodes are configured to develop and deploy sub-chain contracts, Some nodes in the public chain network are configured to execute sub-chain contracts to form a sub-chain network; the public chain network includes a test network; the public chain network is further configured to perform the following program steps: through the public chain network The test network performs compatibility testing on the sub-chain network; the nodes in the public chain network feed back voting results according to the voting transactions, and generate a candidate list of sub-chain nodes according to the voting results; if the feedback voting results meet the preset voting requirements, Nodes in the candidate list of sub-chain nodes are docked with public chain nodes to complete the chain;
  • the sub-chain network is further configured to perform the following program steps: the sub-chain network that has completed and passed the compatibility test, initiates the sub-chain deployment voting transaction through the public-chain standard voting contract, and broadcasts the vote in the public-chain network transaction.
  • this application provides a method and system for creating a blockchain sub-chain based on a public chain.
  • the method can form a sub-chain network by developing a sub-chain contract by public chain nodes, and after completing the compatibility test, A voting transaction is initiated in the public chain network, and then according to the voting result, the sub-chain node is connected with the public chain node to complete the chain.
  • the method can use the existing public chain network to create a blockchain sub-chain network with new functions, and directly complete the docking of the sub-chain and the public chain through voting transactions.
  • the sub-chain creation speed is fast and the cost is low.
  • the created sub-chain network has both the functions of public chain and sub-chain, and the functions are independent of each other, and can realize free cross-chain transactions, improve the scalability of the new chain, and meet various business needs.
  • Figure 1 is a schematic flowchart of a method for creating a blockchain sub-chain based on a public chain in this application;
  • Figure 2 is a schematic diagram of the logic flow of the application method for creating a blockchain sub-chain
  • Figure 3 is a schematic diagram of the application compatibility test process
  • Figure 4 is a schematic diagram of the application process for comparing public chain block data
  • Figure 5 is a schematic diagram of the process of applying for voting transactions
  • FIG. 6 shows the Liu Yuanyi Pavilion for the initial exchange rate of the application for the birthday.
  • the blockchain network refers to a point-to-point (P2P) network with a decentralized application architecture, and the blockchain network can perform distributed storage, public consensus, digital encryption, transaction accounting, and verification. That is, a trading platform that covers distributed technology, cryptography, P2P network architecture, and various consensus algorithms that may be applied.
  • Blockchain or blockchain data refers to the accounting information generated according to transaction information when transactions occur in the blockchain network, that is, multiple specific transactions form a block, and multiple blocks form an ordered block chain.
  • the blockchain network includes nodes that establish a peer-to-peer network connection with each other.
  • Each node is equipped with a corresponding consensus mechanism, such as a smart contract, and has sufficient computing power to perform transaction verification and accounting procedures.
  • the node also has an interface specification that meets a certain unified standard to realize access to more nodes or other types of blockchain networks through the interface specification.
  • FIG. 1 is a schematic flowchart of a method for creating a blockchain sub-chain based on a public chain in this application.
  • Figure 2 is a schematic diagram of the logic flow of the method for creating a blockchain sub-chain of this application. It can be seen from Figure 1 and Figure 2 that the public chain-based blockchain sub-chain creation method provided by this application includes the following steps:
  • S1 The nodes in the public chain network develop and deploy sub-chain contracts, and some nodes execute the sub-chain contracts to form a sub-chain network.
  • the public chain is a public network established based on the same protocol, and the public chain includes multiple nodes for blockchain transaction verification, distributed accounting, etc.
  • the public chain network serves as a basic platform arranged in the entire network, and its node interfaces are connected to multiple blockchain networks, such as industry chains, alliance chains, and private chains built based on public connection interface specifications.
  • Each blockchain network can be used as a development platform and provide corresponding services within its network.
  • the public chain definition and specification have standard interfaces and methods to facilitate other blockchains for network connection.
  • the public chain in this application has the ability to support cross-chain intermediaries, as well as decentralized applications and smart contract capabilities.
  • the public chain provided in this application may be a blockchain public chain based on CNWW3, so as to obtain greater scalability and cross-chain performance.
  • some nodes in the public chain network can assemble a new blockchain network as needed.
  • This new blockchain network can carry out corresponding business expansion and customization on the basis of inheriting the capabilities of the public chain. Realize and deploy its own blockchain network in the fastest way to complete the needs of business access to the blockchain network.
  • the private chain, industry chain, and alliance chain can be called sub-chains, that is, the sub-chain is inheriting the capabilities of the public chain. Based on this, the business expansion and customization are carried out to complete the business access to the blockchain network.
  • nodes in the public chain can jointly create a sub-chain contract to agree on the transaction, verification, accounting and storage methods in the sub-chain network.
  • the sub-chain contract can also directly use the public chain contract without re-developing a complete contract form.
  • the basic capabilities that the sub-chain obtains from the public chain can include data storage capabilities, network capabilities, and basic blockchain platform capabilities, such as passwords and security, transactions, accounts, consensus, certificate communication, smart contracts, etc., basic blockchain Application capabilities, such as platform-based capabilities, development of business applications, etc., and cross-chain capabilities, such as supporting public chain cross-chain contracts and docking, one-step cross-chain, etc.
  • basic blockchain platform capabilities such as passwords and security, transactions, accounts, consensus, certificate communication, smart contracts, etc.
  • basic blockchain Application capabilities such as platform-based capabilities, development of business applications, etc.
  • cross-chain capabilities such as supporting public chain cross-chain contracts and docking, one-step cross-chain, etc.
  • the sub-chain can also make corresponding flexible definitions and extensions based on its own business and operational requirements. These redefinitions and extensions can be used as the content of the sub-chain contract. That is, the sub-chain contract is a variety of preset transaction rules, including but not limited to: sub-chain block data structure, transaction consensus mechanism, certificate communication mechanism, and algorithm mechanism. Therefore, the public chain network
  • the node developing the sub-chain contract in the public chain network further includes: defining the block data structure of the sub-chain network; or, reusing the block data structure of the public chain as the The block data structure of the sub-chain network.
  • the sub-chain may have a block structure independent of the public chain.
  • the sub-chain can be flexibly defined.
  • the packaging mechanism, period, number of transactions supported by the block, etc. can be flexibly customized.
  • the sub-chain can flexibly define the autonomous certificate communication mechanism, or directly follow the certificate communication mechanism of the public chain, and can also define the unlicensed communication sub-chain to target specific technical fields.
  • the algorithm mechanism of the sub-chain is mainly reflected in the password and security algorithm mechanism.
  • sub-chains can be flexibly selected.
  • security of data blocks such as access policies, can also be defined independently.
  • the account number and the corresponding password ellipse algorithm
  • the data query and access interface mechanism of the sub-chain can also be defined.
  • the open data query and access interface of the sub-chain can also provide corresponding public chain standard interfaces.
  • the overload mechanism is used to provide richer access and access capabilities.
  • the transaction mechanism of the sub-chain can be defined.
  • the sub-chain can be flexibly and independently defined through the sub-chain contract.
  • you can also define the smart contract support mode of the sub-chain select whether to support smart contracts, default smart contract types, smart contract operating environment, language and other functions.
  • the nodes in the public chain network develop and deploy the sub-chain contract, and some nodes execute the sub-chain contract, and the steps of forming the sub-chain network further include:
  • S102 Select the consensus mechanism of the sub-chain network, and select the digest algorithm, encryption algorithm, and decryption algorithm of the sub-chain block data.
  • the sub-chain network has an independent certificate communication mechanism
  • it is also necessary to define the number and distribution method of the certificate in the sub-chain network and after defining the number and distribution method of the certificate, select The consensus mechanism of the sub-chain network, and the digest algorithm and encryption/decryption algorithm of the selected sub-chain block data.
  • the selected digest algorithm SHA264 by default, can also be implemented independently. If there are corresponding privacy requirements for the data, the encryption and decryption algorithms and strategies of block data need to be implemented synchronously.
  • the nodes of the sub-chain may not use the nodes in the public chain as nodes, but adopt the newly added nodes to deploy the sub-chain network; or partly use the nodes in the public chain as nodes, and partly Use the newly added node as the node.
  • newly added nodes in order to inherit the functions and mechanisms of the public chain network, newly added nodes must undergo hardware testing before going online and pass the test before they can be added as new nodes. In essence, it can be regarded as an extension of the public chain network nodes, and the extended network nodes form a sub-chain network.
  • a series of interfaces such as inheritance or realization of sub-chain block data access and query in the sub-chain can be set; determine the transaction strategy, such as the minimum fee, Verification methods and other content; select smart contract options, smart contracts are supported by default, and include several types of basic smart contracts.
  • S2 Implement compatibility testing on the sub-chain network through the test network in the public chain network.
  • the test network can be a private network composed of some nodes in the public chain network.
  • the corresponding node can configure the corresponding test contract.
  • the data compatibility test can be carried out according to the interface specification and the network transmission specification defined by the sub-chain contract, for example, whether the sub-chain network can adapt to the public chain data transmission specification, etc.; on the other hand, it can be tested for the certificate exchange transaction.
  • the nodes in the chain network act as both sub-chain nodes and public chain nodes. Therefore, the test of certificate exchange transactions must include not only the sub-chain certificate exchange transaction test, but also the public chain certificate exchange transaction test, as well as cross-chain transactions. (I.e. between the sub-chain and the public chain) certificate exchange transaction test.
  • the steps of implementing a compatibility test on the sub-chain network through the test network in the public chain network include:
  • test network creates a test certificate pass address in the sub-chain network
  • S203 Create a test account in the sub-chain network, and transfer a preset number of test certificates to the test account to generate test block data;
  • a certificate pass address for testing can be created in the sub-chain network through the test network, and then a preset number of test pass addresses can be obtained from the sub-chain through the created pass address, where the test pass can be Sub-chain certificate pass or public chain certificate pass. Then create a test account through the sub-chain, and transfer the test certificate pass obtained before to the test account. Since this test transaction occurs between the test network and the sub-chain network, a block of data can be generated, that is, the test block Data, obviously, the generated test block data should conform to the preset block data format. Therefore, in this embodiment, the generated test data can be compared with the preset block data template. If the two forms are consistent, it means that the current sub-chain network has passed the compatibility test.
  • the sub-chain nodes of the sub-chain network are both sub-chain nodes and public chain nodes
  • the sub-chain nodes generally store both the sub-chain and public chain block data.
  • the compatibility test of the sub-chain mainly focuses on whether the sub-chain block data can meet the accounting requirements of the public chain, that is, whether it can be in accordance with the public chain. Generate data in the form of block data. Therefore, in the above test process, the preset block data template may be a block data format based on public chain transactions, so that after the compatibility test is passed, the sub-chain can directly synchronize the block data with the public chain.
  • the sub-chain can be used as a relatively independent block chain system, in this embodiment, if the transaction occurs within the scope of the sub-chain, the generated block data does not need to be synchronized with the public chain. There is no need to perform compatibility testing; and when a transaction occurs between the public chain and the sub-chain, a node must produce sub-chain-specific block data and public-chain-specific block data. At this time, the newly created sub-chain must To be tested for compatibility.
  • the step of comparing the test block data with the predefined block data template also includes the following specific comparison process:
  • test network generates public chain block data based on public chain standards as a block data template
  • S2042 The sub-chain network generates sub-chain block data based on the sub-chain standard
  • S2043 Compare the public chain block data with the sub-chain block data
  • the test network can first generate public chain block data based on public chain standards. Since the test network is a part of the public chain network, the public chain block data generated by the test network must meet the public chain block data Therefore, this embodiment can use the generated public chain block data as a block data template. Then through the sub-chain network, the sub-chain block data is generated according to the standards defined by the sub-chain contract. In the subsequent comparison process, the sub-chain block data and the public chain block data can be directly compared for consistency.
  • the compatibility test also includes the following content: sub-chain contract validity, reliability, security test; sub-chain inheritance public chain capability test (block, transaction, contract, account query, creation, verification, etc.) ); Sub-chain and public chain two-way transaction capability test (public chain to sub-chain transaction, sub-chain to public chain transaction); sub-chain security sandbox test, no impact on the public chain; if the sub-chain is connected to a third-party system or traditional Centralized networks require concurrent and repeated testing.
  • S3 The sub-chain network completed and passed the compatibility test, through the public chain standard voting contract, initiates the sub-chain deployment voting transaction, and broadcasts the voting transaction in the public chain network.
  • the sub-chain network that has completed and passed the compatibility test cannot be directly put into adaptation, but still needs The nodes in the public chain network vote and go online to the public chain network. Since the solution provided in this application requires multiple nodes in the public chain network to participate in voting, the blockchain network provided in this application is still a decentralized network system that conforms to the basics of blockchain technology. specification.
  • any one or more nodes in the sub-chain can jointly execute the voting contract to initiate a voting transaction.
  • the voting transaction is a special form of constraint transaction, which also needs to execute the corresponding smart contract in actual application, and also needs to generate block data according to the transaction result in the transaction process, and verify the transaction in the public chain network And distributed storage.
  • voting transactions also need to participate in voting nodes to feedback the voting results, that is, whether to agree to the online request of the sub-chain network.
  • the project parties of the sub-chains can also pay a certain amount of public chain certificates as voting fees, and give a certain number of public chain nodes that feedback the results in the voting transaction.
  • the public chain certificate token rewards are also paid.
  • the sub-chain network that has completed and passed the compatibility test, through the public chain standard voting contract, initiating the sub-chain deployment voting transaction includes:
  • the sub-chain network initiates a voting transaction through the voting contract of the public chain standard; the voting transaction includes a preset number of public chain certificates paid by the project party;
  • S302 The sub-chain network broadcasts the voting transaction to the public chain
  • S303 The node that has received the voting transaction generates a voting result for the voting transaction, and the voting result includes support and opposition;
  • the voting contract of the public chain standard can be used to initiate the sub-chain deployment voting.
  • the sub-chain project party actively initiates the vote and needs to pay the corresponding public chain pass to complete the vote.
  • the paid pass can include two parts, one is the smart contract execution fee, and the other part is for the nodes that are supported by subsequent votes. Voluntary commitment of transaction costs.
  • the voting transaction it is also possible to set the voting result of the feedback voting result as the voting fee of the supporting node, which is paid by the project party, and the feedback voting result is that the node fee is not paid by the project party, thereby prompting the nodes in the public chain Feedback voting results for voting transactions.
  • the subsequent chaining process of the sub-chain needs the support of the nodes in the public chain, that is, after the sub-chain is on the chain, the original public chain node must undertake the transaction verification and accounting functions in the sub-chain. Therefore, the nodes in the public chain Whether or not to agree to the sub-chain on the chain is not entirely dependent on the subjective will of the node manager, and certain requirements should be made on the hardware of the public chain node. Therefore, the public chain certificate payment paid by the project party can also be used as a reward for the public chain node to participate in the sub-chain.
  • S4 The nodes in the public chain network feed back voting results according to the voting transactions, and generate a candidate list of sub-chain nodes according to the voting results.
  • the node in the public chain after receiving the voting transaction, the node in the public chain can confirm whether to support the sub-link entry through a transaction; that is, the public chain node that supports the online sub-chain can feedback the voting result as support , The public chain node that opposes the online of the sub-chain will feedback the voting result as opposing. Since the public chain network is a blockchain network, the feedback results can be obtained by nodes in the public chain. Therefore, in this application, any node in the public chain can count the voting results, or vote for all participants through the voting contract. The voting results of the nodes feedback are counted.
  • the public chain nodes whose voting results are supported are fed back to the candidate list of sub-chain nodes, that is, in order to obtain the support of the public chain nodes during the subsequent online process of the sub-chain
  • the nodes whose voting results are supported as feedback can be entered into the subsequent sub-chain node candidate list by default.
  • the method further includes: configuring the sub-chain contract for the public chain node in the candidate list of sub-chain nodes.
  • the public chain nodes in the candidate list of sub-chain nodes can be understood as an expansion of the node scale of the sub-chain network. Therefore, after the nodes in the sub-chain node candidate list are linked to the public chain network, they also need to bear the sub-chain network. Therefore, the previously developed sub-chain contract can be configured for the public chain node in the candidate list of the sub-chain node, so that the node can adapt to the transaction form of the sub-chain network. Obviously, the configuration process of the above-mentioned sub-chain contract can be completed after the sub-chain is completed, so as to avoid redundant configuration of the public chain nodes when the sub-chain fails to pass the voting.
  • all nodes in the public chain network can receive voting transactions and feedback the voting results.
  • the waiting time for all public chain nodes to feedback the voting results is too long Therefore, when the voting result meets the preset requirements, the online process of the sub-chain can be completed to reduce the waiting time.
  • Specific voting requirements can be set according to the public chain. For example, when the public chain network is in its infancy stage, in order to expand the business scope of the public chain, the online threshold set by the voting requirements can be set low to quickly attract a large number of sub-chain networks.
  • the voting requirement can be that the number of public chain nodes that agree to go online accounts for more than 51% of the total number of public chain nodes.
  • the voting results can be weighted according to the specific application status and management methods of the public chain network. For example, the project parties of the public chain and the nodes related to the sub-chain function can have a larger weight to avoid partial The created sub-chain maliciously destroys the trading environment of the public chain.
  • connecting the node in the candidate list of sub-chain nodes with the public chain node, and the steps of completing the chaining include:
  • the voting results are calculated In order that the number of supported nodes is greater than or equal to the second judgment threshold, the feedback voting result meets the preset voting requirement.
  • the voting results can be counted in real time for voting transactions, and when the statistical results meet the preset voting requirements, voting ends.
  • two judgment thresholds can be set respectively to determine whether the voting result meets the voting requirements. That is, the sign of voting completion may be that the voting time has expired, or that there are already enough nodes to support access.
  • the remaining tokens paid by the sub-chain will be returned to the project party. However, regardless of whether the sub-chain is successfully or failed to go online to the public chain, the tokens that have been spent will not be refunded.
  • the method further includes:
  • S601 Create an account corresponding to the sub-chain network in the public chain network
  • S602 Transfer a preset number of sub-chain certificates and public chain certificates to the public chain through the created account
  • S603 Generate an initial exchange ratio according to the number of sub-chain certificates and the total number of certificates in the current public chain network
  • S604 Store the initial exchange ratio in the public chain network node and the sub-chain network node.
  • the sub-chain has a sub-chain certificate pass, you need to create an account corresponding to the sub-chain network in the public chain network.
  • the established account can be used to complete the transfer and subsequent mortgage, and then use the created account to transfer to the public chain.
  • the nodes in the sub-chain provide a preset number of sub-chain certificates and a corresponding number of public chain certificates through smart contracts provided by the public chain to determine the corresponding exchange ratio.
  • the sub-chain provides 1000 sub-chain certificates and 10 public-chain certificates at the same time, and the corresponding exchange ratio is determined to be 100:1. This part of the initial sub-chain certificates will be used as reserve certificates.
  • the smart contract can be called multiple times, and each invocation completes a pass-through exchange, and the corresponding exchange ratio can be updated through continuous exchange.
  • the sub-chain project party will confirm the deployed node list, that is, the node list composed of the public chain nodes that support the feedback during the voting process, and the confirmation is completed by executing the contract.
  • the sub-chain successfully docks with the public chain, completes the chaining, and the selected node will serve as the subsequent sub-chain node to provide corresponding services.
  • the method for creating a blockchain sub-chain can rely on the software architecture of the public chain, reuse the data network of the public chain, share data storage, and quickly establish its own blockchain network, that is, create a sub-chain.
  • This sub-chain creation method can effectively save the corresponding investment in terms of implementation and deployment costs and time. In some cases, it can also be used as a method of program testing and verification to quickly verify system programs, test system capabilities, and verify business requirements.
  • this application also provides a public chain-based blockchain sub-chain creation system, including a public chain network in which nodes establish a P2P network connection with each other, and the public chain network nodes are configured as Developing and deploying a sub-chain contract, some nodes in the public chain network are configured to develop a sub-chain contract to form a sub-chain network; the public chain network includes a test network;
  • the public chain network is further configured to perform the following procedural steps: implement compatibility testing on the sub-chain network through the test network in the public chain network; nodes in the public chain network feed back voting results according to the voting transaction, and according to the voting results Generate a candidate list of sub-chain nodes; if the feedback voting result meets the preset voting requirements, connect the nodes in the candidate list of sub-chain nodes with public chain nodes to complete the chain;
  • the sub-chain network is further configured to perform the following program steps: the sub-chain network that has completed and passed the compatibility test, initiates the sub-chain deployment voting transaction through the public-chain standard voting contract, and broadcasts the vote in the public-chain network transaction.
  • this application provides a method and system for creating a blockchain sub-chain based on a public chain.
  • the method can form a sub-chain network by developing a sub-chain contract by public chain nodes, and after completing the compatibility test, A voting transaction is initiated in the public chain network, and then according to the voting result, the sub-chain node is connected with the public chain node to complete the chain.
  • the method can use the existing public chain network to create a blockchain sub-chain network with new functions, and directly complete the docking of the sub-chain and the public chain through voting transactions.
  • the creation of the sub-chain is fast and the cost is low.
  • the created sub-chain network has both the functions of the public chain and the sub-chain, and the functions are independent of each other, and can realize free cross-chain transactions, improve the scalability of the new chain, and meet multiple business needs.

Abstract

A public chain-based sub-blockchain construction method and system. Said method comprises: a public chain node develops a sub-chain contract to form a sub-chain network; after completing a compatibility test, initiating a vote transaction in the public chain network, and according to the vote result, connecting a sub-chain node and a public chain node, and completing linking with the sub-chain. The method utilizes existing public chain networks, constructs a sub-blockchain network having new functions, and directly completes the connection between the sub-chain and the public chain by a vote transaction, so that the construction of a sub-chain is rapid and low-cost. The sub-chain network constructed has mutually independent functions of both public chains and sub-chains, enables free inter-chain transactions, enhances the extendibility of new chains, and satisfies requirements of different services.

Description

基于公链的区块链子链创建方法及系统 本申请要求在 2019年 2月 26日提交中国专利局、 申请号为 201910141900. 0、 发明名 称为“基于公链的子链搭建及应用部署方法”,以及在 2019年 7月 22日提交中国专利局、 申请号为 201910663012. 5、 发明名称为“基于公链的区块链子链创建方法及系统”的中国 专利申请的优先权, 其全部内容通过引用结合在本申请中。 Public chain-based blockchain sub-chain creation method and system This application is required to be submitted to the Chinese Patent Office on February 26, 2019, the application number is 201910141900. 0, the title of the invention is "Public chain-based sub-chain construction and application deployment method" , And the priority of a Chinese patent application filed with the Chinese Patent Office on July 22, 2019 with the application number 201910663012. 5. The title of the invention is "the method and system for creating a blockchain sub-chain based on the public chain". The reference is incorporated in this application.
技术领域 Technical field
本申请涉及区块链技术领域, 尤其涉及一种基于公链的区块链子链创建方法及系统。 背景技术 This application relates to the field of blockchain technology, and in particular to a method and system for creating a blockchain sub-chain based on a public chain. Background technique
区块链技术的主要任务, 是按照去中心化的系统要求, 基于公众共识的方式, 创建一 个相对客观的抗抵赖数字环境。 基于区块链技术, 可以保证网络信息的真实性, 例如, 区 块链网络中发生一笔交易, 网络中的节点会根据交易信息生成记载交易内容的区块数据, 并将区块数据进行全网广播, 网络中的其他节点同时存储区块数据, 形成不可更改的区块 链。 基于区块链技术组成的网络称为区块链网络系统, 区块链网络系统由多个节点设备组 成 P2P网络。 The main task of blockchain technology is to create a relatively objective non-repudiation digital environment in accordance with the requirements of the decentralized system and based on public consensus. Based on blockchain technology, the authenticity of network information can be guaranteed. For example, if a transaction occurs in the blockchain network, the nodes in the network will generate block data recording the transaction content based on the transaction information, and complete the block data. In network broadcasting, other nodes in the network store block data at the same time, forming an unchangeable blockchain. A network based on blockchain technology is called a blockchain network system. The blockchain network system consists of multiple node devices forming a P2P network.
在区块链网络中, 可根据不同的业务需要将区块链网络划分成多个子网络, 每个子网 络称为一个链, 例如公链、 私链、 行业链、 联盟链等。 根据实际业务需要, 还可以基于区 块链技术搭建新链, 即新的区块链平台。 由于区块链平台都是基于分布式技术, 密码学, 点对点网络, 及各种共识算法搭建的, 很多在技术上都属于非常新, 学习成本非常高, 因 此开发和部署一个区块链网络, 无论是在研发成本, 还是在时间成本上, 都需要较大的投 入。 In a blockchain network, the blockchain network can be divided into multiple sub-networks according to different business needs, and each sub-network is called a chain, such as public chains, private chains, industry chains, and alliance chains. According to actual business needs, it is also possible to build a new chain based on blockchain technology, that is, a new blockchain platform. Since blockchain platforms are built based on distributed technology, cryptography, peer-to-peer networks, and various consensus algorithms, many of them are very new in technology and the learning cost is very high. Therefore, the development and deployment of a blockchain network, Both in terms of R&D costs and time costs, large investments are required.
新链搭建可先通过部署节点, 组成 P2P网络, 再通过在节点中配置共识机制和智能合 约, 使节点能够参与新链网络中的交易过程, 再通过安装交易应用程序, 以适应新链的业 务需要, 最后通过上线测试对新链网络的功能和机制进行验证, 完成上链。 可见, 上述方 式搭建的新链需要自主配置网络设备, 搭建的新链极容易与现有的区块链网络之间存在差 异, 导致搭建的新链不能与己有的区块链网络完成对接。 并且由于在节点组网和测试过程 中需要反复进行调试, 导致新链搭建速度缓慢。 The establishment of a new chain can first deploy nodes to form a P2P network, and then configure consensus mechanisms and smart contracts in the nodes to enable nodes to participate in the transaction process in the new chain network, and then install transaction applications to adapt to the business of the new chain If necessary, finally verify the function and mechanism of the new chain network through the online test, and complete the chain. It can be seen that the new chain built in the above-mentioned way requires independent configuration of network equipment, and the new chain built is very likely to be different from the existing blockchain network, resulting in the new chain being built cannot be docked with the own blockchain network. And because of the need to repeatedly debug in the process of node networking and testing, the speed of building a new chain is slow.
为了与己有的区块链网络对接, 以及快速搭建新链, 还可以通过采用区块链网络节点 和全节点服务器在己有网络内组成一个子网, 并且依托全节点服务器搭建的多条通信链路 来访问区块链网络。 但这种搭建方式本质上是对现有网络节点的一种扩展, 新组建的网络 所具有的功能与己有的网络功能是完全相同的, 因此, 这种新链创建方式的扩展性低, 无 法满足多种业务需求。 In order to connect with the existing blockchain network and quickly build a new chain, it is also possible to form a subnet within the existing network by using blockchain network nodes and full-node servers, and rely on multiple communications built by the full-node servers Link to access the blockchain network. However, this method of construction is essentially an extension of existing network nodes. The functions of the newly established network are exactly the same as those of the existing network. Therefore, the scalability of this new chain creation method is low. Unable to meet multiple business needs.
发明内容 Summary of the invention
本申请提供了一种基于公链的区块链子链创建方法及系统, 以解决传统创建方法扩展 性低, 无法满足多种业务需求的问题。 一方面, 本申请提供一种基于公链的区块链子链创建方法, 包括: This application provides a method and system for creating a blockchain sub-chain based on a public chain to solve the problem that traditional creation methods have low scalability and cannot meet various business needs. On the one hand, this application provides a method for creating a blockchain sub-chain based on a public chain, including:
由公链网络中的节点开发部署子链合约, 由部分节点执行子链合约, 组成子链网络; 通过公链网络中的测试网络对子链网络实施兼容性测试; The nodes in the public chain network develop and deploy sub-chain contracts, and some nodes execute the sub-chain contracts to form a sub-chain network; implement compatibility tests on the sub-chain network through the test network in the public chain network;
完成并通过兼容性测试的子链网络, 通过公链标准的投票合约, 发起子链部署投票交 易, 以及在公链网络中广播所述投票交易; The sub-chain network that has completed and passed the compatibility test, through the public chain standard voting contract, initiates the deployment of the sub-chain voting transaction, and broadcasts the voting transaction in the public chain network;
公链网络中的节点根据所述投票交易反馈投票结果, 以及根据投票结果生成子链节点 候选列表; The nodes in the public chain network feed back voting results according to the voting transactions, and generate a candidate list of child chain nodes according to the voting results;
如果反馈的投票结果满足预设投票要求, 将所述子链节点候选列表中的节点与公链节 点对接, 完成上链。 If the feedback voting result meets the preset voting requirements, the node in the candidate list of sub-chain nodes is docked with the public chain node to complete the chain.
可选的, 所述子链合约为预设的多种交易规则, 包括但不限于: 子链区块数据结构、 交易共识机制、 证通机制以及算法机制; 由公链网络中的节点开发部署子链合约, 组成子 链网络的步骤包括: Optionally, the sub-chain contract is a variety of preset transaction rules, including but not limited to: sub-chain block data structure, transaction consensus mechanism, certificate communication mechanism, and algorithm mechanism; developed and deployed by nodes in the public chain network Sub-chain contract, the steps to form a sub-chain network include:
定义子链网络的区块数据结构; Define the block data structure of the sub-chain network;
或者, 复用所述公链的区块数据结构作为所述子链网络的区块数据结构。 Or, reuse the block data structure of the public chain as the block data structure of the sub-chain network.
可选的, 由公链网络中的节点开发部署子链合约, 由部分节点执行子链合约, 组成子 链网络的步骤还包括: Optionally, the nodes in the public chain network develop and deploy the sub-chain contract, and some nodes execute the sub-chain contract, and the steps of forming the sub-chain network further include:
如果所述子链网络有独立的证通机制, 定义所述子链网络的证通数量和分配方式; 选定子链网络共识机制, 以及选定子链区块数据的摘要算法、加密算法以及解密算法。 可选的, 如果所述子链网络有独立的证通机制, 在完成上链前, 所述方法还包括: 在公链网络中创建子链网络对应的账号; If the sub-chain network has an independent certificate communication mechanism, define the number and distribution method of the certificate communication of the sub-chain network; select the consensus mechanism of the sub-chain network, and select the digest algorithm and encryption algorithm of the sub-chain block data, and Decryption algorithm. Optionally, if the sub-chain network has an independent certificate communication mechanism, before completing the chaining, the method further includes: creating an account corresponding to the sub-chain network in the public chain network;
通过创建的账号向公链转账预设数量的子链证通和公链证通; Transfer a preset number of sub-chain certificates and public chain certificates to the public chain through the created account;
根据所述子链证通数量和当前公链网络中的全部公链证通数量, 生成初始兑换比率; 在公链网络节点和子链网络节点中存储所述初始兑换比率。 Generate an initial conversion ratio according to the number of sub-chain tokens and the number of all public-chain tokens in the current public chain network; store the initial conversion ratio in the public chain network node and the sub-chain network node.
可选的, 通过公链网络中的测试网络对子链网络实施兼容性测试的步骤包括: 测试网络在子链网络中创建测试证通地址; Optionally, the steps of implementing a compatibility test on the sub-chain network through the test network in the public chain network include: the test network creates a test certificate pass address in the sub-chain network;
根据所述测试证通地址获取预设数量的测试证通; Obtain a preset number of test pass addresses according to the test pass address;
在所述子链网络中创建测试账户, 以及向所述测试账户转账预设数量的测试证通, 以 生成测试区块数据; Creating a test account in the sub-chain network, and transferring a preset number of test certificate passes to the test account to generate test block data;
对比所述测试区块数据与区块数据模板, 若一致, 则通过兼容性测试。 Compare the test block data with the block data template, and if they are consistent, the compatibility test is passed.
可选的, 对比所述测试区块数据与预定义区块数据模板包括: Optionally, comparing the test block data with a predefined block data template includes:
测试网络基于公链标准生成公链区块数据, 作为区块数据模板; The test network generates public chain block data based on public chain standards as a block data template;
子链网络基于子链标准生成子链区块数据; The sub-chain network generates sub-chain block data based on the sub-chain standard;
对比所述公链区块数据与所述子链区块数据; Comparing the public chain block data with the sub-chain block data;
如果所述公链区块数据与所述子链区块数据一致, 所述子链网络通过兼容性测试。 可选的, 完成并通过兼容性测试的子链网络, 通过公链标准的投票合约, 发起子链部 署投票交易包括: If the public chain block data is consistent with the sub-chain block data, the sub-chain network passes the compatibility test. Optionally, the sub-chain network that has completed and passed the compatibility test, through the voting contract of the public chain standard, initiates the sub-chain deployment voting transaction including:
子链网络通过公链标准的投票合约发起投票交易; 所述投票交易中包括由项目方支付 的预设数量公链证通; The sub-chain network initiates a voting transaction through the voting contract of the public chain standard; the voting transaction includes a preset number of public chain certificates paid by the project party;
所述子链网络向所述公链广播所述投票交易; 接收到所述投票交易的节点针对所述投票交易生成投票结果, 所述投票结果包括支持 和反对; The sub-chain network broadcasts the voting transaction to the public chain; The node that receives the voting transaction generates a voting result for the voting transaction, and the voting result includes support and opposition;
根据投票合约, 向投票结果为支持的节点转账预设数量的公链证通。 According to the voting contract, transfer a preset number of public chain certificates to the nodes whose voting results are supported.
可选的, 根据投票结果生成子链节点候选列表的步骤中, 反馈投票结果为支持的公链 节点添加至子链节点候选列表, 所述方法还包括: Optionally, in the step of generating the candidate list of child chain nodes according to the voting results, feeding back the public chain nodes supported by the voting result to be added to the candidate list of child chain nodes, the method further includes:
为所述子链节点候选列表中的公链节点配置所述子链合约。 Configure the sub-chain contract for the public chain nodes in the candidate list of sub-chain nodes.
可选的, 如果反馈的投票结果满足预设投票要求, 将所述子链节点候选列表中的节点 与公链节点对接, 完成上链的步骤包括: Optionally, if the feedback voting result meets the preset voting requirements, connecting the node in the candidate list of sub-chain nodes with the public chain node, and the steps of completing the chaining include:
统计反馈的投票结果; Statistical feedback of voting results;
如果统计投票结果为支持的节点数量大于或等于第一判断阈值, 反馈的投票结果满足 预设投票要求; If the statistical voting result is that the number of supported nodes is greater than or equal to the first judgment threshold, the feedback voting result meets the preset voting requirement;
或者, 在发起投票交易的预设投票截止时间内, 统计投票结果为支持的节点数量大于 或等于第二判断阈值, 反馈的投票结果满足预设投票要求。 Or, within the preset voting deadline for initiating a voting transaction, the statistical voting result is that the number of supported nodes is greater than or equal to the second judgment threshold, and the feedback voting result meets the preset voting requirement.
另一方面, 本申请还提供一种基于公链的区块链子链创建系统, 包括节点之间相互建 立 P2P网络连接的公链网络, 所述公链网络节点被配置为开发部署子链合约, 所述公链网 络中的部分节点被配置为执行子链合约, 组成子链网络; 所述公链网络包括测试网络; 所述公链网络被进一步配置为执行以下程序步骤: 通过公链网络中的测试网络对子链 网络实施兼容性测试; 公链网络中的节点根据所述投票交易反馈投票结果, 以及根据投票 结果生成子链节点候选列表; 如果反馈的投票结果满足预设投票要求, 将所述子链节点候 选列表中的节点与公链节点对接, 完成上链; On the other hand, this application also provides a public chain-based blockchain sub-chain creation system, including a public chain network in which nodes establish a P2P network connection with each other, and the public chain network nodes are configured to develop and deploy sub-chain contracts, Some nodes in the public chain network are configured to execute sub-chain contracts to form a sub-chain network; the public chain network includes a test network; the public chain network is further configured to perform the following program steps: through the public chain network The test network performs compatibility testing on the sub-chain network; the nodes in the public chain network feed back voting results according to the voting transactions, and generate a candidate list of sub-chain nodes according to the voting results; if the feedback voting results meet the preset voting requirements, Nodes in the candidate list of sub-chain nodes are docked with public chain nodes to complete the chain;
所述子链网络被进一步配置为执行以下程序步骤: 完成并通过兼容性测试的子链网络, 通过公链标准的投票合约,发起子链部署投票交易, 以及在公链网络中广播所述投票交易。 The sub-chain network is further configured to perform the following program steps: the sub-chain network that has completed and passed the compatibility test, initiates the sub-chain deployment voting transaction through the public-chain standard voting contract, and broadcasts the vote in the public-chain network transaction.
由以上技术方案可知, 本申请提供一种基于公链的区块链子链创建方法及系统, 所述 方法可通过公链节点开发子链合约组成子链网络, 并且在完成兼容性测试后, 在公链网络 中发起投票交易, 再根据投票结果, 使子链节点与公链节点上线对接, 完成上链。 所述方 法可以利用己有的公链网络, 创建具有新功能的区块链子链网络, 并通过投票交易直接完 成子链和公链的对接, 子链的创建速度快, 成本低。 所创建的子链网络同时具备公链和子 链的功能, 具备的功能相互独立, 并可以实现自由跨链交易, 提高新链的扩展性, 能够满 足多种业务需求。 It can be seen from the above technical solutions that this application provides a method and system for creating a blockchain sub-chain based on a public chain. The method can form a sub-chain network by developing a sub-chain contract by public chain nodes, and after completing the compatibility test, A voting transaction is initiated in the public chain network, and then according to the voting result, the sub-chain node is connected with the public chain node to complete the chain. The method can use the existing public chain network to create a blockchain sub-chain network with new functions, and directly complete the docking of the sub-chain and the public chain through voting transactions. The sub-chain creation speed is fast and the cost is low. The created sub-chain network has both the functions of public chain and sub-chain, and the functions are independent of each other, and can realize free cross-chain transactions, improve the scalability of the new chain, and meet various business needs.
附图说明 Description of the drawings
为了更清楚地说明本申请的技术方案, 下面将对实施例中所需要使用的附图作简单地 介绍, 显而易见地, 对于本领域普通技术人员而言, 在不付出创造性劳动的前提下, 还可 以根据这些附图获得其他的附图。 In order to explain the technical solution of the present application more clearly, the following will briefly introduce the drawings that need to be used in the embodiments. Obviously, for those of ordinary skill in the art, without creative work, Other drawings can be obtained from these drawings.
图 1为本申请一种基于公链的区块链子链创建方法的流程示意图; Figure 1 is a schematic flowchart of a method for creating a blockchain sub-chain based on a public chain in this application;
图 2为本申请区块链子链创建方法的逻辑流程示意图; Figure 2 is a schematic diagram of the logic flow of the application method for creating a blockchain sub-chain;
图 3为本申请兼容性测试的流程示意图; Figure 3 is a schematic diagram of the application compatibility test process;
图 4为本申请对比公链区块数据的流程示意图; Figure 4 is a schematic diagram of the application process for comparing public chain block data;
图 5为本申请投票交易的流程示意图; Figure 5 is a schematic diagram of the process of applying for voting transactions;
图 6为本申请生辰初始兑换比率的流 沄意阁。 具体实施方式 Figure 6 shows the Liu Yuanyi Pavilion for the initial exchange rate of the application for the birthday. detailed description
下面将详细地对实施例进行说明, 其示例表示在附图中。 下面的描述涉及附图时, 除 非另有表示, 不同附图中的相同数字表示相同或相似的要素。 以下实施例中描述的实施方 式并不代表与本申请相一致的所有实施方式。 仅是与权利要求书中所详述的、 本申请的一 些方面相一致的系统和方法的示例。 The embodiments will be described in detail below, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following examples do not represent all implementation manners consistent with this application. It is only an example of a system and method consistent with some aspects of the present application as detailed in the claims.
在本申请提供的技术方案中, 区块链网络是指具有去中心化应用架构的点对点 (P2P) 网络, 所述区块链网络能够进行分布式存储、 公共共识、 数字加密、 交易记账以及验证。 即涵盖了分布式技术、密码学、 P2P网络架构以及各种可能被应用的共识算法的交易平台。 区块链或区块链数据是指在区块链网络中发生交易时, 根据交易信息生成的记账信息, 即 多笔具体的交易组成一个区块, 多个区块形成一条有序区块链。 In the technical solution provided by this application, the blockchain network refers to a point-to-point (P2P) network with a decentralized application architecture, and the blockchain network can perform distributed storage, public consensus, digital encryption, transaction accounting, and verification. That is, a trading platform that covers distributed technology, cryptography, P2P network architecture, and various consensus algorithms that may be applied. Blockchain or blockchain data refers to the accounting information generated according to transaction information when transactions occur in the blockchain network, that is, multiple specific transactions form a block, and multiple blocks form an ordered block chain.
区块链网络中, 包括相互建立点对点网络连接的节点, 每一个节点都配置有相应的共 识机制, 如智能合约, 并且具有足够的运算能力, 以进行交易验证和记账程序。 节点上还 具有符合某种统一标准的接口规范, 以实现通过接口规范接入更多的节点或者其他类型的 区块链网络。 The blockchain network includes nodes that establish a peer-to-peer network connection with each other. Each node is equipped with a corresponding consensus mechanism, such as a smart contract, and has sufficient computing power to perform transaction verification and accounting procedures. The node also has an interface specification that meets a certain unified standard to realize access to more nodes or other types of blockchain networks through the interface specification.
参见图 1, 为本申请一种基于公链的区块链子链创建方法的流程示意图。 参见图 2, 为本申请区块链子链创建方法的逻辑流程示意图。 由图 1、 图 2可知, 本申请提供的基于 公链的区块链子链创建方法, 包括以下步骤: Refer to Figure 1, which is a schematic flowchart of a method for creating a blockchain sub-chain based on a public chain in this application. See Figure 2, which is a schematic diagram of the logic flow of the method for creating a blockchain sub-chain of this application. It can be seen from Figure 1 and Figure 2 that the public chain-based blockchain sub-chain creation method provided by this application includes the following steps:
S1: 由公链网络中的节点开发部署子链合约, 由部分节点执行子链合约, 组成子链网 络。 S1: The nodes in the public chain network develop and deploy sub-chain contracts, and some nodes execute the sub-chain contracts to form a sub-chain network.
本申请提供的技术方案中, 所述公链是基于同一个协议而建立的公共网络, 公链中包 含多个节点, 以进行区块链交易验证、 分布记账等。 所述公链网络作为布置在全网的基础 平台, 其节点接口接入多个区块链网络, 如基于公链接口规范搭建的行业链、 联盟链以及 私有链。每个区块链网络可以作为一个开发平台,并为其网络内部提供相应的服务。其中, 公链定义和规范有标准的接口和方式, 以便于其他区块链, 进行网络对接。 本申请中公链 具有支持跨链中介的能力,还具有去中心化的应用和智能合约化能力。本申请提供的公链, 可以是基于 CNWW3形式的区块链公链, 从而获得更大的扩展性和跨链性能。 In the technical solution provided by this application, the public chain is a public network established based on the same protocol, and the public chain includes multiple nodes for blockchain transaction verification, distributed accounting, etc. The public chain network serves as a basic platform arranged in the entire network, and its node interfaces are connected to multiple blockchain networks, such as industry chains, alliance chains, and private chains built based on public connection interface specifications. Each blockchain network can be used as a development platform and provide corresponding services within its network. Among them, the public chain definition and specification have standard interfaces and methods to facilitate other blockchains for network connection. The public chain in this application has the ability to support cross-chain intermediaries, as well as decentralized applications and smart contract capabilities. The public chain provided in this application may be a blockchain public chain based on CNWW3, so as to obtain greater scalability and cross-chain performance.
实际应用中, 公链网络中的部分节点可以根据需要自行组件一个新的区块链网络, 这 个新的区块链网络可以在继承公链能力的基础上, 进行相应的业务扩展和定制, 能以最快 速的方式实现和部署自有的区块链网络,完成业务接入区块链网络的需求。上述子网络中, 如果相互建立网络连接的私链、 行业链、 联盟链与公链的标准相同, 该私链、 行业链、 联 盟链可称为子链, 即子链是在继承公链能力的基础上, 进行的业务扩展和定制, 完成业务 接入区块链网络的需求。 In actual applications, some nodes in the public chain network can assemble a new blockchain network as needed. This new blockchain network can carry out corresponding business expansion and customization on the basis of inheriting the capabilities of the public chain. Realize and deploy its own blockchain network in the fastest way to complete the needs of business access to the blockchain network. In the above-mentioned sub-networks, if the private chain, industry chain, alliance chain and public chain that establish network connections with each other have the same standards, the private chain, industry chain, and alliance chain can be called sub-chains, that is, the sub-chain is inheriting the capabilities of the public chain. Based on this, the business expansion and customization are carried out to complete the business access to the blockchain network.
根据不同的业务需要, 公链中的节点可以共同创建一个子链合约, 以此来约定子链网 络中的交易、 验证、 记账和存储方式。 显然, 子链合约也可以无需重新开发一个完整的合 约形式, 而直接沿用公链合约。 According to different business needs, nodes in the public chain can jointly create a sub-chain contract to agree on the transaction, verification, accounting and storage methods in the sub-chain network. Obviously, the sub-chain contract can also directly use the public chain contract without re-developing a complete contract form.
在技术层面, 子链获得公链的基础能力可以包括数据存储能力, 网络能力, 基础区块 链平台能力, 例如密码和安全、 交易、 账户、 共识、 证通、 智能合约等, 基础区块链应用 能力, 例如基于平台能力、 开发业务应用等, 以及, 跨链能力, 例如支持公链的跨链合约 和对接, 一步跨链等。 显然, 子链继承的公链的能力, 都是区块链网络中最基础, 同时也 是开发和实施难度最大的部分, 因此, 通过这种继承公链能力的方式, 可以有效的降低区 块链应用开发和部署的难度。 At the technical level, the basic capabilities that the sub-chain obtains from the public chain can include data storage capabilities, network capabilities, and basic blockchain platform capabilities, such as passwords and security, transactions, accounts, consensus, certificate communication, smart contracts, etc., basic blockchain Application capabilities, such as platform-based capabilities, development of business applications, etc., and cross-chain capabilities, such as supporting public chain cross-chain contracts and docking, one-step cross-chain, etc. Obviously, the capabilities of the public chain inherited by the child chain are the most basic of the blockchain It is the most difficult part of development and implementation. Therefore, this way of inheriting public chain capabilities can effectively reduce the difficulty of blockchain application development and deployment.
进一步地, 子链在继承公链基础能力的基础上, 还可以基于自身的业务和运营需求, 做相应的灵活定义和扩展,这些重新定义和扩展的内容,即可以作为子链合约的内容。即, 所述子链合约为预设的多种交易规则,包括但不限于:子链区块数据结构、交易共识机制、 证通机制以及算法机制等规则约定形式, 因此, 由公链网络中的节点开发子链合约, 由公 链网络中的节点开发部署子链合约的步骤还包括: 定义子链网络的区块数据结构; 或者, 复用所述公链的区块数据结构作为所述子链网络的区块数据结构。 Further, on the basis of inheriting the basic capabilities of the public chain, the sub-chain can also make corresponding flexible definitions and extensions based on its own business and operational requirements. These redefinitions and extensions can be used as the content of the sub-chain contract. That is, the sub-chain contract is a variety of preset transaction rules, including but not limited to: sub-chain block data structure, transaction consensus mechanism, certificate communication mechanism, and algorithm mechanism. Therefore, the public chain network The node developing the sub-chain contract in the public chain network further includes: defining the block data structure of the sub-chain network; or, reusing the block data structure of the public chain as the The block data structure of the sub-chain network.
本实施例中, 对于子链区块数据结构, 子链可以有独立于公链的区块结构。 对于共识 机制, 可以从 POW、 P0S或者自主实现中进行选择, 但无论是 P0W还是 P0S, 或者其他的共 识方式, 子链均可以灵活定义。 同时, 对于打包机制, 周期, 区块支持的交易数等, 均可 以灵活定制。 对于证通机制, 子链可以灵活定义自主证通机制, 也可以直接沿用公链的证 通机制, 还可以定义无证通子链, 以针对特定的技术领域。 In this embodiment, for the sub-chain block data structure, the sub-chain may have a block structure independent of the public chain. For the consensus mechanism, you can choose from POW, POS or independent implementation, but whether it is POW or POS, or other consensus methods, the sub-chain can be flexibly defined. At the same time, the packaging mechanism, period, number of transactions supported by the block, etc., can be flexibly customized. For the certificate communication mechanism, the sub-chain can flexibly define the autonomous certificate communication mechanism, or directly follow the certificate communication mechanism of the public chain, and can also define the unlicensed communication sub-chain to target specific technical fields.
对于子链的算法机制, 主要体现在密码和安全算法机制上。 其中, 在密码学上, 特别 是在摘要 hash等算法上, 子链可以灵活选择。 同时, 对于数据区块的安全性, 比如访问 策略等, 也可以自主定义。 需要说明的是, 账号以及对应的密码 (椭圆算法), 从公链整 体安全性考虑, 只能使用公链机制。 The algorithm mechanism of the sub-chain is mainly reflected in the password and security algorithm mechanism. Among them, in cryptography, especially in algorithms such as digest hash, sub-chains can be flexibly selected. At the same time, the security of data blocks, such as access policies, can also be defined independently. It should be noted that the account number and the corresponding password (ellipse algorithm), in view of the overall security of the public chain, can only use the public chain mechanism.
本实施例中, 还可以对子链的数据查询和访问接口机制进行定义, 本实施例中, 子链 开放的数据查询和访问接口,在除了实现公链标准接口之外,也可以提供相应的重载机制, 用于提供更为丰富的接入和访问能力。 并且, 可以对子链的交易机制进行定义, 对于交易 的策略, 方式, 费用, 以及验证, 多重签名等内容, 子链均可以通过子链合约灵活自主定 义。 另外, 还可对子链的智能合约支持方式进行定义, 选定是否支持智能合约, 缺省智能 合约类型, 智能合约运行环境, 语言等等功能。 In this embodiment, the data query and access interface mechanism of the sub-chain can also be defined. In this embodiment, the open data query and access interface of the sub-chain can also provide corresponding public chain standard interfaces. The overload mechanism is used to provide richer access and access capabilities. In addition, the transaction mechanism of the sub-chain can be defined. For the transaction strategy, method, cost, verification, multi-signature, etc., the sub-chain can be flexibly and independently defined through the sub-chain contract. In addition, you can also define the smart contract support mode of the sub-chain, select whether to support smart contracts, default smart contract types, smart contract operating environment, language and other functions.
在本申请的部分实施例中, 由公链网络中的节点开发部署子链合约, 由部分节点执行 子链合约, 组成子链网络步骤还包括: In some embodiments of the present application, the nodes in the public chain network develop and deploy the sub-chain contract, and some nodes execute the sub-chain contract, and the steps of forming the sub-chain network further include:
S101: 如果所述子链网络有独立的证通机制, 定义所述子链网络的证通数量和分配方 式; S101: If the sub-chain network has an independent certificate exchange mechanism, define the number of certificates and the distribution method of the sub-chain network;
S102: 选定子链网络共识机制, 以及选定子链区块数据的摘要算法、 加密算法以及解 密算法。 S102: Select the consensus mechanism of the sub-chain network, and select the digest algorithm, encryption algorithm, and decryption algorithm of the sub-chain block data.
实际应用中, 如果子链网络有独立的证通机制, 在开发子链合约的同时, 还需要定义 子链网络中的证通数量和分配方式, 以及在定义证通数量和分配方式后, 选定子链网络的 共识机制, 和选定子链区块数据的摘要算法、 加密 /解密算法。 其中, 选定摘要算法, 默 认为 SHA264, 也可以进行自主实现。 如果对于数据有相应的私密要求, 则需要同步实现区 块数据的加解密算法以及策略。 In practical applications, if the sub-chain network has an independent certificate communication mechanism, while developing the sub-chain contract, it is also necessary to define the number and distribution method of the certificate in the sub-chain network, and after defining the number and distribution method of the certificate, select The consensus mechanism of the sub-chain network, and the digest algorithm and encryption/decryption algorithm of the selected sub-chain block data. Among them, the selected digest algorithm, SHA264 by default, can also be implemented independently. If there are corresponding privacy requirements for the data, the encryption and decryption algorithms and strategies of block data need to be implemented synchronously.
需要说明的是, 在实际应用中, 子链的节点也可以不采用公链中的节点作为节点, 而 采用新加入节点的方式布置子链网络; 或者部分采用公链中的节点作为节点, 部分采用新 加入节点作为节点。 但为了继承公链网络的功能和机制, 新加入的节点要在上线前进行硬 件检测, 并通过测试, 才能作为新的节点加入。 其本质上可以看做是对公链网络节点的扩 展, 再由扩展的网络节点组成子链网络。 此外, 在开发子链合约的过程中, 除定义上述功能外, 还可以设定子链中继承或者实 现子链区块数据的访问, 查询等一系列接口; 确定交易的策略, 如最低费用, 验证方式等 内容; 选定智能合约选项, 默认支持智能合约, 且包含几类基本智能合约等。 It should be noted that, in practical applications, the nodes of the sub-chain may not use the nodes in the public chain as nodes, but adopt the newly added nodes to deploy the sub-chain network; or partly use the nodes in the public chain as nodes, and partly Use the newly added node as the node. However, in order to inherit the functions and mechanisms of the public chain network, newly added nodes must undergo hardware testing before going online and pass the test before they can be added as new nodes. In essence, it can be regarded as an extension of the public chain network nodes, and the extended network nodes form a sub-chain network. In addition, in the process of developing sub-chain contracts, in addition to defining the above functions, a series of interfaces such as inheritance or realization of sub-chain block data access and query in the sub-chain can be set; determine the transaction strategy, such as the minimum fee, Verification methods and other content; select smart contract options, smart contracts are supported by default, and include several types of basic smart contracts.
S2: 通过公链网络中的测试网络对子链网络实施兼容性测试。 S2: Implement compatibility testing on the sub-chain network through the test network in the public chain network.
在子链合约的开发工作完成后, 可以通过公链网络中的测试网络来验证子链的功能和 机制, 即完成 TestNet兼容性测试。 测试网络可以是由公链网络中的部分节点构成的专用 网络。 在测试网络中, 对应的节点可以配置相应的测试合约。 一方面, 能够根据接口规范 和子链合约定义的网络传输规范进行数据兼容性测试, 例如, 子链网络是否能够适应公链 数据传输规范等; 另一方面, 能够针对证通交易进行测试, 由于子链网络中的节点既作为 子链节点, 又作为公链节点, 因此关于证通交易的测试不仅要包括子链证通交易测试, 还 包括公链证通交易测试,另外还需要包括跨链交易(即子链与公链之间)的证通交易测试。 After the development of the sub-chain contract is completed, the function and mechanism of the sub-chain can be verified through the test network in the public chain network, that is, the TestNet compatibility test is completed. The test network can be a private network composed of some nodes in the public chain network. In the test network, the corresponding node can configure the corresponding test contract. On the one hand, the data compatibility test can be carried out according to the interface specification and the network transmission specification defined by the sub-chain contract, for example, whether the sub-chain network can adapt to the public chain data transmission specification, etc.; on the other hand, it can be tested for the certificate exchange transaction. The nodes in the chain network act as both sub-chain nodes and public chain nodes. Therefore, the test of certificate exchange transactions must include not only the sub-chain certificate exchange transaction test, but also the public chain certificate exchange transaction test, as well as cross-chain transactions. (I.e. between the sub-chain and the public chain) certificate exchange transaction test.
即在本申请的部分实施例中, 如图 3所示, 通过公链网络中的测试网络对子链网络实 施兼容性测试的步骤包括: That is, in some embodiments of the present application, as shown in FIG. 3, the steps of implementing a compatibility test on the sub-chain network through the test network in the public chain network include:
S201: 测试网络在子链网络中创建测试证通地址; S201: The test network creates a test certificate pass address in the sub-chain network;
S202: 根据所述测试证通地址获取预设数量的测试证通; S202: Obtain a preset number of test pass addresses according to the test pass address;
S203: 在所述子链网络中创建测试账户, 以及向所述测试账户转账预设数量的测试证 通, 以生成测试区块数据; S203: Create a test account in the sub-chain network, and transfer a preset number of test certificates to the test account to generate test block data;
S204: 对比所述测试区块数据与区块数据模板, 若一致, 则通过兼容性测试。 S204: Compare the test block data with the block data template, and if they are consistent, pass the compatibility test.
实际应用中, 可以通过测试网络在子链网络中创建一个应用于测试的证通地址, 再通 过创建的证通地址从子链中获取预设数量的测试证通, 其中, 测试证通可以是子链证通或 公链证通。 再通过子链创建一个测试账户, 并向这个测试账户转账之前获取的测试证通, 由于这个测试交易是发生在测试网络与子链网络之间, 因此可以生成一个区块数据, 即测 试区块数据, 显然, 生成的测试区块数据应符合预设的区块数据形式。 因此, 在本实施例 中, 可以将生成的测试数据与预设的区块数据模板进行对比, 如果两者的形式一致, 则表 示当前子链网络通过兼容性测试。 In practical applications, a certificate pass address for testing can be created in the sub-chain network through the test network, and then a preset number of test pass addresses can be obtained from the sub-chain through the created pass address, where the test pass can be Sub-chain certificate pass or public chain certificate pass. Then create a test account through the sub-chain, and transfer the test certificate pass obtained before to the test account. Since this test transaction occurs between the test network and the sub-chain network, a block of data can be generated, that is, the test block Data, obviously, the generated test block data should conform to the preset block data format. Therefore, in this embodiment, the generated test data can be compared with the preset block data template. If the two forms are consistent, it means that the current sub-chain network has passed the compatibility test.
本申请提供的技术方案中, 由于子链网络的节点既作为子链节点同时也是公链节点, 因此, 子链节点中一般要同时存储有子链和公链的区块数据。 为了在后续交易过程中, 子 链可以直接向公链同步区块数据, 因此对子链兼容性进行测试的主要针对子链区块数据是 否能够符合公链记账要求, 即是否能够按照公链的区块数据形式生成数据。 因此, 上述测 试过程中, 预设的区块数据模板可以是基于公链交易的区块数据形式, 以使兼容性测试通 过后, 子链能够直接向公链同步区块数据。 In the technical solution provided in this application, since the nodes of the sub-chain network are both sub-chain nodes and public chain nodes, the sub-chain nodes generally store both the sub-chain and public chain block data. In order for the sub-chain to directly synchronize the block data with the public chain in the subsequent transaction process, the compatibility test of the sub-chain mainly focuses on whether the sub-chain block data can meet the accounting requirements of the public chain, that is, whether it can be in accordance with the public chain. Generate data in the form of block data. Therefore, in the above test process, the preset block data template may be a block data format based on public chain transactions, so that after the compatibility test is passed, the sub-chain can directly synchronize the block data with the public chain.
需要说明的是, 由于子链可作为一个相对独立的区块链系统, 因此在本实施例中, 如 果交易是发生在子链范围内, 则产生的区块数据可以不必向公链同步, 也就无需进行兼容 性测试; 而当交易发生在公链和子链之间, 则一个节点中必然要产生子链规范的区块数据 和公链规范的区块数据, 此时新创建的子链必须要进行兼容性测试。 It should be noted that since the sub-chain can be used as a relatively independent block chain system, in this embodiment, if the transaction occurs within the scope of the sub-chain, the generated block data does not need to be synchronized with the public chain. There is no need to perform compatibility testing; and when a transaction occurs between the public chain and the sub-chain, a node must produce sub-chain-specific block data and public-chain-specific block data. At this time, the newly created sub-chain must To be tested for compatibility.
进一步地, 如图 4所示, 对比所述测试区块数据与预定义区块数据模板的步骤, 还包 括以下具体的对比过程: Further, as shown in FIG. 4, the step of comparing the test block data with the predefined block data template also includes the following specific comparison process:
S2041: 测试网络基于公链标准生成公链区块数据, 作为区块数据模板; S2041: The test network generates public chain block data based on public chain standards as a block data template;
S2042: 子链网络基于子链标准生成子链区块数据; S2043: 对比所述公链区块数据与所述子链区块数据; S2042: The sub-chain network generates sub-chain block data based on the sub-chain standard; S2043: Compare the public chain block data with the sub-chain block data;
S2044: 如果所述公链区块数据与所述子链区块数据一致, 所述子链网络通过兼容性 测试。 S2044: If the public chain block data is consistent with the sub-chain block data, the sub-chain network passes the compatibility test.
在实际应用中, 可以先通过测试网络基于公链标准生成公链区块数据, 由于测试网络 是公链网络的部分节点, 由测试网络生成的公链区块数据, 必然满足公链区块数据规范, 因此, 本实施例可以将生成的公链区块数据作为区块数据模板。 再通过子链网络根据子链 合约定义的标准再生成子链区块数据, 而在后续对比过程中, 直接将子链区块数据与公链 区块数据进行一致性对比即可。 In practical applications, the test network can first generate public chain block data based on public chain standards. Since the test network is a part of the public chain network, the public chain block data generated by the test network must meet the public chain block data Therefore, this embodiment can use the generated public chain block data as a block data template. Then through the sub-chain network, the sub-chain block data is generated according to the standards defined by the sub-chain contract. In the subsequent comparison process, the sub-chain block data and the public chain block data can be directly compared for consistency.
需要说明的是,兼容性测试还包括如下内容:子链合约有效性,可靠性,安全性测试; 子链继承公链能力测试 (区块, 交易, 合约, 账号的查询, 创建, 验证等功能); 子链与 公链双向交易能力测试 (公链向子链交易, 子链向公链交易); 子链安全性沙盒测试, 对 于公链没有影响; 如果子链对接第三方系统或传统中心化网络, 则需要进行并发和重复测 试。 It should be noted that the compatibility test also includes the following content: sub-chain contract validity, reliability, security test; sub-chain inheritance public chain capability test (block, transaction, contract, account query, creation, verification, etc.) ); Sub-chain and public chain two-way transaction capability test (public chain to sub-chain transaction, sub-chain to public chain transaction); sub-chain security sandbox test, no impact on the public chain; if the sub-chain is connected to a third-party system or traditional Centralized networks require concurrent and repeated testing.
S3: 完成并通过兼容性测试的子链网络, 通过公链标准的投票合约, 发起子链部署投 票交易, 以及在公链网络中广播所述投票交易。 S3: The sub-chain network completed and passed the compatibility test, through the public chain standard voting contract, initiates the sub-chain deployment voting transaction, and broadcasts the voting transaction in the public chain network.
实际应用中, 为了便于对新创建的子链进行管理, 例如: 区块数据存储方式、 新链功 能注册等, 完成并通过兼容性测试的子链网络并不可以直接投放适应, 而是仍需要公链网 络中的节点进行投票, 以上线到公链网络。 由于本申请提供的方案在实施投票时, 需要公 链网络中的多个节点进行参与, 因此本申请提供的区块链网络依然是一种去中心化的网络 系统, 符合区块链技术的基本规范。 In actual applications, in order to facilitate the management of newly created sub-chains, such as: block data storage method, new chain function registration, etc., the sub-chain network that has completed and passed the compatibility test cannot be directly put into adaptation, but still needs The nodes in the public chain network vote and go online to the public chain network. Since the solution provided in this application requires multiple nodes in the public chain network to participate in voting, the blockchain network provided in this application is still a decentralized network system that conforms to the basics of blockchain technology. specification.
具体地,在子链通过测试后,可以由子链中的任意一个或多个节点共同执行投票合约, 从而发起投票交易。 所述投票交易是一种特殊约束形式交易, 其在实际应用中也需要执行 对应的智能合约, 并且在交易过程中也需要根据交易结果生成区块数据, 并且在公链网络 内对交易进行验证和分布式存储。 但投票交易在满足上述交易过程的基础上, 还需要参与 投票的节点反馈投票结果, 即是否同意该子链网络的上线请求。 同时, 为了促进公链中的 参与节点及时完成投票交易, 还可以由子链的项目方支付一定数量的公链证通作为投票的 费用, 并且针对在投票交易中反馈结果的公链节点给予一定数量的公链证通奖励。 Specifically, after the sub-chain passes the test, any one or more nodes in the sub-chain can jointly execute the voting contract to initiate a voting transaction. The voting transaction is a special form of constraint transaction, which also needs to execute the corresponding smart contract in actual application, and also needs to generate block data according to the transaction result in the transaction process, and verify the transaction in the public chain network And distributed storage. However, on the basis of satisfying the above-mentioned transaction process, voting transactions also need to participate in voting nodes to feedback the voting results, that is, whether to agree to the online request of the sub-chain network. At the same time, in order to promote the timely completion of voting transactions by participating nodes in the public chain, the project parties of the sub-chains can also pay a certain amount of public chain certificates as voting fees, and give a certain number of public chain nodes that feedback the results in the voting transaction. The public chain certificate token rewards.
即在本申请的部分实施例中, 如图 5所示, 完成并通过兼容性测试的子链网络, 通过 公链标准的投票合约, 发起子链部署投票交易包括: That is, in some embodiments of this application, as shown in FIG. 5, the sub-chain network that has completed and passed the compatibility test, through the public chain standard voting contract, initiating the sub-chain deployment voting transaction includes:
S301: 子链网络通过公链标准的投票合约发起投票交易; 所述投票交易中包括由项目 方支付的预设数量公链证通; S301: The sub-chain network initiates a voting transaction through the voting contract of the public chain standard; the voting transaction includes a preset number of public chain certificates paid by the project party;
S302: 所述子链网络向所述公链广播所述投票交易; S302: The sub-chain network broadcasts the voting transaction to the public chain;
S303: 接收到所述投票交易的节点针对所述投票交易生成投票结果, 所述投票结果包 括支持和反对; S303: The node that has received the voting transaction generates a voting result for the voting transaction, and the voting result includes support and opposition;
S304: 根据投票合约, 向投票结果为支持的节点转账预设数量的公链证通。 S304: According to the voting contract, transfer a preset number of public chain certificates to nodes whose voting results are supported.
由以上步骤可知, 当相关开发工作己经完成并完成测试, 则可以通过公链标准的投票 合约, 发起子链部署投票。 首先, 子链项目方主动发起该投票, 需要支付相应的公链证通 完成该投票, 支付的证通可以包含两个部分, 一部分是智能合约执行费用, 另外一部分是 对后续投票支持的节点的交易费用的主动承担。 并且, 在投票交易中, 还可以设定反馈投票结果为支持的节点的投票费用, 由项目方 支付, 而反馈的投票结果为反对的节点费用不是由项目方支付, 从而促使公链中的节点针 对投票交易反馈投票结果。 另外, 由于后期子链的上链过程需要公链中节点的支持, 即子 链上链后, 原本的公链节点要承担子链中的交易验证、 记账功能, 因此, 公链中的节点是 否同意该子链上链也不完全取决于节点管理者的主观意愿, 还应对公链节点的硬件作出一 定的要求。 因此, 项目方支付的公链证通, 还可以作为公链节点参与子链上链的奖励。 From the above steps, it can be seen that when the relevant development work has been completed and the test is completed, the voting contract of the public chain standard can be used to initiate the sub-chain deployment voting. First of all, the sub-chain project party actively initiates the vote and needs to pay the corresponding public chain pass to complete the vote. The paid pass can include two parts, one is the smart contract execution fee, and the other part is for the nodes that are supported by subsequent votes. Voluntary commitment of transaction costs. Moreover, in the voting transaction, it is also possible to set the voting result of the feedback voting result as the voting fee of the supporting node, which is paid by the project party, and the feedback voting result is that the node fee is not paid by the project party, thereby prompting the nodes in the public chain Feedback voting results for voting transactions. In addition, since the subsequent chaining process of the sub-chain needs the support of the nodes in the public chain, that is, after the sub-chain is on the chain, the original public chain node must undertake the transaction verification and accounting functions in the sub-chain. Therefore, the nodes in the public chain Whether or not to agree to the sub-chain on the chain is not entirely dependent on the subjective will of the node manager, and certain requirements should be made on the hardware of the public chain node. Therefore, the public chain certificate payment paid by the project party can also be used as a reward for the public chain node to participate in the sub-chain.
S4: 公链网络中的节点根据所述投票交易反馈投票结果, 以及根据投票结果生成子链 节点候选列表。 S4: The nodes in the public chain network feed back voting results according to the voting transactions, and generate a candidate list of sub-chain nodes according to the voting results.
本申请提供的技术方案中, 公链中的节点在接收到该投票交易后, 可以通过交易的方 式确认是否支持该子链接入; 即支持该子链上线的公链节点可以反馈投票结果为支持, 反 对该子链上线的公链节点则反馈投票结果为反对。 由于公链网络是区块链网络, 因此反馈 的结果均可以被公链中的节点获得, 因此, 本申请可以由公链中的任意节点统计该投票结 果, 也可以通过投票合约对所有参与投票的节点反馈的投票结果进行统计。 In the technical solution provided by this application, after receiving the voting transaction, the node in the public chain can confirm whether to support the sub-link entry through a transaction; that is, the public chain node that supports the online sub-chain can feedback the voting result as support , The public chain node that opposes the online of the sub-chain will feedback the voting result as opposing. Since the public chain network is a blockchain network, the feedback results can be obtained by nodes in the public chain. Therefore, in this application, any node in the public chain can count the voting results, or vote for all participants through the voting contract. The voting results of the nodes feedback are counted.
进一步地, 根据投票结果生成子链节点候选列表的步骤中, 反馈投票结果为支持的公 链节点添加至子链节点候选列表, 即为了在后续子链上线的过程中,得到公链节点的支持, 本申请中反馈投票结果为支持的节点, 可以默认进入后续的子链节点候选列表。 并且, 所 述方法还包括: 为所述子链节点候选列表中的公链节点配置所述子链合约。 Further, in the step of generating the candidate list of sub-chain nodes according to the voting results, the public chain nodes whose voting results are supported are fed back to the candidate list of sub-chain nodes, that is, in order to obtain the support of the public chain nodes during the subsequent online process of the sub-chain In this application, the nodes whose voting results are supported as feedback can be entered into the subsequent sub-chain node candidate list by default. And, the method further includes: configuring the sub-chain contract for the public chain node in the candidate list of sub-chain nodes.
子链节点候选列表中的公链节点, 可以理解为是对子链网络节点规模的扩充, 因此子 链节点候选列表中的节点在子链上链到公链网络以后, 还需要承担子链网络中的交易验证、 记账过程, 因此可以为子链节点候选列表中的公链节点配置之前开发的子链合约, 以使该 节点能够适应子链网络的交易形式。 显然, 上述子链合约的配置过程可以在子链完成上链 以后, 以避免子链在没有通过投票时, 对公链节点的多余配置。 The public chain nodes in the candidate list of sub-chain nodes can be understood as an expansion of the node scale of the sub-chain network. Therefore, after the nodes in the sub-chain node candidate list are linked to the public chain network, they also need to bear the sub-chain network. Therefore, the previously developed sub-chain contract can be configured for the public chain node in the candidate list of the sub-chain node, so that the node can adapt to the transaction form of the sub-chain network. Obviously, the configuration process of the above-mentioned sub-chain contract can be completed after the sub-chain is completed, so as to avoid redundant configuration of the public chain nodes when the sub-chain fails to pass the voting.
S5: 如果反馈的投票结果满足预设投票要求, 将所述子链节点候选列表中的节点与公 链节点对接, 完成上链。 S5: If the feedback voting result meets the preset voting requirements, connect the node in the candidate list of sub-chain nodes with the public chain node to complete the chain.
本申请提供的技术方案中, 原则上公链网络中的所有节点都能够接收到投票交易, 并 反馈投票结果, 但由于公链网络的规模庞大, 所有公链节点都反馈投票结果的等待时间过 长, 因此可以在投票结果满足预设要求时, 即完成子链的上线过程, 以减小等待时间。 具 体的投票要求, 可以根据公链情况进行设定。 例如, 公链网络处于刚刚投入阶段时, 为了 拓展公链的业务领域范围, 可以将投票要求制定的上线门槛设置的较低, 以快速吸引大量 的子链网络。 In the technical solution provided by this application, in principle, all nodes in the public chain network can receive voting transactions and feedback the voting results. However, due to the large scale of the public chain network, the waiting time for all public chain nodes to feedback the voting results is too long Therefore, when the voting result meets the preset requirements, the online process of the sub-chain can be completed to reduce the waiting time. Specific voting requirements can be set according to the public chain. For example, when the public chain network is in its infancy stage, in order to expand the business scope of the public chain, the online threshold set by the voting requirements can be set low to quickly attract a large number of sub-chain networks.
示例地, 投票要求可以为同意上线的公链节点数量占公链节点总数量的 51%以上。 另 外, 还可以根据公链网络的具体应用状态和管理方式, 对投票结果进行加权计算, 例如公 链的项目方, 以及与子链功能相关的节点, 可以拥有更大的权值, 以避免部分创建的子链 恶意破坏公链的交易环境。 For example, the voting requirement can be that the number of public chain nodes that agree to go online accounts for more than 51% of the total number of public chain nodes. In addition, the voting results can be weighted according to the specific application status and management methods of the public chain network. For example, the project parties of the public chain and the nodes related to the sub-chain function can have a larger weight to avoid partial The created sub-chain maliciously destroys the trading environment of the public chain.
进一步地, 如果反馈的投票结果满足预设投票要求, 将所述子链节点候选列表中的节 点与公链节点对接, 完成上链的步骤包括: Further, if the feedback voting result meets the preset voting requirement, connecting the node in the candidate list of sub-chain nodes with the public chain node, and the steps of completing the chaining include:
统计反馈的投票结果; 如果统计投票结果为支持的节点数量大于或等于第一判断阈值, 反馈的投票结果满足预设投票要求; 或者, 在发起投票交易的预设投票截止时间内, 统计 投票结果为支持的节点数量大于或等于第二判断阈值, 反馈的投票结果满足预设投票要求。 实际应用中, 可以针对投票交易实时对投票结果进行统计, 当统计的结果达到预设投 票要求时, 结束投票。 为了提高子链的上线效率, 可以分别设置两个判断阈值来确定投票 结果是否满足投票要求。 即投票完成的标志可以为投票时间到期, 或者, 己经有足够节点 支持接入。 另外, 在投票结束后, 子链己支付的剩余证通退回项目方。 但无论子链上线到 公链成功还是失败, 己花费的证通不会退回。 Count the feedback voting results; if the statistic voting result is that the number of nodes supported is greater than or equal to the first judgment threshold, the feedback voting result meets the preset voting requirements; or, within the preset voting deadline for initiating a voting transaction, the voting results are calculated In order that the number of supported nodes is greater than or equal to the second judgment threshold, the feedback voting result meets the preset voting requirement. In practical applications, the voting results can be counted in real time for voting transactions, and when the statistical results meet the preset voting requirements, voting ends. In order to improve the online efficiency of the sub-chain, two judgment thresholds can be set respectively to determine whether the voting result meets the voting requirements. That is, the sign of voting completion may be that the voting time has expired, or that there are already enough nodes to support access. In addition, after the voting ends, the remaining tokens paid by the sub-chain will be returned to the project party. However, regardless of whether the sub-chain is successfully or failed to go online to the public chain, the tokens that have been spent will not be refunded.
在本申请的部分实施例中, 如图 6所示, 如果所述子链网络有独立的证通机制, 在完 成上链前, 所述方法还包括: In some embodiments of the present application, as shown in FIG. 6, if the sub-chain network has an independent certificate communication mechanism, before completing the chaining, the method further includes:
S601: 在公链网络中创建子链网络对应的账号; S601: Create an account corresponding to the sub-chain network in the public chain network;
S602: 通过创建的账号向公链转账预设数量的子链证通和公链证通; S602: Transfer a preset number of sub-chain certificates and public chain certificates to the public chain through the created account;
S603: 根据所述子链证通数量和当前公链网络中的全部公链证通数量, 生成初始兑换 比率; S603: Generate an initial exchange ratio according to the number of sub-chain certificates and the total number of certificates in the current public chain network;
S604: 在公链网络节点和子链网络节点中存储所述初始兑换比率。 S604: Store the initial exchange ratio in the public chain network node and the sub-chain network node.
当投票成功后, 如果子链为有子链证通, 需要先在公链网络中创建子链网络对应的账 号, 建立的账号可以用于完成转账和后续抵押, 再通过创建的账号向公链转账预设数量的 子链证通和公链证通则子链, 即进行证通抵押,确定子链证通和公链证通的初始兑换比率, 以及, 确保子链后续跨链及其他应用场景下的证通流转和兑换。 在本实施例中, 初始情况 下, 子链中的节点, 通过公链提供的智能合约, 提供预设数量的子链证通, 以及相应数量 的公链证通, 以确定对应的兑换比率。 例如, 子链提供 1000个子链证通, 同时提供 10个 公链证通, 确定对应的兑换比率为 100: 1, 这部分初始的子链证通会作为储备性证通。 在 后续应用中, 智能合约可以多次调用, 每次调用即完成一次证通兑换, 进而可以通过不停 的兑换, 进行相应的兑换比率更新。 After the vote is successful, if the sub-chain has a sub-chain certificate pass, you need to create an account corresponding to the sub-chain network in the public chain network. The established account can be used to complete the transfer and subsequent mortgage, and then use the created account to transfer to the public chain. Transfer a preset number of sub-chain certificate tokens and public chain certificate sub-chains, that is, carry out certificate token mortgage, determine the initial exchange ratio of sub-chain certificate tokens and public chain certificate tokens, and ensure the subsequent cross-chain and other application scenarios of the sub-chain Circulation and exchange of certificates under the license. In this embodiment, in the initial situation, the nodes in the sub-chain provide a preset number of sub-chain certificates and a corresponding number of public chain certificates through smart contracts provided by the public chain to determine the corresponding exchange ratio. For example, the sub-chain provides 1000 sub-chain certificates and 10 public-chain certificates at the same time, and the corresponding exchange ratio is determined to be 100:1. This part of the initial sub-chain certificates will be used as reserve certificates. In subsequent applications, the smart contract can be called multiple times, and each invocation completes a pass-through exchange, and the corresponding exchange ratio can be updated through continuous exchange.
证通抵押完成后, 子链项目方将确认部署的节点列表, 即在投票过程中反馈投票结果 表示支持的公链节点组成的节点列表, 通过执行合约的方式完成确认。 上述步骤完成后, 子链成功对接公链, 完成上链, 选定的节点将作为后续的子链节点提供相应的服务。 After the token pass mortgage is completed, the sub-chain project party will confirm the deployed node list, that is, the node list composed of the public chain nodes that support the feedback during the voting process, and the confirmation is completed by executing the contract. After the above steps are completed, the sub-chain successfully docks with the public chain, completes the chaining, and the selected node will serve as the subsequent sub-chain node to provide corresponding services.
由以上技术方案可知, 本申请提供的区块链子链创建方法, 可以依托于公链的软件架 构, 复用公链的数据网络, 共享数据存储, 快速建立自有区块链网络, 即创建子链网络。 该子链创建方法无论是在实施和部署成本, 还是时间上, 都能有效地节省相应的投入。 在 某些情况下, 也可以作为方案测试和验证的一种方式, 用于快速检验系统方案, 测试系统 能力, 验证业务需求。 It can be seen from the above technical solutions that the method for creating a blockchain sub-chain provided by this application can rely on the software architecture of the public chain, reuse the data network of the public chain, share data storage, and quickly establish its own blockchain network, that is, create a sub-chain. Chain network. This sub-chain creation method can effectively save the corresponding investment in terms of implementation and deployment costs and time. In some cases, it can also be used as a method of program testing and verification to quickly verify system programs, test system capabilities, and verify business requirements.
基于上述区块链子链的创建方法, 本申请还提供一种基于公链的区块链子链创建系统, 包括节点之间相互建立 P2P网络连接的公链网络, 所述公链网络节点被配置为开发部署子 链合约, 所述公链网络中的部分节点被配置为开发子链合约, 组成子链网络; 所述公链网 络包括测试网络; Based on the foregoing method for creating blockchain sub-chains, this application also provides a public chain-based blockchain sub-chain creation system, including a public chain network in which nodes establish a P2P network connection with each other, and the public chain network nodes are configured as Developing and deploying a sub-chain contract, some nodes in the public chain network are configured to develop a sub-chain contract to form a sub-chain network; the public chain network includes a test network;
所述公链网络被进一步配置为执行以下程序步骤: 通过公链网络中的测试网络对子链 网络实施兼容性测试; 公链网络中的节点根据所述投票交易反馈投票结果, 以及根据投票 结果生成子链节点候选列表; 如果反馈的投票结果满足预设投票要求, 将所述子链节点候 选列表中的节点与公链节点对接, 完成上链; The public chain network is further configured to perform the following procedural steps: implement compatibility testing on the sub-chain network through the test network in the public chain network; nodes in the public chain network feed back voting results according to the voting transaction, and according to the voting results Generate a candidate list of sub-chain nodes; if the feedback voting result meets the preset voting requirements, connect the nodes in the candidate list of sub-chain nodes with public chain nodes to complete the chain;
所述子链网络被进一步配置为执行以下程序步骤: 完成并通过兼容性测试的子链网络, 通过公链标准的投票合约,发起子链部署投票交易, 以及在公链网络中广播所述投票交易。 由以上技术方案可知, 本申请提供一种基于公链的区块链子链创建方法及系统, 所述 方法可通过公链节点开发子链合约组成子链网络, 并且在完成兼容性测试后, 在公链网络 中发起投票交易, 再根据投票结果, 使子链节点与公链节点上线对接, 完成上链。 所述方 法可以利用己有的公链网络, 创建具有新功能的区块链子链网络, 并通过投票交易直接完 成子链和公链的对接, 子链的创建速度快, 成本低。 所创建的子链网络同时具备公链和子 链的功能, 具备的功能相互独立, 并可以实现自由跨链交易, 提高新链的扩展性, 能够满 足多种业务需求。 The sub-chain network is further configured to perform the following program steps: the sub-chain network that has completed and passed the compatibility test, initiates the sub-chain deployment voting transaction through the public-chain standard voting contract, and broadcasts the vote in the public-chain network transaction. It can be seen from the above technical solutions that this application provides a method and system for creating a blockchain sub-chain based on a public chain. The method can form a sub-chain network by developing a sub-chain contract by public chain nodes, and after completing the compatibility test, A voting transaction is initiated in the public chain network, and then according to the voting result, the sub-chain node is connected with the public chain node to complete the chain. The method can use the existing public chain network to create a blockchain sub-chain network with new functions, and directly complete the docking of the sub-chain and the public chain through voting transactions. The creation of the sub-chain is fast and the cost is low. The created sub-chain network has both the functions of the public chain and the sub-chain, and the functions are independent of each other, and can realize free cross-chain transactions, improve the scalability of the new chain, and meet multiple business needs.
本申请提供的实施例之间的相似部分相互参见即可, 以上提供的具体实施方式只是本 申请总的构思下的几个示例, 并不构成本申请保护范围的限定。 对于本领域的技术人员而 言, 在不付出创造性劳动的前提下依据本申请方案所扩展出的任何其他实施方式都属于本 申请的保护范围。 The similar parts between the embodiments provided in this application can be referred to each other. The specific implementation manners provided above are only a few examples under the general idea of this application, and do not constitute a limitation of the protection scope of this application. For those skilled in the art, any other implementation manners expanded according to the scheme of this application on the premise of not paying creative work belong to the protection scope of this application.

Claims

权 利 要 求 书 Claims
1、 一种基于公链的区块链子链创建方法, 其特征在于, 包括: 1. A method for creating a blockchain sub-chain based on a public chain, characterized in that it includes:
由公链网络中的节点开发部署子链合约, 由部分节点执行子链合约, 组成子链网 络; The nodes in the public chain network develop and deploy sub-chain contracts, and some nodes execute the sub-chain contracts to form a sub-chain network;
通过公链网络中的测试网络对子链网络实施兼容性测试; Implement compatibility testing on the sub-chain network through the test network in the public chain network;
完成并通过兼容性测试的子链网络, 通过公链标准的投票合约, 发起子链部署投 票交易, 以及在公链网络中广播所述投票交易; The sub-chain network that has completed and passed the compatibility test, through the public chain standard voting contract, initiates the deployment of the sub-chain voting transaction, and broadcasts the voting transaction in the public chain network;
公链网络中的节点根据所述投票交易反馈投票结果, 以及根据投票结果生成子链 节点候选列表; The nodes in the public chain network feed back voting results according to the voting transactions, and generate a candidate list of sub-chain nodes according to the voting results;
如果反馈的投票结果满足预设投票要求, 将所述子链节点候选列表中的节点与公 链节点对接, 完成上链。 If the feedback voting result meets the preset voting requirements, the node in the candidate list of sub-chain nodes is connected with the public chain node to complete the chain.
2、 根据权利要求 1所述的区块链子链创建方法, 其特征在于, 所述子链合约为预 设的多种交易规则, 包括但不限于: 子链区块数据结构、 交易共识机制、 证通机制以 及算法机制; 由公链网络中的节点开发部署子链合约, 组成子链网络的步骤包括: 定义子链网络的区块数据结构; 2. The method for creating a block chain sub-chain according to claim 1, wherein the sub-chain contract is a preset multiple transaction rules, including but not limited to: sub-chain block data structure, transaction consensus mechanism, Certificate communication mechanism and algorithm mechanism; The nodes in the public chain network develop and deploy sub-chain contracts, and the steps to form the sub-chain network include: Define the block data structure of the sub-chain network;
或者, 复用所述公链的区块数据结构作为所述子链网络的区块数据结构。 Or, reuse the block data structure of the public chain as the block data structure of the sub-chain network.
3、 根据权利要求 2所述的区块链子链创建方法, 其特征在于, 由公链网络中的节 点开发部署子链合约, 由部分节点执行子链合约, 组成子链网络的步骤还包括: 3. The method for creating a blockchain sub-chain according to claim 2, characterized in that the steps of developing and deploying the sub-chain contract by nodes in the public chain network, and executing the sub-chain contract by some nodes to form the sub-chain network further comprises:
如果所述子链网络有独立的证通机制,定义所述子链网络的证通数量和分配方式; 选定子链网络共识机制, 以及选定子链区块数据的摘要算法、 加密算法以及解密 算法。 If the sub-chain network has an independent certificate communication mechanism, define the number and distribution method of the certificate communication of the sub-chain network; select the consensus mechanism of the sub-chain network, and select the digest algorithm and encryption algorithm of the sub-chain block data, and Decryption algorithm.
4、 根据权利要求 1所述的区块链子链创建方法, 其特征在于, 如果所述子链网络 有独立的证通机制, 在完成上链前, 所述方法还包括: 4. The method for creating a blockchain sub-chain according to claim 1, characterized in that, if the sub-chain network has an independent certificate communication mechanism, before completing the chaining, the method further comprises:
在公链网络中创建子链网络对应的账号; Create an account corresponding to the sub-chain network in the public chain network;
通过创建的账号向公链转账预设数量的子链证通和公链证通; Transfer a preset number of sub-chain certificates and public chain certificates to the public chain through the created account;
根据所述子链证通数量和当前公链网络中的全部公链证通数量, 生成初始兑换比 率; Generating an initial exchange ratio according to the number of sub-chain certificates and the total number of certificates in the current public chain network;
在公链网络节点和子链网络节点中存储所述初始兑换比率。 The initial exchange rate is stored in the public chain network node and the sub-chain network node.
5、 根据权利要求 1所述的区块链子链创建方法, 其特征在于, 通过公链网络中的 测试网络对子链网络实施兼容性测试的步骤包括: 5. The method for creating a blockchain sub-chain according to claim 1, wherein the step of implementing a compatibility test on the sub-chain network through the test network in the public chain network comprises:
测试网络在子链网络中创建测试证通地址; The test network creates a test certificate pass address in the sub-chain network;
根据所述测试证通地址获取预设数量的测试证通; Obtain a preset number of test pass addresses according to the test pass address;
在所述子链网络中创建测试账户,以及向所述测试账户转账预设数量的测试证通, 以生成测试区块数据; Creating a test account in the sub-chain network, and transferring a preset number of test certificate passes to the test account to generate test block data;
对比所述测试区块数据与区块数据模板, 若一致, 则通过兼容性测试。 Compare the test block data with the block data template, and if they are consistent, the compatibility test is passed.
6、 根据权利要求 5所述的区块链子链创建方法, 其特征在于, 对比所述测试区块 数据与预定义区块数据模板包括: 6. The method for creating a blockchain sub-chain according to claim 5, wherein comparing the test block data with a predefined block data template comprises:
测试网络基于公链标准生成公链区块数据, 作为区块数据模板; The test network generates public chain block data based on public chain standards as a block data template;
子链网络基于子链标准生成子链区块数据; The sub-chain network generates sub-chain block data based on the sub-chain standard;
对比所述公链区块数据与所述子链区块数据; Comparing the public chain block data with the sub-chain block data;
如果所述公链区块数据与所述子链区块数据一致,所述子链网络通过兼容性测试。 If the public chain block data is consistent with the sub-chain block data, the sub-chain network passes the compatibility test.
7、 根据权利要求 1所述的区块链子链创建方法, 其特征在于, 完成并通过兼容性 测试的子链网络, 通过公链标准的投票合约, 发起子链部署投票交易包括: 7. The method for creating a block chain sub-chain according to claim 1, wherein the sub-chain network that has completed and passed the compatibility test and initiates the sub-chain deployment voting transaction through the public chain standard voting contract includes:
子链网络通过公链标准的投票合约发起投票交易; 所述投票交易中包括由项目方 支付的预设数量公链证通; The sub-chain network initiates a voting transaction through the voting contract of the public chain standard; the voting transaction includes a preset number of public chain certificates paid by the project party;
所述子链网络向所述公链广播所述投票交易; The sub-chain network broadcasts the voting transaction to the public chain;
接收到所述投票交易的节点针对所述投票交易生成投票结果, 所述投票结果包括 支持和反对; The node that receives the voting transaction generates a voting result for the voting transaction, and the voting result includes support and opposition;
根据投票合约, 向投票结果为支持的节点转账预设数量的公链证通。 According to the voting contract, transfer a preset number of public chain certificates to the nodes whose voting results are supported.
8、 根据权利要求 1所述的区块链子链创建方法, 其特征在于, 根据投票结果生成 子链节点候选列表的步骤中, 反馈投票结果为支持的公链节点添加至子链节点候选列 表, 所述方法还包括: 8. The method for creating a blockchain sub-chain according to claim 1, wherein in the step of generating a candidate list of sub-chain nodes according to the voting results, the public chain nodes that are supported by the feedback voting result are added to the candidate list of sub-chain nodes, The method also includes:
为所述子链节点候选列表中的公链节点配置所述子链合约。 Configure the sub-chain contract for the public chain nodes in the candidate list of sub-chain nodes.
9、 根据权利要求 1所述的区块链子链创建方法, 其特征在于, 如果反馈的投票结 果满足预设投票要求, 将所述子链节点候选列表中的节点与公链节点对接, 完成上链 的步骤包括: 9. The method for creating a blockchain sub-chain according to claim 1, wherein if the feedback voting result meets the preset voting requirements, the nodes in the candidate list of sub-chain nodes are docked with the public chain nodes to complete the upload The steps of the chain include:
统计反馈的投票结果; Statistical feedback of voting results;
如果统计投票结果为支持的节点数量大于或等于第一判断阈值, 反馈的投票结果 满足预设投票要求; If the statistical voting result is that the number of supported nodes is greater than or equal to the first judgment threshold, the feedback voting result meets the preset voting requirement;
或者, 在发起投票交易的预设投票截止时间内, 统计投票结果为支持的节点数量 大于或等于第二判断阈值, 反馈的投票结果满足预设投票要求。 Or, within the preset voting deadline for initiating a voting transaction, the statistical voting result is that the number of nodes supported is greater than or equal to the second judgment threshold, and the feedback voting result meets the preset voting requirement.
10、 一种基于公链的区块链子链创建系统, 其特征在于, 包括节点之间相互建立 P2P 网络连接的公链网络, 所述公链网络节点被配置为开发部署子链合约, 所述公链 网络中的部分节点被配置为执行子链合约, 组成子链网络; 所述公链网络包括测试网 络; 10. A blockchain sub-chain creation system based on a public chain, characterized in that it includes a public chain network in which nodes establish a P2P network connection with each other, and the public chain network nodes are configured to develop and deploy sub-chain contracts, Some nodes in the public chain network are configured to execute sub-chain contracts to form a sub-chain network; the public chain network includes a test network;
所述公链网络被进一步配置为执行以下程序步骤: 通过公链网络中的测试网络对 子链网络实施兼容性测试; 公链网络中的节点根据所述投票交易反馈投票结果, 以及 根据投票结果生成子链节点候选列表; 如果反馈的投票结果满足预设投票要求, 将所 述子链节点候选列表中的节点与公链节点对接, 完成上链; 所述子链网络被进一步配置为执行以下程序步骤: 完成并通过兼容性测试的子链 网络, 通过公链标准的投票合约, 发起子链部署投票交易, 以及在公链网络中广播所 述投票交易。 The public chain network is further configured to perform the following procedural steps: implement compatibility testing on the sub-chain network through the test network in the public chain network; nodes in the public chain network feed back voting results according to the voting transaction, and according to the voting results Generate a candidate list of sub-chain nodes; if the feedback voting result meets the preset voting requirements, connect the nodes in the candidate list of sub-chain nodes with public chain nodes to complete the chain; The sub-chain network is further configured to perform the following program steps: the sub-chain network that has completed and passed the compatibility test, passes the public chain standard voting contract, initiates the sub-chain deployment voting transaction, and broadcasts the vote in the public chain network transaction.
PCT/CN2020/078669 2019-02-26 2020-03-10 Public chain-based sub-blockchain construction method and system WO2020173499A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201910141900 2019-02-26
CN201910141900.0 2019-02-26
CN201910663012.5 2019-07-22
CN201910663012.5A CN111612615A (en) 2019-02-26 2019-07-22 Block chain sub-chain creation method and system based on public chain

Publications (1)

Publication Number Publication Date
WO2020173499A1 true WO2020173499A1 (en) 2020-09-03

Family

ID=72197616

Family Applications (3)

Application Number Title Priority Date Filing Date
PCT/CN2020/078664 WO2020173497A1 (en) 2019-02-26 2020-03-10 Block chain network deployed with centralized system
PCT/CN2020/078669 WO2020173499A1 (en) 2019-02-26 2020-03-10 Public chain-based sub-blockchain construction method and system
PCT/CN2020/078671 WO2020173500A1 (en) 2019-02-26 2020-03-10 Public chain-based sub-chain business system

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/078664 WO2020173497A1 (en) 2019-02-26 2020-03-10 Block chain network deployed with centralized system

Family Applications After (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/078671 WO2020173500A1 (en) 2019-02-26 2020-03-10 Public chain-based sub-chain business system

Country Status (2)

Country Link
CN (3) CN111612613B (en)
WO (3) WO2020173497A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113655965A (en) * 2021-08-20 2021-11-16 湖北央中巨石信息技术有限公司 Capacity expansion method of block chain network, block chain network system and block chain network operation method
CN113726913A (en) * 2021-11-04 2021-11-30 中国信息通信研究院 Backbone node access method and block chain system
US20220244743A1 (en) * 2021-01-29 2022-08-04 Toyota Motor Engineering & Manufacturing North America, Inc. System and Methods for Platoon-Leader-as-a-Service

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111833061B (en) * 2020-09-21 2020-12-01 江苏傲为控股有限公司 Asset processing method and system for converting assets into digital assets
CN112163950A (en) * 2020-09-25 2021-01-01 湖南和信安华区块链科技有限公司 Block chain network construction method and system convenient for expansion and node resource reuse and terminal equipment
CN113064675B (en) * 2020-12-29 2023-12-19 上海零数众合信息科技有限公司 Inheritable block chain lossless reconstruction method
CN113141401B (en) * 2021-04-20 2022-09-06 广州安易达互联网小额贷款有限公司 Multi-chain construction method and system based on master chain
CN113067901B (en) * 2021-06-02 2021-09-24 支付宝(杭州)信息技术有限公司 Method for creating block chain subnet
CN113259119B (en) * 2021-06-02 2021-10-29 支付宝(杭州)信息技术有限公司 Block chain message distribution method and device
CN113067900B (en) * 2021-06-02 2021-09-24 支付宝(杭州)信息技术有限公司 Intelligent contract deployment method and device
CN113420086A (en) * 2021-06-21 2021-09-21 北京众享比特科技有限公司 Method for blockchain and related product
CN116760632B (en) * 2023-08-10 2023-11-03 腾讯科技(深圳)有限公司 Data processing method, device, equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107733855A (en) * 2017-08-31 2018-02-23 中国科学院信息工程研究所 A kind of block catenary system and application process that can support publicly-owned chain, alliance's chain and privately owned chain simultaneously
CN108876370A (en) * 2018-06-12 2018-11-23 北京航空航天大学 The architectural framework of the shared open data of transregional piece of chain under a kind of isomery multichain framework
US20190020471A1 (en) * 2016-12-23 2019-01-17 Joseph Santilli Methods and systems for crowdsourcing an outcome to an issue
CN110868308A (en) * 2018-08-28 2020-03-06 傲为信息技术(江苏)有限公司 Block chain network access method and system

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786339A (en) * 2016-08-31 2018-03-09 陈新 It is layered controllable alliance's block catenary system
US10491378B2 (en) * 2016-11-16 2019-11-26 StreamSpace, LLC Decentralized nodal network for providing security of files in distributed filesystems
CN106779805A (en) * 2016-11-24 2017-05-31 中国银行股份有限公司 Integration circulation method and device between a kind of different businessmans based on block chain
US10102265B1 (en) * 2017-04-12 2018-10-16 Vijay K. Madisetti Method and system for tuning blockchain scalability for fast and low-cost payment and transaction processing
CN107358526B (en) * 2017-06-26 2021-03-09 中国人民银行数字货币研究所 Method and device for emergency transaction
CN107528886B (en) * 2017-07-25 2020-07-31 中国科学院计算技术研究所 Block chain full-network splitting method and system
CN108389047B (en) * 2018-02-12 2021-07-09 南京思利华信息科技有限公司 Method for trading between parent chain and child chain in block chain and block chain network
CN108347486A (en) * 2018-02-12 2018-07-31 众安信息技术服务有限公司 Across chain communication means, device and system based on block chain
CN108200210B9 (en) * 2018-02-12 2021-06-18 众安信息技术服务有限公司 Block chain-based chain management method, block chain-based chain management device and computer-readable medium
CN108712491A (en) * 2018-05-17 2018-10-26 易链科技(深圳)有限公司 Block chain node, exchange information processing method, terminal device and medium
CN108960825A (en) * 2018-06-26 2018-12-07 阿里巴巴集团控股有限公司 Electric endorsement method and device, electronic equipment based on block chain
CN112749188B (en) * 2018-09-27 2022-07-05 福建福链科技有限公司 Data processing method and terminal for solving data isolation between sub-chains in alliance chain
CN109493227B (en) * 2018-11-23 2021-10-22 贵州电网有限责任公司 Energy internet-based block chain weak centralized energy online transaction method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190020471A1 (en) * 2016-12-23 2019-01-17 Joseph Santilli Methods and systems for crowdsourcing an outcome to an issue
CN107733855A (en) * 2017-08-31 2018-02-23 中国科学院信息工程研究所 A kind of block catenary system and application process that can support publicly-owned chain, alliance's chain and privately owned chain simultaneously
CN108876370A (en) * 2018-06-12 2018-11-23 北京航空航天大学 The architectural framework of the shared open data of transregional piece of chain under a kind of isomery multichain framework
CN110868308A (en) * 2018-08-28 2020-03-06 傲为信息技术(江苏)有限公司 Block chain network access method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220244743A1 (en) * 2021-01-29 2022-08-04 Toyota Motor Engineering & Manufacturing North America, Inc. System and Methods for Platoon-Leader-as-a-Service
CN113655965A (en) * 2021-08-20 2021-11-16 湖北央中巨石信息技术有限公司 Capacity expansion method of block chain network, block chain network system and block chain network operation method
CN113726913A (en) * 2021-11-04 2021-11-30 中国信息通信研究院 Backbone node access method and block chain system
WO2023077796A1 (en) * 2021-11-04 2023-05-11 中国信息通信研究院 Backbone node access method and blockchain system

Also Published As

Publication number Publication date
CN111612615A (en) 2020-09-01
CN111612613B (en) 2023-11-10
WO2020173497A1 (en) 2020-09-03
WO2020173500A1 (en) 2020-09-03
CN111612614A (en) 2020-09-01
CN111612613A (en) 2020-09-01

Similar Documents

Publication Publication Date Title
WO2020173499A1 (en) Public chain-based sub-blockchain construction method and system
CN110868439B (en) Block chain system
CN108256864B (en) Foundation across chain alliance and communication means, system between a kind of block chain
CN108009811B (en) Inter-cloud computing environment value exchange-oriented cross-chain communication method
WO2020059865A1 (en) Settlement system, settlement method, user device, and settlement program
CN112330326B (en) Business processing method and device applied to bank transaction blockchain system
CN110348830A (en) A kind of network system based on block chain, authentication method, equipment and storage medium
CN111240732B (en) Method, device, equipment and storage medium for distributing distributed microservice
CN112231741B (en) Data processing method, device, medium and electronic equipment based on block chain system
CN110098938B (en) Trusted committee under-chain acceleration solution method and system
CN112163950A (en) Block chain network construction method and system convenient for expansion and node resource reuse and terminal equipment
WO2015140745A2 (en) A system and method for managing workflows associated with a document exchanged between a first service provider and a second service provider
CN108022090A (en) Virtual account management method, equipment, system and readable storage medium storing program for executing
CN112907252A (en) Block chain transaction method and system based on multi-person down-chain channel
CN116150260A (en) Data processing method, device, medium and electronic equipment of block chain system
WO2020042929A1 (en) Block chain system
CN114616807B (en) Method and system for managing and controlling a communication network
CN114707663B (en) Distributed machine learning method, device, electronic equipment and storage medium
CN116186749A (en) Block chain-based service processing method and device, electronic equipment and readable medium
CN116233139A (en) Data processing method, device, medium and electronic equipment of block chain system
CN116186786A (en) Block chain-based service processing method and device, electronic equipment and readable medium
Antevski et al. Applying Blockchain consensus mechanisms to Network Service Federation: Analysis and performance evaluation
Herrmann et al. Design of trusted systems with reusable collaboration models
CN116126480A (en) Cross-region block chain processing method and device for transaction, intelligent equipment, medium and product
JP2022075522A (en) Method executed by computer, information processing device and storage medium

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: 20763802

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: 20763802

Country of ref document: EP

Kind code of ref document: A1