CN113259458A - Method and device for starting/closing block link point service - Google Patents
Method and device for starting/closing block link point service Download PDFInfo
- Publication number
- CN113259458A CN113259458A CN202110611538.6A CN202110611538A CN113259458A CN 113259458 A CN113259458 A CN 113259458A CN 202110611538 A CN202110611538 A CN 202110611538A CN 113259458 A CN113259458 A CN 113259458A
- Authority
- CN
- China
- Prior art keywords
- node
- plug
- subnet
- blockchain
- module
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 156
- 230000004044 response Effects 0.000 claims abstract description 34
- 230000000977 initiatory effect Effects 0.000 claims abstract description 28
- 230000006855 networking Effects 0.000 claims description 23
- 238000003860 storage Methods 0.000 claims description 23
- 230000008569 process Effects 0.000 description 32
- 238000010586 diagram Methods 0.000 description 19
- 230000007246 mechanism Effects 0.000 description 17
- 238000012544 monitoring process Methods 0.000 description 16
- 238000012545 processing Methods 0.000 description 13
- 230000006870 function Effects 0.000 description 12
- 238000004590 computer program Methods 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 8
- 230000014759 maintenance of location Effects 0.000 description 5
- 230000008520 organization Effects 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 4
- 230000001419 dependent effect Effects 0.000 description 4
- 238000012546 transfer Methods 0.000 description 4
- 239000003999 initiator Substances 0.000 description 3
- 230000036961 partial effect Effects 0.000 description 3
- RTZKZFJDLAIYFH-UHFFFAOYSA-N Diethyl ether Chemical compound CCOCC RTZKZFJDLAIYFH-UHFFFAOYSA-N 0.000 description 2
- 230000004913 activation Effects 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000002955 isolation Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002829 reductive effect Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 210000001072 colon Anatomy 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000008034 disappearance Effects 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002427 irreversible effect Effects 0.000 description 1
- 238000005304 joining Methods 0.000 description 1
- 230000000670 limiting effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1044—Group management mechanisms
- H04L67/1048—Departure or maintenance mechanisms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/12—Arrangements for remote connection or disconnection of substations or of equipment thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Theoretical Computer Science (AREA)
- Development Economics (AREA)
- Technology Law (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Strategic Management (AREA)
- Marketing (AREA)
- Economics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
One or more embodiments of the present disclosure provide a method for enabling/disabling a blockchain node service, which is applied to a first node device, where the method for enabling a blockchain node service includes: acquiring starting control information of a block chain node service; initiating a first master network node in a locally deployed blockchain master network in response to the initiation control information; and in the case that the first master network node is started up and the subnet nodes in the blockchain subnet managed by the blockchain master network are locally deployed, starting the subnet nodes in response to the starting control information. The method for closing the service of the block chain node comprises the following steps: obtaining closing control information of a block chain node service; under the condition that the subnet nodes in the blockchain subnet managed by the blockchain main network are locally deployed, responding to the closing control information to close the subnet nodes; and under the condition that the sub-network node is closed, closing the first main network node in the locally deployed blockchain main network in response to the closing control information.
Description
Technical Field
One or more embodiments of the present disclosure relate to the field of blockchain technology, and more particularly, to a method and apparatus for enabling/disabling blockchain point services.
Background
The blockchain technique is built on top of a transport network, such as a point-to-point network. Nodes in the blockchain network utilize a chained data structure to validate and store data and employ a distributed node consensus algorithm to generate and update data. In a scenario of establishing a new blockchain network based on an existing blockchain network system, multiple blockchain network nodes are often deployed and operated on the same node device, when a user wishes to start or close the node device, the user will start or close multiple blockchain network nodes having a management relationship with each other, and if the user cannot perform the operation according to a certain flow and rules, the node device is likely to crash.
Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a storage medium for enabling/disabling a block link point service, where the one or more embodiments of the present disclosure provide the following technical solutions:
according to a first aspect of one or more embodiments of the present specification, there is provided a method for initiating a blockchain node service, the method being applied to a first node device, and including:
acquiring starting control information of a block chain node service;
initiating a first master network node in a locally deployed blockchain master network in response to the initiation control information;
and under the condition that the first main network node is started up and the subnet nodes in the block chain subnet managed by the block chain main network are locally deployed, starting the subnet nodes in response to the starting control information.
According to a second aspect of one or more embodiments herein, there is provided a method of turning off block-link point service, the method being applied to a first node apparatus, comprising:
obtaining closing control information of a block chain node service;
in a case where it is determined that a subnet node in a blockchain subnet managed by the blockchain main network is locally deployed, shutting down the subnet node in response to the shutdown control information;
and in the case that the subnet node closing is completed, closing a first master network node in the locally deployed blockchain master network in response to the closing control information.
According to a third aspect of one or more embodiments of the present specification, there is provided a method for starting a blockchain node service, where a first node device deploys a master network node in a blockchain master network and a subnet node in a blockchain subnet, the method including:
and acquiring starting control information of the block chain node service.
And in the case that the subnet node in the blockchain subnet managed by the blockchain main network is locally deployed, starting the subnet node in response to the starting control information.
According to a fourth aspect of one or more embodiments of the present specification, there is provided an apparatus for initiating a blockchain node service, the apparatus being applied to a first node device, and including:
the control information acquisition module is used for acquiring starting control information of the block link point service;
the master network starting module is used for responding to the starting control information and starting a first master network node in a locally deployed block chain master network;
and the subnet starting module is used for responding to the starting control information to start the subnet node under the condition that the first main network node is started and the subnet node in the block chain subnet managed by the block chain main network is locally deployed.
According to a fifth aspect of one or more embodiments herein, there is provided an apparatus for turning off block link point service, the apparatus being applied to a first node device, including:
the control information acquisition module is used for acquiring the closing control information of the block link node service;
a subnet shutdown module, configured to shutdown a subnet node in a blockchain subnet managed by the blockchain main network in response to the shutdown control information when it is determined that the subnet node is locally deployed;
and the master network closing module is used for closing the first master network node in the locally deployed blockchain master network in response to the closing control information under the condition that the sub-network node is closed completely.
According to a sixth aspect of one or more embodiments of the present specification, there is provided an electronic device comprising:
a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the steps of the above-described on/off block link point serving method.
According to a seventh aspect of one or more embodiments of the present specification, there is provided a computer-readable storage medium having stored thereon executable instructions; wherein the instructions, when executed by the processor, implement the steps of the method for turning on/off block link point services described above.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Drawings
FIG. 1 is a schematic diagram of creating an intelligent contract, provided by an exemplary embodiment.
FIG. 2 is a schematic diagram of a calling smart contract provided by an exemplary embodiment.
FIG. 3 is a schematic diagram of creating and invoking an intelligent contract according to an exemplary embodiment.
Fig. 4 is a schematic diagram of building a blockchain subnet based on a blockchain master network according to an exemplary embodiment.
Fig. 5 is a flowchart of a method for initiating a blockchain node service according to an exemplary embodiment.
Fig. 6 is a flowchart of a method for turning off block-link point service according to an exemplary embodiment.
Fig. 7 is a flow chart of another method for initiating a blockchain node service in accordance with an example embodiment.
Fig. 8 is a schematic structural diagram of an apparatus according to an exemplary embodiment.
Fig. 9 is a block diagram of an apparatus for initiating a blockchain node service according to an exemplary embodiment.
Fig. 10 is a block diagram of an apparatus for shutting down block-link point service according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of one or more embodiments of the specification, as detailed in the claims which follow.
It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily performed in the order shown and described herein. In some other embodiments, the method may include more or fewer steps than those described herein. Moreover, a single step described in this specification may be broken down into multiple steps for description in other embodiments; multiple steps described in this specification may be combined into a single step in other embodiments.
Blockchains are generally divided into three types: public chain (Public Blockchain), Private chain (Private Blockchain) and alliance chain (Consortium Blockchain). In addition, there are various types of combinations, such as private chain + federation chain, federation chain + public chain, and other different combinations. The most decentralized of these is the public chain. The public chain is represented by bitcoin and ether house, and the participators joining the public chain can read the data record on the chain, participate in transaction, compete for accounting right of new blocks, and the like. Furthermore, each participant (i.e., node) is free to join and leave the network and perform related operations. Private chains are the opposite, with the network's write rights controlled by an organization or organization and the data read rights specified by the organization. Briefly, a private chain can be a weakly centralized system with strictly limited and few participating nodes. This type of blockchain is more suitable for use within a particular establishment. A federation chain is a block chain between a public chain and a private chain, and "partial decentralization" can be achieved. Each node in a federation chain typically has a physical organization or organization corresponding to it; participants jointly maintain blockchain operation by authorizing to join the network and forming a benefit-related alliance.
Whether public, private, or alliance, may provide the functionality of an intelligent contract. An intelligent contract on a blockchain is a contract that can be executed on a blockchain system triggered by a transaction. An intelligent contract may be defined in the form of code.
Taking the ethernet as an example, the support user creates and invokes some complex logic in the ethernet network, which is the biggest challenge of ethernet to distinguish from bitcoin blockchain technology. The core of the ethernet plant as a programmable blockchain is the ethernet plant virtual machine (EVM), each ethernet plant node can run the EVM. The EVM is a well-behaved virtual machine, which means that a variety of complex logic can be implemented through it. The user issuing and invoking smart contracts in the etherhouse is running on the EVM. In fact, what the virtual machine directly runs is virtual machine code (virtual machine bytecode, hereinafter referred to as "bytecode"). The intelligent contracts deployed on the blockchain may be in the form of bytecodes.
For example, as shown in fig. 1, after Bob sends a transaction containing information to create an intelligent contract to the ethernet network, the EVM of node 1 may execute the transaction and generate a corresponding contract instance. The "0 x6f8ae93 …" in fig. 1 represents the address of the contract, the data field of the transaction holds the byte code, and the to field of the transaction is empty. After agreement is reached between the nodes through the consensus mechanism, this contract is successfully created and can be invoked in subsequent procedures. After the contract is created, a contract account corresponding to the intelligent contract appears on the blockchain and has a specific address, and the contract code is stored in the contract account. The behavior of the intelligent contract is controlled by the contract code. In other words, an intelligent contract causes a virtual account to be generated on a blockchain that contains a contract code and an account store (Storage).
As shown in fig. 2, still taking an ethernet house as an example, after Bob sends a transaction for invoking an intelligent contract to the ethernet house network, the EVM of a certain node may execute the transaction and generate a corresponding contract instance. The from field of the transaction in FIG. 2 is the address of the account of the initiator of the transaction (i.e., Bob), the "0 x6f8ae93 …" in the to field represents the address of the smart contract being invoked, and the value field is the value in EtherFang that is kept in the data field of the transaction as the method and parameters for invoking the smart contract. After invoking the smart contract, the value of balance may change. Subsequently, a client can view the current value of balance through a blockchain node (e.g., node 6 in fig. 2). The intelligent contract is independently executed at each node in the blockchain network in a specified mode, and all execution records and data are stored on the blockchain, so that after the transaction is completed, transaction certificates which cannot be tampered and cannot be lost are stored on the blockchain.
A schematic diagram of creating an intelligent contract and invoking the intelligent contract is shown in fig. 3. To create an intelligent contract in an ethernet workshop, the intelligent contract needs to be compiled, compiled into byte codes, deployed to a block chain and the like. The intelligent contract is called in the Ethernet workshop, a transaction pointing to the intelligent contract address is initiated, and the intelligent contract codes are distributed and run in the virtual machine of each node in the Ethernet workshop network.
It should be noted that, in addition to the creation of the smart contracts by the users, the smart contracts may also be set by the system in the creation block. Such contracts are generally referred to as foundational contracts. In general, the data structure, parameters, attributes and methods of some blockchain networks may be set in the startup contract. Further, an account with system administrator privileges may create a contract at the system level, or modify a contract at the system level (simply referred to as a system contract). In addition to EVM in the ethernet, different blockchain networks may employ various virtual machines, which is not limited herein.
After executing a transaction that invokes a smart contract, a node in the blockchain network generates a corresponding receipt (receipt) for recording information related to executing the smart contract. In this way, information about the contract execution results may be obtained by querying the receipt of the transaction. The contract execution result may be represented as an event (event) in the receipt. The message mechanism can implement message passing through events in the receipt to trigger the blockchain node to execute corresponding processing. The structure of the event may be, for example:
Event:
[topic][data]
[topic][data]
......
in the above example, the number of events may be one or more; wherein, each event respectively comprises fields of a subject (topic) and data (data). The tile chain node may perform the preset process by listening to topic of the event, in case that predefined topic is listened to, or read the related content from the data field of the corresponding event, and may perform the preset process based on the read content.
In the event mechanism, it is equivalent to that there is a client with a monitoring function at a monitoring party (e.g. a user with a monitoring requirement), for example, an SDK or the like for implementing the monitoring function is run on the client, and the client monitors events generated by the blockchain node, and the blockchain node only needs to generate a receipt normally. The passage of transaction information may be accomplished in other ways than through the event mechanism described above. For example, the monitoring code can be embedded in a blockchain platform code running at blockchain nodes, so that the monitoring code can monitor one or more data of transaction content of blockchain transactions, contract states of intelligent contracts, receipts generated by contracts and the like, and send the monitored data to a predefined monitoring party. Since the snoop code is deployed in the blockchain platform code, rather than at the snooper's client, this implementation based on snoop code is relatively more proactive than the event mechanism. The above monitoring code may be added by a developer of the blockchain platform in the development process, or may be embedded by the monitoring party based on the own requirement, which is not limited in this specification.
The blockchain technology is different from the traditional technology in one of decentralization characteristics, namely accounting is performed on each node, or distributed accounting is performed, and the traditional centralized accounting is not performed. To be a difficult-to-defeat, open, non-falsifiable data record decentralized honest and trusted system, the blockchain system needs to be secure, unambiguous, and irreversible in the shortest possible time for distributed data records. In different types of blockchain networks, in order to keep the ledger consistent among the nodes recording the ledger, a consensus algorithm is generally adopted to ensure that the consensus mechanism is the aforementioned mechanism. For example, a common mechanism of block granularity can be implemented between block nodes, such as after a node (e.g., a unique node) generates a block, if the generated block is recognized by other nodes, other nodes record the same block. For another example, a common mechanism of transaction granularity may be implemented between the blockchain nodes, such as after a node (e.g., a unique node) acquires a blockchain transaction, if the blockchain transaction is approved by other nodes, each node that approves the blockchain transaction may add the blockchain transaction to the latest block maintained by itself, and finally, each node may be ensured to generate the same latest block. The consensus mechanism is a mechanism for the blockchain node to achieve a global consensus on the block information (or called blockdata), which can ensure that the latest block is accurately added to the blockchain. The current mainstream consensus mechanisms include: proof of Work (POW), Proof of stock (POS), Proof of commission rights (DPOS), Practical Byzantine Fault Tolerance (PBFT) algorithm, HoneyBadgerBFT algorithm, etc.
Due to the decentralized characteristic of the blockchain network, all blockchain nodes in the blockchain network can maintain the same blockchain data, and the special requirements of part of nodes cannot be met. Taking a federation chain as an example, all federation members (i.e., node members in a federation) may form a blockchain network, and all federation members respectively have corresponding blockchain nodes in the blockchain network, and may obtain all transactions and related data occurring on the blockchain network through the corresponding blockchain nodes. In some cases, however, there may be some security-required transactions that some coalition members wish to complete, which may both wish to be able to verify on the blockchain or to take advantage of other advantages of blockchain technology, and avoid other coalition members from viewing the transactions and associated data. Although the federating members can additionally build a new blockchain network in a manner similar to the blockchain network including all federating members described above, the new blockchain network is built from scratch, which consumes a lot of resources and is time-consuming in both the building process and the post-building configuration process. The demand between the members of the federation is often temporary or has a certain timeliness, so that the newly-built blockchain network can quickly lose significance due to the disappearance of the demand, thereby further increasing the link establishment cost of the blockchain network. The demands among the federation members often change, and the federation members corresponding to each demand often differ, so that a new blockchain network may need to be established whenever a change occurs in a federation member, thereby causing a great waste of resources and time.
For this purpose, the established blockchain network may be used as a blockchain master network, and a blockchain sub-network may be established on the basis of the blockchain master network. Then, in a federation chain scenario such as that described above, federation members can build the required blockchain subnets on a blockchain master basis based on their own needs, already participating in the blockchain master. Because the block chain sub-networks are established on the basis of the block chain main network, compared with the process of completely and independently establishing a block chain network, the block chain sub-networks are greatly reduced in consumed resources, required time consumption and the like, and are extremely high in flexibility.
The process of quickly establishing the block chain sub-network based on the block chain main network comprises the following steps: each block link point in a block chain main network respectively acquires a transaction for establishing a block chain sub-network, the transaction comprises configuration information of the block chain sub-network, the configuration information comprises identity information of node members participating in establishing the block chain sub-network, each block link point in the block chain main network respectively executes the transaction to reveal the configuration information, and when the configuration information comprises identity information of a node member corresponding to a first block link point, node equipment for deploying the first block chain node starts a second block chain node belonging to the block chain sub-network based on an innovation block comprising the configuration information.
The transaction for establishing the blockchain sub-network can be initiated by an administrator of the blockchain main network, that is, the administrator is only allowed to establish the blockchain sub-network on the basis of the blockchain main network, and the establishment permission of the blockchain sub-network is prevented from being opened to a common user, so that the security problem caused by the establishment permission can be prevented. In some cases, a common user of the blockchain main network may also be allowed to initiate a transaction for building the blockchain sub-network, so as to meet networking requirements of the common user, and the common user can still quickly build the blockchain sub-network under the condition that an administrator is not convenient to initiate the transaction.
For example, as shown in fig. 4, the main network of the blockchain is subnet0, and the subnet0 includes blockchain link points nodeA, nodeB, nodeC, nodeD, and nodeE. Assume nodeA, nodeB, nodeC, and nodeD wish to build a blockchain subnet: if nodeA is an administrator and only allows the administrator to initiate a transaction to build a blockchain subnet, the transaction to build the blockchain subnet can be initiated by nodeA to subnet 0; if the nodeb is an administrator and only the administrator is allowed to initiate a transaction for building the blockchain subnet, nodeb a to nodeb d need to make a request to nodeb, so that nodeb initiates the transaction for building the blockchain subnet to subnet 0; if the node E is an administrator but allows a common user to initiate the transaction of building the blockchain sub-network, the node A-node E can initiate the transaction of building the blockchain sub-network to the subnet 0. Of course, the blockchain link point initiating the transaction for building the blockchain subnet does not necessarily participate in the built blockchain subnet, regardless of the administrator or the general user, for example, although the blockchain subnet is finally built by nodeA, nodeB, nodeC and nodeD, the transaction for building the blockchain subnet may be initiated by nodeE to subnet0, but the transaction for building the blockchain subnet is not necessarily initiated by nodeA to nodeD.
When the blockchain sub-network is constructed on the basis of the blockchain main network, it is easy to understand that a logical hierarchical relationship exists between the blockchain sub-network and the blockchain main network. For example, when a blockchain subnet1 is constructed on subnet0 shown in fig. 4, subnet0 may be considered to be at the first level and subnet1 may be considered to be at the second level. In one case, the blockchain main network in this specification may be an underlying blockchain network, that is, the blockchain main network is not a blockchain sub-network constructed on the basis of other blockchain networks, for example, the subnet0 in fig. 4 may be regarded as a blockchain main network belonging to the underlying blockchain network type. In another case, the blockchain main network in this specification may also be a subnet of another blockchain network, for example, another blockchain subnet may be further configured on the basis of the subnet1 in fig. 4, and at this time, the subnet1 may be considered as the blockchain main network corresponding to the blockchain subnet, and this does not affect that the subnet1 belongs to the blockchain subnet created on the subnet0 at the same time. It can be seen that the blockchain main network and the blockchain sub-network are actually relative concepts, and the same blockchain network may be the blockchain main network in some cases and the blockchain sub-network in other cases.
After the transaction for establishing the blockchain sub-network is sent to the blockchain main network, the consensus nodes in the blockchain main network perform consensus, and after the consensus is passed, each main network node executes the transaction to complete establishment of the blockchain sub-network. The consensus process depends on the consensus mechanism employed, such as any of the consensus mechanisms described above, and is not limited by the present specification.
The configuration information is included in the transaction of the block chain sub-network, and the configuration information can be used for configuring the block chain sub-network, so that the block chain sub-network meets networking requirements. For example, by including the identity information of the node members in the configuration information, it is possible to specify which blockchain nodes the constructed blockchain subnet includes.
The identity information of the node member may include a public key of the node, or other information capable of representing the node identity, such as a node ID, which is not limited in this specification. Taking a public key as an example, each blockchain node has one or more corresponding sets of public-private key pairs, and the private key is held by the blockchain node and the public key is public and uniquely corresponds to the private key, so that the identity of the corresponding blockchain node can be characterized by the public key. Therefore, for blockchain nodes that are desired to be node members of a blockchain subnet, the public keys of these blockchain nodes can be added to the transaction of the building blockchain subnet as the identity information of the node members. The public and private key pair described above may be used in the process of signature verification. For example, in a signed consensus algorithm, such as the sub net1, the above-mentioned nodeA1 signs a message with its own private key, and broadcasts the signed message in the sub net1, while nodeB1, nodeC1 and nodeD1 can verify that the received message is signed with the public key of nodeA1 to confirm that the received message is indeed from nodeA1 and has not been tampered with.
The first master network node may be a blockchain node on the blockchain master network that belongs to a node member indicated by the configuration information. When the blockchain subnet is constructed, the first master network node does not directly participate in the construction of the blockchain subnet and becomes a node member thereof, but the first subnet node needs to be generated by the node device for deploying the first master network node and becomes a node member in the blockchain subnet by the first subnet node. The first main network node and the first sub-network node correspond to the same blockchain member, for example, correspond to the same alliance chain member in an alliance chain scene, but the first main network node belongs to a blockchain main network and the first sub-network node belongs to a blockchain sub-network, so that the blockchain member can participate in the transaction of the blockchain main network and the blockchain sub-network respectively; moreover, because the blockchain main network and the blockchain sub-network belong to two mutually independent blockchain networks, the blocks generated by the first main network node and the blocks generated by the first sub-network node are respectively stored in different storages (the adopted storages can be databases, for example) on the node device, so that mutual isolation between the storages used by the first main network node and the first sub-network node respectively is realized, and thus, data generated by the blockchain sub-network can only be synchronized among the node members of the blockchain sub-network, so that the blockchain members only participating in the blockchain main network cannot obtain the data generated by the blockchain sub-network, the data isolation between the blockchain main network and the blockchain sub-network is realized, and the transaction requirements between partial blockchain members (namely, the blockchain members participating in the blockchain sub-network) are met.
It can be seen that the first master network node and the first sub-network node are logically divided block chain link points, and from the perspective of physical devices, the node devices which are equivalent to the first master network node and the first sub-network node are deployed to participate in both the block chain master network and the block chain sub-network. Since the blockchain main network and the blockchain sub-network are independent from each other, so that the identity systems of the two blockchain networks are also independent from each other, even though the first main network node and the first sub-network node may adopt the same public key, the first main network node and the first sub-network node should be regarded as different blockchain nodes. For example, in fig. 4, the nodeA in subnet0 corresponds to a first master network node, and the node device deploying the nodeA generates nodeA1 belonging to subnet1, and the nodeA1 corresponds to a first sub-network node. It can be seen that, since the identity systems are independent of each other, even if the public key adopted by the first subnet node is different from that of the first master network node, the implementation of the solution in this specification is not affected.
Of course, the node members of the blockchain sub-network are not necessarily only part of the node members of the blockchain main network. In some cases, the node members of the blockchain subnet may be completely consistent with the node members of the blockchain main network, and at this time, all the blockchain members may obtain data on the blockchain main network and the blockchain subnet, but data generated by the blockchain main network and the blockchain subnet may still be isolated from each other, for example, one type of service may be implemented on the blockchain main network, and another type of service may be implemented on the blockchain subnet, so that service data generated by the two types of services may be isolated from each other.
In addition to the identity information of the node members described above, the configuration information may include at least one of: the network identifier of the blockchain subnet, the identity information of an administrator of the blockchain subnet, the attribute configuration for the blockchain platform code, and the like, which are not limited in this specification. The network identifier is used to uniquely characterize the blockchain subnet, and thus the network identifier of the blockchain subnet should be distinguished from the blockchain main network and other blockchain subnets established on the blockchain main network. Identity information of an administrator of the blockchain subnet, such as a public key of a node member as the administrator; the administrators of the blockchain main network and the blockchain sub-network may be the same or different.
One of the advantages of building the blockchain subnet by using the blockchain master network is that since the first master network node is already deployed on the node device generating the first subnet node, the blockchain platform code used by the first master network node can be multiplexed on the first subnet node, so that repeated deployment of the blockchain platform code is avoided, and the building efficiency of the blockchain subnet is greatly improved. Then, if the configuration information does not include the attribute configuration for the blockchain platform code, the first subnet node may reuse the attribute configuration adopted on the first master network node; if the configuration information includes the attribute configuration for the blockchain platform code, the first subnet node may adopt the attribute configuration, so that the attribute configuration adopted by the first subnet node is not limited by the attribute configuration of the first main network node and is not related to the first main network node. The attribute configuration for blockchain platform code may include at least one of: code version number, whether consensus is required, type of consensus algorithm, block size, etc., which is not limited in this specification.
The transactions that make up the blockchain subnet include transactions that invoke contracts. The address of the invoked smart contract, the method invoked and the incoming parameters may be specified in the transaction. For example, the contract invoked may be the aforementioned startup contract or system contract, the method invoked may be a method that builds a blockchain subnet, and the incoming parameters may include the configuration information described above. In one embodiment, the transaction may contain the following information:
from:Administrator
to:Subnet
method:AddSubnet(string)
string:genesis
the from field is information of the initiator of the transaction, such as administeror indicating that the initiator is an Administrator; the to field is the address of the intelligent contract being called, for example, the intelligent contract may be a Subnet contract, and the to field is specifically the address of the Subnet contract; the method field is a called method, for example, the method used in the Subnet contract to build the blockchain Subnet may be AddSubnet (string), and string is a parameter in the AddSubnet () method, and the value of the parameter is represented by the aforementioned example, which is specifically the aforementioned configuration information.
Take the example that nodes nodeA-nodeS on Subnet0 execute a transaction that invokes the AddSubnet () method in the Subnet contract. After the transaction passes the consensus, nodeA-nodeE respectively execute the AddSubnet () method and transmit configuration information to obtain corresponding execution results.
The execution result of the contract may include the configuration information, and the execution result may be in the receipt as described above, and the receipt may contain the event related to the execution of the adsubnet () method, i.e., the networking event. The topoc of a networking event may contain a predefined networking event identification to distinguish it from other events. For example, in an event related to the execution of the AddSubnet () method, the content of topic is a keyword subnet, and the keyword is distinguished from topic in the event generated by other methods. Then, nodeA to nodeE can determine to monitor the event related to executing the AddSubnet () method, that is, the networking event, when the topic including the keyword subnet is monitored by monitoring topic included in each event in the generated receipt. For example, the events in the receipt are as follows:
Event:
[topic:other][data]
[topic:subnet][data]
......
then, when the nodeA-nodeE monitors the 1 st event, the event is determined to be irrelevant to the AddSubnet () method because the contained topic content is other; and when the 2 nd event is monitored by the nodeA to nodeE, determining that the event is related to the AddSubnet () method because the contained topic content is subnet, and further reading a data field corresponding to the event, wherein the data field comprises the configuration information. Taking the example that the configuration information includes the public key of the node member of the blockchain subnet, the content of the data field may include, for example:
{subnet1;
the public key of nodeA, the IP of nodeA, port number … of nodeA;
public key of nodeB, IP of nodeB, port number … of nodeB;
public key of nodeC, IP of nodeC, port number … of nodeC;
the public key of nodeD, the IP of nodeD, port number … of nodeD;
}
where subnet1 is the network identification of the blockchain subnet that one wishes to create. Each blockchain link point in the blockchain master network may record network identifiers of all blockchain subnets that have been created on the blockchain master network, or other information related to the blockchain subnets, which may be maintained in the Subnet contract, for example, and may specifically correspond to values of one or more contract states included in the Subnet contract. Then, nodeA-nodeE can determine whether the subnet1 already exists according to the recorded network identifiers of all the created subnet block chains; if not, subnet1 is the new blockchain subnet that needs to be created currently, and if so, subnet1 is already present.
In addition to the network identifier of the new blockchain subnet that is desired to be created, a predefined new network identifier may be used, which indicates that the corresponding networking event is used to create the new blockchain subnet. For example, the subnet1 may be replaced by newsbnet, where newsbnet is a predefined new network identifier, and when the nodeA to nodeE recognize that the data field includes newsbnet, it may be determined that an event including newsbnet is a networking event and a new blockchain subnet needs to be created.
Besides the network identification subnet1, the data field also contains the identity information of each node member. The node device deploying the first master network node may monitor the generated receipt, and obtain, by the node device deploying the first master network node, configuration information or an innovation block included in the networking event when the networking event is monitored and the content of the networking event indicates that the first master network node belongs to the node member. Or the first block link point may monitor the generated receipt, and trigger the node device deploying the first block link node to acquire the configuration information or the created block included in the networking event when the networking event is monitored and the content of the networking event indicates that the first block link point belongs to the node member.
As previously described, the node device may listen for receipts directly. Assuming that nodeA to nodeE are respectively deployed on the node devices 1 to 5, and the node devices 1 to 5 can monitor receipts respectively generated by the nodeA to nodeE, the node devices 1 to 5 further identify the identity information of the node members included in the data field to determine their own processing modes when it is monitored that the subnet1 is a block chain subnet that needs to be newly built. Take nodeA and node device 1 as an example: if node device 1 finds that the data field contains identity information such as a public key, an IP address, and a port number of nodeA, node device 1 generates a created block containing configuration information when obtaining the configuration information from the data field based on the above-mentioned message mechanism, and node device 1 deploys nodeA1 locally, and further loads the generated created block by nodeA1, thereby becoming a subnet node of subnet 1; similarly, node device 2 may generate nodeB1, node device 3 may generate nodeB c1, and node device 4 may generate nodeB 1. And if the node device 5 finds that the identity information included in the data field does not match with itself, the node device 5 does not generate a creation block according to the configuration information in the data field, and does not generate a block link point in subnet1.
As mentioned above, the blockchain link point in the blockchain master network can listen for the receipt and trigger the node device to perform the relevant processing according to the listening result. For example, when determining that subnet1 is a blockchain subnet that needs to be newly built, nodeA to nodeE further identify the identity information of the node members included in the data field to determine their own processing methods. For example, the nodeA to nodeD may find that the data field includes identity information such as their own public key, IP address, and port number, and assume that nodeA to nodeD are respectively deployed on node devices 1 to 4, taking nodeA and node device 1 as an example: the nodeA triggers the node device 1, so that the node device 1 obtains the configuration information from the data field based on the message mechanism and generates a created block containing the configuration information, and the node device 1 deploys the nodeA1 locally, and the nodeA1 loads the generated created block, so that the node device 1 becomes 1 subnet node in the subnet 1; similarly, nodeB will trigger NodeB1 to be generated by node device 2, nodeC will trigger NodeC1 to be generated by node device 3, and nodeD will trigger NodeD1 to be generated by node device 4. And the nodeE finds that the identity information contained in the data field is not matched with the nodeE, and if the nodeE is deployed on the node device 5, the node device 5 does not generate a creation block according to the configuration information in the data field, and does not generate a node in the subnet1.
As mentioned above, the first master network node and the first subnet node do not necessarily adopt the same identity information. Therefore, in the above embodiment, the data field may include the identity information previously generated for nodeA 1-nodeD 1, and is different from the identity information of nodeA-nodeD. Taking nodeA and node device 1 as an example: if identity information of nodeA1 is found in the data field, node device 1 may generate a founding block, deploy nodeA1, and load the founding block by nodeA 1; alternatively, nodeA, if identity information of nodeA1 is found in the data field, will trigger node device 1 to generate a foundational block, deploy nodeA1, and load the foundational block by nodeA 1. The processing modes of other blockchain nodes or node devices are similar, and are not described in detail herein.
In addition to configuration information, the execution results of the contract may include a foundational block. In other words, in addition to the configuration information contained in the data field, the created block containing the configuration information may be directly generated in the process of executing the contract call, so that the created block is contained in the data field, and for the nodeA to nodeD described above, the corresponding node devices 1 to 4 may directly obtain the created block from the data field through a message mechanism without self-generation, so that the deployment efficiency of nodeA1 to nodeD1 may be improved.
In this specification, the transaction for creating the blockchain subnet may not be a transaction for calling an intelligent contract, so that the blockchain network that does not support the intelligent contract may also implement the technical solution of this specification, thereby quickly creating the blockchain subnet on the basis of the blockchain main network. For example, a group network transaction type identifier may be predefined, and when a transaction includes the group network transaction type identifier, it indicates that the transaction is used for building a new blockchain subnet, that is, the transaction is a transaction for building a blockchain subnet. The blockchain platform code may include related processing logic for component blockchain subnets, so that when a first master network node running the blockchain platform code performs a transaction, if the transaction is found to include the above networking transaction type identifier, and the first master network node belongs to a node member indicated by configuration information in the transaction, a node device deploying the first master network node may be triggered to generate an innovation block including the configuration information and start the first subnet node based on the above processing logic, and the innovation block is loaded by the first subnet node to form a blockchain node in the blockchain subnet.
The node device realizes the deployment of a blockchain node on the node device by creating an instance of running blockchain platform codes in the process. For the first master network node, a first instance is created by the node device in the above process and formed by the first instance running blockchain platform code. Similarly, for the first subnet node, a second instance different from the first instance is created by the node device in the above process, and is formed by the second instance running the blockchain platform code. For example, the node device may first create a first instance in a process to form a first blockchain node in a blockchain master network; when the node member corresponding to the node device wishes to participate in building the blockchain subnet, a second instance may be created in the process, where the second instance is different from the first instance, and forms a second blockchain node in the blockchain subnet. When the first instance and the second instance are located in the same process, the deployment difficulty of the first subnet node can be reduced and the deployment efficiency can be improved because cross-process interaction is not involved; of course, the second instance may also be in a different process on the node device than the first instance, and this specification does not limit this; for example, the node device may create a first instance in a first process to form a first blockchain node in a blockchain master network; when the node member corresponding to the node device wishes to participate in building the blockchain subnet, a second process different from the first process may be started, and a second instance different from the first instance may be created in the second process, so that the second blockchain node in the blockchain subnet is formed by the second instance. In fact, each block link point deployed on any node device referred to in the embodiments of this specification is a different block chain instance running on any node device, blocks generated by each block link point deployed on any node device are respectively stored in different storages (for example, a database) on any node device, and the storages used by each block link point deployed on any node device are isolated from each other.
By the method, the block chain sub-network can be created on the block chain main network. Taking fig. 4 as an example, the subnet0 originally includes nodeA to nodeE, and can construct subnet1 on the basis of subnet0, where subnet1 includes nodeA1 to nodeD1, and nodeA1, nodeB and nodeB1, nodeC and nodeC1, and nodeD1 are respectively disposed on the same node device. Similarly, a subnet2 or more block chain subnets can be constructed on subnet0, where subnet2 includes nodeA2, nodeB2, nodeC2, and nodeE2, and nodeA1, nodeA2, nodeB1, nodeB2, nodeC1, nodeD1, and nodeE2 are respectively deployed on the same node device. And, subnet1, subnet2, etc. may be used as new blockchain main networks, and a blockchain subnet is further constructed on the basis, which is similar to the construction of subnet1 or subnet2, and is not described herein again.
In this way, a blockchain subnet is established, and the node members included in the blockchain subnet are determined by the configuration information described above. Therefore, in the above scenario of building a blockchain subnet based on a blockchain master network, a plurality of blockchain nodes are often deployed on the same node device, for example, nodeA1 and nodeA2 in fig. 4 are deployed on the same node device 1, so when a user, such as an administrator, wishes to start or close a blockchain node service of the node device 1, it may involve starting or closing each blockchain node deployed in the node device 1, specifically, nodeA1 and nodeA2 deployed by the node device 1 need to be controlled to start or close, while sublet 0, sublet 1 and sublet 2 respectively corresponding to nodeA, nodeA1 and nodeA2 have a certain hierarchical relationship, which is embodied that a blockchain network at a high level is managed by a blockchain network at a low level adjacent to, for example, sublet 1 and sublet 685 are managed by sublet 0, and a sublet 0 may start or close each blockchain node, if a sublet 737 starts or closes each blockchain node, according to a certain hierarchical relationship, it may cause some of the block link points to be not normally started or shut down, or even cause the node device to crash.
Therefore, the present specification provides a control method for starting/closing a block link point service, which can enable a control node device to sequentially start/close each block link point according to a management sequence of a block chain network to which each block link point is deployed when a block chain master network is established and managed by a block chain sub-network, thereby realizing safe and lossless starting/closing of the block link point service of the node device.
Fig. 5 is a flowchart of a method for initiating a blockchain node service according to an exemplary embodiment. As shown in fig. 5, the method is applied to a first node device, and includes:
The first node device may be deployed with a master network node or a sub-network node corresponding to a blockchain master network or a blockchain sub-network, or may be deployed with other blockchain nodes corresponding to other blockchain networks except for the blockchain master network or the blockchain sub-network, in this case, the first node device may obtain the start control information of the blockchain link point service by monitoring a receipt of the node service for starting a transaction, where it is noted that the blockchain link point service in this embodiment refers to a blockchain system formed by a predetermined blockchain master network and blockchain sub-networks, and therefore although the first node device does not start a blockchain node corresponding to a relevant blockchain master network or blockchain sub-network before starting the blockchain node service, the first node device may be deployed with other blockchain nodes corresponding to other blockchain networks except for the blockchain master network or the blockchain sub-network, and the other blockchain nodes are in an open state, so that theoretically, the first node device can also start a receipt of a transaction by monitoring the node service executed on the other blockchain nodes under the condition that the blockchain node service is not started, so as to acquire starting control information of the blockchain node service. In an embodiment, the node devices with the master network node are all deployed with other blockchain nodes corresponding to other blockchain networks, so that a node service start transaction can be initiated on the other blockchain networks, so that each node device can acquire start control information of a blockchain linked point service by monitoring a receipt of the transaction and control the start of the master network node and the subnet node, thereby implementing a start process of the whole blockchain system composed of the blockchain master network and the blockchain subnet.
The first node device may further obtain the start control information of the blockchain node service through multiple ways, for example, the start control information of the blockchain node service may be obtained directly by receiving a node service start message sent by an administrator of the blockchain master network, or may be obtained by receiving a node service start message sent by an ordinary user of the blockchain master network, which is not limited in this description.
The start control information may include identity information corresponding to the first node device, such as an IP address, a port number, or a held main network public key of the first node device. As described above, a receipt for starting a node transaction or a node service start message may include identity information, so that start control information of a block chain link point service acquired by a first node device includes the identity information, and when the first node device detects that the start control information includes the identity information of the first node device itself, a subsequent process for starting a block chain node service is further executed, so that a node service start transaction initiated on another block chain network or a node service start message broadcasted to each node device can control a specific node device to start the block chain link point service.
And the first node equipment starts the first main network node under the condition of acquiring the starting control information and determining that the first main network node in the block chain main network is locally deployed. After the first master network node is started, network connection can be automatically established with other nodes in other block chain master networks, after all master network nodes in the block chain master network are started, the block chain master network can be considered to be started completely, at this time, transaction can be initiated on the block chain master network, so that the transaction can be normally identified and executed, but for the first node device, after the first master network node is started, because the first master network node theoretically already carries information of all block chain master networks, the first node device can acquire various types of information in the block chain master network by initiating a local transaction mode.
In this embodiment, each block link point deployed on the first node device is substantially a different block chain instance running on the first node device and formed by a respective plug-in module, and meanwhile, the first node device is deployed with a plug-in manager corresponding to any block link point, which is used for managing a plug-in module on which any block chain node (a master network node or a sub network node) deployed on the first node device depends when running, that is, a plug-in module used for forming any block chain node. Therefore, the starting or closing of any blockchain node by the first node device in the embodiments of the present specification means that the first node device can start or close a plug-in module for constituting any blockchain node by controlling a plug-in manager corresponding to any blockchain node.
In this embodiment of the present description, the plug-in manager deployed on the first node device maintains the operating state of each block chain node deployed on the first node device, and therefore, the first node device may obtain the operating state of the first master network node by checking the plug-in manager corresponding to the locally deployed first master network node, so as to determine whether the first master network node has been started.
The first node device maintains a local subnet list, and subnet identifiers of blockchain subnets to which subnet nodes locally deployed by the first node device belong are recorded in the local subnet list. When the subnet identifier of a certain blockchain subnet is recorded in the local subnet list, it may be considered that the first node device deploys the subnet node in the blockchain subnet corresponding to the subnet identifier, and therefore, the first node device may determine whether the subnet node in the blockchain subnet managed by the blockchain main network is deployed locally by querying whether the local subnet list maintained by the first node device contains the subnet identifier, without waiting for the completion of the complete startup of the blockchain main network.
The local subnet list maintained by the first node device further records an operation state of a block chain subnet to which each subnet node locally deployed by the first node device belongs, and if the local subnet list records a subnet identifier corresponding to the block chain subnet to which a certain subnet node belongs, the operation state corresponding to the block chain subnet is a closed state, which indicates that under the management of the block chain master network, the block chain subnet to which the subnet node belongs is required to be set to the closed state, so that the subnet node may not be started, thereby ensuring that the actual operation state of the block chain node is consistent with the management record of the block chain master network, and if the operation state corresponding to the block chain subnet to which the subnet node belongs is an open state, it indicates that the block chain subnet to which the subnet node belongs is required to be set to the open state, and at this time, the subnet node may be started. By starting the subnet node when the running state of the blockchain subnet is the open state, the first node device blockchain node service can be ensured to be started correctly and satisfactorily.
Taking fig. 4 as an example, it is assumed that nodeA to nodeE on subnet0 are respectively deployed on node devices 1 to 5, and thus node device 1 is deployed with subnet node nodeA, subnet node nodeA1 belonging to subnet1 and subnet node nodeA2 belonging to subnet 563, in addition to the primary network nodeA, for node device 1, subnet identifiers and operating states of subnet node 1 and subnet2 are recorded in a local subnet list locally maintained, and if node device 1 acquires start control information of block link point service, it is first checked whether it is deployed with primary network node nodeA by using a plug-in manager, in case that it is determined that nodeA is deployed, locally deployed nodeA is started in response to the start control information, then it is still checked by using the plug-in manager whether nodeA is started, in case that nodeA is started, it is searched for a locally maintained local subnet list, thereby determining that locally deployed device 1 has corresponding nodeA 829 3 and nodeA 13 corresponding to subnet b3 and b 28 b3, and assuming that the running states of subnet1 and subnet2 are both in an on state, at this time, node device 1 may control the plugin managers corresponding to nodeA1 and nodeA2 to start nodeA1 and nodeA2 in response to the start control information; for the node device 5, a node e belonging to a subnet0 and a node e2 belonging to a subnet2 are locally deployed, so that a subnet identifier and an operating state of a subnet2 are recorded in a local subnet list maintained by the node device 5, if the node device 5 acquires start control information of a block link point service, the node device first starts a main network node e through a plug-in manager corresponding to the node e, and searches for the local subnet list maintained locally when the node a is started, and finds that the subnet identifier subnet2 is included in the local subnet list maintained by the node device, so that the node device 5 can determine that a subnet node 2 corresponding to the subnet2 is locally deployed, and assume that the operating state corresponding to the subnet2 is in a closed state, at this time, the node device 5 does not perform any operation, so as to maintain the closed state where the subnet2 should be in. Similarly, after acquiring the start control information of the blockchain node service, the node devices 2, 3, and 4 may also execute the above procedure to open the corresponding main network node and sub-network node, so that the node devices complete the process of opening the blockchain node service.
In this specification embodiment, the local subnet list may be generated by the first node device by querying a subnet management contract deployed on the first primary network node. For example, the subnet identifier and the operating state included in the local subnet list may be obtained by the first node device monitoring a subnet information query event, where the subnet information query event is generated by the first master network node executing a subnet information query transaction that invokes a subnet management contract on the block chain master network, and the subnet information query event includes subnet information of each block chain subnet managed by the block chain master network, where the subnet information includes subnet identifier, node member identity information, operating state, plug-in configuration information, and the like. For example, after obtaining the start control information of the blockchain link point service and starting the first master network node, the node device 1 may initiate a subnet information query transaction (local transaction, which does not participate in consensus) to a subnet management contract on the blockchain master network, and monitor a subnet information query event generated after the subnet management contract executes the transaction, where a topic keyword is ListSubnet, a data field includes subnet information of each blockchain subnet managed by the blockchain master network, including subnet identifiers, node membership information, an operating state, plug-in configuration information, and the like of the blockchain master network and each blockchain subnet, and the subnet information query event may be expressed as follows:
[topic:ListSubnet][data]
after being monitored by the node device 1, reading the content (only showing the subnet identification, node membership information and running state part of the blockchain subnet) in the data field as follows:
{subnet1:on;nodeA1,nodeB1,nodeC1,nodeD1;
subnet2:off;nodeA2,nodeB2,nodeC2,nodeE2;}
the prefixes subnet1 and subnet2 represent subnet identifiers of the blockchain subnet, the "on" or "off" after the colon represents an operating state, and the suffixes nodeA1 and the like represent node identity information of the subnet nodes, such as node public keys. The node device 1 compares the identity information of each node maintained by itself with the content in the data field, and finds the block chain subnet to which the subnet node deployed by itself belongs, for example, the node device 1 maintains the identity information of nodeA1 and nodeA2, and the subnet identifiers of the block chain subnets corresponding to the corresponding subnet nodes in the data field are subnet1 and subnet2, so the node device 1 can determine that the subnet nodes corresponding to subnet1 and subnet2 have been deployed locally, and then add the subnet identifiers and the operating states corresponding to subnet1 and subnet2 into the local subnet list respectively. In another embodiment, the node device 1 may initiate the subnet information query transaction to the subnet management contract in advance, so that a local subnet list including subnet1 and subnet2 is already maintained, and after the node device 1 acquires the start control information of the zone-link node service and starts the first master network node, it is not necessary to initiate the subnet information query transaction to the subnet management contract. The contract state of each block chain Subnet managed by the block chain main network is maintained in the contract state of the Subnet management contract, and the Subnet contract state corresponding to each block chain Subnet records Subnet identification, running state, public key and common identification type information of node members, plug-in configuration information, creation block and the like of the corresponding block chain Subnet.
Or, the first node device may read the contract state of the subnet management contract from the database corresponding to the first master network node, and generate the local subnet list from the subnet information included in the read contract state, for example, the node device 1 may directly read the contract state of the subnet management contract deployed in the block-link master network from the database of the block-link master network corresponding to the first master network node, and since the contract state records the subnet information of each block-link subnet managed by the block-link master network, the node device 1 may add the subnet identifications and operating states corresponding to the subdean net1 and the subdea 2 corresponding to the subdea 1 and the subdea 2, respectively, to the local subnet list according to the contract state of the subnet management contract and the identity information of the subdea 1 and the nodeA2 maintained by the node device 1. The Subnet management contract may be the Subnet contract, or may be another intelligent contract deployed on the blockchain main network.
As described above, the first node device may determine whether a subnet node in a blockchain subnet managed by a blockchain main network has been deployed locally and an operating state of the blockchain subnet by querying a local subnet list maintained by the first node device, and in another embodiment, after acquiring a data field of the subnet information query event, the first node device may also determine whether a subnet node and an operating state of the blockchain subnet have been deployed locally according to subnet information of each blockchain subnet in the data field directly, without using or sorting out the local subnet list, for example, after the node device 1 acquires start control information of a blockchain node service and starts the first main network node, the node device 1 may query in the data field directly to obtain identity information of the subnet node corresponding to a subnet1 as nodeA1, nodeB1, nodeC1 and nodeD1, and the operating state is an open state, the identity information of the subnet node corresponding to the subnet2 is nodeA2, nodeB2, nodeC2 and nodeE2, the operation state is a closed state, and then the identity information nodeA1 and nodeA2 maintained by the node device are compared with each other, and it is determined that the identity information maintained by the node device 1 is included in the subnet node member corresponding to the subnet1 and the subnet node member corresponding to the subnet2, so that the node device 1 can determine that the node device is locally deployed with nodeA1 and nodeA2 corresponding to the subnet1 and the subnet2, respectively, and the operation state of the subnet1 is an open state, and the operation state of the subnet2 is a closed state.
Each block chain sub-network under the management of the block chain main network can comprise a block chain sub-network established under the block chain main network, and can also comprise a block chain sub-network which is not established under the block chain main network. Generally, a blockchain subnet established on any blockchain network is managed by any blockchain network, for example, if a subnet1.1 with nodeA3 and nodeB3 as node members is created on the basis of subnet1, then subnet1 will obtain the management right of subnet1.1, and can control the operation state, consensus attribute, plug-in configuration, and the like of subnet1.1, while subnet0 cannot manage subnet1.1, in this scenario, a node device may use different rights management for different blockchain networks, for example, when a monitored event belongs to subnet0, the node device may only read the local subnet list corresponding to the rights of subnet 563 when completing various operations in response to the event, and the local subnet list only may include the identifier of the blockchain managed by subnet0, that is, subnet1 and subnet 3526 include subnet 351, and subnet 3526.
However, by some means, cross-layer management of subnet0 may be achieved, enabling subnet0 to manage subnet 1.1. For example, subnet0 may add subnet information about subnet1.1 obtained from parent network subnet1 of subnet1.1 to the contract state of subnet management contract on subnet0 through cross-chain technology, so that subnet0 obtains the management right of subnet1.1, and a subsequent host network node on subnet0 may write subnet information of subnet1.1 into a subnet information query event through a subnet information query transaction, so that each node device adds subnet information of subnet1.1 to the local subnet list of the corresponding right of subnet 0; alternatively, an administrative right transfer transaction may be issued on the subnet1, so that after monitoring an administrative right transfer event generated after the administrative right transfer transaction is executed, each node device adds subnet information of subnet1.1 in the local subnet list of the authority corresponding to the subnet1 to the local subnet list of the authority corresponding to the subnet0 at the node device level, so that although the contract state of the subnet management contract on the subnet0 does not record subnet information of subnet1.1, the subnet information of subnet1.1 may be read from the local subnet list of the authority corresponding to the subnet0 when the node device monitors an event occurring in the subnet0, and thus the subnet0 is substantially enabled to obtain the administrative right to subnet 1.1.
As described above, by sending out the transaction for constructing the blockchain subnet based on the blockchain main network, so as to construct the blockchain subnet, the newly constructed blockchain subnet can be managed by the blockchain main network for constructing the blockchain subnet. For example, a block chain subnet may be established on a block chain master network through a registration method (hereinafter referred to as a registration networking method for short), subnet information of the block chain subnet to be established is directly registered to the block chain master network, so that the block chain master network obtains relevant information of the block chain subnet to be established, such as a subnet identifier and an operating state of the block chain subnet to be established, public keys and plug-in configuration information of each node member therein, IP addresses and port information of each node device, and the information is written into a contract state of a subnet management contract corresponding to the block chain master network, and thus the block chain master network obtains a management right of the block chain subnet to be established. Since the registration manner does not need to transfer information between the blockchain link points of the blockchain main network through transactions, the subnet nodes in the blockchain subnet constructed through the registration networking manner may be completely or partially different from the node devices disposed in each main network node in the blockchain main network, for example, subnet0 in fig. 4 constructs one subnet4 in the registration manner, and assuming that main network nodes nodeA to nodeE included in subnet0 themselves are disposed in node devices 1 to 5, respectively, the subnet node corresponding to subnet4 may be disposed on any node device other than node devices 1 to 5, or, subnet node a4 in subnet4 is disposed in node device 1, and subnet node nodeF4 in subnet4 is disposed in node device 6, of course, the subnet nodes in subnet4 may also be disposed in node devices 1 to 5.
In an embodiment, the first node device provides, when determining that the second node device deploys the subnet node in the blockchain subnet and does not deploy the master network node in the blockchain master network, the start control information to instruct the second node device to start the subnet node in the blockchain subnet locally deployed by the second node device. As described above, the first node device may obtain subnet information of the blockchain main network contained in the data field and subnet information of all blockchain subnets managed by the blockchain main network (but not the blockchain subnet to which the locally deployed subnet node belongs) by monitoring a subnet information query event generated after executing a subnet information query transaction by the subnet management contract, so that the first node device determines, through the content in the data field, the IP addresses of the node devices where each subnet node in any blockchain subnet is located, and determines, by comparing the IP addresses with the IP addresses of the node devices where each main network node in the blockchain main network is located, that the node device where the specific subnet node in the specific blockchain subnet is located does not belong to the node device where each main network node is located, that is, it is determined that the specific node device (second node device) is deployed with the subnet node in the blockchain subnet and is not deployed with the main network in the blockchain main network, and the specific blockchain sub-network is established in a registration networking manner or the specific blockchain sub-network is established in a transaction networking manner but includes a subnet node added in a registration manner and deployed in the second node device, in this case, the first node device may further provide the start control information to the second node device through the IP address of the second node device recorded in the data field to instruct the second node device to start a subnet node in the blockchain sub-network locally deployed by the second node device, so as to synchronously start the subnet node in the blockchain sub-network networked in the registration manner.
As described above, the first node device may start or close the plug-in module for forming any blockchain node by controlling the plug-in manager corresponding to any blockchain node. In one case, the first node device may only deploy one shared plug-in manager for managing plug-in modules corresponding to all block link points deployed under the node device, specifically, the shared plug-in manager maintains plug-in configuration information of locally deployed block link nodes, and since plug-in modules of different block link nodes in the same block link network are often the same, the plug-in configuration information of a block link node is generally the same as the plug-in configuration information of the block link network to which the block link node belongs, and certainly, the plug-in modules of different block link nodes in the same block link network may also be different. The plug-in configuration information of the blockchain node is used to indicate a specific plug-in module constituting the certain blockchain node, and may include: a business network plug-in, a service plug-in, a P2P (peer-to-peer) plug-in, a blockchain subnet management plug-in, a Cache plug-in, a verification plug-in, an event management plug-in, a consensus plug-in, a synchronization plug-in, an execution plug-in, a blockchain plug-in, a storage plug-in, etc., which are not limited in this specification.
In another case, the first node device may individually allocate a corresponding independent plug-in manager according to each blockchain node deployed by the node device, so that the independent plug-in manager only maintains plug-in configuration information of the corresponding blockchain node, and is specially responsible for managing plug-in modules of the corresponding blockchain node, such as a plug-in module that opens, closes, and replaces the corresponding blockchain node.
As described above, the subnet state query event may include the plug-in configuration information of the blockchain main network and each blockchain subnet, and the plug-in configuration information of any blockchain network includes the plug-in configuration information of each blockchain node in the blockchain network, so that the first node device may determine the plug-in configuration information of the locally deployed subnet node according to the identity information of the first node device, and therefore, the plug-in configuration information of the blockchain subnet to which each locally deployed subnet node belongs may be recorded in a local subnet list maintained by the first node device, and therefore, the plug-in manager deployed in the first node device may obtain the plug-in configuration information of each blockchain node locally deployed by the first node device by reading the local subnet list.
When the first node device starts a first main network node in a locally deployed blockchain main network in response to the start/stop control information, the first node device controls a plug-in manager corresponding to the first main network node to start or stop a plug-in module for forming the first main network node. For example, when the node apparatus 1 starts the first master network node in response to the start control information of the tile link node service, in one case, the node apparatus 1 may control the master network node corresponding to the subnet0, that is, the independent plug-in manager of nodeA, so that the independent plug-in manager of nodeA starts a plug-in module for constituting nodeA according to the plug-in configuration information of nodeA; in another case, the node device 1 may control the shared plugin manager, so that the shared plugin manager searches for plugin configuration information of a nodeA, which is a main network node corresponding to the subnet0, and starts a plugin module for forming the nodeA0 according to the plugin configuration information of the nodeA; similarly, when the node apparatus 1 shuts down the first master network node in response to the shutdown control information of the block-link node service, similar to the above startup procedure, only the startup in the above procedure is changed to shutdown; alternatively, when the node apparatus 1 activates the sub-network node nodeb1 in response to the activation control information of the block link node service, also similarly to the above-described activation procedure, only the card manager of nodeb is replaced with the card manager of nodeb1, and the card configuration information of nodeb is replaced with the card configuration information of nodeb 1.
Different blockchain nodes on the first node device may rely on the same plug-in module at runtime, and such plug-ins are in a shared state. For example, the currently opened tile link node on node device 1 includes nodeA and nodeA1, the plug-in modules for forming nodeA include plug-in 1.0, plug-in 2.0, plug-in 3.0 and plug-in 4.0, and the plug-in modules for forming nodeA1 include plug-in 1.1, plug-in 2.0, plug-in 3.1, plug-in 4.1 and plug-in 5.1, where plug-in 1.0 and plug-in 1.1, plug-in 3.0 and plug-in 3.1, plug-in 4.0 and plug-in 4.1 are of the same type and have the same plug-in function, but two different plug-in modules are still embedded in different tile link nodes respectively and do not share information with each other, and are essentially of different plug-in modules. And the plug-in 2.0 is depended on and used by nodeA and nodeA1 at the same time, so that the plug-in module used by two or more blockchain nodes at the same time like the plug-in 2.0 is in a shared state, and correspondingly, the plug-in module depended on by only one blockchain node is in an independent state, for example, the plug-ins except the plug-in 2.0 are in an independent state.
On the other hand, if a specific plug-in module whose operation mode is the sharing mode may be run on the first node device, this means that, if the specific plug-in module is included in the configuration of the new blockchain node to be started on the first node device, and the operation requirement corresponding to the specific plug-in module in the plug-in configuration information corresponding to the new blockchain node is the sharing operation, in the process of starting the new blockchain node, the specific plug-in module will not be started, but the specific plug-in module that has already been run is directly shared to the new blockchain node for the new blockchain node to directly call. However, if the operation mode of the specific plug-in module is the exclusive mode, in the process of starting the new blockchain node, since the operation mode of the specific plug-in module is the exclusive mode and does not support the sharing operation, the specific plug-in module cannot be directly called by the new blockchain node, and a plug-in module having the same function needs to be restarted to be allocated to the new blockchain node to be called by the new blockchain node.
The plug-in manager deployed on the first node device maintains a plug-in information attribute list corresponding to each block chain node managed by the plug-in manager according to the plug-in configuration information and the running state of each locally deployed block chain node, and is used for marking the attribute information of each plug-in module required to be used, wherein the attribute information includes whether the running state is an open state or a closed state, whether the running mode is a sharing mode or an exclusive mode, whether the running mode is the sharing state or the exclusive state, the dependency relationship between the running mode and other plug-in modules, and the like. The plug-in information attribute list is updated in real time, for example, when the plug-in manager reads the local subnet list, finding that the blockchain subnet with the current running state being the open state only has subnet0 and subnet1, then plug-in configuration information of nodeA and nodeA1 respectively corresponding to subnet0 and subnet1 deployed locally is further searched and obtained, and then the comparison can obtain that the plug-in module used by both nodeA and nodeA1 is plug-in 2.0, so that the plug-in 2.0 in the plug-in information attribute list is marked as the sharing state, when subnet1 is closed, the plugin manager reads the local subnet list again to find that the blockchain subnet with the running state being the open state is subnet0 only, then only the plugin configuration information of nodeA can be found, since the plug-in 2.0 is now already relied on by nodeA only, the plug-in 2.0 in the plug-in information attribute list is changed from the shared state to the exclusive state, while changing the operation state of the plug-in modules for constituting nodeA1 other than plug-in 2.0 from the on state to the off state. In addition to obtaining the plug-in configuration information and the running state of each locally deployed block chain node through the subnet information of each block chain network in the local subnet list, the plug-in manager can also separately maintain the plug-in configuration information and the running state of each locally deployed main network node and each subnet node, and automatically update the maintained running state and other information after completing the control of the running state of the corresponding subnet node, so that the attribute information of each plug-in module in the plug-in information attribute list can be updated more timely and accurately.
Because a plug-in a sharing state and a plug-in with a sharing mode in an operation mode exist, when the first node device starts a plug-in module for forming any blockchain node, the repeated starting of the plug-in with the sharing mode in the operation mode needs to be avoided, so that the sharing requirement of each plug-in module in any blockchain node is correctly met, and the normal operation of any blockchain node is further ensured; when the plug-in module for forming any block chain node is closed, the plug-in module in the shared state needs to be prevented from being closed, so that the normal operation of other block chain nodes except the first subnet node is prevented from being influenced. That is, when the first node device starts a plug-in module for forming any block chain node, the following procedure is required:
and determining the plug-in description information of each plug-in module for forming any block chain node and the operation requirement of each plug-in module. In this embodiment, plug-in description information and operation requirements of each plug-in module forming any block chain node may be found by querying a plug-in information attribute list corresponding to any block chain node, where the plug-in description information includes at least one of a plug-in type, a plug-in name, and a plug-in function, and is used for pointing to a specific plug-in module.
Under the condition that the operation requirement of any plug-in module is shared operation, if an opened plug-in module matched with the plug-in description information of any plug-in module exists and the operation mode of the opened plug-in module is a sharing mode, sharing the opened plug-in module to any block chain node. The operation requirement of each plug-in module is defined in the plug-in configuration information corresponding to any block chain point, if the operation requirement of any plug-in module in the plug-in configuration information is shared operation, it indicates that any plug-in module needs to be operated in a shared mode, and if the first node device finds an opened plug-in module corresponding to the plug-in description information of any plug-in module through the plug-in information attribute list before starting any plug-in module, the opened plug-in module is further shared to the block chain node to which the any plug-in module belongs under the condition that the operation mode of the opened plug-in module is determined to be the shared mode.
And under the condition that the operation requirement of any plug-in module is shared operation, if no started plug-in module which is matched with the plug-in description information and has the operation mode of the shared mode exists, starting the plug-in module. If the operation requirement of any plug-in module in the plug-in configuration information is shared operation, it indicates that it is necessary to operate the any plug-in module in the shared mode, and if, before starting the any plug-in module, the first node device already finds, through the plug-in information attribute list, an opened plug-in module corresponding to the plug-in description information that does not exist in the plug-in module, or the operation mode of the opened plug-in module is not the shared mode although the opened plug-in module exists, it is determined that an opened plug-in module matching the plug-in description information and having the operation mode being the shared mode does not exist at this time, and therefore the any plug-in module needs to be started, and at the same time, when starting the plug-in module corresponding to the plug-in description information, the operation mode of the started plug-in module is also set based on the operation requirement, for example, because the shared requirement of the any plug-in module is shared operation, therefore, the running mode of any started plug-in module can be set to be the sharing mode, so that any plug-in module can be shared to the block chain node which is started subsequently when the block chain node which needs to use any plug-in module is started.
And starting any plug-in module under the condition that the operation requirement of any plug-in module is independent operation. If the operation requirement of any plug-in module in the plug-in configuration information is independent operation, it indicates that any plug-in module needs to be operated in an exclusive mode, so that any plug-in module can be directly started and the operation mode of any plug-in module is set to the exclusive mode, so that any plug-in module cannot be shared to a subsequently started block chain node by a block chain node which needs to use any plug-in module subsequently when the block chain node is started, the operation mode of the exclusive mode is met, and the operation requirement of independent operation of any plug-in module in the plug-in configuration information is ensured.
Under the above condition, the operation requirement of each plug-in module is defined in the plug-in configuration information corresponding to any block chain link point, and the plug-in configuration information corresponding to different block chain link points may be different, so that different plug-in sharing strategies may be allocated to different block chain link points, and this differentiated management for different block chain nodes can flexibly meet various actual requirements of users. In another case, the operation requirement of each plug-in module is global predefined information, so that the operation requirement of each plug-in module does not need to be recorded in the plug-in configuration information corresponding to any block chain node, and the plug-in configurator maintains the operation requirement of each plug-in module according to different plug-in description information, so that when the plug-in modules are started in the above manner, the preset plug-in modules always operate in a sharing mode, and when the plug-in modules for forming any block chain node need to be started, if the plug-in description information of the plug-in modules indicates that the plug-in modules have the sharing requirement, the started plug-in modules corresponding to the plug-in description information can be directly shared to any block chain node, thereby providing a uniform sharing strategy.
Specifically, when the node device 1 starts the first master network node nodeA, the node device 1 may check the plug-in configuration information of the nodeA through the plug-in manager, obtain the plug-in description information of the plug-in modules for constituting the nodeA, where the plug-in description information includes the plug-ins 1, 2, 3, and 4, and at this time, since there is no other blockchain node, directly allocate the plug-ins 1.0, 2.0, 3.0, and 4.0, which are obtained by starting the plug-in modules corresponding to the above plug-in description information, to the nodeA so as to start the nodeA, and after it is further determined through the plug-in configuration information that the operation requirements of the plug-ins 1, 3, and 4 are independent operations and the operation requirement of the plug-in 2 is a shared operation, set the operation modes of the plug-ins 1.0, 3.0, and 4.0 to be an independent mode, and set the operation mode of the plug-in 2.0 to be a shared mode. After the nodeA is started, assuming that the node device 1 determines that nodeA1 and nodeA2 are locally deployed, and the running state of the subnet1 to which the nodeA1 belongs is an open state, and the running state of the subnet2 to which the nodeA2 belongs is a closed state, at this time, the node device will check the plugin configuration information of the nodeA1 through the plugin manager, and obtain the plugin description information of the plugin modules forming the nodeA1, including the plugins 1, 2, 3, 4 and 5, at this time, the node device 1 already runs the plugins 1.0, 2.0, 3.0 and 4.0 having the same plugin description information, and further check the running requirements of each plugin module, and it can be known through the plugin configuration information of the nodeA1 that the sharing requirements of the plugins 1, 3, 4 and 5 are all independently running, and the sharing requirement of the plugin 2 is a sharing running requirement, and therefore, the sharing requirement of the plugin 1.1 is directly started according to the sharing requirement The plug-ins 3.1, 4.1 and 5.1 are distributed to the nodeA1, and at the same time, because the operation mode of the started plug-in 2.0 corresponding to the description information of the plug-in 2 is the sharing mode, the plug-in 2.0 used by the nodeA is directly shared to the nodeA1 without restarting a new plug-in corresponding to the description information of the plug-in 2, and the nodeA1 is formed together with the plug-ins 1.1, 3.1, 4.1 and 5.1 of which the other operation modes are set to the independent modes.
The plug-in manager maintains the dependency relationship between the plug-in modules. If normal operation of plug-in A necessarily requires that plug-in B already be operational, then it can be assumed that there is a dependency between plug-in A and plug-in B, and that plug-in A depends on plug-in B, which can be denoted as "plug-in A → plug-in B". The dependency relationship between the plug-in modules related in the plug-in manager may be pre-established or predefined by the system, and recorded in the plug-in information attribute list, as shown in table 1, according to the dependency relationship between the plug-ins, two dependency relationships may be obtained by sorting: "insert A → insert B → insert D", "insert C → insert D and insert E".
When the first node device starts or closes the plug-in modules for forming any block chain node according to the control information, the plug-in modules of the first subnet node can be started or closed according to the start-stop sequence among the plug-in modules forming any block chain node; and the start-stop sequence is related to the dependency relationship among all the plug-in modules. Specifically, assuming that the plug-in modules constituting any block chain node are plug-in a, plug-in B, and plug-in D, and the dependency relationship is "plug-in a → plug-in B → plug-in D", in the case of closing the plug-in modules constituting the first subnet node, the closing sequence is the same as the dependency sequence, and is also "plug-in a → plug-in B → plug-in D", by closing the upper layer plug-in module having dependency first and then closing the lower layer plug-in module having no dependency; in the case of starting the plug-in modules for forming the first subnetwork node, the starting sequence will be opposite to the dependency sequence, i.e. "plug-in D → plug-in B → plug-in a", so that the upper-layer plug-in module which is not dependent on itself is started first, and then the upper-layer plug-in module which is dependent on itself is started. In the scheme, the start-stop sequence is determined according to the dependency relationship among the plug-in modules, so that the situation that the plug-in modules run wrongly due to lack of the dependent plug-ins in the start-stop process can be avoided, data loss and even node crash can be avoided, and meanwhile, the memory resources are fully used and released.
For example, when the node device 1 acquires the shutdown control information of the blockchain node service, the node device 1 may acquire, by the plug-in manager, that the subnet node nodeb1 corresponding to the subnet1 is composed of the plug-ins 1.1, 2.0, 3.1, 4.1, and 5.1, and the corresponding dependency is "plug-in 1.1 → plug-in 3.1 → 2.0", "plug-in 4.1 → plug-in 5.1", and since the nodeb1 needs to be closed, the shutdown order of "plug-in 1.1 → plug-in 3.1 → 2.0", "plug-in 4.1 → plug-in 5.1" is determined according to the aforementioned rule, wherein the plug-ins 1.1, 3.1, and 2.0 are closed according to "plug-ins 1.1 → 3.1 → plug-ins 2.0", and the plug-ins 4.1, 5.1 and 5.1 are closed according to "plug-ins 4.1 → plug-ins 5.1", and the node device 1 plays a role of closing the plug-ins 4.1, so that the corresponding plug-ins are shared, and the corresponding shutdown order is, and thus, the plug-ins 2 is not damaged, the closing sequence of "plug-in 1.1 → plug-in 3.1 → plug-in 2.0" may be replaced with "plug-in 1.1 → plug-in 3.1", i.e. plug-in 2.0 as a shared plug-in is not closed, so as not to affect the normal operation of other subnet nodes.
Fig. 6 is a flowchart of a method for turning off block-link point service according to an exemplary embodiment. As shown in fig. 6, the method is applied to a first node device, and includes:
Optionally, the closing control information includes identity information corresponding to the first node device.
Optionally, the turning off the subnet node includes:
and closing the subnet nodes under the condition that the running state of the block chain subnet is the opening state.
Optionally, the method further includes: the first node equipment determines whether subnet nodes in the block chain subnet are deployed locally and determines the running state of the block chain subnet by inquiring a local subnet list maintained by the first node equipment;
the local subnet list is used for recording subnet identifications and running states of block chain subnets to which each subnet node belongs, wherein the subnet identifications and running states are locally deployed by the first node device.
Optionally, the local subnet list is generated by the first node device by querying a subnet management contract deployed on the first master network node.
Optionally, the method further includes: and under the condition that the second node device is determined to be deployed with the subnet node in the blockchain subnet and not deployed with the main network node in the blockchain main network, providing the closing control information to the second node device so as to instruct the second node device to close the subnet node in the blockchain subnet locally deployed by the second node device.
Optionally, the closing any blockchain node includes:
and closing plug-in modules for forming any block chain node.
Optionally, the closing a plug-in module for forming any blockchain node includes: and closing the plug-in modules used for forming any block chain node through the plug-in manager corresponding to any block chain node.
Alternatively to this, the first and second parts may,
the plug-in manager is a global plug-in manager corresponding to all block link points deployed on the first node equipment; or,
the plug-in manager is an independent plug-in manager which is independently applied to any blockchain node.
Optionally, the closing a plug-in module for forming any blockchain node includes:
determining plug-in description information of plug-in modules for forming any block chain node;
and if the running mode of the opened plug-in module matched with the plug-in description information of any plug-in module is an independent mode or the running mode is a sharing mode but is not shared to other block chain nodes except any block chain link point, closing the opened plug-in module. As described above, if the operation mode of a certain plugin module is the shared mode but is not shared to other blockchain nodes except any blockchain node, it indicates that the plugin module is not in the shared state although the operation mode is the shared mode, so that the plugin module can be directly turned off without considering interference to other blockchain nodes when the plugin is turned off, because the plugin module is not dependent on other blockchain nodes at this time, it can be regarded as a plugin module operating in an independent mode.
Optionally, the operation mode of any plug-in module is determined by the operation requirement of any plug-in module.
Optionally, the operation requirement of any plug-in module is defined in the plug-in configuration information corresponding to any block link point.
Optionally, the operation requirement of any plug-in module is global predefined information.
Optionally, the closing a plug-in module for forming any blockchain node includes: and sequentially closing the plug-in modules for forming any block chain node according to the dependency relationship among the plug-in modules for forming any block chain node.
The present specification also provides embodiments of an apparatus, an electronic device, and a storage medium, corresponding to embodiments of the foregoing method.
Fig. 7 is a flowchart of another method for enabling blockchain node services in accordance with an example embodiment. As shown in fig. 7, the method is applied to a first node device, where a master network node in a blockchain master network and a subnet node in a blockchain subnet are deployed in the first node device, and includes:
As described above, the start control information includes identity information corresponding to the first node device.
As mentioned above, the initiating the subnet node includes:
and starting the subnet nodes under the condition that the running state of the block chain subnet is the opening state.
As mentioned above, the method further comprises: the first node equipment determines whether subnet nodes in the block chain subnet are deployed locally and determines the running state of the block chain subnet by inquiring a local subnet list maintained by the first node equipment;
the local subnet list is used for recording subnet identifications and running states of block chain subnets to which each subnet node belongs, wherein the subnet identifications and running states are locally deployed by the first node device.
As mentioned above, the first node device starts any blockchain node, including:
and starting a plug-in module for forming any block chain node.
As mentioned above, the starting of the plug-in modules for constituting any blockchain node includes: and starting a plug-in module for forming any block chain node through the plug-in manager corresponding to any block chain node.
As mentioned above, the method further comprises:
the plug-in manager is a global plug-in manager corresponding to all block link points deployed on the first node equipment; or,
the plug-in manager is an independent plug-in manager which is independently applied to any blockchain node.
As mentioned above, the starting of the plug-in modules for constituting any blockchain node includes:
determining plug-in description information of plug-in modules for forming any block chain node and operation requirements of the plug-in modules;
under the condition that the operation requirement of any plug-in module is shared operation, if an opened plug-in module matched with the plug-in description information of any plug-in module exists and the operation mode of the opened plug-in module is a sharing mode, sharing the opened plug-in module to any block chain node;
under the condition that the operation requirement of any plug-in module is shared operation, if an opened plug-in module which is matched with the plug-in description information and has an operation mode of a shared mode does not exist, starting the plug-in module;
and starting any plug-in module under the condition that the operation requirement of any plug-in module is independent operation.
As described above, the operation requirement of each plug-in module is defined in the plug-in configuration information corresponding to any block link point.
As mentioned above, the operation requirement of each plug-in module is global predefined information.
As mentioned above, the method further comprises: and when the plug-in module corresponding to the plug-in description information is started, setting the running mode of the started plug-in module based on the running requirement.
As mentioned above, the starting of the plug-in modules for constituting any blockchain node includes: and sequentially starting the plug-in modules for forming any block chain node according to the dependency relationship among the plug-in modules for forming any block chain node.
As described above, the blockchain subnet is established in the blockchain main network through a transaction networking mode or a registration networking mode.
FIG. 8 is a schematic block diagram of an apparatus provided in an exemplary embodiment. Referring to fig. 8, at the hardware level, the apparatus includes a processor 802, an internal bus 804, a network interface 806, a memory 808, and a non-volatile memory 810, but may also include hardware required for other services. One or more embodiments of the present description may be implemented in software, such as by the processor 802 reading a corresponding computer program from the non-volatile storage 810 into the memory 808 and then executing the computer program. Of course, besides software implementation, the one or more embodiments in this specification do not exclude other implementations, such as logic devices or combinations of software and hardware, and so on, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Referring to fig. 9, fig. 9 is a block diagram of an apparatus for initiating a blockchain node service according to an exemplary embodiment, where the apparatus for initiating a blockchain node service may be applied to a device shown in fig. 8 to implement a technical solution of the present specification, and the apparatus is applied to a first node device, and includes:
a control information obtaining module 901, configured to obtain starting control information of a block link point service;
a master network starting module 902, configured to start a first master network node in a locally deployed blockchain master network in response to the start control information;
a subnet starting module 903, configured to start the subnet node in response to the start control information when the first master network node is started and it is determined that a subnet node in the blockchain subnet managed by the blockchain master network is locally deployed.
Optionally, the start control information includes identity information corresponding to the first node device.
Optionally, the subnet starting module 903 starts the subnet node, including:
and starting the subnet nodes under the condition that the running state of the block chain subnet is the opening state.
Optionally, the method further includes:
a subnet determining module 904, configured to enable the first node device to determine whether a subnet node in the blockchain subnet is deployed locally and determine an operating state of the blockchain subnet by querying a local subnet list maintained by the first node device;
the local subnet list is used for recording subnet identifications and running states of block chain subnets to which each subnet node belongs, wherein the subnet identifications and running states are locally deployed by the first node device.
Optionally, the local subnet list is generated by the first node device by querying a subnet management contract deployed on the first master network node.
Optionally, the method further includes:
a control information providing module 905, configured to provide, when it is determined that the second node device is deployed with a subnet node in the blockchain subnet and does not deploy a main network node in the blockchain main network, the start control information to instruct the second node device to start the subnet node in the blockchain subnet locally deployed by the second node device.
Optionally, the first node device starts any blockchain node, including:
and starting a plug-in module for forming any block chain node.
Optionally, the starting a plug-in module for forming any blockchain node includes: and starting a plug-in module for forming any block chain node through the plug-in manager corresponding to any block chain node.
Alternatively to this, the first and second parts may,
the plug-in manager is a global plug-in manager corresponding to all block link points deployed on the first node equipment; or,
the plug-in manager is an independent plug-in manager which is independently applied to any blockchain node.
Optionally, the starting a plug-in module for forming any blockchain node includes:
determining plug-in description information of plug-in modules for forming any block chain node and operation requirements of the plug-in modules;
under the condition that the operation requirement of any plug-in module is shared operation, if an opened plug-in module matched with the plug-in description information of any plug-in module exists and the operation mode of the opened plug-in module is a sharing mode, sharing the opened plug-in module to any block chain node;
under the condition that the operation requirement of any plug-in module is shared operation, if an opened plug-in module which is matched with the plug-in description information and has an operation mode of a shared mode does not exist, starting the plug-in module;
and starting any plug-in module under the condition that the operation requirement of any plug-in module is independent operation.
Optionally, the operation requirement of each plug-in module is defined in the plug-in configuration information corresponding to any block link point.
Optionally, the operation requirement of each plug-in module is global predefined information.
Optionally, the method further includes: an operation mode setting module 906, configured to set an operation mode of the started plug-in module based on the operation requirement when the plug-in module corresponding to the plug-in description information is started.
Optionally, the starting a plug-in module for forming any blockchain node includes: and sequentially starting the plug-in modules for forming any block chain node according to the dependency relationship among the plug-in modules for forming any block chain node.
Referring to fig. 10, fig. 10 is a block diagram of an apparatus for closing a block-link point service according to an exemplary embodiment, where the apparatus for closing a block-link point service may be applied to a device shown in fig. 8 to implement the technical solution of the present specification, and the apparatus is applied to a first node device, and includes:
a control information obtaining module 1001 configured to obtain control information for closing a blockchain node service;
a subnet shutdown module 1002, configured to shutdown a subnet node in a blockchain subnet managed by the blockchain main network in response to the shutdown control information when it is determined that the subnet node is locally deployed;
a master network shutdown module 1003, configured to, when the subnet node shutdown is completed, shutdown a first master network node in a locally deployed blockchain master network in response to the shutdown control information.
Optionally, the closing control information includes identity information corresponding to the first node device.
Optionally, the subnet closing module 1002 closes the subnet node, including:
and closing the subnet nodes under the condition that the running state of the block chain subnet is the opening state.
Optionally, the method further includes:
a subnet determining module 1004, configured to determine, by querying a local subnet list maintained by the first node device, whether a subnet node in the blockchain subnet is deployed locally and an operating state of the blockchain subnet;
the local subnet list is used for recording subnet identifications and running states of block chain subnets to which each subnet node belongs, wherein the subnet identifications and running states are locally deployed by the first node device.
Optionally, the local subnet list is generated by the first node device by querying a subnet management contract deployed on the first master network node.
Optionally, the method further includes:
a control information providing module 1005, configured to, when it is determined that the second node device is deployed with a subnet node in the blockchain subnet and is not deployed with a master network node in the blockchain master network, provide the shutdown control information to the second node device, so as to instruct the second node device to shutdown the subnet node in the blockchain subnet locally deployed by the second node device.
Optionally, the closing any blockchain node includes:
and closing plug-in modules for forming any block chain node.
Optionally, the closing a plug-in module for forming any blockchain node includes: and closing the plug-in modules used for forming any block chain node through the plug-in manager corresponding to any block chain node.
Alternatively to this, the first and second parts may,
the plug-in manager is a global plug-in manager corresponding to all block link points deployed on the first node equipment; or,
the plug-in manager is an independent plug-in manager which is independently applied to any blockchain node.
Optionally, the closing a plug-in module for forming any blockchain node includes:
determining plug-in description information of plug-in modules for forming any block chain node;
and if the running mode of the opened plug-in module matched with the plug-in description information of any plug-in module is an independent mode or the running mode is a sharing mode but is not shared to other block chain nodes except any block chain link point, closing the opened plug-in module.
Optionally, the operation mode of any plug-in module is determined by the operation requirement of any plug-in module.
Optionally, the operation requirement of any plug-in module is defined in the plug-in configuration information corresponding to any block link point.
Optionally, the operation requirement of any plug-in module is global predefined information.
Optionally, the closing a plug-in module for forming any blockchain node includes: and sequentially closing the plug-in modules for forming any block chain node according to the dependency relationship among the plug-in modules for forming any block chain node.
Correspondingly, the present specification also provides an apparatus comprising a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the steps of the method for enabling/disabling block-linked point services provided by all of the above method embodiments.
Accordingly, the present specification also provides a computer readable storage medium having executable instructions stored thereon; wherein the instructions, when executed by the processor, implement the steps of the method for enabling/disabling block-link point services provided in all of the above method embodiments.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments herein. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The above description is only for the purpose of illustrating the preferred embodiments of the one or more embodiments of the present disclosure, and is not intended to limit the scope of the one or more embodiments of the present disclosure, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the one or more embodiments of the present disclosure should be included in the scope of the one or more embodiments of the present disclosure.
Claims (45)
1. A method for starting a blockchain node service, which is applied to a first node device, comprises the following steps:
acquiring starting control information of a block chain node service;
initiating a first master network node in a locally deployed blockchain master network in response to the initiation control information;
and under the condition that the first main network node is started up and the subnet nodes in the block chain subnet managed by the block chain main network are locally deployed, starting the subnet nodes in response to the starting control information.
2. The method of claim 1, wherein the start control information includes identity information corresponding to the first node device.
3. The method of claim 1, the initiating the subnet node, comprising:
and starting the subnet nodes under the condition that the running state of the block chain subnet is the opening state.
4. The method of claim 3, further comprising:
the first node equipment determines whether subnet nodes in the block chain subnet are deployed locally and determines the running state of the block chain subnet by inquiring a local subnet list maintained by the first node equipment;
the local subnet list is used for recording subnet identifications and running states of block chain subnets to which each subnet node belongs, wherein the subnet identifications and running states are locally deployed by the first node device.
5. The method of claim 4, the local subnet list being generated by the first node device by querying a subnet management contract deployed on the first primary network node.
6. The method of claim 1, further comprising:
and under the condition that the second node device is determined to be deployed with the subnet node in the blockchain subnet and not deployed with the main network node in the blockchain main network, providing the starting control information to the second node device so as to instruct the second node device to start the subnet node in the blockchain subnet locally deployed by the second node device.
7. The method of claim 1, the first node device initiating any blockchain node, comprising:
and starting a plug-in module for forming any block chain node.
8. The method of claim 7, said initiating a plug-in module for forming said any blockchain node, comprising: and starting a plug-in module for forming any block chain node through the plug-in manager corresponding to any block chain node.
9. The method of claim 8, wherein the first and second light sources are selected from the group consisting of,
the plug-in manager is a global plug-in manager corresponding to all block link points deployed on the first node equipment; or,
the plug-in manager is an independent plug-in manager which is independently applied to any blockchain node.
10. The method of claim 7, said initiating a plug-in module for forming said any blockchain node, comprising:
determining plug-in description information of plug-in modules for forming any block chain node and operation requirements of the plug-in modules;
under the condition that the operation requirement of any plug-in module is shared operation, if an opened plug-in module matched with the plug-in description information of any plug-in module exists and the operation mode of the opened plug-in module is a sharing mode, sharing the opened plug-in module to any block chain node;
under the condition that the operation requirement of any plug-in module is shared operation, if an opened plug-in module which is matched with the plug-in description information and has an operation mode of a shared mode does not exist, starting the plug-in module;
and starting any plug-in module under the condition that the operation requirement of any plug-in module is independent operation.
11. The method of claim 10, wherein the operating requirements of each plug-in module are defined in the plug-in configuration information corresponding to any one of the block link points.
12. The method of claim 10, wherein the operational requirements of each plug-in module are global predefined information.
13. The method of claim 10, further comprising: and when the plug-in module corresponding to the plug-in description information is started, setting the running mode of the started plug-in module based on the running requirement.
14. The method of claim 7, said initiating a plug-in module for forming said any blockchain node, comprising: and sequentially starting the plug-in modules for forming any block chain node according to the dependency relationship among the plug-in modules for forming any block chain node.
15. A method for closing block link point service, which is applied to a first node device, comprises the following steps:
obtaining closing control information of a block chain node service;
in a case where it is determined that a subnet node in a blockchain subnet managed by the blockchain main network is locally deployed, shutting down the subnet node in response to the shutdown control information;
and in the case that the subnet node closing is completed, closing a first master network node in the locally deployed blockchain master network in response to the closing control information.
16. The method of claim 15, wherein the shutdown control information includes identity information corresponding to the first node device.
17. The method of claim 15, the shutting down the subnet node, comprising:
and closing the subnet nodes under the condition that the running state of the block chain subnet is the opening state.
18. The method of claim 17, further comprising:
the first node equipment determines whether subnet nodes in the block chain subnet are deployed locally and determines the running state of the block chain subnet by inquiring a local subnet list maintained by the first node equipment;
the local subnet list is used for recording subnet identifications and running states of block chain subnets to which each subnet node belongs, wherein the subnet identifications and running states are locally deployed by the first node device.
19. The method of claim 18, the local subnet list is generated by the first node device by querying a subnet management contract deployed on the first primary network node.
20. The method of claim 15, further comprising:
and under the condition that the second node device is determined to be deployed with the subnet node in the blockchain subnet and not deployed with the main network node in the blockchain main network, providing the closing control information to the second node device so as to instruct the second node device to close the subnet node in the blockchain subnet locally deployed by the second node device.
21. The method of claim 15, the closing any blockchain node, comprising:
and closing plug-in modules for forming any block chain node.
22. The method of claim 21, said shutting down plug-in modules used to form said any blockchain node, comprising: and closing the plug-in modules used for forming any block chain node through the plug-in manager corresponding to any block chain node.
23. The method of claim 22, wherein the first and second portions are selected from the group consisting of,
the plug-in manager is a global plug-in manager corresponding to all block link points deployed on the first node equipment; or,
the plug-in manager is an independent plug-in manager which is independently applied to any blockchain node.
24. The method of claim 21, said shutting down plug-in modules used to form said any blockchain node, comprising:
determining plug-in description information of plug-in modules for forming any block chain node;
and if the running mode of the opened plug-in module matched with the plug-in description information of any plug-in module is an independent mode or the running mode is a sharing mode but is not shared to other block chain nodes except any block chain link point, closing the opened plug-in module.
25. The method of claim 24, the operating mode of any of the plug-in modules being determined by the operating requirements of the any of the plug-in modules.
26. The method of claim 25, wherein the operating requirements of any one plug-in module are defined in the plug-in configuration information corresponding to any one block link point.
27. The method of claim 25, wherein the operational requirements of any plug-in module are global predefined information.
28. The method of claim 21, said shutting down plug-in modules used to form said any blockchain node, comprising: and sequentially closing the plug-in modules for forming any block chain node according to the dependency relationship among the plug-in modules for forming any block chain node.
29. A method for starting a blockchain node service is applied to a first node device, the first node device is deployed with a main network node in a blockchain main network and a sub-network node in a blockchain sub-network, and the method comprises the following steps:
acquiring starting control information of a block chain node service;
and in the case that the subnet node in the blockchain subnet managed by the blockchain main network is locally deployed, starting the subnet node in response to the starting control information.
30. The method of claim 29, wherein the start control information includes identity information corresponding to the first node device.
31. The method of claim 29, the initiating the subnet node, comprising:
and starting the subnet nodes under the condition that the running state of the block chain subnet is the opening state.
32. The method of claim 31, further comprising:
the first node equipment determines whether subnet nodes in the block chain subnet are deployed locally and determines the running state of the block chain subnet by inquiring a local subnet list maintained by the first node equipment;
the local subnet list is used for recording subnet identifications and running states of block chain subnets to which each subnet node belongs, wherein the subnet identifications and running states are locally deployed by the first node device.
33. The method of claim 29, the first node device initiating any blockchain node, comprising:
and starting a plug-in module for forming any block chain node.
34. The method of claim 33, said initiating a plug-in module for forming said any blockchain node, comprising: and starting a plug-in module for forming any block chain node through the plug-in manager corresponding to any block chain node.
35. The method of claim 34, wherein said step of selecting said target,
the plug-in manager is a global plug-in manager corresponding to all block link points deployed on the first node equipment; or,
the plug-in manager is an independent plug-in manager which is independently applied to any blockchain node.
36. The method of claim 33, said initiating a plug-in module for forming said any blockchain node, comprising:
determining plug-in description information of plug-in modules for forming any block chain node and operation requirements of the plug-in modules;
under the condition that the operation requirement of any plug-in module is shared operation, if an opened plug-in module matched with the plug-in description information of any plug-in module exists and the operation mode of the opened plug-in module is a sharing mode, sharing the opened plug-in module to any block chain node;
under the condition that the operation requirement of any plug-in module is shared operation, if an opened plug-in module which is matched with the plug-in description information and has an operation mode of a shared mode does not exist, starting the plug-in module;
and starting any plug-in module under the condition that the operation requirement of any plug-in module is independent operation.
37. The method of claim 36, wherein the operating requirements of each plug-in module are defined in the plug-in configuration information corresponding to any one of the block link points.
38. The method of claim 36, wherein the operational requirements of each plug-in module are global predefined information.
39. The method of claim 36, further comprising: and when the plug-in module corresponding to the plug-in description information is started, setting the running mode of the started plug-in module based on the running requirement.
40. The method of claim 33, said initiating a plug-in module for forming said any blockchain node, comprising: and sequentially starting the plug-in modules for forming any block chain node according to the dependency relationship among the plug-in modules for forming any block chain node.
41. The method of claim 29, wherein the blockchain subnet is established with the blockchain primary network through a transaction networking mode or a registration networking mode.
42. An apparatus for initiating a blockchain node service, the apparatus being applied to a first node device, and comprising:
the control information acquisition module is used for acquiring starting control information of the block link point service;
the master network starting module is used for responding to the starting control information and starting a first master network node in a locally deployed block chain master network;
and the subnet starting module is used for responding to the starting control information to start the subnet node under the condition that the first main network node is started and the subnet node in the block chain subnet managed by the block chain main network is locally deployed.
43. An apparatus for shutting down block link point service, the apparatus being applied to a first node device, comprising:
the control information acquisition module is used for acquiring the closing control information of the block link node service;
a subnet shutdown module, configured to shutdown a subnet node in a blockchain subnet managed by the blockchain main network in response to the shutdown control information when it is determined that the subnet node is locally deployed;
and the master network closing module is used for closing the first master network node in the locally deployed blockchain master network in response to the closing control information under the condition that the sub-network node is closed completely.
44. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of any one of claims 1-41 by executing the executable instructions.
45. A computer readable storage medium having stored thereon computer instructions which, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 41.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110611538.6A CN113259458B (en) | 2021-06-02 | 2021-06-02 | Method and device for starting/closing block link point service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110611538.6A CN113259458B (en) | 2021-06-02 | 2021-06-02 | Method and device for starting/closing block link point service |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113259458A true CN113259458A (en) | 2021-08-13 |
CN113259458B CN113259458B (en) | 2021-11-02 |
Family
ID=77185877
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110611538.6A Active CN113259458B (en) | 2021-06-02 | 2021-06-02 | Method and device for starting/closing block link point service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113259458B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113609231A (en) * | 2021-09-30 | 2021-11-05 | 支付宝(杭州)信息技术有限公司 | Method and device for maintaining network architecture information of block chain system |
CN114363336A (en) * | 2021-12-31 | 2022-04-15 | 支付宝(杭州)信息技术有限公司 | Method and device for starting/closing block link point service |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109639550A (en) * | 2018-12-06 | 2019-04-16 | 北京磁云数字科技有限公司 | A kind of multi-tiling chain network network-building method, apparatus and system |
WO2020073859A1 (en) * | 2018-10-12 | 2020-04-16 | 阿里巴巴集团控股有限公司 | Blockchain node service deployment method, apparatus and system, and computing device and medium |
CN111355780A (en) * | 2020-02-18 | 2020-06-30 | 杭州云象网络技术有限公司 | Block chain-based Internet of things monitoring management method and system |
CN111382168A (en) * | 2020-05-28 | 2020-07-07 | 支付宝(杭州)信息技术有限公司 | Node group creating method and node group-based transaction method in alliance chain network |
CN112073247A (en) * | 2020-09-10 | 2020-12-11 | 工银科技有限公司 | Block chain network deployment method, device, computer system and medium |
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 |
CN112256388A (en) * | 2020-10-15 | 2021-01-22 | 深圳壹账通智能科技有限公司 | Container-based blockchain network deployment method, device, equipment and storage medium |
CN112491847A (en) * | 2020-07-08 | 2021-03-12 | 支付宝(杭州)信息技术有限公司 | Block chain all-in-one machine and automatic chain building method and device thereof |
CN112887160A (en) * | 2021-04-29 | 2021-06-01 | 杭州链城数字科技有限公司 | Block chain all-in-one machine, multi-node deployment method and device thereof, and storage medium |
-
2021
- 2021-06-02 CN CN202110611538.6A patent/CN113259458B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020073859A1 (en) * | 2018-10-12 | 2020-04-16 | 阿里巴巴集团控股有限公司 | Blockchain node service deployment method, apparatus and system, and computing device and medium |
CN111045690A (en) * | 2018-10-12 | 2020-04-21 | 阿里巴巴集团控股有限公司 | Block chain node service deployment method, device, system, computing equipment and medium |
CN109639550A (en) * | 2018-12-06 | 2019-04-16 | 北京磁云数字科技有限公司 | A kind of multi-tiling chain network network-building method, apparatus and system |
CN111355780A (en) * | 2020-02-18 | 2020-06-30 | 杭州云象网络技术有限公司 | Block chain-based Internet of things monitoring management method and system |
CN111382168A (en) * | 2020-05-28 | 2020-07-07 | 支付宝(杭州)信息技术有限公司 | Node group creating method and node group-based transaction method in alliance chain network |
CN112491847A (en) * | 2020-07-08 | 2021-03-12 | 支付宝(杭州)信息技术有限公司 | Block chain all-in-one machine and automatic chain building method and device thereof |
CN112073247A (en) * | 2020-09-10 | 2020-12-11 | 工银科技有限公司 | Block chain network deployment method, device, computer system and medium |
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 |
CN112256388A (en) * | 2020-10-15 | 2021-01-22 | 深圳壹账通智能科技有限公司 | Container-based blockchain network deployment method, device, equipment and storage medium |
CN112887160A (en) * | 2021-04-29 | 2021-06-01 | 杭州链城数字科技有限公司 | Block chain all-in-one machine, multi-node deployment method and device thereof, and storage medium |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113609231A (en) * | 2021-09-30 | 2021-11-05 | 支付宝(杭州)信息技术有限公司 | Method and device for maintaining network architecture information of block chain system |
WO2023050986A1 (en) * | 2021-09-30 | 2023-04-06 | 支付宝(杭州)信息技术有限公司 | Maintenance of network architecture information of blockchain system |
CN114363336A (en) * | 2021-12-31 | 2022-04-15 | 支付宝(杭州)信息技术有限公司 | Method and device for starting/closing block link point service |
Also Published As
Publication number | Publication date |
---|---|
CN113259458B (en) | 2021-11-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113067904B (en) | Method for building block chain sub-network and block chain system | |
CN113067895B (en) | Method for building block chain sub-network and block chain system | |
CN113067894B (en) | Method for node to exit block chain sub-network | |
CN113259457B (en) | Information synchronization method and device for block chain sub-network | |
CN113055190B (en) | Access control method for client | |
CN113067897B (en) | Cross-chain interaction method and device | |
CN113259458B (en) | Method and device for starting/closing block link point service | |
CN113067899B (en) | Method and device for starting/closing block link point service | |
CN114116166A (en) | Task execution method and device based on intelligent contract | |
CN113067914B (en) | Method and device for distributing subnet identification, electronic equipment and storage medium | |
CN114363162A (en) | Block chain log generation method and device, electronic equipment and storage medium | |
CN113067896B (en) | Method for adding node in block chain sub-network and block chain system | |
CN113259120B (en) | Method for synchronizing node information lists | |
CN113326290B (en) | Cross-network query control method | |
CN113259117B (en) | Method for synchronizing node information lists | |
CN113259119B (en) | Block chain message distribution method and device | |
CN113259466B (en) | Block chain subnet operation state control method and block chain system | |
CN113259459B (en) | Block chain subnet operation state control method and block chain system | |
CN115086338B (en) | Block chain sub-network construction method, device, electronic equipment and computer readable storage medium | |
CN113259237B (en) | Transaction forwarding method between block chain networks | |
CN113259236B (en) | Transaction forwarding method between block chain networks | |
CN113067774B (en) | Transaction forwarding method between block chain networks | |
CN114363349B (en) | Block chain sub-network starting method and device | |
CN113098984B (en) | Method for forming multi-layer block chain system based on registration mechanism and block chain system | |
CN114297171A (en) | Account data reading and writing 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20240926 Address after: Room 803, floor 8, No. 618 Wai Road, Huangpu District, Shanghai 200010 Patentee after: Ant blockchain Technology (Shanghai) Co.,Ltd. Country or region after: China Address before: 310000 801-11 section B, 8th floor, 556 Xixi Road, Xihu District, Hangzhou City, Zhejiang Province Patentee before: Alipay (Hangzhou) Information Technology Co.,Ltd. Country or region before: China |