CN112631623A - Chain code deployment method, system, device, equipment and storage medium - Google Patents

Chain code deployment method, system, device, equipment and storage medium Download PDF

Info

Publication number
CN112631623A
CN112631623A CN202011601616.6A CN202011601616A CN112631623A CN 112631623 A CN112631623 A CN 112631623A CN 202011601616 A CN202011601616 A CN 202011601616A CN 112631623 A CN112631623 A CN 112631623A
Authority
CN
China
Prior art keywords
chain code
organization
chain
target
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011601616.6A
Other languages
Chinese (zh)
Inventor
张帅
李伟
邱炜伟
蔡亮
王磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Qulian Technology Co Ltd
Original Assignee
Hangzhou Qulian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Qulian Technology Co Ltd filed Critical Hangzhou Qulian Technology Co Ltd
Priority to CN202011601616.6A priority Critical patent/CN112631623A/en
Publication of CN112631623A publication Critical patent/CN112631623A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

A chain code deployment method, system, device, equipment and storage medium are disclosed, which belong to the block chain technical field. The method comprises the following steps: each device of a plurality of devices logged in with user identifications associated with a plurality of organizations in a blockchain system sends a chain code installation request carrying a chain code packet to the blockchain system; when a block chain system receives a chain code installation request sent by equipment, installing a chain code at a computing node of a corresponding organization according to a chain code packet carried by the received chain code installation request; the target equipment sends a chain code instantiation request to the block chain system; and the block chain system instantiates the chain code when the chain code is determined to meet the chain code deployment strategy according to the organization to which the computing node which successfully installs the chain code belongs. When the chain code is deployed, each organization in a plurality of organizations realizes the approval of the chain code when the chain code is installed, so that the deployment permission of the chain code is dispersed to the related plurality of organizations, and the peer-to-peer of the organization permission is realized when the chain code is deployed.

Description

Chain code deployment method, system, device, equipment and storage medium
Technical Field
The present application relates to the field of block chain technologies, and in particular, to a method, a system, an apparatus, a device, and a storage medium for chain code deployment.
Background
The chain code (chainocode) is called chain code for short, and generally refers to an application code written by a user. Chain codes may be deployed on nodes in a blockchain system, and data in a distributed ledger of the blockchain system may be operated on by calling the chain codes.
At present, chain code deployment can be performed through a bandwidth as a Service (basas a Service) platform. Specifically, if a user wants to deploy a chain code in a Channel (Channel) in the blockchain system, the user may upload the chain code to be deployed to a BaaS platform after logging in the BaaS platform, and the BaaS platform directly deploys the chain code on computing nodes of a plurality of organizations joining the Channel.
However, in the chain code deployment manner, a user can deploy the chain code on the node in the blockchain system as long as the user logs in the BaaS platform, and the chain code deployment authority is too centralized.
Disclosure of Invention
The embodiment of the application provides a chain code deployment method, a system, a device, equipment and a storage medium, which can realize the peer-to-peer of organization permission during chain code deployment. The technical scheme is as follows:
in a first aspect, a method for chain code deployment is provided, where the method includes:
each device in the plurality of devices sends a chain code installation request carrying a chain code packet to a blockchain system, wherein each device corresponds to an organization in the blockchain system, each device is logged with a user identifier, and the organization corresponding to each device is an organization related to the blockchain system by the logged user identifier;
when the block chain system receives a chain code installation request sent by one device, installing the chain code at a computing node of a corresponding organization according to the chain code packet carried by the received chain code installation request;
a target device in the plurality of devices sends a chain code instantiation request to the blockchain system, wherein the chain code instantiation request is used for requesting to instantiate the chain code;
after receiving the chain code instantiation request, the block chain system instantiates the chain code if the chain code is determined to meet a chain code deployment strategy according to the organization to which the computing node successfully installed the chain code belongs, wherein the chain code deployment strategy is used for indicating the organization which needs to approve the chain code during chain code deployment.
In the present application, a plurality of devices logged in with a user identifier associated with each of a plurality of organizations send a chain code installation request to a blockchain system. And when the block chain system receives a chain code installation request sent by one device, installing a chain code at a computing node of a corresponding organization according to a chain code packet carried by the received chain code installation request. Thus, when the chain code is deployed, each organization in a plurality of organizations realizes the approval of the chain code when the chain code is installed, so that the deployment authority of the chain code is dispersed to the related plurality of organizations, and the peer-to-peer of the organization authority is realized when the chain code is deployed. And then, after the block chain system receives the chain code instantiation request, if the chain code is determined to meet the chain code deployment strategy according to the organization to which the computing node successfully installed the chain code belongs, instantiating the chain code, and completing the deployment of the chain code. Therefore, the installation, approval and instantiation operations of the chain code are separated, and the flexibility of the system is improved.
Optionally, the installing, by the blockchain system, the chain code at a computing node of a corresponding organization according to the chain code packet carried by the received chain code installation request includes:
the computing node installs the chain code according to the chain code packet, and sends a confirmation message carrying a chain code packet identifier to a sequencing node in the block chain system after the chain code is successfully installed;
if the block chain system determines that the chain codes meet the chain code deployment strategy according to the organization to which the computing nodes which have successfully installed the chain codes belong, the block chain system comprises the following steps:
and the sequencing node determines the organization which has approved the chain code according to all the received confirmation messages carrying the chain code packet identification, and instantiates the chain code if the organization which has approved the chain code is consistent with the organization indicated by the chain code deployment strategy.
Optionally, the chain code instantiation request is used to request to instantiate the chain code in the target channel, and the chain code deployment policy is used to indicate any one of:
deploying chain codes in the target channel and requiring all organizations to join the target channel to approve;
deploying the chain code in the target channel and requiring any organization approval of joining the target channel;
deploying chain code at the target channel requires more than half of all organizations joining the target channel to approve.
Optionally, before each of the multiple devices sends a chain code installation request carrying a chain code packet to the blockchain system, the method further includes:
the target equipment acquires chain code information;
the target device sends a chain code packaging request carrying the chain code information to the block chain system, wherein the chain code packaging request is used for requesting a target organization corresponding to the target device to package a chain code;
after receiving the chain code packaging request, the block chain system generates the chain code package at the computing node of the target organization according to the chain code information;
and the block chain system sends the chain code packet to the target equipment.
Optionally, after the block chain system sends the chain code packet to the target device, the method further includes:
and after receiving the chain code packet, the target equipment sends the chain code packet to other equipment according to the organization indicated by the chain code deployment strategy.
Optionally, before the target device sends a chain code packing request carrying the chain code information to the blockchain system, the method further includes:
the target device displays a plurality of organization identifications, wherein the plurality of organization identifications comprise identifications of each organization in a plurality of organizations associated with the target user identification;
and when the target device detects a selection operation for one of the plurality of organization identifiers, the selected one organization identifier is used as a target organization identifier, and a chain code packing request carrying the target organization identifier and the chain code information is generated, wherein the chain code packing request is used for requesting the target organization identified by the target organization identifier to pack the chain code.
In a second aspect, a chain code deployment method is provided, which is applied to a block chain system, and the method includes:
receiving a chain code installation request carrying a chain code packet and sent by each device in a plurality of devices, wherein each device corresponds to an organization in the blockchain system, each device is logged with a user identifier, and the organization corresponding to each device is an organization related to the blockchain system by the logged user identifier;
every time a chain code installation request sent by one device is received, installing the chain code at a computing node of a corresponding organization according to the chain code packet carried by the received chain code installation request;
receiving a chain code instantiation request, wherein the chain code instantiation request is used for requesting to instantiate the chain code;
and if the chain code is determined to meet a chain code deployment strategy according to the organization to which the computing node successfully installed with the chain code belongs, instantiating the chain code, wherein the chain code deployment strategy is used for indicating the organization which needs to approve the chain code during chain code deployment.
Optionally, before receiving a chain code installation request carrying a chain code packet sent by each device of the multiple devices, the method further includes:
receiving a chain code packaging request carrying chain code information, wherein the chain code packaging request is used for requesting a target organization to package a chain code;
generating the chain code packet at the computing node of the target organization according to the chain code information;
and sending the chain code packet to target equipment corresponding to the target organization.
Optionally, the chain code instantiation request is used to request to instantiate the chain code in the target channel, and the chain code deployment policy is used to indicate any one of:
deploying chain codes in the target channel and requiring all organizations to join the target channel to approve;
deploying the chain code in the target channel and requiring any organization approval of joining the target channel;
deploying chain code at the target channel requires more than half of all organizations joining the target channel to approve.
In a third aspect, a chain code deployment system is provided, the system including: a plurality of devices and a blockchain system;
each device in the multiple devices is configured to send a chain code installation request carrying a chain code packet to the blockchain system, where each device corresponds to an organization in the blockchain system, each device logs in a user identifier, and the organization corresponding to each device is an organization associated with the blockchain system by the logged user identifier;
the block chain system is used for installing the chain codes at the computing nodes of the corresponding organization according to the chain code packet carried by the received chain code installation request when receiving the chain code installation request sent by one device;
a target device of the plurality of devices, configured to send a chain code instantiation request to the blockchain system, where the chain code instantiation request is used to request to instantiate the chain code;
the block chain system is configured to instantiate the chain code after receiving the chain code instantiation request, if it is determined that the chain code satisfies a chain code deployment policy according to an organization to which a computing node that has successfully installed the chain code belongs, where the chain code deployment policy is used to indicate an organization that needs to approve the chain code when the chain code is deployed.
Optionally, the computing node is configured to install the chain code according to the chain code packet, and send a confirmation message carrying a chain code packet identifier to a sorting node in the block chain system after the chain code is successfully installed;
and the sequencing node is used for determining an organization which has approved the chain code according to all the received confirmation messages carrying the chain code packet identifier, and instantiating the chain code if the organization which has approved the chain code is consistent with the organization indicated by the chain code deployment strategy.
Optionally, the chain code instantiation request is used to request to instantiate the chain code in the target channel, and the chain code deployment policy is used to indicate any one of:
deploying chain codes in the target channel and requiring all organizations to join the target channel to approve;
deploying the chain code in the target channel and requiring any organization approval of joining the target channel;
deploying chain code at the target channel requires more than half of all organizations joining the target channel to approve.
Optionally, the target device is further configured to obtain chain code information; sending a chain code packaging request carrying the chain code information to the block chain system, wherein the chain code packaging request is used for requesting a target organization corresponding to the target equipment to package chain codes;
the block chain system is further configured to generate the chain code packet at the computing node of the target organization according to the chain code information after receiving the chain code packaging request; and sending the chain code packet to the target equipment.
Optionally, the target device is further configured to send the chain code packet to other devices according to an organization indicated by the chain code deployment policy after receiving the chain code packet.
Optionally, the target user identification of the target device login is associated with a plurality of organizations in the blockchain system;
the target device is further configured to display a plurality of organization identifiers, where the plurality of organization identifiers include an identifier of each of a plurality of organizations associated with the target user identifier; and when the selection operation aiming at one of the plurality of organization identifications is detected, taking the selected organization identification as a target organization identification, and generating a chain code packing request carrying the target organization identification and the chain code information, wherein the chain code packing request is used for requesting the target organization identified by the target organization identification to pack the chain code.
In a fourth aspect, a chain code deployment apparatus is provided, which is applied to a block chain system, and the apparatus includes:
a receiving module, configured to receive a chain code installation request carrying a chain code packet sent by each device of a plurality of devices, where each device corresponds to an organization in the blockchain system, and each device is logged with a user identifier, where the organization corresponding to each device is an organization associated with the blockchain system by the logged user identifier;
the installation module is used for installing the chain codes at the computing nodes of the corresponding organizations according to the chain code packets carried by the received chain code installation request when receiving the chain code installation request sent by one device;
the receiving module is further configured to receive a chain code instantiation request, where the chain code instantiation request is used to request to instantiate the chain code;
and the instantiation module is used for instantiating the chain code under the condition that the chain code meets a chain code deployment strategy according to the organization to which the computing node which successfully installs the chain code belongs, wherein the chain code deployment strategy is used for indicating the organization which needs to approve the chain code during chain code deployment.
Optionally, the apparatus further comprises a generating module and a sending module;
the receiving module is further configured to receive a chain code packaging request carrying chain code information, where the chain code packaging request is used to request a target organization to package a chain code;
the generating module is configured to generate the chain code packet at the computing node of the target organization according to the chain code information;
and the sending module is used for sending the chain code packet to the target equipment corresponding to the target organization.
Optionally, the chain code instantiation request is used to request to instantiate the chain code in the target channel, and the chain code deployment policy is used to indicate any one of:
deploying chain codes in the target channel and requiring all organizations to join the target channel to approve;
deploying the chain code in the target channel and requiring any organization approval of joining the target channel;
deploying chain code at the target channel requires more than half of all organizations joining the target channel to approve.
In a fifth aspect, a computer device is provided, the computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the computer program, when executed by the processor, implementing the chain code deployment method of the second aspect.
In a sixth aspect, a computer-readable storage medium is provided, which stores a computer program, and the computer program, when executed by a processor, implements the chain code deployment method of the second aspect.
In a seventh aspect, a computer program product containing instructions is provided, which when run on a computer causes the computer to perform the steps of the chain code deployment method of the second aspect.
It is to be understood that, for the beneficial effects of the second aspect, the third aspect, the fourth aspect, the fifth aspect, the sixth aspect and the seventh aspect, reference may be made to the description of the first aspect, and details are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of a blockchain system according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a block chain according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a chain code deployment system according to an embodiment of the present application;
fig. 4 is a schematic diagram of another chain code deployment system provided in the embodiment of the present application;
FIG. 5 is a block chain system according to another embodiment of the present disclosure;
fig. 6 is a flowchart of a chain code deployment method provided in an embodiment of the present application;
fig. 7 is a flowchart of another chain code deployment method provided in the embodiment of the present application;
fig. 8 is a schematic structural diagram of a chain code deployment apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that reference to "a plurality" in this application means two or more. In addition, for the convenience of clearly describing the technical solutions of the present application, the terms "first", "second", and the like are used to distinguish the same items or similar items having substantially the same functions and actions. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
Before explaining the embodiments of the present application, the related contents of the block chain will be described.
Fig. 1 is a schematic structural diagram of a blockchain system according to an embodiment of the present disclosure.
Referring to fig. 1, a blockchain system 100 refers to a system for performing data sharing between nodes, a plurality of nodes 101 may be included in the blockchain system 100, and the plurality of nodes 101 may refer to respective clients in the blockchain system 100. Each node 101 may receive input information and maintain shared data within the blockchain system 100 based on the received input information while operating normally. In order to ensure information intercommunication in the blockchain system 100, there may be an information connection between each node 101 in the blockchain system 100, and information transmission between the nodes 101 may be performed through the information connection. For example, when an input message is received by any node 101 in the blockchain system 100, other nodes 101 in the blockchain system 100 acquire the input message according to the consensus algorithm, and store the input message as data in the shared data, so that the data stored in all nodes 101 in the blockchain system 100 are consistent.
Each node 101 in the blockchain system 100 stores one identical blockchain. Referring to fig. 2, a block chain is composed of a plurality of blocks, a starting block includes a block header and a block main body, the block header stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
The blockchain system 100 has computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, etc. The blockchain system 100 is a distributed shared ledger and database, and has the characteristics of decentralization, non-tampering, whole-course trace-keeping, traceability, collective maintenance, public transparency and the like. The characteristics ensure that the block chain is shared openly, real and complete, safe and reliable.
The system architecture according to the embodiments of the present application is described below.
Fig. 3 is a schematic diagram of a chain code deployment system according to an embodiment of the present application. Referring to fig. 3, the chain code deployment system includes: a plurality of devices 301 and a blockchain system 302.
The target device 301 is included in the plurality of devices 301, and the blockchain system 302 may be the blockchain system 100 described above in the embodiments of fig. 1-2.
For any one device 301 of the plurality of devices 301, the one device 301 may be a general purpose computer device or a special purpose computer device. In a specific implementation, the device 301 may be a desktop, a laptop, a web server, a palmtop, a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device, and the embodiment of the present application does not limit the type of the device 301.
In one possible approach, the device 301 is a device capable of communicating directly with the blockchain system 302, e.g., the device 301 may be a network server or the like. In this manner, the device 301 may communicate with the blockchain system 302 via a wired network or a wireless network.
In another possible approach, the device 301 is a device that is not capable of communicating directly with the blockchain system 302, e.g., the device 301 may be a terminal device, etc. In this way, referring to fig. 4, the chain code deployment system may further include a service platform 303. The service platform 303 is a platform that can access the blockchain system 302, for example, the service platform 303 may be a BaaS platform. The service platform 303 may communicate with the device 301 through a wired network or a wireless network, and the service platform 303 may also communicate with the blockchain system 302 through a wired network or a wireless network. In this manner, this device 301 can communicate with the blockchain system 302 through the service platform 303.
The structure of the blockchain system 302 is described below.
Referring to fig. 5, the blockchain system 302 may include one or more organizations 500 and one or more channels 502, and the blockchain system 302 is illustrated in fig. 5 as including three organizations 500 and one channel 502. Each organization 500 includes one or more compute nodes (i.e., peer nodes) 501, one or more compute nodes 501 in each organization may join a channel 502, and each channel 502 also has a sort node (i.e., Orderer node) 503. The channels 502 in the blockchain system 302 enable private isolation between the organizations 500 in the blockchain system 302, and the chain code and transaction in each channel 502 are visible only to the nodes joining this channel 502 (including the compute nodes 501 and the sort nodes 503). The same node may join one or more channels 502 and maintain an accounting book for each channel 502.
The multiple devices 301 and the blockchain system 302 may implement a chain code deployment method described in the embodiment of fig. 6 below to implement the deployment of the chain code.
The chain code deployment method provided in the embodiments of the present application is explained in detail below.
Fig. 6 is a flowchart of a chain code deployment method provided in an embodiment of the present application. Referring to fig. 6, the method includes the following steps.
It is noted that in the embodiment of the present application, each device in the plurality of devices is logged with a user identifier, and each user identifier is associated with an organization in the blockchain system. Each device corresponds to an organization in the blockchain system, and the organization corresponding to each device is an organization associated with the logged-in user identifier in the blockchain system.
The user identifier is used to identify the user, and for example, the user identifier may be a user name, a user certificate number, a user account number, and the like of the user, which is not limited in this embodiment of the application. The association relationship between the user identifier and the organization may be stored in the service platform, or may be stored in the blockchain system, which is not limited in this embodiment of the present application.
Step 601: the target device acquires the chain code information.
The target device is logged in with a target user identifier. The target user identifier is used to identify the target user, for example, the target user identifier may be a user name, a user certificate number, a user account number, and the like of the target user, which is not limited in this embodiment of the application.
A target user identification is associated with one or more organizations in the blockchain system, the target user identification having administrative rights for the one or more organizations, including but not limited to having rights to deploy chain codes in the one or more organizations. The organization associated with the target user identifier may also be referred to as an organization corresponding to the target device logged with the target user identifier.
The chain code information may be information related to a chain code. For example, the chain code information may include the name of the chain code, a profile, a version number, a source code, an endorsement policy, etc. The chain code may be an intelligent contract, such as a deposit and license contract.
The link code information acquired by the target device may be input to the target device by the target user, and may also be acquired by the target device in other manners, which is not limited in this embodiment of the present application.
For example, the target device may log in the service platform by using the target user identifier, at this time, the front end page of the service platform is displayed on the target device, the target user may input the chain code information in the front end page, and the target device may acquire the chain code information input by the target user on the front end page.
Step 602: and the target equipment sends a chain code packaging request carrying the chain code information to the block chain system.
The link code packaging request is used for requesting a target organization corresponding to the target device (namely, a target organization associated with the target user identifier) to package the link code. Optionally, the chain code packaging request may carry a target organization identifier, where the target organization identifier is used to identify the target organization, for example, the target organization identifier may be a name of the target organization.
In one possible approach, the target device may send the chain code packing request directly to the blockchain system. In another possible manner, the target device may first send the chain code packaging request to the service platform, and then the service platform sends the chain code packaging request to the blockchain system.
In some embodiments, if a target user identification is associated with only one organization in the blockchain system, then this organization may be directly taken as the target organization. In this case, the target device may directly generate a chain code packaging request carrying the identifier of the organization (i.e. the target organization identifier) and the chain code information.
If the target user identification is associated with multiple organizations in the blockchain system, one of the multiple organizations may be selected as the target organization. Specifically, the target device may display a plurality of tissue identifications; when the target device detects a selection operation for one of the plurality of tissue identifiers, the selected one tissue identifier is taken as a target tissue identifier. In this case, the target device may generate a chain code packaging request carrying the target organization identifier and the chain code information, where the chain code installation request is used to request the target organization identified by the target organization identifier to package the chain code.
The plurality of organization identities includes an identity of each of a plurality of organizations associated with the target user identity. Each organization id is used to identify an organization, which may be the name of the organization, etc.
The selecting operation is to select one tissue identity from the plurality of tissue identities. The selection operation may be triggered by a target user, for example, the selection operation may be a click operation, a slide operation, a voice operation, a gesture operation, a motion sensing operation, and the like, which is not limited in this embodiment of the present application.
Illustratively, the target device may log into the service platform using the target user identification. The service platform may obtain an identifier of each of a plurality of organizations associated with the target user identifier, that is, obtain a plurality of organization identifiers, according to the association relationship between the user identifier and the organizations, and then send the plurality of organization identifiers to the target device. After receiving the plurality of organization identifiers, the target device may display the plurality of organization identifiers on a front-end page of the service platform. Then, the target user can select one organization identifier from the plurality of organization identifiers displayed on the front page of the service platform to specify an organization that needs to package the chain code.
Step 603: and after receiving the chain code packaging request, the block chain system generates a chain code package at the computing node of the target organization according to the chain code information.
The chain code needs to be packaged into a deployable structure before installation, and optionally, can be packaged into a file in tar format, that is, a chain code package.
After receiving the chain code packaging request, the block chain system can send the chain code information carried by the chain code packaging request to the computing node of the target organization, and the computing node of the target organization generates a chain code packet according to the chain code information.
The operation of generating the chain code packet by the computing node of the target organization according to the chain code information is similar to the operation of generating the chain code packet by a certain node according to the chain code information in the related art, which is not described in detail in the embodiment of the present application. For example, a computing node of the target organization may obtain a chain code packet using a peer command based on the chain code information.
Step 604: the block chain system sends the chain code packet to the target device.
After receiving the chain code packet, the target device may obtain a chain code deployment strategy corresponding to the target channel. The target channel is the channel that needs to deploy the chain code. The chain code deployment policy is used to indicate an organization that requires chain code approval at the time of chain code deployment, wherein chain code approval is an agreement to deploy the chain code. When channels needing to deploy chain codes are different, corresponding chain code deployment strategies can be different.
The target device may locally store the chain code deployment policy corresponding to each of the one or more channels, and then obtain the chain code deployment policy corresponding to the target channel therefrom. Or, the target device may obtain a chain code deployment policy corresponding to the target channel from the service platform or the blockchain system.
Optionally, the chain code deployment policy may be used to indicate any one of: deploying chain codes in the target channel and requiring all organizations to join the target channel to approve; deploying the chain code in the target channel and requiring any organization to join the target channel for approval; deploying chain codes on a target channel requires more than half of all organizations joining the target channel to approve.
In this case, after receiving the chain code packet, the destination device needs to send the chain code packet to a device corresponding to another organization in order to obtain approval from the other organization.
In one possible approach, after receiving the chain code packet, the target device sends the chain code packet to other devices according to an organization indicated by the chain code deployment policy.
In this way, the target device may first determine the user identifier associated with the organization indicated by the chain code deployment policy, and then send the chain code packet to the device logged in with the determined user identifier.
In another possible manner, after the target device receives the chain code packet, the target user knows the chain code packet, and then may notify other users of the chain code packet, and the other users may input the chain code packet to devices logged in with their respective user identifiers.
Step 605: each device in the plurality of devices sends a chain code installation request carrying the chain code packet to the blockchain system.
The plurality of devices includes a target device. Each device is logged with a user identification, each user identification associated with an organization in the blockchain system. The chain code installation request sent by each device is used for requesting an organization corresponding to each device (namely, an organization associated with the user identifier logged in by each device) to install the chain code. Optionally, the chain code installation request may further carry a target channel identifier, where the target channel identifier is used to identify a target channel in which the chain code needs to be deployed, and for example, the target channel identifier may be a name of the target channel.
It should be noted that, for any one of the multiple devices, if the user identifier logged in by the device is only associated with one organization in the blockchain system, the device may directly send a chain code installation request carrying the identifier of the organization and the chain code packet to the blockchain system. The chain code installation request is used for requesting the organization installation chain code identified by the carried organization identification.
If the user identifier of the device log-in is associated with a plurality of organizations in the blockchain system, one of the organizations can be selected from the plurality of organizations. Specifically, the device may display a plurality of organization identifiers, where the plurality of organization identifiers include an identifier of each of a plurality of organizations associated with the user identifier logged in by the device; the device may generate a chain code installation request carrying the selected organization identifier and the chain code packet when detecting a selection operation for one of the plurality of organization identifiers. The chain code installation request is used for requesting the organization installation chain code identified by the carried organization identification.
Illustratively, this device may log into the service platform using the user identification. The service platform may obtain an identifier of each of a plurality of organizations associated with the user identifier logged in by the device, that is, obtain a plurality of organization identifiers, according to the association relationship between the user identifier and the organizations, and then send the plurality of organization identifiers to the device. After receiving the plurality of organization identifiers, the device may display the plurality of organization identifiers on a front-end page of the service platform. Thereafter, the user may select one of the organization identifiers displayed on the front page of the service platform to designate an organization to which the chain code needs to be installed. The user may then enter the chain code package in the front page of the service platform and click the install button. The device may generate and send a chain code installation request carrying the selected organization identifier and the chain code packet to the service platform. After receiving the chain code installation request, the service platform may send the chain code installation request to the blockchain system.
Step 606: and when the block chain system receives a chain code installation request sent by one device, installing a chain code at a computing node of a corresponding organization according to the chain code packet carried by the received chain code installation request.
After receiving a chain code installation request sent by a device, the blockchain system may send the chain code installation request to a computing node of an organization corresponding to the device (i.e., an organization associated with a user identifier logged in by the device, i.e., an organization identified by an organization identifier carried in the chain code installation request), and the computing node installs a chain code according to the chain code packet.
The operation of the computing node for installing the chain code according to the chain code package is similar to the operation of a certain computing node for installing the chain code according to the chain code package in the related art, which is not described in detail in the embodiment of the present application.
The chain code can be approved by the computing node in the process of installing the chain code according to the chain code package, and the chain code can be successfully installed only after the chain code is approved. In other words, if the computing node successfully installs the link code according to the link code package, it indicates that the computing node passed the link code approval, i.e., that the organization to which the computing node belongs approves the link code.
And the computing node can send a confirmation message carrying the chain code packet identifier to the sequencing node in the block chain system after the chain code is successfully installed according to the chain code packet. Specifically, the computing node may send a confirmation message carrying the link code packet identifier to the sorting node of the target channel identified by the target channel identifier carried in the link code installation request. The chain code packet identifier is used to identify the chain code packet, for example, the chain code packet identifier may be a name of the chain code packet. The confirmation message indicates that the organization to which the compute node belongs has recognized the chain code.
In this case, after receiving the confirmation message carrying the link code packet identifier sent by each computing node, the sequencing node may know that each computing node has successfully installed the link code, and thus, know that the organization to which each computing node belongs has approved the link code. That is, the sequencing node may determine the organization that has acknowledged the chain code according to all the received acknowledgement messages carrying the identification of the chain code packet.
Step 607: the target device sends a chain code instantiation request to the blockchain system.
The chain code instantiation request is used for requesting to instantiate the chain code, and the chain code instantiation request can carry chain code initialization parameters. Optionally, the chain code instantiation request is used to request to instantiate the chain code in the target channel, and at this time, the chain code instantiation request may carry the target channel identifier.
Illustratively, the target device may log into the service platform using the target user identification. At this time, the target device displays a front-end page of the service platform, and the target user can input chain code initialization parameters and click an instantiation button on the front-end page of the service platform. The target device may generate a chain code instantiation request carrying the chain code initialization parameter and send the chain code instantiation request to the service platform. The business platform can send the chain code instantiation request to the blockchain system.
Step 608: after the block chain system receives the chain code instantiation request, if the chain code is determined to meet the chain code deployment strategy according to the organization to which the computing node which has successfully installed the chain code belongs, the chain code is instantiated.
Specifically, the sequencing node may determine, according to all the received acknowledgement messages carrying the identifier of the chain code packet, an organization that has acknowledged the chain code, and instantiate the chain code to complete the deployment of the chain code if the organization that has acknowledged the chain code is consistent with the organization indicated by the chain code deployment policy. The operation of the sequencing node for instantiating the chain code is similar to the operation of a certain node for instantiating a certain chain code in the related art, which is not described in detail in the embodiments of the present application.
For example, the chain deployment policy is used to indicate that deployment of the chain at the target channel requires approval by all organizations that join the target channel. The sequencing node may instantiate the chain code if all organizations joining the target channel approve the chain code, at which point deployment of the chain code on the target channel is complete.
For another example, the chain deployment policy is used to indicate that deployment of the chain at the target channel requires approval by any organization that joins the target channel. The sequencing node may instantiate the chain code if any organization joining the target channel approves the chain code, at which point deployment of the chain code on the target channel is complete.
As another example, the chain deployment policy is used to indicate more than half of all organizations that the target channel deployment chain needs to join the target channel approve. The sequencing node may instantiate the chain code if most organizations joining the target channel have recognized the chain code, at which point deployment of the chain code on the target channel is complete.
In an embodiment of the present application, a plurality of devices logged in with a user identifier associated with each of a plurality of organizations send a chain code installation request to a blockchain system. And when the block chain system receives a chain code installation request sent by one device, installing a chain code at a computing node of a corresponding organization according to a chain code packet carried by the received chain code installation request. Thus, when the chain code is deployed, each organization in a plurality of organizations realizes the approval of the chain code when the chain code is installed, so that the deployment authority of the chain code is dispersed to the related plurality of organizations, and the peer-to-peer of the organization authority is realized when the chain code is deployed. And then, after the block chain system receives the chain code instantiation request, if the chain code is determined to meet the chain code deployment strategy according to the organization to which the computing node successfully installed the chain code belongs, instantiating the chain code, and completing the deployment of the chain code. Therefore, the installation, approval and instantiation operations of the chain code are separated, and the flexibility of the system is improved.
Fig. 7 is a flowchart of a chain code deployment method according to an embodiment of the present application. The method is applied to a blockchain system, which may be the blockchain system 100 described in the embodiments of fig. 1-2 above, or the blockchain system 302 described in the embodiments of fig. 3-5 above. Referring to fig. 7, the method may include the steps of:
step 701: and receiving a chain code installation request carrying a chain code packet sent by each of the plurality of devices.
Each device corresponds to an organization in the blockchain system, each device is logged with a user identifier, and the organization corresponding to each device is an organization associated with the logged user identifier in the blockchain system.
The related content of step 701 has already been described in detail in step 605 in the embodiment of fig. 6, and this is not described again in this embodiment of the present application.
Step 702: and when a chain code installation request sent by one device is received, installing a chain code at a computing node of a corresponding organization according to a chain code packet carried by the received chain code installation request.
The related content of step 702 is described in detail in step 606 in the embodiment of fig. 6, and is not described again in this embodiment of the application.
Step 703: a chain code instantiation request is received.
The chain code instantiation request is used for requesting to instantiate the chain code.
The related content of step 703 is already described in detail in step 607 in the embodiment of fig. 6, and is not described again in this embodiment of the application.
Step 704: and if the chain code is determined to meet the chain code deployment strategy according to the organization to which the computing node which successfully installs the chain code belongs, instantiating the chain code.
The chain code deployment policy is used to indicate an organization that needs to approve the chain code at the time of deployment.
The related content of step 704 is described in detail in step 608 in the embodiment of fig. 6, and is not described again in this embodiment of the application.
In an embodiment of the present application, a plurality of devices logged in with a user identifier associated with each of a plurality of organizations send a chain code installation request to a blockchain system. And when the block chain system receives a chain code installation request sent by one device, installing a chain code at a computing node of a corresponding organization according to a chain code packet carried by the received chain code installation request. Thus, when the chain code is deployed, each organization in a plurality of organizations realizes the approval of the chain code when the chain code is installed, so that the deployment authority of the chain code is dispersed to the related plurality of organizations, and the peer-to-peer of the organization authority is realized when the chain code is deployed. And then, after the block chain system receives the chain code instantiation request, if the chain code is determined to meet the chain code deployment strategy according to the organization to which the computing node successfully installed the chain code belongs, instantiating the chain code, and completing the deployment of the chain code. Therefore, the installation, approval and instantiation operations of the chain code are separated, and the flexibility of the system is improved.
Fig. 8 is a schematic structural diagram of a chain code deployment apparatus according to an embodiment of the present application, which may be applied to a blockchain system, where the blockchain system may be the blockchain system 100 according to the embodiment of fig. 1 to 2 or the blockchain system 302 according to the embodiment of fig. 3 to 5. Referring to fig. 8, the apparatus includes: a receiving module 801, an installing module 802, and an instantiating module 803.
A receiving module 801, configured to receive a chain code installation request carrying a chain code packet sent by each device of the multiple devices, where each device corresponds to an organization in the blockchain system, each device logs in a user identifier, and an organization corresponding to each device is an organization associated with the logged user identifier in the blockchain system;
an installation module 802, configured to, each time a chain code installation request sent by one device is received, install a chain code at a computing node of a corresponding organization according to a chain code packet carried by the received chain code installation request;
a receiving module 801, further configured to receive a chain code instantiation request, where the chain code instantiation request is used to request to instantiate a chain code;
an instantiation module 803, configured to instantiate the chain code when it is determined that the chain code satisfies a chain code deployment policy according to an organization to which the computing node that has successfully installed the chain code belongs, where the chain code deployment policy is used to indicate an organization that needs to approve the chain code at the time of chain code deployment.
Optionally, the apparatus further comprises: the device comprises a generating module and a sending module;
the receiving module 801 is further configured to receive a chain code packing request carrying chain code information, where the chain code packing request is used to request a target organization to pack a chain code;
the generating module is used for generating a chain code packet at a computing node of a target organization according to the chain code information;
and the sending module is used for sending the chain code packet to the target equipment corresponding to the target organization.
Optionally, the chain code instantiation request is used to request to instantiate the chain code in the target channel, and the chain code deployment policy is used to indicate any one of the following:
deploying chain codes in the target channel and requiring all organizations to join the target channel to approve;
deploying the chain code in the target channel and requiring any organization to join the target channel for approval;
deploying chain codes on a target channel requires more than half of all organizations joining the target channel to approve.
In an embodiment of the present application, a plurality of devices logged in with a user identifier associated with each of a plurality of organizations send a chain code installation request to a blockchain system. And when the block chain system receives a chain code installation request sent by one device, installing a chain code at a computing node of a corresponding organization according to a chain code packet carried by the received chain code installation request. Thus, when the chain code is deployed, each organization in a plurality of organizations realizes the approval of the chain code when the chain code is installed, so that the deployment authority of the chain code is dispersed to the related plurality of organizations, and the peer-to-peer of the organization authority is realized when the chain code is deployed. And then, after the block chain system receives the chain code instantiation request, if the chain code is determined to meet the chain code deployment strategy according to the organization to which the computing node successfully installed the chain code belongs, instantiating the chain code, and completing the deployment of the chain code. Therefore, the installation, approval and instantiation operations of the chain code are separated, and the flexibility of the system is improved.
It should be noted that: in the chain code deployment device provided in the foregoing embodiment, when the chain code is deployed, only the division of each functional module is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
Each functional unit and module in the above embodiments may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present application.
The embodiments of the chain code deployment apparatus and the chain code deployment method provided in the above embodiments belong to the same concept, and for specific working processes of units and modules and technical effects brought by the working processes in the above embodiments, reference may be made to the portions of the embodiments of the methods, and details are not described here.
Fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 9, the computer device 9 includes: a processor 90, a memory 91 and a computer program 92 stored in the memory 91 and operable on the processor 90, the processor 90 implementing the steps in the chain code deployment method in the embodiment of fig. 7 above when executing the computer program 92.
The computer device 9 may be a general purpose computer device or a special purpose computer device. In a particular implementation, the computer device 9 may be a server assembly consisting of a plurality of servers. Those skilled in the art will appreciate that fig. 9 is only an example of the computer device 9, and does not constitute a limitation of the computer device 9, and may include more or less components than those shown, or combine some components, or different components, such as input and output devices, network access devices, etc.
The Processor 90 may be a Central Processing Unit (CPU), and the Processor 90 may be other general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or any conventional processor.
The storage 91 may in some embodiments be an internal storage unit of the computer device 9, such as a hard disk or a memory of the computer device 9. The memory 91 may also be an external storage device of the computer device 9 in other embodiments, such as a plug-in hard disk provided on the computer device 9, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 91 may also include both an internal storage unit of the computer device 9 and an external storage device. The memory 91 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of a computer program. The memory 91 may also be used to temporarily store data that has been output or is to be output.
An embodiment of the present application further provides a computer device, where the computer device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the various method embodiments described above when executing the computer program.
The embodiments of the present application also provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
The embodiments of the present application provide a computer program product, which when run on a computer causes the computer to perform the steps of the above-described method embodiments.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above method embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and used by a processor to implement the steps of the above method embodiments. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or apparatus capable of carrying computer program code to a photographing apparatus/terminal device, a recording medium, computer Memory, ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, optical data storage device, etc. The computer-readable storage medium referred to herein may be a non-volatile storage medium, in other words, a non-transitory storage medium.
It should be understood that all or part of the steps for implementing the above embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions may be stored in the computer-readable storage medium described above.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/computer device and method may be implemented in other ways. For example, the above-described apparatus/computer device embodiments are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and may be implemented in other ways, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. 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.
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.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (12)

1. A method for chain code deployment, the method comprising:
each device in the plurality of devices sends a chain code installation request carrying a chain code packet to a blockchain system, wherein each device corresponds to an organization in the blockchain system, each device is logged with a user identifier, and the organization corresponding to each device is an organization related to the blockchain system by the logged user identifier;
when the block chain system receives a chain code installation request sent by one device, installing the chain code at a computing node of a corresponding organization according to the chain code packet carried by the received chain code installation request;
a target device in the plurality of devices sends a chain code instantiation request to the blockchain system, wherein the chain code instantiation request is used for requesting to instantiate the chain code;
after receiving the chain code instantiation request, the block chain system instantiates the chain code if the chain code is determined to meet a chain code deployment strategy according to the organization to which the computing node successfully installed the chain code belongs, wherein the chain code deployment strategy is used for indicating the organization which needs to approve the chain code during chain code deployment.
2. The method of claim 1, wherein the blockchain system installs the chain code at a computing node of a corresponding organization according to the chain code packet carried by the received chain code installation request, comprising:
the computing node installs the chain code according to the chain code packet, and sends a confirmation message carrying a chain code packet identifier to a sequencing node in the block chain system after the chain code is successfully installed;
if the block chain system determines that the chain codes meet the chain code deployment strategy according to the organization to which the computing nodes which have successfully installed the chain codes belong, the block chain system comprises the following steps:
and the sequencing node determines the organization which has approved the chain code according to all the received confirmation messages carrying the chain code packet identification, and instantiates the chain code if the organization which has approved the chain code is consistent with the organization indicated by the chain code deployment strategy.
3. The method of claim 1 or 2, wherein the chain code instantiation request is to request instantiation of the chain code at a target channel, and wherein the chain code deployment policy is to indicate any of:
deploying chain codes in the target channel and requiring all organizations to join the target channel to approve;
deploying the chain code in the target channel and requiring any organization approval of joining the target channel;
deploying chain code at the target channel requires more than half of all organizations joining the target channel to approve.
4. The method of claim 1, wherein before each of the plurality of devices sends a chain code installation request carrying a chain code packet to a blockchain system, further comprising:
the target equipment acquires chain code information;
the target device sends a chain code packaging request carrying the chain code information to the block chain system, wherein the chain code packaging request is used for requesting a target organization corresponding to the target device to package a chain code;
after receiving the chain code packaging request, the block chain system generates the chain code package at the computing node of the target organization according to the chain code information;
and the block chain system sends the chain code packet to the target equipment.
5. The method of claim 4, wherein after the blockchain system sends the chain code packet to the target device, further comprising:
and after receiving the chain code packet, the target equipment sends the chain code packet to other equipment according to the organization indicated by the chain code deployment strategy.
6. The method as claimed in claim 4 or 5, wherein the target user identifier for the target device to log in is associated with a plurality of organizations in the blockchain system, and before the target device sends a chain code packing request carrying the chain code information to the blockchain system, the method further comprises:
the target device displays a plurality of organization identifications, wherein the plurality of organization identifications comprise identifications of each organization in a plurality of organizations associated with the target user identification;
and when the target device detects a selection operation for one of the plurality of organization identifiers, the selected one organization identifier is used as a target organization identifier, and a chain code packing request carrying the target organization identifier and the chain code information is generated, wherein the chain code packing request is used for requesting the target organization identified by the target organization identifier to pack the chain code.
7. A chain code deployment method is applied to a block chain system, and comprises the following steps:
receiving a chain code installation request carrying a chain code packet and sent by each device in a plurality of devices, wherein each device corresponds to an organization in the blockchain system, each device is logged with a user identifier, and the organization corresponding to each device is an organization related to the blockchain system by the logged user identifier;
every time a chain code installation request sent by one device is received, installing the chain code at a computing node of a corresponding organization according to the chain code packet carried by the received chain code installation request;
receiving a chain code instantiation request, wherein the chain code instantiation request is used for requesting to instantiate the chain code;
and if the chain code is determined to meet a chain code deployment strategy according to the organization to which the computing node successfully installed with the chain code belongs, instantiating the chain code, wherein the chain code deployment strategy is used for indicating the organization which needs to approve the chain code during chain code deployment.
8. The method of claim 7, wherein before receiving the chain code installation request carrying the chain code packet sent by each of the plurality of devices, the method further comprises:
receiving a chain code packaging request carrying chain code information, wherein the chain code packaging request is used for requesting a target organization to package a chain code;
generating the chain code packet at the computing node of the target organization according to the chain code information;
and sending the chain code packet to target equipment corresponding to the target organization.
9. A chain code deployment system, the system comprising: a plurality of devices and a blockchain system;
each device in the multiple devices is configured to send a chain code installation request carrying a chain code packet to the blockchain system, where each device corresponds to an organization in the blockchain system, each device logs in a user identifier, and the organization corresponding to each device is an organization associated with the blockchain system by the logged user identifier;
the block chain system is used for installing the chain codes at the computing nodes of the corresponding organization according to the chain code packet carried by the received chain code installation request when receiving the chain code installation request sent by one device;
a target device of the plurality of devices, configured to send a chain code instantiation request to the blockchain system, where the chain code instantiation request is used to request to instantiate the chain code;
the block chain system is configured to instantiate the chain code after receiving the chain code instantiation request, if it is determined that the chain code satisfies a chain code deployment policy according to an organization to which a computing node that has successfully installed the chain code belongs, where the chain code deployment policy is used to indicate an organization that needs to approve the chain code when the chain code is deployed.
10. A chain code deployment device applied to a block chain system comprises:
a receiving module, configured to receive a chain code installation request carrying a chain code packet sent by each device of a plurality of devices, where each device corresponds to an organization in the blockchain system, and each device is logged with a user identifier, where the organization corresponding to each device is an organization associated with the blockchain system by the logged user identifier;
the installation module is used for installing the chain codes at the computing nodes of the corresponding organizations according to the chain code packets carried by the received chain code installation request when receiving the chain code installation request sent by one device;
the receiving module is further configured to receive a chain code instantiation request, where the chain code instantiation request is used to request to instantiate the chain code;
and the instantiation module is used for instantiating the chain code under the condition that the chain code meets a chain code deployment strategy according to the organization to which the computing node which successfully installs the chain code belongs, wherein the chain code deployment strategy is used for indicating the organization which needs to approve the chain code during chain code deployment.
11. A computer device, characterized in that the computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, which computer program, when executed by the processor, implements the method according to claim 7 or 8.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of claim 7 or 8.
CN202011601616.6A 2020-12-29 2020-12-29 Chain code deployment method, system, device, equipment and storage medium Pending CN112631623A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011601616.6A CN112631623A (en) 2020-12-29 2020-12-29 Chain code deployment method, system, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011601616.6A CN112631623A (en) 2020-12-29 2020-12-29 Chain code deployment method, system, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112631623A true CN112631623A (en) 2021-04-09

Family

ID=75286374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011601616.6A Pending CN112631623A (en) 2020-12-29 2020-12-29 Chain code deployment method, system, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112631623A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672305A (en) * 2021-09-03 2021-11-19 中国银行股份有限公司 Chain code starting method, device, equipment and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965468A (en) * 2018-08-16 2018-12-07 北京京东尚科信息技术有限公司 Block chain network service platform and its chain code installation method, storage medium
CN109194506A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 Block chain network dispositions method, platform and computer storage medium
US20200092114A1 (en) * 2018-09-18 2020-03-19 International Business Machines Corporation Membership compiler for applications
US20200110825A1 (en) * 2018-10-09 2020-04-09 International Business Machines Corporation Blockchain notification board storing blockchain resources
CN111010372A (en) * 2019-11-20 2020-04-14 国家信息中心 Block chain network identity authentication system, data processing method and gateway equipment
CN111221568A (en) * 2020-01-10 2020-06-02 杭州趣链科技有限公司 Fabric chain code life cycle management system based on physical machine deployment
US20200177373A1 (en) * 2018-11-14 2020-06-04 Royal Bank Of Canada System and method for storing contract data structures on permissioned distributed ledgers
US20200201843A1 (en) * 2018-12-19 2020-06-25 International Business Machines Corporation Optimization of chaincode statements
CN111950019A (en) * 2020-06-05 2020-11-17 成都链向科技有限公司 Block chain-based Internet of things access control system and method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965468A (en) * 2018-08-16 2018-12-07 北京京东尚科信息技术有限公司 Block chain network service platform and its chain code installation method, storage medium
CN109194506A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 Block chain network dispositions method, platform and computer storage medium
US20200092114A1 (en) * 2018-09-18 2020-03-19 International Business Machines Corporation Membership compiler for applications
US20200110825A1 (en) * 2018-10-09 2020-04-09 International Business Machines Corporation Blockchain notification board storing blockchain resources
US20200177373A1 (en) * 2018-11-14 2020-06-04 Royal Bank Of Canada System and method for storing contract data structures on permissioned distributed ledgers
US20200201843A1 (en) * 2018-12-19 2020-06-25 International Business Machines Corporation Optimization of chaincode statements
CN111010372A (en) * 2019-11-20 2020-04-14 国家信息中心 Block chain network identity authentication system, data processing method and gateway equipment
CN111221568A (en) * 2020-01-10 2020-06-02 杭州趣链科技有限公司 Fabric chain code life cycle management system based on physical machine deployment
CN111950019A (en) * 2020-06-05 2020-11-17 成都链向科技有限公司 Block chain-based Internet of things access control system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
季超越;郭仲勇;岳勇;: "超级账本智能合约的应用研究", 现代信息科技, no. 04, 25 February 2020 (2020-02-25) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672305A (en) * 2021-09-03 2021-11-19 中国银行股份有限公司 Chain code starting method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN110443704B (en) Method and device for sending resources in cross-link mode
CN112003703B (en) Method and device for transmitting authenticatable message across chains
US20230110131A1 (en) Internet of things
CN110430162B (en) Method and device for sending authenticable message in cross-link mode
CN111416808A (en) Cross-block-chain data mutual storage method, device, equipment and storage medium
CN110839029B (en) Micro-service registration method and device
CN110430235B (en) Method, apparatus, storage medium and computing device for cross-chain transmission of authenticatable messages
CN110601896B (en) Data processing method and equipment based on block chain nodes
KR102288521B1 (en) Apparatus and method for storing data based on blockchain
US20230037932A1 (en) Data processing method and apparatus based on blockchain network, and computer device
EP3598333A1 (en) Electronic device update management
CN112613877A (en) Intelligent contract triggering method and device applied to block chain network and related equipment
CN114567643A (en) Cross-block-chain data transfer method, device and related equipment
CN110417742B (en) Method, device and storage medium for cross-link sending, transferring and receiving authenticable message
CN112631623A (en) Chain code deployment method, system, device, equipment and storage medium
EP3547231B1 (en) Electronic device management
US9172607B2 (en) Transmitting of configuration items within a network
CN115250354A (en) Resource allocation method, device, equipment and storage medium based on block chain network
CN116804949B (en) Block chain-based data processing method, device, equipment and readable storage medium
CN112163034B (en) Model sharing method, node and blockchain system
CN116977073A (en) Transaction processing method, device, equipment and medium
CN114418578A (en) Block chain account risk query method and device
CN114398082A (en) Compatible operation method and device for frame type block chain application
CN117057788A (en) Transaction processing method, device, system, equipment and storage medium
CN115499836A (en) Communication method, communication device, electronic device, storage medium, and vehicle

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