CN113420086A - Method for blockchain and related product - Google Patents

Method for blockchain and related product Download PDF

Info

Publication number
CN113420086A
CN113420086A CN202110687807.7A CN202110687807A CN113420086A CN 113420086 A CN113420086 A CN 113420086A CN 202110687807 A CN202110687807 A CN 202110687807A CN 113420086 A CN113420086 A CN 113420086A
Authority
CN
China
Prior art keywords
chain
child
backbone
transaction
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110687807.7A
Other languages
Chinese (zh)
Inventor
路京磊
卢小明
严挺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Peersafe Technology Co ltd
Original Assignee
Beijing Peersafe Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Peersafe Technology Co ltd filed Critical Beijing Peersafe Technology Co ltd
Priority to CN202110687807.7A priority Critical patent/CN113420086A/en
Publication of CN113420086A publication Critical patent/CN113420086A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • 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

Abstract

The present disclosure relates to a method, apparatus, blockchain system, and computer program product for a blockchain, wherein the blockchain includes a backbone and backbone nodes associated with the backbone, the method comprising: receiving a create transaction from a master chain node regarding creating a child chain; acquiring main chain state information about a main chain according to the creation transaction; and creating a child chain that inherits the backbone state information. By using the technical scheme disclosed by the invention, the processing efficiency of the service can be improved, and the overall performance of the block chain architecture can be further improved.

Description

Method for blockchain and related product
Technical Field
The present disclosure relates generally to the field of blockchain technology. More particularly, the present disclosure relates to a method, apparatus, blockchain system, and computer program product for blockchains.
Background
This section is intended to provide a background or context to the embodiments of the disclosure recited in the claims. The description herein may include concepts that could be pursued, but are not necessarily ones that have been previously conceived or pursued. Thus, unless otherwise indicated herein, what is described in this section is not prior art to the description and claims in this application and is not admitted to be prior art by inclusion in this section.
With the development of the block chain technology, it is gradually applied to various fields. The block chain technology is a distributed account book which is composed of data blocks in a chain data structure in a sequential connection mode according to time sequence and is guaranteed in a cryptographic mode to be non-falsifiable and non-counterfeitable. In the related art, the block chain architecture may employ a multi-chain technique, which may operate multiple parallel chains simultaneously at one node in the block chain, each chain having its own independent block data.
Due to the above parallel relationship between the chains in the current blockchain architecture, some service requirements cannot be met. For example, when a specific service is required, a required account is prepared on the main chain and initialized. Then, each child chain participating in the service also needs to create all required accounts, and after all accounts are initialized, the service operation can be performed. It can be seen that such initialization operations greatly affect the processing efficiency of the traffic, and further reduce the overall performance of the blockchain architecture.
Disclosure of Invention
To solve at least the technical problems described in the above background section, the present disclosure proposes a scheme for a blockchain. By the scheme, the processing efficiency of the service can be improved based on the sub-chain capable of inheriting the main chain state, and the overall performance of the block chain architecture is improved. In view of this, the present disclosure provides solutions in a number of aspects as follows.
A first aspect of the present disclosure provides a method for a blockchain comprising a backbone and backbone nodes associated with the backbone, the method comprising: receiving a create transaction from the master chain node regarding creation of a child chain; obtaining backbone state information about a backbone according to the create transaction; and creating a child chain that inherits the backbone state information.
In one embodiment, the backbone status information includes unique identification information of the backbone block and unique identification information of the backbone block status.
In one embodiment, the child chain is associated with a plurality of child chain nodes, wherein creating the child chain that inherits the backbone state information comprises: when any child chain node creates the child chain, detecting whether permission for creating the child chain is acquired; and responding to the obtained permission for creating the sub-chain, and executing creation of the sub-chain inheriting the main chain state information.
In one embodiment, the creation information includes child chain unique identification information, wherein the method further comprises: detecting whether a remote calling request containing the unique identification information of the sub chain is acquired; responding to the remote call request, and acquiring a target sub-chain identified by the sub-chain unique identification information; and processing the remote invocation request based on the target sub-chain.
In one embodiment, creating a child chain that inherits the backbone state information comprises: constructing a configuration file of the child chain; generating a created block of the child chain, wherein the created block of the child chain inherits the backbone state information; and a P2P network connecting the child chain to the blockchain.
A second aspect of the present disclosure provides a method for a blockchain, the blockchain comprising a backbone, the method comprising: obtaining a transaction request for creating a child chain; determining a create transaction from the transaction request, wherein the create transaction includes main chain state information about the main chain to indicate that the child chain inherits the main chain state information.
In one embodiment, determining to create a transaction based on the transaction request comprises: performing consensus verification on the transaction request; determining the create transaction in response to the transaction request passing the consensus verification; and storing the create transaction in a global world state of the backbone.
In one embodiment, the create transaction further includes child chain unique identification information, and the method further comprises: and performing hash operation according to the account information of the transaction request initiator, the name of the child chain and the parent block hash of the current common block to obtain the unique identification information of the child chain.
A third aspect of the present disclosure provides an apparatus comprising: a processor; a memory storing computer instructions that, when executed by the processor, cause the apparatus to perform the method provided by the first aspect of the disclosure and its various embodiments that will be described below, or cause the apparatus to perform the method provided by the second aspect of the disclosure and its various embodiments that will be described below.
A fourth aspect of the present disclosure provides a blockchain system, comprising: at least one child chain created by a method according to the method provided by the first aspect of the present disclosure and the methods of the embodiments thereof to be described below; and a main chain for performing the method provided by the second aspect of the present disclosure and the methods of the various embodiments thereof to be described below.
A fifth aspect of the present disclosure provides a computer program product having stored thereon a program for a blockchain, which when executed by one or more processors causes the method provided by the first aspect of the present disclosure and its various embodiments to be described below, or causes the method provided by the second aspect of the present disclosure and its various embodiments to be described below, to be implemented.
By using the scheme provided by the disclosure, the sub-chain capable of inheriting the main chain state can be dynamically created, so that the service processing efficiency is improved. In particular, by utilizing a creation transaction regarding creation of a child chain and the main chain state information stored on the main chain, the present disclosure can dynamically create a child chain that inherits the main chain state information so that the child chain that inherits the main chain does not need to repeatedly perform an initialization operation for the main chain state information after the main chain completes the initialization operation for the main chain state information. Therefore, the scheme of the disclosure can improve the processing efficiency of the service, and further improve the overall performance of the block chain architecture.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present disclosure will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar or corresponding parts and in which:
FIG. 1 is a node relationship diagram illustrating a main chain and a child chain in a blockchain according to an embodiment of the present disclosure;
FIG. 2 is a flow diagram illustrating a method for a subchain side to partition a chain of blocks in accordance with an embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating a method of a main chain side for a blockchain in accordance with an embodiment of the present disclosure;
FIG. 4 is an architectural diagram illustrating a blockchain in accordance with an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating the relationship between a main chain block and a child chain founder block according to an embodiment of the present disclosure; and
fig. 6 is a diagram illustrating interactions between a client and a child chain with respect to remote invocation, according to an embodiment of the present disclosure.
Detailed Description
Technical solutions in embodiments of the present disclosure will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It should be understood that the terms "first," "second," "third," and "fourth," etc. in the claims, description, and drawings of the present disclosure are used to distinguish between different objects and are not used to describe a particular order. The terms "comprises" and "comprising," when used in the specification and claims of this disclosure, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the disclosure herein is for the purpose of describing particular embodiments only, and is not intended to be limiting of the disclosure. As used in the specification and claims of this disclosure, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be further understood that the term "and/or" as used in the specification and claims of this disclosure refers to any and all possible combinations of one or more of the associated listed items and includes such combinations.
Specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
In order to better understand the scheme of the present disclosure, a brief description of the multi-chain in the block chain will be given below:
a multi-chain means that a blockchain system comprises multiple chains, and each node in a blockchain can participate in one or more of the chains. In an embodiment of the present disclosure, the multi-chain includes a main chain and a sub-chain, where the sub-chain may be one or more, and each node in the block chain needs to participate in the main chain, and optionally participate in the sub-chain. Specifically, the relationship between the nodes and the main chain and the sub chain is illustrated in conjunction with the node relationship diagram 100 of the main chain and the sub chain in fig. 1:
as shown in fig. 1, the network of the block chain has 10 nodes and 3 sub-chains, the main chain is not shown in the figure, where 10 nodes all participate in the main chain, and in addition, nodes 1 to 3 of the 10 nodes also participate in the sub-chain 1, nodes 5 and 6 also participate in the sub-chain 2, nodes 8 to 10 also participate in the sub-chain 3, and nodes 4 and 7 respectively participate in the 2 sub-chains. These child chains and the main chain may be in a parallel chain relationship, or may be in an inherited chain relationship (i.e., a relationship in which the child chains inherit the state of the main chain) referred to in this disclosure. While the parallel chains proposed in the background art can not satisfy some service requirements, the inheritance chains in the embodiments of the present disclosure can overcome this problem to make up for the deficiency of the multi-chain technology in the block chain. Specifically, the creation of the inheritance chain will be explained below in conjunction with fig. 2.
Fig. 2 is a flow diagram illustrating a method 200 for a blockchain at a child chain side, where the blockchain includes a backbone and backbone nodes associated with the backbone, according to an embodiment of the disclosure. It is understood that the block chain and the main chain therein may be the block chain and the main chain described above in connection with fig. 1. The preceding description of the block chain and the main chain therefore applies equally to the description below. As shown in fig. 2, at step S201, a create transaction is received from a main chain node regarding the creation of a child chain. In one implementation scenario, the create transaction contains backbone state information about the backbone, the backbone state information being generated by the backbone side to indicate that the child chain needs to inherit. The aforementioned create transaction may also include, but is not limited to, one or more of the following: a link establishment account, a link establishment strategy, a trust list of the sub-chain and/or an adjacent node connection mode. The content included in the creation transaction is illustrated here, and the specific content of the creation transaction is not limited. Next, at step S202, the main chain state information on the main chain is acquired according to the aforementioned creation transaction. In one embodiment, the main chain state information includes unique identification information of the main chain block (for example, the main chain block Hash, which is not limited herein, any other information capable of uniquely identifying the main chain block) and unique identification information of the main chain block state (for example, the state tree root Hash, which is not limited herein, any other information capable of uniquely identifying the main chain region state).
After the main chain state information is acquired at step S202, at step S203, a child chain that inherits the main chain state information is created. Here, a sub-chain is associated with a plurality of sub-chain nodes, and it is understood that the sub-chain may be the sub-chain described above in conjunction with fig. 1. As shown in fig. 1, each child chain has a plurality of nodes participating therein, that is, the child chain is associated with a plurality of child chain nodes (for example, the child chain 1 in fig. 1 has nodes 1, 2, 3 and 4 participating therein, and the nodes 1 to 4 are child chain nodes associated with the child chain). And creating the sub-chain at each sub-chain node, wherein no authority can be set for each sub-chain node, namely, each sub-chain node can directly create the sub-chain when acquiring the creation transaction. However, when the creation authority is not set, a problem that a large number of sub-chains are maliciously created to cause the whole network to be paralyzed may occur. To this end, in one embodiment, the aforementioned step S203 may be implemented by the steps S203-1 and S203-2 shown in dashed boxes. Specifically, at step S203-1, when any child chain node creates a child chain, it is detected whether permission to create the child chain is acquired. In one embodiment, the permission to create the child chain includes an admin command or other permission command. Next, in step S203-2, in response to acquiring the permission for creating the sub chain, creating the sub chain inheriting the main chain state information, so that the sub chain node that acquires the permission creates the sub chain, thereby avoiding malicious creation of the sub chain, and effectively improving security in the sub chain creation process. It is understood that steps S203-1 and S203-2 shown in fig. 2 are only one possible implementation of step S203, and the scheme of the present disclosure is not limited thereto. Other steps or ways may also be taken by those skilled in the art to implement step S203 in accordance with the teachings of the present disclosure.
Regarding the specific creation process of the child chain, in an embodiment, by first constructing a configuration file of the child chain, the configuration file in this embodiment may only include configuration information of the child chain itself (e.g., trusted consensus node, data storage path, and the like), and may of course also include some configuration information common to the main chain (e.g., port number of P2P network). Next, generating an created block of the child chain inheriting the main chain state information, wherein in one embodiment, in the generation process of the created block of the child chain, a parent block Hash of the created block of the child chain is the same as the inherited main chain block Hash, and a state tree root Hash of the created block of the child chain is the same as the inherited main chain block state tree root Hash. Finally, the child chain is connected to the P2P network of the blockchain, thus completing the creation of the child chain.
The above is an explanation of creation of an inheritance chain based on a sub-chain side, and the following is an explanation of creation of an inheritance chain based on a main chain side in conjunction with fig. 3.
Fig. 3 is a flow diagram illustrating a method 300 for blockchains on a side of a backbone, where the blockchain includes the backbone, according to an embodiment of the present disclosure. It is to be understood that the block chain and the main chain thereof may be the block chain and the main chain described above with reference to fig. 1 and 2, and thus the description of the block chain and the main chain also applies to the following description.
As shown in fig. 3, at step S301, a transaction request for creating a child chain is acquired. In one embodiment, the transaction request may be initiated by the user according to business requirements, which includes but is not limited to information such as a link establishment account, a sub-chain name, a link establishment policy, and the like. The contents of the transaction request are illustrated herein, and the specific contents of the transaction request are not limited. Next, at step S302, a creation transaction for creating the child chain is determined according to the transaction request, wherein the creation transaction includes main chain state information about the main chain so as to indicate that the child chain described in the foregoing fig. 1 and fig. 2 inherits the main chain state information. In one implementation scenario, creating a transaction herein may also include, but is not limited to, one or more of the following: the system comprises a link establishment account, a sub-chain name, a link establishment strategy, a trust list of the sub-chain and/or an adjacent node connection mode. The content included in the creation transaction is illustrated here, and the specific content of the creation transaction is not limited.
In some embodiments, the aforementioned step S302 may be implemented by steps S302-1, S302-2, and S302-3 shown in dashed boxes. Specifically, at step S302-1, a consensus verification is performed on the transaction request. In one embodiment, the consensus verification is determined based on the voting results of the nodes on the backbone for the transaction request. Specifically, the node on the main chain performs voting consensus on the transaction request when receiving the transaction request, broadcasts voting results for agreeing to the transaction request, and determines that the transaction request passes consensus verification when the number of the voting results for agreeing to the transaction request is greater than a threshold value. Next, at step S302-2, a create transaction is determined in response to the transaction request passing the consensus verification, and the create transaction is stored in the global world state of the main chain at step S302-3. In one embodiment, the creation transaction further includes sub-chain unique identification information (e.g., an ID of the sub-chain or a universally unique identifier UUID), where the sub-chain unique identification information in the present disclosure is an ID of the sub-chain, which is obtained by performing a hash operation according to the account information of the transaction request initiator, the name of the sub-chain, and the parent block hash of the current common identification block, and it is understood that the ID of the sub-chain obtained by performing the hash operation on the aforementioned information is only one possible implementation manner of obtaining the sub-chain unique identification information, and the solution of the present disclosure is not limited thereto. Further, it is understood that steps S302-1, S302-2, and S302-3 shown in the figure are only one possible implementation of step S302, and the aspects of the present disclosure are not limited thereto. Other steps or ways may also be taken by those skilled in the art to implement step S302 in accordance with the teachings of the present disclosure.
The foregoing fig. 2 and fig. 3 respectively illustrate the creation process of the inheritance chain based on the sub-chain or the main chain, and dynamically create the sub-chain that relays the main chain state information, so that after the main chain completes the initialization operation on the main chain state information, the sub-chain that inherits the main chain does not need to repeatedly execute the initialization operation on the main chain state information, and through simplification of the initial operation on the sub-chain, the processing efficiency of the service is effectively improved, and further the overall performance of the block chain architecture is improved.
For a clearer understanding of the scheme of the present disclosure, the creation process of the inheritance chain will be further explained below in conjunction with fig. 4 and 5.
Fig. 4 is an architecture diagram 400 illustrating a blockchain in accordance with an embodiment of the present disclosure. As shown in fig. 4, the main sub-chain architecture in the block chain includes a main chain and a plurality of sub-chains (sub-chain 1 to sub-chain n), and it is understood that the block chain, the main chain and the sub-chains therein may be the block chain, the main chain and the sub-chains described above in conjunction with fig. 1, fig. 2 and fig. 3, and therefore the description of the block chain and the main chain is also applicable to the description below. The main chain and each sub-chain respectively have their own independent modules (for example, the main chain has a transaction pool module, a common identification module, a block generation module, a data storage module, and the like in the main chain application layer in fig. 4, and each sub-chain has a transaction pool module, a common identification module, a block generation module, a data storage module, and the like in the sub-chain application layer), the main chain and each sub-chain can also run together in one node process in the block chain, and the main chain and each sub-chain can share common modules such as a P2P network, a node identity, a log module, and an RPC (Remote Procedure Call) module among the sub-chains. Each node in the blockchain may participate in the main chain, which exists once the network of blockchains is created, and 0-n child chains, which may be dynamically created in embodiments of the present disclosure. The specific child chain creation process may be accomplished by the following exemplary steps S1-S4:
at step S1, the main chain determines to create a transaction based on the transaction request. The transaction request herein can be referred to the explanation of the transaction request in the foregoing. In one embodiment, the contents contained in the create transaction are described in connection with Table 1:
Figure BDA0003125402400000081
TABLE 1
Wherein, the specific meanings of each field in table 1 are as follows:
the Account represents a transaction initiator, and the transaction initiator may be a specific user designated in the process of establishing a main chain, or may be an arbitrary user. When the transaction initiator is an arbitrary user, the authority of the user may be set to avoid the problem that a malicious user creates a large number of sub-chains to paralyze the entire network, and the specific authority setting process may be performed with reference to step S203 shown in fig. 2. The schema name represents the name of the designated sub-chain, so that different sub-chains are distinguished conveniently when a user queries sub-chain information; the schema hierarchy represents a specified link establishment strategy, wherein the value of 1 represents establishing a parallel sub-link which does not inherit the main chain, and the value of 2 represents that the sub-link needs to inherit the main chain state; the Anchor LedgerHash represents the main chain block hash to be inherited by the sub chain, and is an optional field which is valid when the Schema Strategy value is 2; validators represent a list of trusted nodes that specify child chains, which is an array of node consensus public keys; PeerList represents a P2P connection list that specifies child trusted nodes, typically including the ip address and port number of the node. It is to be understood that the information presented in table 1 is merely illustrative of creating a transaction and is not limiting of the specific information that creates a transaction.
Next, at step S2, a voting consensus is made on the transaction request, and the confirmed created transaction is stored into the backbone global world state after the transaction request consensus passes. Here, the created transaction further includes child chain unique identification information, which is unique identification information (e.g., child chain ID) when creating a child chain, and the child chain unique identification information is obtained by performing a hash operation according to the account information of the transaction request initiator, the name of the child chain, and the parent block hash of the current common block. Wherein the main chain corresponds to a specific daughter chain with an ID of 0. Of course, the sub-chain unique identification information in the present disclosure may also be a universal unique identifier UUID, and it can be understood that the ID of the sub-chain obtained by performing hash operation on the foregoing information is only one possible implementation manner for obtaining the sub-chain unique identification information, and the scheme of the present disclosure is not limited thereto.
Next, at step S3, when the participating node of the child chain issues a main chain block and it is determined that the created transaction is included in the identified transaction and that the participating node is the child chain participating node, step S4 is executed. Here, issuing the main chain block refers to a series of operations, such as storage operation, interaction operation with the client, and the like, performed after the participating nodes of the child chain synchronize the main chain block.
At step S4, a create child chain operation is performed. The specific process of creating the child chain comprises the following operations:
1) creating a child chain folder for storing child chain data;
2) constructing a configuration file of the child chain and storing the configuration file into a child chain folder, where the configuration file may only include configuration information of the child chain itself (e.g. trusted consensus node, data storage path, etc.), but may also contain some configuration information common to the main chain (e.g. port number of P2P network);
3) generating a child chain creation block and storing the child chain creation block in a child chain folder; the generation process 500 of the sub-chain creation block may be specifically described in conjunction with fig. 5. As shown in fig. 5, when determining that the child chain needs to inherit the main chain block, the state of the inherited main chain block is firstly copied to the child chain, then the inherited main chain block is used as a parent block, and finally a new created block Hash is generated, and the information of the created block is completely saved in the child chain folder. The structure of the founder block can be illustrated with reference to table 2:
field(s) Value taking
Block Hash Hash value of all other fields
Hash of parent block Hash of inherited backbone blocks
Block number
1
Time stamp Network time at that time
Status tree root Hash State tree root Hash of inherited main chain block
Transaction root Hash 0
Other.
TABLE 2
It is to be understood that the information shown in table 2 is only used to illustrate the structure of the child chain creation block, and the specific structure of the child chain creation block is not limited thereto.
4) A child chain is connected into a P2P network of block chains. Specifically, the P2P connection information of the consensus node of the child chain is searched in the backbone global world state, and connection is performed. If a connection for a node already exists in the P2P network layer, the existing connection may be directly multiplexed.
The dynamic creation process of child chains is further described above. The aforementioned dynamic creation process may be performed by various devices in the context of the present disclosure. The equipment disclosed by the invention can comprise a data processing device, a computer, a tablet computer, an intelligent terminal, PC equipment, an Internet of things terminal, a mobile terminal and the like according to different application scenes. Of course, the device of the present disclosure particularly includes a device that can be a node in a regional chain, and after the device has the aforementioned main sub-chain architecture, it is applicable to many scenarios. The following is described with the scenario of interaction 600 between a client and a node in conjunction with fig. 6.
As shown in fig. 6, the client specifies the child chain ID, and can interact with the specified child chain.
Specifically, the method comprises the following steps: the client side sets the specified sub-chain ID (in the embodiment of the disclosure, the default ID is 0, and when the specified sub-chain ID is 0, the client side indicates that the client side interacts with the main chain), and initiates an RPC request containing the specified sub-chain ID; and at the node side of the block chain, when the RPC request processing module receives the RPC request, the RPC request processing module analyzes the sub-chain ID in the RPC request and sends the request to a designated sub-chain for processing, the sub-chain feeds back a result to the RPC request processing module after processing is completed, and the RPC request processing module feeds back the processing result to the client. The whole interaction process fully embodies the advantages of the main sub-chain architecture provided in the embodiment of the disclosure, greatly simplifies the whole interaction process, and improves the service processing efficiency.
From the above description of the modular design of the present invention, it can be seen that the system of the present disclosure can be flexibly arranged according to application scenarios or requirements without being limited to the architecture shown in the figures. Further, it should also be understood that any module, unit, component, server, computer, or device performing operations of examples of the invention may include or otherwise access a computer-readable medium, such as a storage medium, computer storage medium, or data storage device (removable) and/or non-removable) such as a magnetic disk, optical disk, or magnetic tape. Computer storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules or other data. In this regard, the present invention also discloses a computer readable storage medium having stored thereon computer readable instructions for a blockchain, which when executed by one or more processors, perform the methods and operations previously described in connection with the figures.
As used in this specification and claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
While various embodiments of the present disclosure have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Numerous modifications, changes, and substitutions will occur to those skilled in the art without departing from the spirit and scope of the present disclosure. It should be understood that various alternatives to the embodiments of the disclosure described herein may be employed in practicing the disclosure. It is intended that the following claims define the scope of the disclosure and that the module compositions, equivalents, or alternatives falling within the scope of these claims be covered thereby.

Claims (13)

1. A method for a blockchain, the blockchain including a backbone and backbone nodes associated with the backbone, the method comprising:
receiving a create transaction from the master chain node regarding creation of a child chain;
obtaining backbone state information about a backbone according to the create transaction; and
creating a child chain that inherits the backbone state information.
2. The method of claim 1, wherein the backbone status information comprises unique identification information of backbone blocks and unique identification information of backbone block status.
3. The method of claim 1, wherein the child chain is associated with a plurality of child chain nodes, wherein creating the child chain that inherits the backbone state information comprises:
when any child chain node creates the child chain, detecting whether permission for creating the child chain is acquired; and
and responding to the acquired permission for creating the sub-chain, and executing creation of the sub-chain inheriting the main chain state information.
4. The method of claim 1, wherein the creation information includes child chain unique identification information, wherein the method further comprises:
detecting whether a remote calling request containing the unique identification information of the sub chain is acquired;
responding to the remote call request, and acquiring a target sub-chain identified by the sub-chain unique identification information; and
and processing the remote call request based on the target sub-chain.
5. The method of any of claims 1-4, wherein creating a child chain that inherits the backbone state information comprises:
constructing a configuration file of the child chain;
generating a created block of the child chain, wherein the created block of the child chain inherits the backbone state information; and
connecting the child chain to a P2P network of the blockchain.
6. An apparatus, comprising:
a processor; and
a memory storing computer instructions that, when executed by the processor, cause the apparatus to perform the method of any of claims 1-5.
7. A computer program product comprising program instructions for a blockchain, which when executed by a processor, cause the method according to any of claims 1-5 to be carried out.
8. A method for a blockchain, the blockchain comprising a backbone, the method comprising:
obtaining a transaction request for creating a child chain; and
determining a create transaction for creating a child chain according to the transaction request, wherein the create transaction includes main chain state information about the main chain to indicate that the child chain inherits the main chain state information.
9. The method of claim 8, wherein determining to create a transaction according to the transaction request comprises:
performing consensus verification on the transaction request;
determining the create transaction in response to the transaction request passing the consensus verification; and
storing the create transaction in a global world state of the backbone.
10. The method of claim 8 or 9, wherein the create transaction further comprises child chain unique identification information, and the method further comprises:
and performing hash operation according to the account information of the transaction request initiator, the name of the child chain and the parent block hash of the current common block to obtain the unique identification information of the child chain.
11. An apparatus, comprising:
a processor; and
a memory storing computer instructions that, when executed by the processor, cause the apparatus to perform the method of any of claims 8-10.
12. A computer program product comprising program instructions for a blockchain, which when executed by a processor, cause the method according to any of claims 8-10 to be carried out.
13. A blockchain system, comprising:
at least one backbone node on the backbone configured to perform the method of any one of claims 8-10 to create a child chain; and
at least one child chain node configured to create the child chain in accordance with the method of any one of claims 1 to 5 in response to a create transaction of the main chain node.
CN202110687807.7A 2021-06-21 2021-06-21 Method for blockchain and related product Pending CN113420086A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110687807.7A CN113420086A (en) 2021-06-21 2021-06-21 Method for blockchain and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110687807.7A CN113420086A (en) 2021-06-21 2021-06-21 Method for blockchain and related product

Publications (1)

Publication Number Publication Date
CN113420086A true CN113420086A (en) 2021-09-21

Family

ID=77789612

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110687807.7A Pending CN113420086A (en) 2021-06-21 2021-06-21 Method for blockchain and related product

Country Status (1)

Country Link
CN (1) CN113420086A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180293556A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. Method and system for processing blockchain-based real-time transaction
CN109033422A (en) * 2018-08-08 2018-12-18 云南天之游科技股份有限公司 A kind of method, apparatus and block chain generating block chain
CN111010382A (en) * 2019-09-12 2020-04-14 腾讯科技(深圳)有限公司 Method and apparatus for processing data requests in a blockchain network
CN111612615A (en) * 2019-02-26 2020-09-01 傲为信息技术(江苏)有限公司 Block chain sub-chain creation method and system based on public chain
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
CN112600945A (en) * 2021-03-04 2021-04-02 暗链科技(深圳)有限公司 Distributed block chain service system, construction method thereof and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180293556A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. Method and system for processing blockchain-based real-time transaction
CN109033422A (en) * 2018-08-08 2018-12-18 云南天之游科技股份有限公司 A kind of method, apparatus and block chain generating block chain
CN111612615A (en) * 2019-02-26 2020-09-01 傲为信息技术(江苏)有限公司 Block chain sub-chain creation method and system based on public chain
CN111010382A (en) * 2019-09-12 2020-04-14 腾讯科技(深圳)有限公司 Method and apparatus for processing data requests in a blockchain network
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
CN112600945A (en) * 2021-03-04 2021-04-02 暗链科技(深圳)有限公司 Distributed block chain service system, construction method thereof and storage medium

Similar Documents

Publication Publication Date Title
CN112041873B (en) Block chain network partitioning
EP3622687B1 (en) Enclave pool management
CN109472572B (en) Contract system based on block chain main chain and parallel multiple sub-chains
US11176246B2 (en) Enclave pool shared key
WO2020114385A1 (en) Trusted node determining method and apparatus based on block chain network
CN109981279B (en) Block chain system, communication method, device, equipment and medium
CN109886693B (en) Consensus realization method, device, equipment and medium for block chain system
US20180330077A1 (en) Enclave pools
CN111628886B (en) Method, device and computer equipment for building blockchain network in private cloud environment
CN113067904B (en) Method for building block chain sub-network and block chain system
CN110597918A (en) Account management method and device and computer readable storage medium
CN109104419B (en) Block chain account generation method and system
CN113067895B (en) Method for building block chain sub-network and block chain system
CN111737104A (en) Block chain network service platform, test case sharing method thereof and storage medium
CN111177257A (en) Data storage and access method, device and equipment of block chain
CN113609231B (en) Method and device for maintaining network architecture information of block chain system
CN113885797B (en) Data storage method, device, equipment and storage medium
CN113055190B (en) Access control method for client
CN113886495A (en) Method and device for verifying block chain data, electronic equipment and storage medium
CN114363162B (en) Block chain log generation method and device, electronic equipment and storage medium
CN113420086A (en) Method for blockchain and related product
CN114710350B (en) Method and device for distributing callable resources, electronic equipment and storage medium
CN113010600B (en) Data management system, method, related device and medium based on block chain
CN114880717A (en) Data archiving method and device
CN114363349B (en) Block chain sub-network starting method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination