CN113721963A - Method and device for automatically upgrading block chain and electronic equipment - Google Patents

Method and device for automatically upgrading block chain and electronic equipment Download PDF

Info

Publication number
CN113721963A
CN113721963A CN202111083437.2A CN202111083437A CN113721963A CN 113721963 A CN113721963 A CN 113721963A CN 202111083437 A CN202111083437 A CN 202111083437A CN 113721963 A CN113721963 A CN 113721963A
Authority
CN
China
Prior art keywords
historical
execution environment
configuration file
new
version data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202111083437.2A
Other languages
Chinese (zh)
Inventor
张琦
王培基
刘凤余
张平平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Zhuofan Information Technology Co ltd
Original Assignee
Shanghai Zhuofan Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Zhuofan Information Technology Co ltd filed Critical Shanghai Zhuofan Information Technology Co ltd
Priority to CN202111083437.2A priority Critical patent/CN113721963A/en
Publication of CN113721963A publication Critical patent/CN113721963A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Abstract

The invention provides a method and a device for automatically upgrading a block chain and electronic equipment, and relates to the field of block chain technology, wherein historical version data are acquired, and the historical version data comprise a historical execution environment, a historical configuration file, an account book and a starting file; upgrading the historical configuration file to obtain a newly generated configuration file; and respectively packaging and transmitting the newly generated configuration files to corresponding servers. The method has the function of automatically upgrading the old version of the open source block chain into the new version of the open source block chain.

Description

Method and device for automatically upgrading block chain and electronic equipment
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a method and an apparatus for automatically upgrading a blockchain version, and an electronic device.
Background
The block chain is an important concept of bitcoin, is essentially a decentralized database, and is used as a bottom-layer technology of bitcoin, namely a series of data blocks which are generated by correlation by using a cryptographic method, wherein each data block contains information of a batch of bitcoin network transactions for verifying the validity of the information and generating a next block.
The open source block chain is upgraded by an official, the modes of the new version open source block chain, such as installation and instantiation of the chain code, are greatly different from the old version open source block chain, and the intelligent contract decentralization is introduced into the new version open source block chain. The installation and instantiation of the chain code of the old version open source block chain are operated by one organization, and in the life cycle of the chain code of the new version open source block chain, only a plurality of organizations achieve common identification can interact with the account book. The period of the new version of the open source block chain requires an organization to reach the consistency of the chain code name, the version and the endorsement strategy, and the following four steps are required to be executed: packaging chain codes, installing chain codes, agreeing to the definition of the chain codes and submitting the chain codes. Over time, authorities will gradually reduce maintenance of the old version of the open source blockchain.
Therefore, a method, an apparatus and an electronic device for automatically upgrading a block chain are provided.
Disclosure of Invention
The present specification provides a method and an apparatus for automatically upgrading a block chain, and an electronic device, which can implement a function of automatically upgrading an old version of an open source block chain into a new version of the open source block chain.
The method for automatically upgrading the block chain adopts the following technical scheme that:
acquiring historical version data, wherein the historical version data comprises a historical execution environment, a historical configuration file, an account book and a starting file;
upgrading the historical configuration file to obtain a newly generated configuration file;
packaging and transmitting the new generated configuration files to corresponding servers respectively;
completing the following operations at each server based on the new generation configuration file:
the server stops executing the historical execution environment and deletes the file corresponding to the historical execution environment from the server;
executing the starting file at the server, and configuring and forming a newly generated execution environment based on the newly generated configuration file;
creating a channel in the newly generated execution environment;
updating the historical version data based on the channel to obtain new version data;
and restoring the account book based on the relation between the historical version data and the new version data.
Optionally, the upgrading the historical configuration file to obtain a newly generated configuration file includes adding a privilege permission in the historical configuration file.
Optionally, the separately packaging and transmitting the new generated configuration files to their corresponding servers includes:
packing the new generation configuration files respectively;
matching to a corresponding server of the new generated configuration file based on a first mapping relation, wherein the first mapping relation comprises one-to-one or many-to-one relation between the new generated configuration file and the server;
based on the result of the matching, transmitting the new generated profile to its respective server.
Optionally, the creating a channel in the newly generated execution environment includes:
creating a channel based on any first node in the newly generated execution environment;
and adding the rest of the first nodes into the channel.
Optionally, the restoring the ledger based on the relationship between the history version data and the new version data includes:
finding a new generative execution environment matching the historical execution environment based on a second mapping relationship, the second mapping relationship comprising a one-to-one relationship between the historical execution environment and the new generative execution environment;
mapping accounts in the historical execution environment to the matching new generative execution environment one by one based on the first node state.
Optionally, the method further includes:
backing up the historical version data to the local;
the backup of the account book comprises the backup of transaction records and the backup of transaction states.
The device that the block chain automated upgrade that this application provided adopts following technical scheme, includes:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring historical version data, and the historical version data comprises a historical execution environment, a historical configuration file, an account book and a starting file;
the first upgrading module is used for upgrading the historical configuration file to obtain a newly generated configuration file;
the packaging module is used for respectively packaging and transmitting the newly generated configuration files to corresponding servers;
a second upgrade module to complete the following operations at each server based on the newly generated configuration file:
a deletion stopping unit, configured to stop executing the historical execution environment by the server, and delete the file corresponding to the historical execution environment from the server;
the configuration unit is used for executing the starting file on the server and configuring and forming a newly generated execution environment based on the newly generated configuration file;
a creating unit configured to create a channel in the newly generated execution environment;
the upgrading unit is used for upgrading the historical version data based on the channel to obtain new version data;
and the recovery unit is used for recovering the ledger based on the relation between the historical version data and the new version data.
Optionally, the first upgrade module includes:
an adding unit, configured to add a privilege permission in the history configuration file.
Optionally, the packing module includes:
the packaging unit is used for respectively packaging the new generation configuration files;
a matching unit, configured to match to a server corresponding to the newly generated configuration file based on a first mapping relationship, where the first mapping relationship includes one-to-one or many-to-one relationship between the newly generated configuration file and the server;
and the transmission unit is used for transmitting the new generation configuration file to the corresponding server based on the matching result.
Optionally, the creating unit includes:
creating a channel based on any first node in the newly generated execution environment;
and adding the rest of the first nodes into the channel.
Optionally, the recovery unit includes:
finding a new generative execution environment matching the historical execution environment based on a second mapping relationship, the second mapping relationship comprising a one-to-one relationship between the historical execution environment and the new generative execution environment;
mapping accounts in the historical execution environment to the matching new generative execution environment one by one based on the first node state.
Optionally, the method further includes:
the backup module is used for backing up the historical version data to the local;
and the backup unit is used for backing up the account book including the backup of the transaction record and the backup of the transaction state.
The present specification also provides an electronic device, wherein the electronic device includes:
a processor; and the number of the first and second groups,
a memory storing computer-executable instructions that, when executed, cause the processor to perform any of the methods described above.
The present specification also provides a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement any of the methods described above.
According to the method and the device, manual operation is not required to be performed in the execution environment manually, the error probability in the block chain upgrading process is greatly reduced, the workload of an implementer is reduced, and the implementer can successfully upgrade the block chain without knowing the bottom technology of the block chain.
Drawings
FIG. 1 is a schematic diagram illustrating a method for automated upgrade of a blockchain according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an apparatus for automatically upgrading a block chain according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
Detailed Description
The following description is presented to disclose the invention so as to enable any person skilled in the art to practice the invention. The preferred embodiments in the following description are given by way of example only, and other obvious variations will occur to those skilled in the art. The basic principles of the invention, as defined in the following description, may be applied to other embodiments, variations, modifications, equivalents, and other technical solutions without departing from the spirit and scope of the invention.
Exemplary embodiments of the present invention are described more fully below with reference to the accompanying figures 1-4. The exemplary embodiments, however, may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art. The same reference numerals denote the same or similar elements, components, or parts in the drawings, and thus their repetitive description will be omitted.
Features, structures, characteristics or other details described in a particular embodiment do not preclude the fact that the features, structures, characteristics or other details may be combined in a suitable manner in one or more other embodiments in accordance with the technical idea of the invention.
In describing particular embodiments, the present invention has been described with reference to features, structures, characteristics or other details that are within the purview of one skilled in the art to provide a thorough understanding of the embodiments. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific features, structures, characteristics, or other details.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The term "and/or" and/or "includes all combinations of any one or more of the associated listed items.
Fig. 1 is a schematic diagram of a method for automatically upgrading a block chain according to an embodiment of the present disclosure, where the method may include:
s101: obtaining historical version data, wherein the historical version data comprises a historical execution environment, a historical configuration file, an account book and a starting file.
In the embodiment of the specification, a docker-swap is used for deploying a network cluster crossing servers, so that a plurality of servers are connected, and communication among the plurality of servers is facilitated. docker-swarm is a suite of container organization systems offered by docker officials. The historical version data comprises Fabrict 1.4.6 version data, the Fabrict 1.4.6 version data is acquired through collection, and the historical execution environment comprises a node container. The nodes comprise a first node and a second node, the first node comprises a peer node, and the second node comprises an order node. Fabric is an implementation of a blockchain technology that is combined using existing mature technologies, and is a modular architecture that allows pluggable implementation of various functions.
S102: and upgrading the historical configuration file to obtain a new generated configuration file.
Optionally, the upgrading the historical configuration file to obtain a newly generated configuration file includes adding a privilege permission in the historical configuration file.
In the embodiment of the present specification, the privilege permissions include capabilities, which refers to configx.yaml files, and are Fabric network operation and maintenance tools, which are used for generating configuration files for creating channels, and also define the characteristics that the Fabric must support to join the network. The configx.yaml files required by different versions of Fabric are different. The capability of the version of Fabricius 2.2.2 is added on the basis of the configuration file of the version of Fabricius 1.4.6 and is designated as a mirror image of the version of Fabricius 2.2.2.
S103: and respectively packaging and transmitting the new generated configuration files to corresponding servers.
Optionally, the separately packaging and transmitting the new generated configuration files to their corresponding servers includes:
packing the new generation configuration files respectively;
matching to a corresponding server of the new generated configuration file based on a first mapping relation, wherein the first mapping relation comprises one-to-one or many-to-one relation between the new generated configuration file and the server;
based on the result of the matching, transmitting the new generated profile to its respective server.
In the embodiment of the present specification, the fabry 2.2.2 version configuration files are packaged separately, and based on the first mapping relationship between the fabry 2.2.2 version configuration files and the servers, the fabry 2.2.2 version configuration files are transmitted to the corresponding servers by SSH. SSH (secure Shell), the secure shell protocol, is a protocol dedicated to providing security for telnet sessions (even files can be mutually transmitted by Windows telnet Linux server) and other network services, and can effectively make up for vulnerabilities in the network. By SSH, all transmitted data can be encrypted and DNS (domain name service) spoofing and IP spoofing can also be prevented. An additional benefit is that the data to be transmitted is compressed, thereby increasing the speed of transmission.
S104: completing the following operations at each server based on the new generation configuration file:
s1041: the server stops executing the historical execution environment and deletes the historical execution environment from the server.
S1042: and executing the starting file at the server, and configuring and forming a newly generated execution environment based on the newly generated configuration file.
S1043: creating a channel in the newly generated execution environment.
Optionally, the creating a channel in the newly generated execution environment includes:
creating a channel based on any first node in the newly generated execution environment;
and adding the rest of the first nodes into the channel.
In this specification embodiment, the server stops executing the Fabrict 1.4.6 version container and deletes the Fabrict 1.4.6 version container from the server. And creating a target file based on the block transaction generating tool, wherein the block transaction generating tool comprises a configxgen tool, the target file comprises a tx file, namely creating a tx file based on the configxgen tool, creating a channel in any peer node based on the tx file, and adding the rest peer nodes into the channel.
S1044: and updating the historical version data based on the channel to obtain new version data.
In the embodiment of the present specification, the fabric1.4.6 version data is upgraded to obtain 2.2.2 version data, where the 2.2.2 version data may be high-version CouchDB data, and the CouchDB is an open-source document-oriented database management system.
S1045: and restoring the account book based on the relation between the historical version data and the new version data.
Optionally, the restoring the ledger based on the relationship between the history version data and the new version data includes:
determining a new generative execution environment matching the historical execution environment based on a second mapping comprising a one-to-one relationship between the historical execution environment and the new generative execution environment;
mapping accounts in the historical execution environment to the matching new generative execution environment one by one based on the first node state.
In the embodiment of the specification, the specific state of the peer node in the Fabricius 1.4.6 version container is mapped to the Fabricius 2.2.2 version container one to one by utilizing IPFS (inter platform File System). IPFS, the interplanetary file system, is a network transport protocol aimed at creating persistent and distributed storage and sharing files. It is a content addressable peer-to-peer hypermedia distribution protocol. The specific data recovery process is that in the data recovery process, all data recovery operations are that after an orderer node receives heart data transmitted from an external IPFS, the heart data is packaged and sent to a peer node, and then the peer node changes the couchDB data.
Optionally, the method further includes:
backing up the historical version data to the local;
the backup of the account book comprises the backup of transaction records and the backup of transaction states.
In the embodiment of the specification, the fabic 1.4.6 version data backup is to backup a Fabric ledger, an MSP, a channel name and a peer node name in the channel, and the backup of the ledger comprises the backup of a transaction record and a state. The MSP comprises a group of trusted root certificates which are the basis of trust of the whole organization certificate, and the root certificates can issue middle-layer certificates; MSP administrator's identity certificate, the administrator can manage the certificate in the MSP. MSP (Membership Service provider) member Service provider, the main function is to undertake the authority management.
In the embodiment of the description, manual operation is not required to be performed in an execution environment, so that the error probability in the block chain upgrading process is greatly reduced, and the workload of an implementer is reduced, so that the implementer can successfully upgrade the block chain without solving the underlying technology of the block chain.
Fig. 2 is a schematic structural diagram of an apparatus for automatically upgrading a blockchain according to an embodiment of the present disclosure, where the apparatus may include:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring historical version data, and the historical version data comprises a historical execution environment, a historical configuration file, an account book and a starting file;
the first upgrading module is used for upgrading the historical configuration file to obtain a newly generated configuration file;
the packaging module is used for respectively packaging and transmitting the newly generated configuration files to corresponding servers;
a second upgrade module to complete the following operations at each server based on the newly generated configuration file:
a deletion stopping unit, configured to stop executing the historical execution environment by the server, and delete the file corresponding to the historical execution environment from the server;
the configuration unit is used for executing the starting file on the server and configuring and forming a newly generated execution environment based on the newly generated configuration file;
a creating unit configured to create a channel in the newly generated execution environment;
the upgrading unit is used for upgrading the historical version data based on the channel to obtain new version data;
and the recovery unit is used for recovering the ledger based on the relation between the historical version data and the new version data.
Optionally, the first upgrade module includes:
an adding unit, configured to add a privilege permission in the history configuration file.
Optionally, the packing module includes:
the packaging unit is used for respectively packaging the new generation configuration files;
a matching unit, configured to match to a server corresponding to the newly generated configuration file based on a first mapping relationship, where the first mapping relationship includes one-to-one or many-to-one relationship between the newly generated configuration file and the server;
and the transmission unit is used for transmitting the new generation configuration file to the corresponding server based on the matching result.
Optionally, the creating unit includes:
creating a channel based on any first node in the newly generated execution environment;
and adding the rest of the first nodes into the channel.
Optionally, the recovery unit includes:
finding a new generative execution environment matching the historical execution environment based on a second mapping relationship, the second mapping relationship comprising a one-to-one relationship between the historical execution environment and the new generative execution environment;
mapping accounts in the historical execution environment to the matching new generative execution environment one by one based on the first node state.
Optionally, the method further includes:
the backup module is used for backing up the historical version data to the local;
and the backup unit is used for backing up the account book including the backup of the transaction record and the backup of the transaction state.
The functions of the apparatus in the embodiment of the present invention have been described in the above method embodiments, so that reference may be made to the related descriptions in the foregoing embodiments for details that are not described in the present embodiment, and further details are not described herein.
Based on the same inventive concept, the embodiment of the specification further provides the electronic equipment.
In the following, embodiments of the electronic device of the present invention are described, which may be regarded as specific physical implementations for the above-described embodiments of the method and apparatus of the present invention. Details described in the embodiments of the electronic device of the invention should be considered supplementary to the embodiments of the method or apparatus described above; for details which are not disclosed in embodiments of the electronic device of the invention, reference may be made to the above-described embodiments of the method or the apparatus.
Fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. An electronic device 300 according to this embodiment of the invention is described below with reference to fig. 3. The electronic device 300 shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 3, electronic device 300 is embodied in the form of a general purpose computing device. The components of electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one memory unit 320, a bus 330 connecting the various system components (including the memory unit 320 and the processing unit 310), a display unit 340, and the like.
Wherein the storage unit stores program code executable by the processing unit 310 to cause the processing unit 310 to perform the steps according to various exemplary embodiments of the present invention described in the above-mentioned processing method section of the present specification. For example, the processing unit 310 may perform the steps as shown in fig. 1.
The storage unit 320 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)3201 and/or a cache storage unit 3202, and may further include a read only memory unit (ROM) 3203.
The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 300, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 300 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 350. Also, the electronic device 300 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 360. Network adapter 360 may communicate with other modules of electronic device 300 via bus 330. It should be appreciated that although not shown in FIG. 3, other hardware and/or software modules may be used in conjunction with electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments of the present invention described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present invention. The computer program, when executed by a data processing apparatus, enables the computer readable medium to implement the above-described method of the invention, namely: such as the method shown in fig. 1.
Fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
A computer program implementing the method shown in fig. 1 may be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In summary, the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components in embodiments in accordance with the invention may be implemented in practice using a general purpose data processing device such as a microprocessor or a Digital Signal Processor (DSP). The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
While the foregoing embodiments have described the objects, aspects and advantages of the present invention in further detail, it should be understood that the present invention is not inherently related to any particular computer, virtual machine or electronic device, and various general-purpose machines may be used to implement the present invention. The invention is not to be considered as limited to the specific embodiments thereof, but is to be understood as being modified in all respects, all changes and equivalents that come within the spirit and scope of the invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for automated upgrade of a block chain, comprising:
acquiring historical version data, wherein the historical version data comprises a historical execution environment, a historical configuration file, an account book and a starting file;
upgrading the historical configuration file to obtain a newly generated configuration file;
packaging and transmitting the new generated configuration files to corresponding servers respectively;
completing the following operations at each server based on the new generation configuration file:
the server stops executing the historical execution environment and deletes the historical execution environment from the server;
executing the starting file at the server, and configuring and forming a newly generated execution environment based on the newly generated configuration file;
creating a channel in the newly generated execution environment;
updating the historical version data based on the channel to obtain new version data;
and restoring the account book based on the relation between the historical version data and the new version data.
2. The method for blockchain automation upgrade of claim 1, wherein the upgrading the historical configuration file to a new generated configuration file includes adding privilege permissions in the historical configuration file.
3. The method for automated upgrading of a blockchain according to claim 1, wherein the packaging and transmitting the new generated configuration files to their corresponding servers respectively comprises:
packing the new generation configuration files respectively;
matching to a corresponding server of the new generated configuration file based on a first mapping relation, wherein the first mapping relation comprises one-to-one or many-to-one relation between the new generated configuration file and the server;
based on the result of the matching, transmitting the new generated profile to its respective server.
4. The method of blockchain automated upgrade of claim 1, wherein said creating a channel in the newly generated execution environment comprises:
creating a channel based on any first node in the newly generated execution environment;
and adding the rest of the first nodes into the channel.
5. The method of blockchain automation upgrade of claim 4, wherein said restoring the ledger based on the relationship of the historical version data to the new version data comprises:
determining a new generative execution environment matching the historical execution environment based on a second mapping comprising a one-to-one relationship between the historical execution environment and the new generative execution environment;
mapping accounts in the historical execution environment to the matching new generative execution environment one by one based on the first node state.
6. The method for automated upgrading of a blockchain of claim 5, further comprising:
backing up the historical version data to the local;
the backup of the account book comprises the backup of transaction records and the backup of transaction states.
7. An apparatus for automated upgrade of a blockchain, comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring historical version data, and the historical version data comprises a historical execution environment, a historical configuration file, an account book and a starting file;
the first upgrading module is used for upgrading the historical configuration file to obtain a newly generated configuration file;
the packaging module is used for respectively packaging and transmitting the newly generated configuration files to corresponding servers;
a second upgrade module to complete the following operations at each server based on the newly generated configuration file:
a deletion stopping unit, configured to stop executing the historical execution environment by the server, and delete the file corresponding to the historical execution environment from the server;
the configuration unit is used for executing the starting file on the server and configuring and forming a newly generated execution environment based on the newly generated configuration file;
a creating unit configured to create a channel in the newly generated execution environment;
the upgrading unit is used for upgrading the historical version data based on the channel to obtain new version data;
and the recovery unit is used for recovering the ledger based on the relation between the historical version data and the new version data.
8. The apparatus for blockchain automated upgrade of claim 7, wherein the first upgrade module includes an add unit to add privilege permissions in the historical configuration file.
9. An electronic device, wherein the electronic device comprises:
a processor;
and a memory storing computer-executable instructions that, when executed, cause the processor to perform the method of any of claims 1-6.
10. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-6.
CN202111083437.2A 2021-09-15 2021-09-15 Method and device for automatically upgrading block chain and electronic equipment Withdrawn CN113721963A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111083437.2A CN113721963A (en) 2021-09-15 2021-09-15 Method and device for automatically upgrading block chain and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111083437.2A CN113721963A (en) 2021-09-15 2021-09-15 Method and device for automatically upgrading block chain and electronic equipment

Publications (1)

Publication Number Publication Date
CN113721963A true CN113721963A (en) 2021-11-30

Family

ID=78684007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111083437.2A Withdrawn CN113721963A (en) 2021-09-15 2021-09-15 Method and device for automatically upgrading block chain and electronic equipment

Country Status (1)

Country Link
CN (1) CN113721963A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116664129A (en) * 2023-07-28 2023-08-29 杭州趣链科技有限公司 Block chain account book data iteration method, electronic equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116664129A (en) * 2023-07-28 2023-08-29 杭州趣链科技有限公司 Block chain account book data iteration method, electronic equipment and readable storage medium
CN116664129B (en) * 2023-07-28 2023-11-10 武汉趣链数字科技有限公司 Block chain account book data iteration method, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US10599874B2 (en) Container update system
CN108549580B (en) Method for automatically deploying Kubernets slave nodes and terminal equipment
CN110572436B (en) Multi-place cross-cluster server deployment method and system
CN108536519B (en) Method for automatically building Kubernetes main node and terminal equipment
US8978032B2 (en) Host naming application programming interface
US11496323B1 (en) Systems and methods for container orchestration security
EP2864881B1 (en) Establishing an initial configuration of a hardware inventory
CN111277432B (en) Configuration information updating method and device, electronic equipment and storage medium
US8549114B2 (en) Method and system for model-based heterogeneous server configuration management
US20170034071A1 (en) System and method for traffic director support in a multitenant application server environment
US11231912B2 (en) Post-deployment modification of information-technology application using lifecycle blueprint
US20130124807A1 (en) Enhanced Software Application Platform
US9038086B2 (en) End to end modular information technology system
US10063429B2 (en) Systems and methods for optimizing computer network operations
KR102214139B1 (en) Management system for cloud infrastructure template
US10466990B1 (en) Method and system for auto stacking and launching base and extended patterns using an automatic launch and restack engine
CN113721963A (en) Method and device for automatically upgrading block chain and electronic equipment
JP2020184330A (en) Method and apparatus for continuous delivery of permissioned blockchain application
CN110798341A (en) Service opening method, device and system
CN111522625A (en) Cloud data online evidence obtaining system and method
CN111176677A (en) Server system reinforcement updating method and device
CN112425121A (en) Usage control data network for distributed databases
US11804965B2 (en) Connecting configuration services using blockchain technology
CN111147429A (en) Project research and development environment deployment system
EP3772208A1 (en) Systems and methods for conducting data extraction using dedicated data extraction devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20211130