Hyperledger Fabric-based block chain deployment operation and maintenance method and device

By installing a blockchain deployment operation and maintenance platform on the blockchain BaaS platform, decentralized management of multiple institutions and compatibility of different blockchain versions is achieved, and the existing platform cannot meet the compatibility of nodes and versions independently managed by multiple institutions, improving the efficiency of blockchain applications.

CN119536759AActive Publication Date: 2025-02-28ZHEJIANG UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411683469.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-02-28
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

The existing blockchain BaaS platform based on Hyperledger Fabric cannot meet the needs of multiple institutions to independently manage nodes, and the platform relies on specific blockchain versions, making it difficult to support version changes.

Method used

By installing the blockchain deployment operation and maintenance platform, including the alliance service platform and the organization management platform, decentralized node and channel management, supporting multiple organizations' independent management nodes, and generating deployment configuration files through the Velocity template to achieve compatibility with different blockchain versions.

Benefits of technology

Decentralized management of multiple institutions has been realized, reducing the difficulty of blockchain applications, improving application efficiency, and supporting compatibility of different blockchain versions, improving deployment efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536759A_ABST
    Figure CN119536759A_ABST
Patent Text Reader

Abstract

The invention discloses a block chain deployment operation and maintenance method and a block chain deployment operation and maintenance device based on Hyperledger Fabric. According to the method, a decentralized distributed block chain management system is realized. The method comprises the following steps: firstly, installing and deploying an operation and maintenance basic environment on a node, and installing and loading a Docker mirror image of Hyperledger Fabric and CLI tools of a corresponding version; and the operation and maintenance platform is installed and deployed, so that the user can obtain all data required for deploying the block chain in a visual and convenient manner. And then deploying and maintaining the block chain network by using a graphical interface and a simple command. Management of resources such as identities, nodes, channels, smart contracts and the like can be rapidly completed only by providing a small number of parameters for cooperation. And finally, the block chain operation and maintenance personnel can use the deployment maintenance platform to further modify the configuration of the existing channel and upgrade the smart contract. According to the platform, the block chain deployment operation and maintenance efficiency is improved, and different block chain versions can be supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain, and in particular to a blockchain deployment and operation method and device based on Hyperledger Fabric. Background Art

[0002] Major cloud service providers, including Oracle, IBM and Microsoft, have supported blockchain as a service (Baas) based on Hyperledger Fabric. Fabric is now the underlying application of a large number of prototypes, proofs of concept (PoC) and several cross-industry production systems using distributed ledger technology, such as food safety networks, banking systems, global freight digital trading platforms, etc. At present, BaaS providers usually act as third-party managers to centrally manage node identity information, which cannot meet the needs of multiple institutions to independently manage nodes and does not meet the decentralized characteristics of blockchain. In addition, the existing BaaS platform is implemented using SDK and only supports specific versions of blockchain. If you want to support other versions of blockchain, you need to modify the code implementation, recompile and deploy the corresponding version of BaaS. Summary of the invention

[0003] In order to save economic and labor costs, reduce the difficulty of blockchain application, and improve the efficiency of blockchain application, by installing a blockchain deployment and operation and maintenance platform (including alliance service platform, organization management platform and other components), the present invention proposes a blockchain deployment and operation and maintenance method and device based on Hyperledger Fabric.

[0004] The objective of the present invention is to achieve the following technical solution: a blockchain deployment and operation method based on Hyperledger Fabric, the method comprising the following steps:

[0005] S1. Configure and deploy the Fabric basic environment; import and load the Docker images of each component of Hyperledger Fabric, and install the corresponding version of CLI TOOLS;

[0006] S2. Install and deploy the operation and maintenance platform: Install DataCenterService and Authox permission framework on each node, deploy the database and import the business data table, and finally deploy the alliance service platform and the operation and maintenance platform;

[0007] S3. Use the deployment and operation platform to complete the deployment of nodes and channels. Each organization uses the deployment and operation platform in a decentralized manner to complete the configuration of blockchain information and Fabric-CA service information. It obtains various deployment file configuration parameters from the front end. The back end generates deployment configuration files by using the Velocity template engine, uses CLI TOOL to generate block configuration, applies to CA for the identity of each node, and deploys nodes and creates channels.

[0008] S4. Install and upgrade chaincode: Users use the alliance service platform to publish contracts, and administrators of each organization use the deployment and operation platform interface to install, approve and submit smart contracts to the blockchain, and test the deployed chaincode;

[0009] S5. Users monitor the operating status of nodes, contracts, and channels through the deployment and operation platform. The operation and maintenance personnel call the deployment and operation platform interface to dynamically add and delete organizations, modify sorting service parameters, and channel policies for the designated channels of Hyperledger Fabric to implement configuration updates of the blockchain.

[0010] Furthermore, the S1 specifically includes:

[0011] Install Docker and Docker-compose, version control system Git, cURL, Go runtime environment, and data format conversion tool JQ;

[0012] Use Bash scripts to load the Hyperledger Fabric component Docker images;

[0013] Install Hyperledger Fabric CLI tools, including configuration block generation tool configtxgen, block format conversion tool configtxlator, encryption file generation tool cryptogen, inter-node communication tool discover, CA CLI tools fabric-ca-client, fabric-ca-server, as well as peer, orderer, osnadmin, idemixgen.

[0014] Furthermore, the installation and deployment of the operation and maintenance platform specifically includes:

[0015] First, install the database supported by DC Service and the Java integrated development environment; then generate the directory structure required by DC12, use the SQL language on the Navicat tool to create the DC12 metadata table, and finally start the DC12 platform;

[0016] After the DC12 platform is successfully started, add the data source on the DC12 webpage and establish the business database table; use the SQL language again to create the Authox permission framework data table, and start the Fabric-platform to generate the Authox permission basic data and permission non-basic data. Next, copy the block format conversion tool configtxlator in CLI TOOLS, as well as the jar packages of the alliance service platform and the organization management platform to the server, and finally use the java virtual machine to start the above services; the deployment and operation platform includes the organization management platform and the alliance service platform, and DC12 is the background data center of the organization management platform and the alliance service platform.

[0017] Furthermore, the deployment and operation platform includes an organization management platform and an alliance service platform, which runs on the server in the form of a service to provide users with deployment-related business interfaces. The specific interfaces provided include:

[0018] The organization management platform provides users with the following interfaces:

[0019] Apply to the organization CA for peer node, orderer node identity information and TLS encryption files; list channel tasks; approve chaincode installation requests initiated by other organizations; submit the approved chaincode definitions; sign configuration block updates initiated by other organizations; submit the approved configuration block updates; peer nodes join the channel;

[0020] The alliance service platform provides users with the following interfaces:

[0021] Generate channel configuration files with user-specified configuration options; Generate channel genesis blocks based on organization root identity information and configuration files uploaded by users; Initiate channel tasks; List node information; Modify sorting service parameters; Dynamically add and delete organizations within the alliance; Add and modify organization anchor nodes; Generate configuration files and deployment files for peer nodes; Generate configuration files and deployment files for orderer nodes; Generate configuration files and deployment files for CA services; Orderer nodes join channels;

[0022] Furthermore, the organization uses the deployment and operation platform to complete the configuration of blockchain information and Fabric-CA service information, specifically including: each decentralized organization can configure the blockchain information corresponding to the organization, and after successfully configuring the blockchain information corresponding to the organization, configure the Fabric-CA service information, including two parts: Fabric-CA service configuration file and Fabric-CA service deployment file;

[0023] The Fabric-CA service configuration file includes: CA level, CA operation port, CA storage database type, CA database file, CA authentication identity information size, certificate default timeout, and maximum number of intermediate CA levels;

[0024] The Fabric-CA service deployment file content includes: CA service container name, CA image version, CA service storage main directory, CA service external port content.

[0025] Furthermore, the acquisition of various deployment file configuration parameters from the front end and the generation of deployment configuration files by the back end using the Velocity template engine specifically include:

[0026] The user obtains configuration file data information and deployment file matching information on the front-end page and sends it to the back-end in the form of a form. The back-end program reads the Velocity template file corresponding to the defined configuration file content, and then the program will automatically integrate the form data into the template file, and finally generate a file in yaml format;

[0027] The deployment file allows users to deploy it on the server. After successful deployment, each organization can initiate CA identity registration and certificate download requests. Then the organization configures the CA service information defined in the deployment phase, and uses the Fabric-SDK-Java interface to instantiate the Fabric-CA-Client client instance. Through this instance, Java is used to automatically connect to the Fabric-CA service, and then the front-end page is used to automatically complete the process of automatically obtaining node and administrator identity certificates.

[0028] Furthermore, the use of the configuration block generation tool to generate block configuration, applying for the identity of each node from the CA, and performing node deployment and channel creation includes:

[0029] Gather the identities and orderer node certificates of each organization, use the method provided in the Process tool class to start the child process to execute the binary tool configtxgen under Fabric to generate the configuration file for creating the blockchain channel; apply for the identity of each node from the CA; deploy peer nodes and orderer nodes; let the orderer nodes and peer nodes join the channel in turn to complete the channel creation.

[0030] Furthermore, the process of installing and upgrading the chaincode includes: first, the contract maker uses the alliance service platform to publish the contract, upload the chaincode file package, and initiate a channel task, the task type is chaincode installation, and the status is unfinished; the organization administrator queries the channel task, and there is a task of type chaincode submission in the channel task list, and the status is to be installed. After the user calls the installation chaincode interface, the backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface peer chaincode lifecycle install to make the peer node install the specified chaincode, return the hash value of the chaincode package, and then the channel task status is converted to pending approval. After the user calls the approval interface, the backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface peer chaincode lifecycleapproveformyorg to make the peer node agree to the specified chaincode definition, and then the channel task status is converted to pending submission. After the number of approvals meets the channel-specified chaincode submission policy, the channel task status is converted to waiting for submission. At this point, any organization administrator can call the chaincode definition submission interface. The backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface peer chaincode lifecycle commit to submit the specified chaincode definition to the channel.

[0031] When upgrading a chaincode, the initiator modifies the contract code or endorsement policy, etc., and publishes a new contract. The new contract only modifies the sequence and version fields; each organization repackages, installs, approves, and submits the chaincode definition according to the process of initial chaincode deployment to complete the chaincode update.

[0032] Furthermore, the process of updating the channel configuration includes:

[0033] First, the initiating organization uploads the channel configuration block using the organization management platform and initiates a channel task with the task type of channel (configuration) update and the status of unfinished; other organization administrators query the channel tasks and notice that there is a task of channel update in the channel tasks with the status of pending signature; at the same time, the interface of the alliance service platform is called to modify the configuration block. The backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface configtxlator to convert the configuration block from protobuf format to json format, and then uses the Jackson tree model to modify the configuration block. Then, the method provided in the Process tool class is used to create a process to call the Fabric binary command line interface configtxlator to convert the configuration block from json format to protobuf format. After the user calls the configuration block signature interface, the backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface peer channelsignconfigtx to append the organization's signature to the configuration block, and then the channel task status is converted to pending submission. After the number of signatures meets the channel-specified configuration modification submission policy, the channel task status is converted to ready for submission. At this point, any organization administrator can call the channel update submission interface. The backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface peer channel update to submit the configuration update to the channel.

[0034] According to another aspect of the specification, the specification also provides a blockchain deployment and operation and maintenance device based on Hyperledger Fabric, including a memory and one or more processors, wherein the memory stores executable code, and when the processor executes the executable code, the blockchain deployment and operation and maintenance method based on Hyperledger Fabric is implemented.

[0035] According to another aspect of the specification, the specification also provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, the blockchain deployment and operation method based on Hyperledger Fabric is implemented.

[0036] Beneficial effects of the present invention:

[0037] 1. Autonomous identity management. Compared with traditional BAAS products, users use the organization management platform to manage CA, certificates, private keys, and node information. All encrypted files are managed by the unit itself, meeting the decentralized characteristics of blockchain.

[0038] 2. Visual deployment. Use Velocity templates to generate deployment files and configuration files for CA services, and deployment files and configuration files for nodes. The backend implements interfaces for generating the genesis block of the channel, installing chain codes, and updating channel configurations. Users only need to fill in the necessary deployment and configuration information in the front-end form and initiate a request to call the interface. There is no need to pay attention to the blockchain architecture and the command line interface or SDK required to operate the blockchain.

[0039] 3. High compatibility. The platform does not depend on the blockchain version. Whether the signature algorithm (national encryption or elliptic curve) is modified or the node is upgraded, the corresponding version of the binary command tool can be injected without recompiling the code.

[0040] Therefore, this deployment method does not rely on specific plug-ins and does not rely on the underlying blockchain platform version. Compared with the manual blockchain deployment method, this deployment and operation method is a decentralized, highly compatible automated deployment method that realizes visual deployment-operation BaaS, greatly improving the efficiency of deployment. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 The present invention provides a flowchart of a blockchain deployment and operation method based on Hyperledger Fabric;

[0042] Figure 2 A deployment flow chart of a blockchain deployment and operation method of Hyperledger Fabric provided by the present invention in an actual production environment;

[0043] Figure 3 A structural diagram of a blockchain deployment device based on Hyperledger Fabric provided by the present invention. DETAILED DESCRIPTION

[0044] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.

[0045] The present invention provides a blockchain deployment and operation method based on Hyperledger Fabric. Figure 1 As shown, nodes, channels, and contracts are components of the blockchain. Users deploy the blockchain on the machine by deploying the operation and maintenance platform (including the alliance service platform and the organization management platform). The specific steps are as follows:

[0046] 1. Configure the Fabric basic environment on each node. First, initialize the Linux system, install Docker and Docker-compose, version control system Git, cURL, Go runtime environment, and JSON file processing tool JQ. Then use the Bash script to install the Docker image of Hyperledger Fabric, including the installation and loading of the images of each binary file version such as fabric-ca, fabric-peer, fabric-orderer, fabric-baseos, and fabric-tools. Then install the Hyperledger Fabric CLI tools based on specific platforms and versions, including the configuration block generation tool configtxgen, the block format conversion tool configtxlator, the encryption file generation tool cryptogen, the inter-node communication tool discover, the CA CLI tools fabric-ca-client, fabric-ca-server, as well as peer, orderer, osnadmin, idemixgen, etc. The specific operation is to query the required version of Docker image on the official image website, obtain the tag, use Docker CLIDocker Pull<> to quickly pull the required version of Docker image, Dockerload-i<> to load the image, and pull the binary file consistent with the image version from Github. Finally, run the test network to check whether the environment installation is complete.

[0047] 2. Install DataCenterService and Authox permission framework on each node, and deploy the deployment and operation platform including the organization management platform and alliance service platform. The process is summarized as follows: First, install the database supported by DC Service, as well as the Java Integrated Development Environment (JDK). Then generate the directory structure required by DC12, use the SQL language on the Navicat tool to create the metadata table of DC12, and finally start the DC12 platform. After the platform is successfully started, add the data source on the DC12 web page and establish the business database table. Use the SQL language again to create the Authox permission framework data table, start the Fabric-platform, and generate the Authox permission basic data and permission non-basic data. Next, first copy the jar packages of configtxlator, alliance service platform and organization management platform to the Linux server, and then the java virtual machine starts the above services.

[0048] 3. The organization management platform and alliance service platform run on the server in the form of services, providing users with deployment-related business interfaces.

[0049] The organization management platform provides users with the following interfaces:

[0050] Apply to the organization CA for peer node, orderer node identity information and TLS encryption files; list channel tasks; approve chaincode installation requests initiated by other organizations; submit the approved chaincode definitions; sign configuration block updates initiated by other organizations; submit the approved configuration block updates; peer nodes join the channel;

[0051] The alliance service platform provides users with the following interfaces:

[0052] Generate channel configuration files with user-specified configuration options; Generate channel genesis blocks based on organization root identity information and configuration files uploaded by users; Initiate channel tasks; List node information; Modify sorting service parameters; Dynamically add and delete organizations within the alliance; Add and modify organization anchor nodes; Generate configuration files and deployment files for peer nodes; Generate configuration files and deployment files for orderer nodes; Generate configuration files and deployment files for CA services; Orderer nodes join channels;

[0053] (Alliance Service Platform) The backend uses Velocity templates to generate Fabric CA service, node configuration files and deployment files; the backend uses the methods provided in the Process tool class to start the child process to run Fabric CLI tools to operate the blockchain network; the backend uses the tree model in the Jackson toolkit to modify the channel configuration file in json format;

[0054] 4. Users use the organization management platform and alliance service platform to complete the rapid deployment of nodes and channels. The process can be summarized as follows: After each decentralized organization submits its own organizational identity information and CA configuration, use the Velocity template to generate the Fabric CA service, deployment files and configuration files of each orderer organization and peer organization; use the dockercompose command to start the CA service; aggregate the root certificate files of multiple organizations, use the method provided in the Process tool class to start the child process to execute the binary tool configtxgen under Fabric to generate the configuration file for creating the blockchain channel; apply for the identity of each node from the CA; deploy peer nodes and orderer nodes; let the orderer nodes and peer nodes join the channel in turn to complete the channel creation;

[0055] Take the deployment of CA service as an example. The configuration file content includes: CA level, CA operation port, CA storage database type, CA authentication identity information size, certificate default timeout, maximum number of intermediate CA levels, and other certificate issuance service related content. The deployment file content includes: CA service container name, CA image version, CA service storage home directory, CA service external port, etc. After the user obtains this data information on the front-end page of the organization management platform, it is sent to the back-end of the alliance service platform in the form of a form. The back-end program reads the Velocity template file corresponding to the defined relevant configuration file content as described in 3, and then the program will automatically integrate the form data into the template file, and finally generate a yaml format file. The deployment file allows users to place it in the server entered in the configuration for deployment. After the deployment is successful, each organization can initiate a request for CA identity registration and certificate download. The organization will configure the information of the CA service defined in the deployment phase, and then call the interface described in 3. This business interface uses the Fabric-SDK-Java interface to instantiate the Fabric-CA-Client client instance. Through this example, you can use Java to automatically connect to the Fabric-CA service, and then cooperate with the front-end page to automatically complete the process of automatically obtaining identity certificates such as nodes and administrators. At the same time, the organization also allows the certificate information to be sent to the centralized alliance chain and users to actively download and export certificate information. Similarly, the organization can combine and call the interface described in 3 to generate channel configuration files, node deployment files and configuration files, create channels, join channels, deploy chain codes, update channel configurations, and other operations.

[0056] 5. Install and upgrade chaincode. Users use the alliance service platform to publish contracts, and administrators of each organization use the deployment and operation platform interface to install, approve and submit smart contracts to the blockchain, and perform stress testing on the deployed network.

[0057] The process of installing and upgrading the chaincode includes: first, the contract maker uses the alliance service platform to publish the contract, upload the chaincode file package, and initiate a channel task, the task type is chaincode installation, and the status is unfinished; the organization administrator queries the channel task, and there is a task of type chaincode submission in the channel task list, and the status is to be installed. After the user calls the installation chaincode interface, the backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface peer chaincode lifecycle install to make the peer node install the specified chaincode, return the hash value of the chaincode package, and then the channel task status is converted to pending approval. After the user calls the approval interface, the backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface peer chaincode lifecycleapproveformyorg to make the peer node agree to the specified chaincode definition, and then the channel task status is converted to pending submission. When the number of approvals meets the channel-specified chaincode submission policy, the channel task status is converted to waiting for submission. At this time, any organization administrator can call the chaincode definition submission interface, and the backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface peer chaincode lifecycle commit to submit the specified chaincode definition to the channel.

[0058] When upgrading a chaincode, the initiator modifies the contract code or endorsement policy, etc., and publishes a new contract. The new contract only modifies the sequence and version fields; each organization repackages, installs, approves, and submits the chaincode definition according to the process of initial chaincode deployment to complete the chaincode update.

[0059] The deployment and operation platform then completes all tests on the deployed network. The following is the atomic process of the backend operation: first, a networkconfig.json is generated to indicate the channels, organizations, nodes and other parameters of the deployed SUT to Caliper Benchmark, and the relevant parameters in the CCP file are automatically filled into the networkconfig.json file.

[0060] Then create the template workload module ReadAsset.js, and then fill the smart contract parameters and name into the initializeWorkloadModule module, fill the contract function and initiating organization into the submitTransaction module, and fill the contract function, contract ID, and initiating organization into the cleanupWorkLoadmodule to form a complete workload module;

[0061] Then build a benchmark configuration file such as mybenchmark.yml, and fill the test parameters such as the number of Workers and Round specifications into the template benchmark configuration file.

[0062] Finally, the Caliper Benmark test is started, and the measured data of the deployed network, such as latency, throughput, and resource monitoring, are returned to the deployment and operation platform.

[0063] 6. Users monitor the operation status of nodes, contracts, and channels through the deployment and maintenance platform. The operation and maintenance personnel call the interface in 3 to perform real-time indexing and dynamic query on the operation log of Hyperledger Fabric, dynamically add and delete organizations for the specified channel, modify the sorting service parameters, etc., to realize the configuration update of the blockchain.

[0064] The configuration update is specifically as follows:

[0065] First, the initiating organization uploads the channel configuration block using the organization management platform and initiates a channel task with the task type of channel (configuration) update and the status of unfinished; other organization administrators query the channel tasks and notice that there is a task of channel update in the channel tasks with the status of pending signature; at the same time, the interface of the alliance service platform is called to modify the configuration block. The backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface configtxlator to convert the configuration block from protobuf format to json format, and then uses the Jackson tree model to modify the configuration block. Then, the method provided in the Process tool class is used to create a process to call the Fabric binary command line interface configtxlator to convert the configuration block from json format to protobuf format. After the user calls the configuration block signature interface, the backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface peer channelsignconfigtx to append the organization's signature to the configuration block, and then the channel task status is converted to pending submission. After the number of signatures meets the channel-specified configuration modification submission policy, the channel task status is converted to ready for submission; at this time, the organization administrator calls the channel update submission interface, and the backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface peer channel update to submit the configuration update to the channel.

[0066] Through the process described in the above example, the present invention successfully completes the deployment of blockchain under the combination of multiple steps, completes the atomic process of deployment and performance testing, and supports the deployment and operation of complex multi-channel networks. In addition, the existence of the deployment and operation platform greatly improves the deployment and operation efficiency of the Hyperledger Fabric network.

[0067] like Figure 2 As shown in the deployment process in the actual production environment, the blockchain includes nodes, channels, and contracts, and the deployment and operation platform includes the organization management platform and the alliance service platform.

[0068] Corresponding to the aforementioned embodiment of a blockchain deployment and operation method based on Hyperledger Fabric, the present invention also provides an embodiment of a blockchain deployment and operation device based on Hyperledger Fabric.

[0069] See also Figure 3 , a blockchain deployment and operation and maintenance device based on Hyperledger Fabric provided in an embodiment of the present invention includes a memory and one or more processors, wherein the memory stores executable code, and when the processor executes the executable code, it is used to implement a blockchain deployment and operation and maintenance method based on Hyperledger Fabric in the above embodiment.

[0070] The embodiment of a blockchain deployment and operation device based on Hyperledger Fabric provided by the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capabilities in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory for execution. From the hardware level, if Figure 3 As shown in FIG. 1 , a hardware structure diagram of any device with data processing capability in which a blockchain deployment and operation and maintenance device based on Hyperledger Fabric is provided by the present invention is provided, except that Figure 3 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiments is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.

[0071] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0072] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.

[0073] An embodiment of the present invention also provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, a blockchain deployment and operation method based on Hyperledger Fabric in the above embodiment is implemented.

[0074] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capability. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.

[0075] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the blockchain deployment and operation method based on Hyperledger Fabric.

[0076] Those skilled in the art will readily appreciate other embodiments of the present application after considering the description and practicing the contents disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The description and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.

[0077] It should be understood that the above general description and the detailed description below are only exemplary and explanatory and cannot limit the present application. The present application is not limited to the precise structure described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present application is limited only by the attached claims.

Claims

1. A blockchain deployment and operation method based on Hyperledger Fabric, characterized in that: The method comprises the following steps: S1. Configure and deploy the basic environment for Fabric operation; import and load the corresponding version component images of Hyperledger Fabric, and install the corresponding version of CLI TOOLS; S2. Install and deploy the operation and maintenance platform: Install DataCenterService and Authox permission framework on each node, deploy the database and import the business data table, and finally deploy the alliance service platform and the operation and maintenance platform; S3. Use the deployment and operation platform to complete the deployment of nodes and channels. Each organization uses the deployment and operation platform to complete the configuration of blockchain identity and other parameters and the information configuration of Fabric-CA service in a decentralized manner. It obtains various deployment file configuration parameters from the front end. The back end generates deployment configuration files by using the Velocity template engine, uses CLI TOOL to generate block configuration, applies to CA for the identity of each node, and deploys nodes and creates channels. S4. Install and upgrade chaincode: Users use the alliance service platform to publish contracts, and administrators of each organization use the deployment and operation platform interface to install, approve and submit smart contracts to the blockchain, and test the deployed chaincode; S5. Users monitor the operating status of nodes, contracts, and channels through the deployment and operation platform. The operation and maintenance personnel call the deployment and operation platform interface to dynamically add and delete organizations, modify sorting service parameters, and channel policies for the designated channels of Hyperledger Fabric to implement configuration updates of the blockchain.

2. According to a blockchain deployment and operation method based on Hyperledger Fabric according to claim 1, it is characterized in that: The S1 specifically includes: First, initialize the Linux system, install Docker and Docker-compose, version control system Git, cURL, Go runtime environment, and data format conversion tool JQ; Load the Docker images of the components of Hyperledger Fabric; Install Hyperledger Fabric CLI tools, including configuration block generation tool configtxgen, block format conversion tool configtxlator, encryption file generation tool cryptogen, inter-node communication tool discover, CA CLI tools fabric-ca-client, fabric-ca-server, as well as peer, orderer, osnadmin, idemixgen.

3. According to a blockchain deployment and operation method based on Hyperledger Fabric according to claim 1, it is characterized in that: The installation and deployment of the operation and maintenance platform specifically includes: First, install the database supported by DC Service and the Java integrated development environment; then generate the directory structure required by DC12, use the SQL language on the Navicat tool to create the DC12 metadata table, and finally start the DC12 platform; After the DC12 platform is successfully started, add the data source on the DC12 webpage and establish the business database table; use the SQL language again to create the Authox permission framework data table, and start the Fabric-platform to generate the Authox permission basic data and permission non-basic data. Next, copy the block format conversion tool configtxlator in CLI TOOLS, as well as the jar packages of the alliance service platform and the organization management platform to the server, and finally use the java virtual machine to start the above services; the deployment and operation platform includes the organization management platform and the alliance service platform, and DC12 is the background data management center of the organization management platform and the alliance service platform.

4. The blockchain deployment and operation method based on Hyperledger Fabric according to claim 1, characterized in that: The deployment and operation platform includes an organization management platform and an alliance service platform, which runs on the server in the form of a service and provides users with deployment-related business interfaces. The specific interfaces provided include: The organization management platform provides the following interfaces to users: Apply to the organization CA for peer node, orderer node identity and TLS encryption files; list channel tasks; approve chaincode installation requests initiated by other organizations; submit the approved chaincode definitions; sign configuration updates initiated by other organizations; submit the approved configuration updates; peer nodes join the channel; The alliance service platform provides users with the following interfaces: Generate channel configuration files based on user-specified configuration options; generate channel genesis blocks based on the organization identity and configuration files uploaded by users; initiate channel tasks; list node information; modify sorting service parameters; dynamically add and delete organizations within the alliance; add and modify organization anchor nodes; generate configuration files and deployment files for peer nodes; generate configuration files and deployment files for orderer nodes; generate configuration files and deployment files for CA services; orderer nodes join channels.

5. The blockchain deployment and operation method based on Hyperledger Fabric according to claim 1, characterized in that: Each organization uses the deployment and operation platform to complete the configuration of blockchain identity and other parameters and the information configuration of Fabric-CA service in a decentralized manner, which specifically includes: each decentralized organization can configure the blockchain information corresponding to the organization, and after successfully configuring the blockchain information corresponding to the organization, configure the Fabric-CA service information, which includes two parts: Fabric-CA service configuration file and Fabric-CA service deployment file; The Fabric-CA service configuration file includes: CA level, CA operation port, CA storage database type, CA database file, CA authentication identity information size, certificate default timeout, and maximum number of intermediate CA levels; The Fabric-CA service deployment file content includes: CA service container name, CA image version, CA service storage main directory, CA service external port content.

6. The blockchain deployment and operation method based on Hyperledger Fabric according to claim 1, characterized in that: The method of obtaining various deployment file configuration parameters from the front end and generating the deployment configuration file by using the Velocity template engine at the back end specifically includes: The user obtains configuration file data information and deployment file matching information on the front-end page and sends it to the back-end in the form of a form. The back-end program reads the Velocity template file corresponding to the defined configuration file content, and then the program will automatically integrate the form data into the template file, and finally generate a file in yaml format; The deployment file allows users to deploy it on the server. After successful deployment, each organization can initiate CA identity registration and certificate download requests. Then the organization configures the CA service information defined in the deployment phase, and uses the Fabric-SDK-Java interface to instantiate the Fabric-CA-Client client instance. Through this instance, Java is used to automatically connect to the Fabric-CA service, and then the front-end page is used to automatically complete the acquisition of node and administrator identity certificates.

7. The blockchain deployment and operation method based on Hyperledger Fabric according to claim 1, characterized in that: The deployment of the nodes and the creation of channels include: Gather the identities of each organization and the TLS certificates of the orderer nodes, use the methods provided in the Process tool class to start the child process to execute the binary tool configtxgen under Fabric to generate the configuration file for creating the blockchain channel; apply for the identity of each node from the CA; deploy the peer node and the orderer node; let the orderer node and the peer node join the channel in turn to complete the channel creation.

8. The blockchain deployment and operation method based on Hyperledger Fabric according to claim 1, characterized in that: The process of installing and upgrading the chaincode includes: First, the contract maker uses the alliance service platform to publish the contract, upload the chaincode file package, and initiate a channel task with the task type of chaincode installation and the status of incomplete; the organization administrator queries the channel task, and there is a task of chaincode submission in the channel task list with a status of pending installation; after the user calls the installation chaincode interface, the backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface peer chaincode lifecycleinstall to make the peer node install the specified chaincode and return the hash value of the chaincode package, and then the channel task status is converted to pending approval; after the user calls the approval interface, the backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface peer chaincode lifecycle approveformyorg to make the peer node agree to the specified chaincode definition, and then the channel task status is converted to pending submission; after the number of approvals meets the channel-specified chaincode submission policy, the channel task status is converted to waiting for submission; at this time, any organization administrator calls the chaincode definition submission interface, and the backend uses the method provided in the Process tool class to create a process to call the Fabric binary command line interface peer chaincode lifecycle commit to submit the specified chaincode definition to the channel; When upgrading a chaincode, the initiator modifies the contract code or the endorsement policy and publishes a new contract. The new contract only modifies the sequence and version fields. Each organization repackages, installs, approves, and submits the chaincode definition according to the process of initial chaincode deployment to complete the chaincode update.

9. A blockchain deployment and operation device based on Hyperledger Fabric, comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that: When the processor executes the executable code, a blockchain deployment and operation method based on Hyperledger Fabric is implemented as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by the processor, a blockchain deployment and operation method based on Hyperledger Fabric as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Online management method and system based on Fabric chain code and storage medium

    CN112527331A

  • Hyperledger Fabric-based block chain network auxiliary deployment method and device

    CN115202672A

  • Block chain service system based on alliance chain and deployment method

    CN115348026A