A method and apparatus for deploying and maintaining a blockchain based on Hyperledger Fabric

By installing a blockchain deployment and operation platform, decentralized, highly compatible, and automated deployment was achieved, solving the problems of multi-organization node management and version support, and improving the efficiency and compatibility of blockchain deployment.

CN119536759BActive Publication Date: 2025-11-11ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing BaaS providers cannot meet the needs of multiple institutions to independently manage nodes, and support for different blockchain versions requires code modification and recompilation, which violates the decentralized nature of blockchain and increases economic and human costs.

Method used

By installing a blockchain deployment and operation platform, including an alliance service platform and an organization management platform, decentralized node management and automated deployment can be achieved. Configuration files can be generated using Velocity templates, supporting multiple versions of blockchain without recompilation, and providing a visual deployment interface.

Benefits of technology

It achieves autonomous identity management, supports highly compatible deployment of multiple blockchain versions, reduces economic and human costs, improves deployment efficiency, and conforms to the decentralized characteristics of blockchain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536759B_ABST
    Figure CN119536759B_ABST
Patent Text Reader

Abstract

This invention discloses a blockchain deployment and maintenance method and apparatus based on Hyperledger Fabric. The method implements a decentralized distributed blockchain management system. First, a basic deployment and maintenance environment is installed on the nodes, including the Hyperledger Fabric Docker image and the corresponding CLI tools. Then, a deployment and maintenance platform is installed, allowing users to obtain all the necessary information for blockchain deployment in a visual and convenient manner. Next, the graphical interface and simple commands are used for blockchain network deployment and maintenance. Only a few parameters are required to quickly manage resources such as identity, nodes, channels, and smart contracts. Finally, blockchain maintenance personnel can use the deployment and maintenance platform to further modify the configuration of existing channels and upgrade smart contracts. The platform improves the efficiency of blockchain deployment and maintenance and supports different blockchain versions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain, and in particular to a method and apparatus for deploying and maintaining a blockchain based on Hyperledger Fabric. Background Technology

[0002] Major cloud service providers, including Oracle, IBM, and Microsoft, already support Blockchain-as-a-Service (BaaS) based on Hyperledger Fabric. Fabric is now the underlying application for a large number of prototypes, proof-of-concept (PoC) systems, and several cross-industry production systems using distributed ledger technology, such as food safety networks, banking systems, and global freight digital trading platforms. Currently, BaaS providers typically act as third-party administrators, centrally managing node identity information. This cannot meet the needs of multiple institutions independently managing nodes, which contradicts the decentralized nature of blockchain. Furthermore, existing BaaS platforms are implemented using SDKs, supporting only specific blockchain versions. To support other blockchain versions, the code implementation needs to be modified, and the corresponding BaaS version needs to be recompiled and deployed. Summary of the Invention

[0003] To save economic and human costs, reduce the difficulty of blockchain applications, and improve the efficiency of blockchain application, this invention proposes a blockchain deployment and operation method and device based on Hyperledger Fabric by installing a blockchain deployment and operation platform (including components such as a consortium service platform and an organization management platform).

[0004] The objective of this invention is achieved through the following technical solution: a blockchain deployment and operation method based on Hyperledger Fabric, which includes the following steps:

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

[0006] S2. Install, deploy, and maintain the platform: Install DataCenterService and Authox permission framework on each node, deploy the database and import business data tables, and finally deploy the alliance service platform and the 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, and the back end generates deployment configuration files by using the Velocity template engine, generates block configurations by using CLI TOOL, applies for the identity of each node from CA, and performs node deployment and channel creation.

[0008] S4. Installing and Upgrading Chaincode: Users publish contracts using the consortium service platform, and administrators of each organization use the deployment and maintenance platform interface to install, approve, and submit smart contracts to the blockchain, and test the deployed chaincode.

[0009] S5. Users monitor the operation status of nodes, contracts, and channels through the deployment and maintenance platform. Operation and maintenance personnel combine and call the deployment and maintenance platform interface to dynamically add or delete organizations, modify sorting service parameters, and channel policies for specified channels of Hyperledger Fabric, thereby realizing the configuration update of the blockchain.

[0010] Furthermore, S1 specifically includes:

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

[0012] Load Hyperledger Fabric component Docker images using Bash scripts;

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

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

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

[0016] After the DC12 platform successfully starts, add a data source and create a business database table on the DC12 webpage; then use SQL to create the Authox permission framework data table again, and start Fabric-platform to generate Authox permission basic data and permission non-basic data. Next, copy the block format conversion tool configtxlator from CLI TOOLS, as well as the JAR packages of the Alliance Service Platform and Organization Management Platform, to the server. Finally, start the above services using a Java Virtual Machine. The deployment and operation platform includes the Organization Management Platform and the Alliance Service Platform, and DC12 is the backend data center for 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 run as services on the server to provide users with deployment-related business interfaces. Specifically, the provided interfaces include:

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

[0019] Request peer node and orderer node identity information and TLS encrypted files from the organization's CA; list channel tasks; approve chaincode installation requests initiated by other organizations; submit the approved chaincode definitions; update the signatures of configuration blocks initiated by other organizations; submit the approved configuration block updates; and have 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 user-uploaded organization root identity information and configuration files; initiate channel tasks; list node information; modify sorting service parameters; dynamically add or delete organizations within the alliance; add or modify organization anchor nodes; generate configuration and deployment files for peer nodes; generate configuration and deployment files for orderer nodes; generate configuration and deployment files for the CA service; add orderer nodes to the channel;

[0022] Furthermore, the organization's use of the deployment and operation platform to complete the configuration of blockchain information and Fabric-CA service information specifically includes: each decentralized organization can configure its corresponding blockchain information, and after successfully configuring the organization's corresponding blockchain information, it configures the Fabric-CA service information, which includes 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 includes: CA service container name, CA image version, CA service storage main directory, and CA service external port information.

[0025] Furthermore, the process of obtaining various deployment file configuration parameters from the front end and generating deployment configuration files on the back end using the Velocity template engine specifically includes:

[0026] After obtaining configuration file data and deployment file information from the front-end page, the user 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 automatically integrates the form data into the template file, finally generating a YAML file.

[0027] The deployment files allow users to deploy the service on the server. After successful deployment, organizations can initiate CA identity registration and certificate download requests. Then, organizations configure the CA service information defined in the deployment phase, instantiate a Fabric-CA-Client instance using the Fabric-SDK-Java interface, and use Java to automatically connect to the Fabric-CA service. The front-end page then automates the process of obtaining node and administrator identity certificates.

[0028] Furthermore, the process of using the configuration block generation tool to generate block configurations, requesting identities for each node from the CA, and deploying nodes and creating channels includes:

[0029] The system gathers the identities of each organization and the certificates of the orderer nodes, and uses the methods provided in the Process utility class to start a child process to execute the binary tool configtxgen under Fabric to generate the configuration file for creating the blockchain channel; it applies for the identities of each node from the CA; it deploys the peer nodes and orderer nodes; and it sequentially adds the orderer nodes and peer nodes to the channel to complete the channel creation.

[0030] Furthermore, the chaincode installation and upgrade process includes: First, the contract creator publishes the contract using the consortium service platform, uploads the chaincode file package, and initiates a channel task. The task type is chaincode installation, and the status is incomplete. The organization administrator queries the channel tasks, and there is a task in the channel task list of type chaincode submission, with a status of pending installation. After the user calls the chaincode installation interface, the backend uses methods provided in the Process utility class to create a process that calls the Fabric binary command-line interface peer chaincode lifecycle install, causing the peer node to install the specified chaincode and returning the hash value of the chaincode package. Subsequently, the channel task status changes to pending approval. After the user calls the approval interface, the backend uses methods provided in the Process utility class to create a process that calls the Fabric binary command-line interface peer chaincode lifecycleapproveformyorg, causing the peer node to agree to the specified chaincode definition. Subsequently, the channel task status changes to pending submission. Once the number of approvals meets the channel's specified chaincode submission strategy, the channel task status changes to waiting to submit. At this point, any organization administrator can call the chaincode definition submission interface. The backend uses the methods provided in the Process utility class to create a process and call the Fabric binary command-line interface peer chaincode lifecycle commit to submit the specified chaincode definition to the channel.

[0031] When upgrading chaincode, the initiator modifies the contract code or endorsement policy, and releases a new contract. The new contract only modifies the sequence and version fields. Each organization then repackages, installs, approves, and submits the chaincode definition according to the initial deployment process of the chaincode 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, initiating a channel task. The task type is "channel (configuration) update," and the status is "incomplete." Other organization administrators query the channel tasks and notice a task of type "channel update" with a status of "pending signature." Simultaneously, they call the alliance service platform's interface to modify the configuration block. The backend uses methods provided by the Process utility class to create a process that calls the Fabric binary command-line interface `configtxlator` to convert the configuration block from protobuf to JSON format. Then, it uses Jackson's tree model to modify the configuration block, and again uses methods provided by the Process utility class to create a process that calls the Fabric binary command-line interface `configtxlator` to convert the configuration block from JSON to protobuf format. After the user calls the configuration block signing interface, the backend uses methods provided by the Process utility class to create a process that calls the Fabric binary command-line interface `peer channelsignconfigtx` to append the organization's signature to the configuration block. Subsequently, the channel task status changes to "pending submission." Once the number of signatures meets the channel's specified configuration modification submission policy, the channel task status changes to "ready to submit." At this point, any organization administrator can call the channel update submission interface. The backend uses the methods provided in the Process utility class to create a process and 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, this specification also provides a blockchain deployment and maintenance device based on Hyperledger Fabric, including a memory and one or more processors. The memory stores executable code, and when the processor executes the executable code, it implements the aforementioned blockchain deployment and maintenance method based on Hyperledger Fabric.

[0035] According to another aspect of the specification, this specification also provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the aforementioned method for deploying and maintaining a blockchain based on Hyperledger Fabric.

[0036] The beneficial effects of this invention are:

[0037] 1. Autonomous Identity Management. Compared to traditional BAAS products, users manage CAs, certificates, private keys, and node information through an organizational management platform. All encrypted files are managed by the organization itself, fulfilling the decentralized nature of blockchain.

[0038] 2. Visual Deployment. The Velocity template generates deployment and configuration files for the CA service and nodes. The backend implements interfaces for generating the channel's genesis block, installing chaincode, and updating channel configuration. Users only need to fill in the necessary deployment and configuration information in the frontend form and initiate API calls, without needing to concern themselves with the blockchain architecture or the command-line interfaces or SDKs required to operate the blockchain.

[0039] 3. High compatibility. The platform is not dependent on the blockchain version. Whether the signature algorithm is modified (national cryptography or elliptic curve cryptography) 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 depend on specific plugins or the underlying blockchain platform version. Compared to manual blockchain deployment, this deployment and maintenance method is a decentralized, highly compatible, and automated deployment approach that achieves a visualized deployment-operation BaaS, significantly improving deployment efficiency. Attached Figure Description

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

[0042] Figure 2 A flowchart illustrating the deployment process of a Hyperledger Fabric blockchain deployment and maintenance method provided by this invention in a real production environment;

[0043] Figure 3 This invention provides a structural diagram of a blockchain deployment device based on Hyperledger Fabric. Detailed Implementation

[0044] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0045] This invention provides a method for deploying and maintaining a blockchain based on Hyperledger Fabric. For example... Figure 1 As shown, nodes, channels, and contracts are the components of a blockchain. Users deploy the blockchain on their machines through a deployment and maintenance platform (including an alliance service platform and an organization management platform). The specific steps are as follows:

[0046] 1. Configure the basic Fabric environment on each node. First, initialize the Linux system, install Docker and Docker-compose, the version control system Git, cURL, the Go runtime environment, and the JSON file processing tool JQ. Then, use Bash scripts to install the Hyperledger Fabric Docker images, including the installation and loading of the corresponding binary versions of fabric-ca, fabric-peer, fabric-orderer, fabric-baseos, and fabric-tools. Next, 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 and fabric-ca-server, as well as peer, orderer, osnadmin, idemixgen, etc. The specific steps are as follows: You can find the required version of the Docker image on the official mirror website. After obtaining the tag, use the Docker CLI `Docker Pull<>` to quickly pull the required version of the Docker image. Then, use `Dockerload -i<>` to load the image and pull the binary file matching the image version from GitHub. Finally, run a test network to check if the environment installation is complete.

[0047] 2. Install DataCenterService and the Authox permission framework on each node, and deploy and maintain a platform including the organization management platform and the alliance service platform. The process is summarized as follows: First, install the databases supported by DC Service and the Java Integrated Development Environment (JDK). Then, generate the directory structure required by DC12, create the DC12 metadata tables using SQL in Navicat, and finally start the DC12 platform. After successful platform startup, add data sources and create business database tables on the DC12 webpage. Next, create the Authox permission framework data tables using SQL again, and start Fabric-platform to generate Authox permission base data and non-base permission data. Finally, copy the configtxlator, alliance service platform, and organization management platform JAR files to the Linux server, and then start the services using the Java Virtual Machine.

[0048] 3. The organization management platform and alliance service platform run as services on the server, providing users with interfaces for deploying relevant business functions.

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

[0050] Request peer node and orderer node identity information and TLS encrypted files from the organization's CA; list channel tasks; approve chaincode installation requests initiated by other organizations; submit the approved chaincode definitions; update the signatures of configuration blocks initiated by other organizations; submit the approved configuration block updates; and have 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 user-uploaded organization root identity information and configuration files; initiate channel tasks; list node information; modify sorting service parameters; dynamically add or delete organizations within the alliance; add or modify organization anchor nodes; generate configuration and deployment files for peer nodes; generate configuration and deployment files for orderer nodes; generate configuration and deployment files for the CA service; add orderer nodes to the channel;

[0053] The backend of the (Alliance Service Platform) uses Velocity templates to generate configuration files and deployment files for Fabric CA services and nodes; the backend uses methods provided in the Process utility class to start child processes to run Fabric CLI tools to operate the blockchain network; the backend uses the tree model in the Jackson toolkit to modify the JSON format channel configuration files.

[0054] 4. Users utilize the organization management platform and alliance service platform to quickly deploy nodes and channels. This process can be summarized as follows: After each decentralized organization submits its organizational identity information and CA configuration, it uses a Velocity template to generate the Fabric CA service, deployment files, and configuration files for each orderer and peer organization; it uses the dockercompose command to start the CA service; it aggregates the root certificate files of multiple organizations and uses methods provided in the Process utility class to start a child process to execute the Fabric binary tool configtxgen to generate the configuration file for creating the blockchain channel; it applies for the identity of each node from the CA; it deploys peer nodes and orderer nodes; and it sequentially adds the orderer nodes and peer nodes to the channel, completing channel creation.

[0055] Taking CA service deployment as an example, the configuration file 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 includes: CA service container name, CA image version, CA service storage main directory, CA service external port, etc. After obtaining this data information on the organization management platform front-end page, the user sends it to the alliance service platform back-end in the form of a form. As described in section 3, the back-end program reads the Velocity template file corresponding to the defined configuration file content, and then automatically integrates the form data into the template file, finally generating a YAML file. The deployment file allows users to place it on the server entered in the configuration for deployment. After successful deployment, each organization can initiate CA identity registration and certificate download requests. The organization will configure the CA service information defined in the deployment phase, and then call the interface described in section 3. This business interface uses the Fabric-SDK-Java interface to instantiate a Fabric-CA-Client client instance. This example demonstrates how Java can be used to automate the connection to Fabric-CA services, and how a front-end page can automate the process of obtaining identity certificates for nodes, administrators, etc. Organizations can also send certificate information to a centralized consortium blockchain and allow users to actively download and export certificate information. Similarly, organizations can combine calls to the interfaces described in section 3 to generate channel configuration files, node deployment files and configuration files, create channels, join channels, deploy chaincode, and update channel configurations.

[0056] 5. Install and upgrade chaincode. Users publish contracts using the consortium service platform, 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 tests on the deployed network.

[0057] The chaincode installation and upgrade process includes: First, the contract creator publishes the contract using the consortium service platform, uploads the chaincode file package, and initiates a channel task. The task type is chaincode installation, and the status is incomplete. The organization administrator queries the channel tasks; there is a task in the channel task list of type chaincode submission, with a status of pending installation. After the user calls the chaincode installation interface, the backend uses methods provided in the Process utility class to create a process that calls the Fabric binary command-line interface `peer chaincode lifecycle install`, causing the peer node to install the specified chaincode and returning the hash value of the chaincode package. Subsequently, the channel task status changes to pending approval. After the user calls the approval interface, the backend uses methods provided in the Process utility class to create a process that calls the Fabric binary command-line interface `peer chaincode lifecycle approveformyorg`, causing the peer node to agree to the specified chaincode definition. Subsequently, the channel task status changes to pending submission. Once the number of approvals meets the channel's specified chaincode submission policy, the channel task status changes to waiting to submit. At this time, any organization administrator can call the chaincode definition submission interface. The backend uses methods provided in the Process utility class to create a process that calls the Fabric binary command-line interface `peer chaincode lifecycle commit`, causing the specified chaincode definition to be submitted to the channel.

[0058] When upgrading chaincode, the initiator modifies the contract code or endorsement policy, and releases a new contract. The new contract only modifies the sequence and version fields. Each organization then repackages, installs, approves, and submits the chaincode definition according to the initial deployment process of the chaincode 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 file is generated, which specifies the channel, organization, node 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, then populate the smart contract parameters and name into the initializeWorkloadModule module, the contract functions and initiating organization into the submitTransaction module, and the contract functions, contract ID, and initiating organization into the cleanupWorkLoadmodule to form the complete workload module;

[0061] Then, a benchmark configuration file such as mybenchmark.yml is built, and test parameters such as the number of Workers and the Round specification are populated into the template benchmark configuration file.

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

[0063] 6. Users monitor the operation status of nodes, contracts, and channels through the deployment and maintenance platform. Maintenance personnel combine and call the interface described in 3 to perform real-time indexing and dynamic querying of Hyperledger Fabric's operation logs, and dynamically add or delete organizations for specified channels, modify sorting service parameters, etc., to realize the configuration update of the blockchain.

[0064] The configuration update specifically refers to:

[0065] First, the initiating organization uploads the channel configuration block using the organization management platform, initiating a channel task. The task type is "channel (configuration) update," and the status is "incomplete." Other organization administrators query the channel tasks and notice a task of type "channel update" with a status of "pending signature." Simultaneously, they call the alliance service platform's interface to modify the configuration block. The backend uses methods provided by the Process utility class to create a process that calls the Fabric binary command-line interface `configtxlator` to convert the configuration block from protobuf to JSON format. Then, it uses Jackson's tree model to modify the configuration block, and again uses methods provided by the Process utility class to create a process that calls the Fabric binary command-line interface `configtxlator` to convert the configuration block from JSON to protobuf format. After the user calls the configuration block signing interface, the backend uses methods provided by the Process utility class to create a process that calls the Fabric binary command-line interface `peer channelsignconfigtx` to append the organization's signature to the configuration block. Subsequently, the channel task status changes to "pending submission." Once the number of signatures meets the channel's specified configuration modification submission policy, the channel task status changes to ready for submission. At this point, the organization administrator calls the channel update submission interface, and the backend uses methods provided in the Process utility class to create a process that calls 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 examples, this invention successfully completed the deployment of the blockchain through a combination of multiple steps, achieving an atomic process for deployment and performance testing, while supporting the deployment and maintenance of complex multi-channel networks. Furthermore, the existence of the deployment and maintenance platform significantly improves the deployment and maintenance efficiency of Hyperledger Fabric networks.

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

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

[0069] See Figure 3 This invention provides a blockchain deployment and maintenance device based on Hyperledger Fabric, comprising a memory and one or more processors. The memory stores executable code, and when the processor executes the executable code, it implements a blockchain deployment and maintenance method based on Hyperledger Fabric as described in the above embodiments.

[0070] This invention provides an embodiment of a blockchain deployment and operation device based on Hyperledger Fabric, which can be applied to any device with data processing capabilities, such as a computer. The device embodiment can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of any data processing device loading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 3 The diagram shown is a hardware structure diagram of any data processing-capable device where a blockchain deployment and maintenance device based on Hyperledger Fabric, provided by this invention, is located. (Except for...) Figure 3 In addition to the processor, memory, network interface, and non-volatile memory shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.

[0071] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0072] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0073] This invention also provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements a blockchain deployment and maintenance method based on Hyperledger Fabric as described in the above embodiments.

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

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

[0076] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.

[0077] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. This application is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A blockchain deployment and operation method based on Hyperledger Fabric, characterized in that, The method includes the following steps: S1. Configure and deploy the basic Fabric runtime environment; import and load the corresponding Hyperledger Fabric component images and install the corresponding CLI Tools. S2. Install and deploy the operation and maintenance platform: Install DataCenterService and the Authox permission framework on each node, deploy the database and import business data tables, and finally deploy the operation and maintenance platform. The deployment and maintenance platform includes an organization management platform and an alliance service platform, which run as services on the server to provide users with deployment-related business interfaces. The specific interfaces provided include: The organization management platform provides users with the following interfaces: Request peer node and orderer node identities and TLS encrypted files from the organization's CA; list channel tasks; approve chaincode installation requests initiated by other organizations; submit approved chaincode definitions; sign configuration update requests initiated by other organizations; submit approved configuration updates; peer nodes join the channel; The alliance service platform provides users with the following interfaces: Generate channel configuration files with user-specified configuration options; generate channel genesis blocks based on user-uploaded organization identities and configuration files; initiate channel tasks; list node information; modify sorting service parameters; dynamically add or delete organizations within the alliance; add or modify organization anchor nodes; generate configuration and deployment files for peer nodes; generate configuration and deployment files for orderer nodes; generate configuration and deployment files for the CA service; add orderer nodes to the channel; S3. Use the deployment and operation platform to complete the deployment of nodes and channels. Each organization uses the deployment and operation platform to decentralize the configuration of blockchain identity and other parameters and the information configuration of Fabric-CA service. Obtain various deployment file configuration parameters from the front end. The back end generates deployment configuration files by using the Velocity template engine, generates block configurations by using CLI TOOL, applies for the identity of each node from CA, and deploys nodes and creates channels. S4. Installing and Upgrading Chaincode: Users publish contracts using the consortium service platform, and administrators of each organization use the deployment and maintenance platform interface to install, approve, and submit smart contracts to the blockchain, and test the deployed chaincode. S5. Users monitor the operation status of nodes, contracts, and channels through the deployment and maintenance platform. Operation and maintenance personnel combine and call the deployment and maintenance platform interface to dynamically add or delete organizations, modify sorting service parameters, and channel policies for specified channels of Hyperledger Fabric, thereby realizing the configuration update of the blockchain.

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

3. A blockchain deployment and operation method based on Hyperledger Fabric according to claim 1, characterized in that, The installation, deployment, and maintenance platform specifically includes: First, install the databases supported by DC Service and the Java integrated development environment; then generate the directory structure required by DC12, use SQL to create the metadata table for DC12 using the Navicat tool, and finally start the DC12 platform. After the DC12 platform successfully starts, add a data source and create a business database table on the DC12 webpage; then use SQL to create the Authox permission framework data table again, and start Fabric-platform to generate Authox permission basic data and permission non-basic data. Next, copy the block format conversion tool configtxlator from CLI TOOLS, as well as the JAR packages of the Alliance Service Platform and Organization Management Platform, to the server. Finally, start the above services using a Java Virtual Machine. The deployment and operation platform includes the Organization Management Platform and the Alliance Service Platform, and DC12 serves as the backend data management center for the Organization Management Platform and the Alliance Service Platform.

4. A blockchain deployment and operation method based on Hyperledger Fabric according to claim 1, characterized in that, The decentralized configuration of blockchain identity and other parameters, as well as Fabric-CA service information, by each organization using the deployment and operation platform includes: each decentralized organization can configure its corresponding blockchain information, and after successfully configuring the organization's corresponding blockchain information, configure 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 includes: CA service container name, CA image version, CA service storage main directory, and CA service external port information.

5. A blockchain deployment and operation method based on Hyperledger Fabric according to claim 1, characterized in that, The process of obtaining various deployment file configuration parameters from the front end and generating deployment configuration files on the back end using the Velocity template engine specifically includes: After obtaining configuration file data and deployment file information from the front-end page, the user 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 automatically integrates the form data into the template file, finally generating a YAML file. The deployment files allow users to deploy the service on the server. After successful deployment, organizations can initiate CA identity registration and certificate download requests. Then, organizations configure the CA service information defined in the deployment phase, instantiate a Fabric-CA-Client instance using the Fabric-SDK-Java interface, and use Java to automatically connect to the Fabric-CA service. The front-end page then automatically completes the acquisition of node and administrator identity certificates.

6. A 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 the channels include: The system gathers the identities of each organization and the TLS certificates of the orderer nodes, and uses methods provided in the Process utility class to start a child process to execute the Fabric binary tool configtxgen to generate the configuration file for creating the blockchain channel; it then applies for the identities of each node from the CA; deploys the peer nodes and orderer nodes; and finally, it allows the orderer nodes and peer nodes to join the channel in sequence, completing the channel creation.

7. A blockchain deployment and operation method based on Hyperledger Fabric according to claim 1, characterized in that, The process for installing and upgrading chaincode includes: First, the contract creator publishes the contract using the consortium service platform, uploads the chaincode file package, and initiates a channel task. The task type is chaincode installation, and the status is incomplete. The organization administrator queries the channel tasks and finds a task of type chaincode submission with a status of pending installation. After the user calls the chaincode installation interface, the backend uses methods provided by the Process utility class to create a process that calls the Fabric binary command-line interface peer chaincode lifecycleinstall to install the specified chaincode on the peer node, returning the hash value of the chaincode package. Subsequently, the channel task status changes to pending approval. After the user calls the approval interface, the backend uses methods provided by the Process utility class to create a process that calls the Fabric binary command-line interface peer chaincode lifecycle approveformyorg to approve the specified chaincode definition on the peer node. Subsequently, the channel task status changes to pending submission. Once the number of approvals meets the channel's specified chaincode submission policy, the channel task status changes to waiting to submit. At this point, any organization administrator calls the chaincode definition submission interface, and the backend uses methods provided by the Process utility class to create a process that calls the Fabric binary command-line interface peer chaincode lifecycle commit to submit the specified chaincode definition to the channel. When upgrading chaincode, the initiator modifies the contract code or endorsement policy and releases a new contract. The new contract only modifies the sequence and version fields. Each organization then repackages, installs, approves, and submits the chaincode definition according to the initial deployment process of the chaincode to complete the chaincode update.

8. A blockchain deployment and maintenance 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, it implements a blockchain deployment and operation method based on Hyperledger Fabric as described in any one of claims 1-7.

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

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