Block chain network networking method, device, equipment and readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a block chain network networking method, a block chain network networking device, a block chain network networking equipment and a readable storage medium.
Background
With the continuous development of the internet, a block chain technology is produced, and the block chain technology is an internet database technology and has the characteristics of decentralization, openness and transparency. In particular, the essence of blockchain technology is a decentralized and distributed approach to data storage, transmission and certification, replacing the current internet dependency on a central server with data blocks, such that all data changes or transaction items are recorded on a cloud system. Since there is no distributed peer-to-peer network of central control points and a distributed method of collective operation is used, it can be said that the blockchain is a "public big ledger" on the network. The system has a plurality of nodes, each node can observe the whole ledger and participate in maintenance together, the income is the right of obtaining accounting, a complete database can be copied, and a single node cannot modify the database, so that the safety and reliability of ledger data are ensured.
The blockchain technology is generally based on P2P (Peer-to-Peer network), a networking method based on a blockchain in the prior art is a networking method based on cloud services, and a cloud Service platform distributes configuration information such as certificates, addresses, and certificate Management (MSP) information of coalition chain members of participants to other participants and constructs a network; but a centralized mechanism is adopted, the networking process depends on a cloud service platform as a center, and the networking process is opaque and unreliable.
Disclosure of Invention
The embodiment of the invention provides a block chain network networking method, a block chain network networking device and a readable storage medium, which are used for solving the problems that a block chain based networking method in the prior art adopts a centralized mechanism, a networking process depends on a cloud service platform as a center, and the networking process is opaque and unreliable.
One aspect of the embodiments of the present invention is to provide a method for networking a blockchain network, including:
the first participant equipment generates own MSP information;
the first participant equipment sends the MSP information of the first participant equipment to other participant equipment and receives the MSP information sent by other participant equipment;
when a networking initiating instruction is received, the first participant equipment acquires initial block configuration information and sends the initial block configuration information to other participant equipment so that the other participant equipment configures local node information according to the initial block configuration information and starts a local node;
the first participant equipment acquires local node configuration information and completes the configuration of the local node according to the local node configuration information;
the first participant device initiates a local node.
Another aspect of the embodiments of the present invention is to provide a device for block chain network networking, including:
the MSP information generation module is used for generating the MSP information of the first participant equipment;
the MSP information exchange module is used for the first participant equipment to send the MSP information of the first participant equipment to other participant equipment and receive the MSP information sent by other participant equipment;
the first participant equipment acquires initial block configuration information and sends the initial block configuration information to other participant equipment when receiving a networking initiating instruction, so that the other participant equipment configures local node information according to the initial block configuration information and starts a local node;
a local node configuration module, configured to acquire local node configuration information by the first party device, and complete configuration of a local node according to the local node configuration information;
a starting module, configured to start a local node by the first party device.
Another aspect of the embodiments of the present invention is to provide a block chain network networking device, including:
a memory, a processor, and a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method described above.
It is another aspect of an embodiment of the present invention to provide a computer-readable storage medium, storing a computer program,
which when executed by a processor implements the method described above.
According to the block chain network networking method, device, equipment and readable storage medium provided by the embodiment of the invention, MSP information of the first participant equipment is generated; the first participant equipment sends the MSP information of the first participant equipment to other participant equipment and receives the MSP information sent by other participant equipment; when a networking initiating instruction is received, the first participant equipment acquires initial block configuration information and sends the initial block configuration information to other participant equipment so that the other participant equipment configures local node information according to the initial block configuration information and starts a local node; the first participant equipment configures local node information according to the MSP information of the first participant equipment, the MSP information of other participant equipment and initial block configuration information; the first participant device starts a local node to complete block chain network networking, each participant device generates own MSP information and shares the MSP information with other participants, a central server is not needed, each participant device participates in the block chain network networking together, decentralized networking is achieved, and the networking process is more transparent and more reliable.
Drawings
Fig. 1 is a flowchart of a block chain network networking method according to an embodiment of the present invention;
fig. 2 is a flowchart of a block chain network networking method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a block chain network networking method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a blockchain network networking device according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a blockchain network networking device according to a sixth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a blockchain network networking device according to a seventh embodiment of the present invention.
With the above figures, certain embodiments of the invention have been illustrated and described in more detail below. The drawings and written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
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 embodiments of the invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of embodiments of the invention, as detailed in the following claims.
The terms "first", "second", etc. referred to in the embodiments of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following examples, "plurality" means two or more unless specifically limited otherwise.
The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Example one
The block chain network networking method provided by the embodiment of the invention can be suitable for a decentralized communication system. The communication system comprises a plurality of users (hereinafter referred to as participants) participating in the networking, and each participant may comprise one or more communication devices, such as terminal devices, cluster devices, and the like. Optionally, an application, such as a service program, is installed on the communication device. The participator can submit data information or instructions to the terminal equipment through the user interface provided by the application program so as to control the communication equipment to establish the block chain network. The building process of the blockchain network is described in detail below with reference to specific embodiments.
Fig. 1 is a flowchart of a block chain network networking method according to an embodiment of the present invention. The embodiment of the invention provides a block chain network networking method aiming at the problems that a centralized mechanism is adopted in the block chain based networking method in the prior art, the networking process depends on a cloud service platform as a center, and the networking process is opaque and unreliable. As shown in fig. 1, the method comprises the following specific steps:
and S101, generating MSP information of the first participant equipment by the first participant equipment.
In this embodiment, the first participant device may be a communication device of any one participant, which is responsible for building a block chain network. The first participant device may be a terminal device, or a server cluster, and in other embodiments, the method may also be applied to other devices, which is not specifically limited in this embodiment.
The MSP information refers to certificate Management (MSP) information of the member in the federation chain. The MSP information includes a communication address, MSP identification information, and a plurality of credentials.
One participant corresponds to one MSP identification information for uniquely identifying the MSP information of one participant, e.g., the MSP identification information can be an MSPID.
Step S102, the first participant device sends the MSP information of the first participant device to other participant devices, and receives the MSP information sent by the other participant devices.
In this embodiment, after generating the MSP information of the first participant device, the first participant device may send the MSP information of the first participant device to other participant devices, so that the other participant devices may know the MSP information of the first participant device. A first participant device may receive MSP information transmitted by other participant devices.
Step S103, when receiving the networking initiating instruction, the first participant device obtains initial block configuration information, and sends the initial block configuration information to other participant devices, so that the other participant devices configure local node information according to the initial block configuration information and start a local node.
After the MSP information exchange of each participant device is completed, networking may be initiated by any one participant device upon receiving the initiate networking instruction.
The initial block configuration information at least comprises configuration information and block setting information of the sorting nodes. The block setting information includes a communication address of a device where the preset public service is located, a port number, related information generated by the block, a block size, the number of transactions in each block, version information of a block chain, a consensus method and other information. The block setting information is information agreed in advance by each participant and needs to be kept consistent. Wherein presetting the public service includes: kafka services and Zookeeper services, etc.
And step S104, the first participant equipment acquires the local node configuration information and completes the configuration of the local node according to the local node configuration information.
The local nodes at least comprise a sequencing node and a Peer node.
Optionally, the first participant device may provide a node configuration interface for inputting local node configuration information. The first participant equipment receives local node configuration information input and submitted by a participant user through a node configuration page, and completes configuration of the local node according to the obtained local node configuration information.
Optionally, the participating user may write the local node configuration information into the preset node configuration file in advance. The first participant device may read local node configuration information from a preset node configuration file, and complete configuration of the local node according to the obtained local node configuration information.
Step S105, the first party device starts the local node.
In this embodiment, the first participant device may start the local node after completing the configuration of the local node. After the local nodes of each participant device are started, networking of the block chain network can be completed.
Optionally, the first participant device may also start the local node when receiving the start instruction.
The embodiment of the invention generates the MSP information of the first participant equipment by the first participant equipment; the first participant equipment sends the MSP information of the first participant equipment to other participant equipment and receives the MSP information sent by other participant equipment; when a networking initiating instruction is received, the first participant equipment acquires initial block configuration information and sends the initial block configuration information to other participant equipment so that the other participant equipment configures local node information according to the initial block configuration information and starts a local node; the first participant equipment configures local node information according to the MSP information of the first participant equipment, the MSP information of other participant equipment and initial block configuration information; the first participant device starts a local node to complete block chain network networking, each participant device generates own MSP information and shares the MSP information with other participants, a central server is not needed, each participant device participates in the block chain network networking together, decentralized networking is achieved, and the networking process is more transparent and more reliable.
Example two
Fig. 2 is a flowchart of a block chain network networking method according to a second embodiment of the present invention. On the basis of the first embodiment, in this embodiment, one or more seed nodes are determined in advance from each participant device, and the communication addresses of the seed nodes are disclosed to all the participant devices. Each participant device transmits its communication address and MSP identification information to the seed node so that the seed node stores the communication address and MSP information for all known participant devices. Before the first participant device sends the MSP information of the first participant device to other participant devices, the method further comprises: the method comprises the steps that a first participant device sends an address acquisition request to a preset seed node, wherein the address acquisition request comprises a communication address and MSP identification information of the first participant device, so that the seed node sends the communication addresses and the MSP identification information of all known participant devices to the first participant device, and sends the communication address and the MSP identification information of the first participant device to all known participant devices, so that all known participant devices send own MSP information to the first participant device; the first participant device receives the communication addresses and MSP identification information for all known participant devices sent by the seed node. As shown in fig. 2, the method comprises the following specific steps:
step S201, the first participant device generates MSP information of itself.
In this embodiment, the first participant device may be a communication device of any one participant, which is responsible for building a block chain network. The first participant device may be a terminal device, or a server cluster, and in other embodiments, the method may also be applied to other devices, which is not specifically limited in this embodiment.
The MSP information refers to certificate Management (MSP) information of the member in the federation chain. The MSP information includes a communication address, MSP identification information, and a plurality of credentials.
One participant corresponds to one MSP identification information for uniquely identifying the MSP information of one participant, e.g., the MSP identification information can be an MSPID.
Specifically, the first participant device generates MSP information of itself, which may be implemented by the following steps S2011-S2012:
s2011, the first party device obtains the identity information of the corresponding party, and generates a certificate of the corresponding party according to the identity information of the corresponding party, where the certificate includes: a signing certificate and a communication certificate, the signing certificate including an administrator certificate and a non-administrator certificate.
Alternatively, the first party device may provide a certificate generation interface for inputting the identity information of the parties necessary to generate the certificate. The participant user may enter and submit parameter information needed to generate the credential at the credential generation interface. For example, the domain name of the party, the city in which it is located, the company name, etc. are information related to the identity of the party. The first participant device can receive the identity information of the participant submitted by the participant user through the front-end page, and generate the certificate of the corresponding participant according to the identity information of the participant submitted by the participant user, so that the reliability of the certificate of the participant can be ensured.
Optionally, the participant user may write the identity information of the participant necessary for generating the certificate into a preset configuration file in advance. The first participant device may read, from the preset configuration file, the identity information of the participant necessary for generating the certificate, and generate the certificate of the corresponding participant according to the identity information of the participant submitted by the participant user.
S2012, the first participant equipment acquires the communication address and MSP identification information of the first participant equipment.
In this embodiment, the MSP information of the first participant device includes a communication address and MSP identification information of the first participant device, and a certificate of a participant corresponding to the first participant device.
Optionally, the first participant device may provide a front-end interface for entering the communication address and MSP identification information so that the participant user may enter and submit his or her communication address and MSP identification information at the front-end interface. The first participant device may receive the communication address and MSP identification information of the first participant device submitted by the participant user through the front-end page.
Optionally, the participant user may write the communication address and the MSP identification information of the first participant device into a preset configuration file in advance. The first participant device may read its communication address and MSP identification information from a preset configuration file.
Step S202, the first participant device sends an address obtaining request to a preset seed node, where the address obtaining request includes a communication address and MSP identification information of the first participant device, so that the seed node sends the communication addresses and MSP identification information of all known participant devices to the first participant device, and sends the communication address and MSP identification information of the first participant device to all known participant devices, so that all known participant devices send their MSP information to the first participant device.
In this embodiment, each participant device sends its communication address and MSP identification information to the seed node, so that the seed node stores the communication addresses and MSP information of all known participant devices.
The first participant device may obtain the communication addresses and MSP identification information for all known participants from the seed node by sending an address acquisition request to the seed node before sending its MSP information to the other participant devices.
When the seed node receives an address acquisition request sent by any one participant device, the seed node stores the communication address and MSP identification information of a sender device and sends the communication addresses and MSP identification information of all known participant devices to the sender device; and the seed node sends the communication address and the MSP identification information of the sender device to all known participant devices, so that all known participant devices send their MSP information to the sender device.
Optionally, in this embodiment, one or more seed nodes may be preset. If the number of the seed nodes is multiple, the communication addresses and the MSP identification information of all the known participant devices are synchronously stored in the multiple seed nodes.
Optionally, if the first participant device may send an address obtaining request to any seed node, and receive the communication addresses and the MSP identification information of all known participant devices fed back by the seed node.
Step S203, the first participant device receives the communication addresses and MSP identification information of all known participant devices sent by the seed node.
One possible implementation of the above steps S202-S203 is to obtain the communication addresses and MSP identification information of other participant devices for the first participant device.
Optionally, if the first participant device is a seed node, the first participant device itself stores the communication addresses and the MSP identification information of all known participant devices, and the steps S202 to S203 do not need to be executed to obtain the communication addresses and the MSP identification information of other participants, the first participant device sends its communication address and MSP identification information to all known participant devices, and executes the step S204 and subsequent steps.
In addition, if the first participant device is a seed node, the first participant device may further implement the function of the seed node:
the method comprises the steps that a first participant device receives address acquisition requests sent by other participant devices, wherein the address acquisition requests comprise communication addresses and MSP identification information of a sender device; the first participant device stores the communication address and MSP identification information of the sender device and sends the communication address and MSP identification information of all known participant devices to the sender device; the first participant device transmits the communication address and MSP identification information of the sender device to all known participant devices such that all known participant devices transmit their MSP information to the first participant device.
Alternatively, the first participant device may broadcast the communication addresses and MSP identification information for all known participant devices to the sender device.
Step S204, the first participant device sends the MSP information of the first participant device to other participant devices, and receives the MSP information sent by other participant devices.
Optionally, the first participant device may broadcast its MSP information to other participant devices.
The above steps S201-S204 are one possible implementation of exchanging MSP information for the respective participant devices. Each participant device that completes the NSP information exchange may be networked.
Step S205, when receiving the networking initiating instruction, the first participant device obtains initial block configuration information, and sends the initial block configuration information to other participant devices, so that the other participant devices configure local node information according to the initial block configuration information and start a local node.
After the MSP information exchange of each participant device is completed, networking may be initiated by any one participant device upon receiving the initiate networking instruction.
The initial block configuration information at least comprises configuration information and block setting information of the sorting nodes. The block setting information includes a communication address of a device where the preset public service is located, a port number, related information generated by the block, a block size, the number of transactions in each block, version information of a block chain, a consensus method and other information. The block setting information is information agreed in advance by each participant and needs to be kept consistent. Wherein presetting the public service includes: kafka services and Zookeeper services, etc.
Optionally, the first participant device provides an initiating networking interface for submitting an initiating networking instruction. For example, the participant user may submit an initiating networking instruction to the first participant device by clicking a preset button or a preset area in the initiating networking interface.
Optionally, after the first participant device obtains the initial block configuration information, the first participant device generates a sorting node configuration file according to the MSP information of the first participant device, the MSP information of other participant devices, and the initial block configuration information.
For example, the sort node configuration file may be a gene.
In this embodiment, the process of generating the initial block configuration information is completed locally at each participant, that is, each participant needs to generate a configuration file of a sorting node for use by a local sorting service. The information source for generating the sequencing node configuration file is divided into two parts: one part is MSP information from other participant devices and the other part is initial tile configuration information from participant users set through the front-end page.
In the process of generating the configuration file of the sequencing node, each participant needs to negotiate in advance to ensure that other information except the attribute information such as the communication address and the port number of each device in the set initial block configuration information is consistent.
Optionally, the first participant device may store the initial tile configuration information in a local database to backup the initial tile configuration information.
Step S206, the first participant device obtains the local node configuration information and completes the configuration of the local node according to the local node configuration information.
The local nodes at least comprise a sequencing node and a Peer node.
Optionally, the first participant device may provide a node configuration interface for inputting local node configuration information. The first participant equipment receives local node configuration information input and submitted by a participant user through a node configuration page, and completes configuration of the local node according to the obtained local node configuration information.
Optionally, the participating user may write the local node configuration information into the preset node configuration file in advance. The first participant device may read local node configuration information from a preset node configuration file, and complete configuration of the local node according to the obtained local node configuration information.
Step S207, the first party device starts the local node.
In this embodiment, the first participant device may start the local node after completing the configuration of the local node. After the local nodes of each participant device are started, networking of the block chain network can be completed.
Optionally, the first participant device may also start the local node when receiving the start instruction.
The communication addresses of the seed nodes are disclosed to all the participant devices through the preset seed nodes, and the seed nodes store the communication addresses and MSP identification information of all the known participant devices which send address acquisition requests to the seed nodes. Each participant device sends an address acquisition request carrying a communication address and MSP identification information of the participant device to the seed node, and can acquire the communication addresses and the MSP information of all known participant devices from the seed device, each participant device sends the MSP information of the participant device to other participant devices and receives the MSP information sent by other participant devices, so that the interaction of the MSP information among the participant devices is realized, and the MSP information of each participant device is generated by the participant device, so that the reliability of the MSP information can be ensured, and the networking process is more transparent and more reliable.
EXAMPLE III
Fig. 3 is a flowchart of a block chain network networking method according to a third embodiment of the present invention. On the basis of the first embodiment or the second embodiment, in this embodiment, after the first party device starts the local node, the first party device may further create a tunnel and join a node to the tunnel. As shown in fig. 3, after the first participant device starts up the local node, the method further includes the steps of:
step S301, the first participant device receives a channel creation instruction, where the channel creation instruction includes channel configuration information.
The first participant device may be a communication device of any one participant responsible for building the blockchain network.
In this embodiment, the first participant device may provide a channel creation interface for inputting channel configuration information. The participant user may enter configuration information for the channel to be created in the channel creation interface. After the participant user enters the channel configuration information, a channel creation instruction including the channel configuration information is submitted to the first participant device through the submit channel creation interface.
The channel configuration information may include a channel name and channel participant information. The channel participant information may be the domain name of the participant, the company name, etc. that can indicate the identity of the participant.
Optionally, the first participant device may obtain, according to the channel configuration information, MSP identification information of the channel participant corresponding to the channel participant information, and generate the channel configuration file according to the channel name and the MSP identification information of the channel participant. For example, the channel profile may be a channel.
Step S302, the first participant equipment sends a first transaction request to the sequencing node so that the sequencing node creates a channel according to the channel configuration information.
Optionally, the creating of the channel by the sorting node according to the channel configuration information may be completed by calling a corresponding function module in a Software Development Kit (SDK).
In this embodiment, the process of creating a channel by a sorting node according to channel configuration information is implemented by any method for creating a channel in the prior art, and this embodiment is not specifically limited here.
Step S303, receiving a node adding instruction, wherein the node adding instruction comprises identification information of the Peer node.
In this embodiment, the first participant device may provide a node join interface for specifying a Peer node to join the channel. The participant user can specify the Peer node to be added into the created channel in the node adding interface and submit the identification information of the Peer node. After designating a Peer node to join the created channel, the participant user submits a join node instruction including identification information of the Peer node to the first participant device through a submit node join interface.
And step S304, the first participant equipment sends a second transaction request to the Peer node according to the identification information of the Peer node, so that the Peer node is added into the established channel.
Optionally, adding the Peer node into the created channel may be completed by calling a corresponding function module in a Software Development Kit (SDK).
In this embodiment, the process of adding the Peer node into the created channel is implemented by using any method in the prior art for adding the Peer node into the created channel, and this embodiment is not limited in detail here.
According to the embodiment of the invention, after the local nodes are started by each participant device and the block chain network networking is completed, the first participant device receives a channel creation instruction, wherein the channel creation instruction comprises channel configuration information; the first participant equipment sends a first transaction request to the sequencing node so that the sequencing node creates a channel according to the channel configuration information; receiving a node adding instruction, wherein the node adding instruction comprises identification information of a Peer node; the first participant equipment sends a second transaction request to the Peer node according to the identification information of the Peer node so as to enable the Peer node to join the established channel; the block chain network based on the building is realized, and the participant equipment creates the channel and adds the node to the created channel.
Example four
Fig. 4 is a schematic structural diagram of a blockchain network networking device according to a fourth embodiment of the present invention. The block chain network networking device provided by the embodiment of the invention can execute the processing flow provided by the block chain network networking method embodiment. As shown in fig. 4, the apparatus 40 includes: an MSP message generation module 401, an MSP message exchange module 402, an initial block configuration module 403, a local node configuration module 404, and a start-up module 405.
Specifically, the MSP information generation module 401 is configured to generate MSP information for a first participant device.
The MSP message exchange module 402 is configured to enable the first participant device to send the MSP message of the first participant device to other participant devices and receive the MSP message sent by the other participant devices.
The initial block configuration module 403 is configured to, when receiving the networking initiating instruction, obtain initial block configuration information by the first party device, and send the initial block configuration information to other party devices, so that the other party devices configure local node information according to the initial block configuration information and start a local node.
The local node configuration module 404 is configured to enable the first participant device to obtain local node configuration information, and complete configuration of the local node according to the local node configuration information.
The initiation module 405 is for a first participant device to initiate a local node.
The apparatus provided in the embodiment of the present invention may be specifically configured to execute the method embodiment provided in the first embodiment, and specific functions are not described herein again.
The embodiment of the invention generates the MSP information of the first participant equipment by the first participant equipment; the first participant equipment sends the MSP information of the first participant equipment to other participant equipment and receives the MSP information sent by other participant equipment; when a networking initiating instruction is received, the first participant equipment acquires initial block configuration information and sends the initial block configuration information to other participant equipment so that the other participant equipment configures local node information according to the initial block configuration information and starts a local node; the first participant equipment configures local node information according to the MSP information of the first participant equipment, the MSP information of other participant equipment and initial block configuration information; the first participant device starts a local node to complete block chain network networking, each participant device generates own MSP information and shares the MSP information with other participants, a central server is not needed, each participant device participates in the block chain network networking together, decentralized networking is achieved, and the networking process is more transparent and more reliable.
EXAMPLE five
On the basis of the fourth embodiment, in this embodiment, the MSP information generating module is further configured to:
the method comprises the steps that a first participant device obtains identity information of a corresponding participant and generates a certificate of the corresponding participant according to the identity information of the corresponding participant, wherein the certificate comprises: the system comprises a signing certificate and a communication certificate, wherein the signing certificate comprises an administrator certificate and a non-administrator certificate; the method comprises the steps that a first participant device obtains a communication address and MSP identification information of the first participant device; the MSP information of the first participant device includes a communication address and MSP identification information of the first participant device, and a credential of a participant to which the first participant device corresponds.
Optionally, the MSP message exchange module is further configured to:
the method comprises the steps that a first participant device sends an address acquisition request to a preset seed node, wherein the address acquisition request comprises a communication address and MSP identification information of the first participant device, so that the seed node sends the communication addresses and the MSP identification information of all known participant devices to the first participant device, and sends the communication address and the MSP identification information of the first participant device to all known participant devices, so that all known participant devices send own MSP information to the first participant device; the first participant device receives the communication addresses and MSP identification information for all known participant devices sent by the seed node.
Optionally, the MSP message exchange module is further configured to:
the first participant device is a seed node and receives address acquisition requests sent by other participant devices, wherein the address acquisition requests comprise communication addresses and MSP identification information of the sender device; the first participant device stores the communication address and MSP identification information of the sender device and sends the communication address and MSP identification information of all known participant devices to the sender device; the first participant device transmits the communication address and MSP identification information of the sender device to all known participant devices such that all known participant devices transmit their MSP information to the first participant device.
Optionally, the MSP message exchange module is further configured to:
the first participant device broadcasts the communication address and MSP identification information of the sender device to all known participant devices.
Optionally, the MSP message exchange module is further configured to:
a first participant device broadcasts its MSP information to other participant devices.
Optionally, the initial block allocation module is further configured to:
and the first participant device generates a sequencing node configuration file according to the MSP information of the first participant device, the MSP information of other participant devices and the initial block configuration information.
Optionally, the starting module is further configured to:
upon receiving the start instruction, the first participant device starts the local node.
The apparatus provided in the embodiment of the present invention may be specifically configured to execute the method embodiment provided in the second embodiment, and specific functions are not described herein again.
The communication addresses of the seed nodes are disclosed to all the participant devices through the preset seed nodes, and the seed nodes store the communication addresses and MSP identification information of all the known participant devices which send address acquisition requests to the seed nodes. Each participant device sends an address acquisition request carrying a communication address and MSP identification information of the participant device to the seed node, and can acquire the communication addresses and the MSP information of all known participant devices from the seed device, each participant device sends the MSP information of the participant device to other participant devices and receives the MSP information sent by other participant devices, so that the interaction of the MSP information among the participant devices is realized, and the MSP information of each participant device is generated by the participant device, so that the reliability of the MSP information can be ensured, and the networking process is more transparent and more reliable.
EXAMPLE six
Fig. 5 is a schematic structural diagram of a blockchain network networking device according to a sixth embodiment of the present invention. On the basis of the fourth or fifth embodiment, in this embodiment, as shown in fig. 5, the apparatus 40 further includes: a channel management module 406.
Specifically, the channel management module 406 is configured to:
the method comprises the steps that a first participant device receives a channel creating instruction, wherein the channel creating instruction comprises channel configuration information; the first participant device sends a first transaction request to the sequencing node to cause the sequencing node to create a channel according to the channel configuration information.
The channel management module 406 may also be configured to:
receiving a node adding instruction, wherein the node adding instruction comprises identification information of a Peer node; and the first participant equipment sends a second transaction request to the Peer node according to the identification information of the Peer node so as to enable the Peer node to join the established channel.
The apparatus provided in the embodiment of the present invention may be specifically configured to execute the method embodiment provided in the third embodiment, and specific functions are not described herein again.
According to the embodiment of the invention, after the local nodes are started by each participant device and the block chain network networking is completed, the first participant device receives a channel creation instruction, wherein the channel creation instruction comprises channel configuration information; the first participant equipment sends a first transaction request to the sequencing node so that the sequencing node creates a channel according to the channel configuration information; receiving a node adding instruction, wherein the node adding instruction comprises identification information of a Peer node; the first participant equipment sends a second transaction request to the Peer node according to the identification information of the Peer node so as to enable the Peer node to join the established channel; the block chain network based on the building is realized, and the participant equipment creates the channel and adds the node to the created channel.
EXAMPLE seven
Fig. 6 is a schematic structural diagram of a blockchain network networking device according to a seventh embodiment of the present invention. As shown in fig. 6, the apparatus 60 includes: a processor 601, a memory 602, and computer programs.
Wherein a computer program is stored in the memory 602 and configured to be executed by the processor 601 to implement the block chain network networking method as provided by any of the above-described method embodiments.
The embodiment of the invention generates the MSP information of the first participant equipment by the first participant equipment; the first participant equipment sends the MSP information of the first participant equipment to other participant equipment and receives the MSP information sent by other participant equipment; when a networking initiating instruction is received, the first participant equipment acquires initial block configuration information and sends the initial block configuration information to other participant equipment so that the other participant equipment configures local node information according to the initial block configuration information and starts a local node; the first participant equipment configures local node information according to the MSP information of the first participant equipment, the MSP information of other participant equipment and initial block configuration information; the first participant device starts a local node to complete block chain network networking, each participant device generates own MSP information and shares the MSP information with other participants, a central server is not needed, each participant device participates in the block chain network networking together, decentralized networking is achieved, and the networking process is more transparent and more reliable.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method for networking a blockchain network provided in any of the above method embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.