CN114189441B - Method for upgrading nodes in blockchain and related products - Google Patents
Method for upgrading nodes in blockchain and related products Download PDFInfo
- Publication number
- CN114189441B CN114189441B CN202111454253.2A CN202111454253A CN114189441B CN 114189441 B CN114189441 B CN 114189441B CN 202111454253 A CN202111454253 A CN 202111454253A CN 114189441 B CN114189441 B CN 114189441B
- Authority
- CN
- China
- Prior art keywords
- node
- blockchain
- proposal
- transaction
- new version
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000012544 monitoring process Methods 0.000 claims abstract description 22
- 230000008569 process Effects 0.000 claims abstract description 16
- 230000004044 response Effects 0.000 claims abstract description 14
- 230000006870 function Effects 0.000 claims description 26
- 238000009434 installation Methods 0.000 claims description 6
- 230000000694 effects Effects 0.000 claims description 5
- 238000012795 verification Methods 0.000 claims description 5
- 238000004590 computer program Methods 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 abstract description 8
- 238000004891 communication Methods 0.000 description 7
- 238000010200 validation analysis Methods 0.000 description 6
- 230000007547 defect Effects 0.000 description 5
- 230000002093 peripheral effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000000977 initiatory effect Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 238000007792 addition Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000008439 repair process Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1059—Inter-group management mechanisms, e.g. splitting, merging or interconnection of groups
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to a method for upgrading nodes in a blockchain and a related product. Wherein the blockchain includes a plurality of nodes, the method including performing, at a node: monitoring whether proposal transactions related to upgrading node versions exist on the blockchain; and in response to monitoring the proposal transaction, triggering an operation of upgrading the node version based on the proposal transaction. By the technical scheme, the limitation of the existing block chain node upgrading technology can be effectively overcome, and the whole node upgrading process is simplified, so that the nodes in the block chain can be timely updated according to the needs.
Description
Technical Field
The present invention relates generally to the field of blockchain technology. More particularly, the present invention relates to a method, apparatus and computer program product for upgrading nodes in a blockchain.
Background
This section is intended to provide a background or context to the embodiments of the application that are recited in the claims. The description herein may include concepts that could be pursued, but are not necessarily ones that have been previously conceived or pursued. Accordingly, unless indicated otherwise, what is described in this section is not prior art to the description and claims of the present application and is not admitted to be prior art by inclusion in this section.
A federation chain is a distributed network system consisting of a plurality of federation-side nodes, in that there is no central server and each node runs on its own server. Thus, when a blockchain system has version update requirements (e.g., a need to repair a defect or add a new function, etc.), it is necessary to ensure an overall synchronous update on the chain, otherwise, a blockchain network node inconsistency may occur.
However, the prior art generally requires node operation staff to manually update nodes, and also requires that the operators of each node agree on an updated time window in an online or offline manner and then update node programs in a unified manner. It can be seen that the existing node upgrading technology not only depends on node side operation staff, but also requires each alliance side to agree on upgrading time for upgrading, so that the whole upgrading process is large in limitation and complex in operation.
Disclosure of Invention
In order to solve at least the technical problems described in the background section, the present invention proposes a solution for upgrading nodes in a blockchain. The scheme of the invention can realize the dynamic upgrading of the nodes in the block chain without introducing excessive manual intervention. In view of this, the present invention provides a solution in a number of aspects as follows.
A first aspect of the present invention provides a method for upgrading a node in a blockchain, wherein the blockchain includes a plurality of nodes, the method comprising performing at a node: monitoring whether proposal transactions related to upgrading node versions exist on the blockchain; and in response to monitoring the proposal transaction, triggering an operation of upgrading the node version based on the proposal transaction.
In one embodiment, a daemon process for monitoring the running state of the node is configured at the node, wherein listening for the proposal transaction is performed by the daemon process and the following operations are performed in triggering the upgrade of the node version: updating the new version according to the proposal transaction; and triggering the node it monitors to enable the predetermined function in the new version.
In one embodiment, wherein completing the update of the new version in accordance with the proposal transaction comprises: acquiring the new version according to the proposal transaction; and controlling the node which it monitors to exit the old version and start the new version.
In one embodiment, wherein the proposal transaction includes installation information and verification information for a new version, wherein obtaining the new version from the proposal transaction includes: downloading the new version according to the installation information; detecting whether the check information is matched with preset reference information or not; and determining that the new version is acquired in response to the check information being matched with the preset reference information.
In one embodiment, wherein controlling the node it monitors to exit the old version and start the new version comprises: monitoring whether the voting of the blockchain about the proposal transaction passes or not; and in response to listening for a voting pass regarding the proposal transaction, performing an operation of exiting the old version and initiating the new version.
In one embodiment, wherein the new version is stored in an upgrade directory and the plurality of nodes includes a target node having voting rights, wherein listening for whether the blockchain votes for the proposal transaction pass includes: monitoring whether a target node on the blockchain votes for the proposal transaction, wherein the target node executes the voting operation when determining that the new version exists in the upgrade catalog; and determining to monitor the passage of the vote about the proposal transaction after the target node monitors the vote about the proposal transaction.
In one embodiment, wherein the proposal transaction further comprises identification information enabling the predetermined function, wherein the node triggering its monitoring to enable the predetermined function in the new version comprises: monitoring whether the proposal transaction is effective; monitoring whether a block currently in the block chain has the identification information or not; and in response to monitoring that the proposed transaction is effective and the block which is currently in account has the identification information, triggering the monitored node to start the preset function.
In one embodiment, wherein listening for whether the proposed transaction is in effect and whether the currently posted block has the identification information comprises: and when the block account is found on the blockchain, judging whether the proposed transaction is effective or not and whether the block of the current account has the identification information or not through a preset callback function.
A second aspect of the invention provides an apparatus comprising: a processor; and a memory storing computer instructions for upgrading a node in a blockchain, which when executed by the processor, cause the apparatus to perform the method of the first aspect above and in the embodiments below.
A third aspect of the invention provides a computer program product comprising program instructions for upgrading a node in a blockchain, which when executed by a processor, cause the method of the first aspect hereinbefore and in the embodiments hereinafter to be carried out.
By utilizing the scheme provided by the invention, the version upgrading operation of the node is triggered through the monitored proposal transaction about upgrading the node version, and the dynamic upgrading of the node can be realized without introducing excessive manual intervention. Therefore, the scheme of the invention can effectively overcome the limitation of the prior block chain node upgrading technology and simplify the whole node upgrading process, thereby ensuring that the nodes in the block chain can be timely updated according to the needs. In addition, in some embodiments, the upgrade of the node includes the update of the new version and the trigger enabling of the predetermined function in the new version, so that the node upgrade scheme of the invention more conforms to the actual upgrade requirement.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. In the drawings, embodiments of the invention are illustrated by way of example and not by way of limitation, and like reference numerals refer to similar or corresponding parts and in which:
FIG. 1 is an architecture diagram illustrating a blockchain network in accordance with embodiments of the invention;
FIG. 2 is a flow chart illustrating one method for upgrading nodes in a blockchain in accordance with embodiments of the invention;
FIG. 3 is a flow chart illustrating another method for upgrading nodes in a blockchain in accordance with embodiments of the invention;
FIG. 4 is a flow chart illustrating yet another method for upgrading nodes in a blockchain in accordance with embodiments of the invention; and
Fig. 5 is a block diagram illustrating a blockchain system in accordance with an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the present invention. All other embodiments, based on the embodiments of the invention, which a person skilled in the art would obtain without making any inventive effort, are within the scope of the invention.
It should be understood that the terms "first," "second," "third," and "fourth," etc. in the claims, specification and drawings of the present invention are used for distinguishing between different objects and not for describing a particular sequential order. The terms "comprises" and "comprising" when used in the specification and claims of the present invention are taken to specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification and claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be further understood that the term "and/or" as used in the present specification and claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
In order to better understand the scheme of the present invention, a brief description of the blockchain will be provided below in connection with fig. 1.
FIG. 1 is an architecture diagram 100 illustrating a blockchain in accordance with embodiments of the present invention. The blockchain may include a plurality of nodes (e.g., node a, node B, node C, and node D in fig. 1), it being noted that the nodes illustrated in fig. 1 are merely exemplary and are not limiting on the number of nodes in the blockchain. The aforementioned nodes may include authentication nodes and non-authentication nodes, where authentication nodes may be understood as nodes that would participate in transaction consensus, whereas non-authentication nodes do not participate in transaction consensus, may be used to forward transactions, maintain ledgers, and the like. In some embodiments, the proposed governance module may be incorporated into the node program of the blockchain described above, and may include an on-chain governance committee. And the on-chain governance committee may be comprised of committee nodes. Here, the committee node may be understood as a part of the authentication node having higher management authority, and may initiate a proposal (for example, a proposal of a committee node change, an upgrade, or the like). The scheme for upgrading nodes in the blockchain will be described with emphasis.
FIG. 2 is a flow chart illustrating a method 200 for upgrading a node in a blockchain in accordance with an embodiment of the invention. It should be noted that the blockchain may include a plurality of nodes, and the steps shown in fig. 2 may be performed at the node where the upgrade is required. The nodes with upgrade requirements here may be determined according to design and application requirements, e.g. for each node, or only for part of the nodes. It will be appreciated that the blockchains and nodes herein may have the same general attributes as the blockchains and nodes described above in connection with fig. 1, and that further performance optimization and promotion is achieved by the scheme of the present invention.
As shown in fig. 2, at step S201, it may be monitored whether there is a proposal transaction on the blockchain for an upgrade node version. In some implementations, when there is an upgrade requirement for a node on the blockchain (e.g., a defect in the node or a need to add functionality, etc.), the aforementioned proposal transaction may be initiated by the node in the blockchain. In one embodiment, the proposal transaction may be issued by any of the authentication nodes described previously. Alternatively, in another embodiment, the proposal transaction may also be initiated by the aforementioned committee node. It should be noted that the description of the initiation process of the proposal transaction is only exemplary, and the scheme of the present invention is not limited thereto.
Next, at step S202, in response to listening to the aforementioned proposal transaction, an operation to upgrade the node version may be triggered based on the proposal transaction. In some embodiments, the proposal transaction described above may include information about the new version of the program (e.g., version number, link address, etc.). The proposal transaction triggers the upgrade operation of the node, excessive manual intervention is not required to be introduced in the whole process, the limitation of the existing block chain node upgrade technology can be effectively overcome, and the whole node upgrade process is simplified.
FIG. 3 is a flow chart illustrating a method 300 for upgrading a node in a blockchain in accordance with an embodiment of the invention. It should be noted that the method 300 is understood to be one possible exemplary description of the method 200 of fig. 2 and further additions. The blockchain may include a plurality of nodes, and a daemon for monitoring the running state of the nodes may be configured at the nodes in need of upgrades. It should be noted that the blockchains and nodes herein may have the same general properties as the blockchains and nodes described above in connection with fig. 1 and 2, and thus the details described above in connection with fig. 1 and 2 are equally applicable below.
As shown in fig. 3, at step S301, it is possible to monitor whether there is a proposal transaction on the blockchain for an upgrade node version through the daemon described above. In some embodiments, the daemon may communicate with the node it monitors, e.g., may listen for proposal transactions on the blockchain through communication with the node. As previously described, the proposal transaction may be initiated by any validation node or committee node on the blockchain.
Next, at step S302, the update of the new version may be completed according to the proposal transaction described previously. Wherein the updating of the new version may involve the acquisition of the new version and the node controlling the daemon monitoring exiting the old version and starting the new version. Specifically, in some embodiments, the foregoing proposal transaction may include installation information (e.g., version number, link address, etc. information) and verification information (e.g., program hash value, etc.). Therefore, the new version can be downloaded through the installation information, whether the check information is matched with the preset reference information or not is detected, and the new version is determined to be acquired when the check information is matched with the preset reference information. The downloaded new version is checked through the check information to judge whether the new version is damaged (e.g. tampered maliciously), so that risks brought by the damaged version can be effectively avoided, and the safety of the block chain system is improved.
In some embodiments, after the completion of the acquisition of the aforementioned new version, the blockchain may be monitored for the passage of votes for proposal transactions, and upon the monitoring of the passage of votes for proposal transactions, the operations of exiting the old version and initiating the new version may be performed. In particular, nodes in the blockchain may include target nodes (e.g., any validation node or committee node) that have voting rights. After the aforementioned new version is acquired, it may be stored in an upgrade directory. The target node performs a voting operation when it determines that a new version exists in the upgrade directory, and the daemon may monitor and parse the blocks and voting transactions on the blockchain through the nodes it monitors. The daemon may signal exit of the original node process and run the upgraded node program upon determining that the current target node votes for. In the scheme of the invention, the target node executes the voting operation only when determining that the upgrading catalog has a new version, so that some misoperation (such as initiating voting on an unknown version and the like) in the upgrading process can be effectively avoided.
Next, at step S303, the node it monitors may be triggered to enable a predetermined function in the new version. In some embodiments, the proposal transaction described above may also include identification information (e.g., a block number or a block timestamp) that enables the predetermined function. In particular, it may be monitored whether the proposal transaction described previously is in effect. For example, the daemon may determine that the proposed transaction is in effect when it monitors more than a predetermined number of validation nodes or committee nodes on the blockchain by voting for the proposed transaction. Then, it can monitor whether the currently-settled block on the blockchain has the identification information (for example, has the block number or the block timestamp), and trigger the node monitored by the currently-settled block to start the preset function when the proposal transaction is effective and the currently-settled block has the identification information. Thus, the operation of upgrading the node version is completed. It should be noted that the description of the triggering of the predetermined function is only exemplary, and the aspect of the present invention is not limited thereto. For example, in implementations, it may be determined whether the proposed transaction is in effect and whether the block has the aforementioned block number or block timestamp by a predetermined callback function (e.g., an isActive function).
FIG. 4 is a flow chart illustrating a method 400 for upgrading a node in a blockchain in accordance with an embodiment of the invention. It is understood that method 400 may be one possible application example of the methods of fig. 2 and 3. Accordingly, the foregoing detailed description in connection with fig. 1 to 3 applies equally to the following.
As shown in fig. 4, a proposal governance module may be added to the node program in the blockchain, a time notification module may be added when the blocks are settled, and a separate daemon may be added. The daemon can communicate with the node, which notifies the daemon of the block that has been posted as an event, and is also responsible for peripheral tasks such as node start and stop. The proposal governance module, as previously described, may include an on-chain governance committee. The governance committee consists of validation nodes that can initiate and vote on proposals. For example, the initiated proposal may include a committee node upgrade, or the like.
When there is an upgrade requirement for a node in the blockchain, for example, the current version of the node is 1.0.0, because there is a defect in the node, the problem needs to be solved by upgrading the node, and a developer develops the 1.0.1 version to solve the defect. The version number of the node can be written into the source code of the node in a hard coding mode, and then the upgrading of the node version is realized through the interaction between the node and the daemon.
Specifically, on the node side:
At step S401, a proposal transaction may be initiated on the chain by the committee node. The proposed transaction is of the type of an upgrade node, and may specifically include a program acquisition link, a version number, a program hash value, and a block number that triggers an upgrade. It should be noted that the description of the proposed transaction is only exemplary, and for example, a block time stamp may be used instead of a block number or the like.
On the daemon side:
At step S402, the daemon may obtain the blocks and transaction information on the chain. When the daemon judges that the transaction is an upgrade proposal, the daemon automatically acquires the program of the new version downloaded by the link, judges whether the hash values of the programs are consistent, and then places the program into a directory (such as an upgrade directory) corresponding to the version number in the upgrade directory when the hash values are consistent.
On the node side:
At step S403, the committee node may acquire a voting transaction initiated by a node administrator. The committee node administrator may vote on the proposal, e.g., the node administrator may initiate a voting transaction with its own committee node. Next, at step S404, the committee node verifies the administrator identity, and if the verification passes, notifies the daemon. Otherwise, directly returning to failure. The committee node then checks the upgrade catalog and returns a failure if the upgrade program does not exist. If a node program exists, the committee node can sign up the proposal with its own private key.
On the daemon side:
at step S405, the daemon process determines that the current committee node has voted by parsing the block and the transaction, and then signals the exiting process and runs the upgraded node program.
It should be noted that, although the foregoing node has been updated, the new function is not activated temporarily. While the conditions triggering the new function enablement are two: firstly, voting passes of a majority committee node are proposed; and secondly, the block number reaches the block number for validating the function defined in the proposal, and then the new function is validated. In practical applications, this may be achieved by the design of a "version update table" data structure. Specifically, the data structure mainly includes a version number of the current node, a hash value of the version number, and whether the current node is enabled or not. And the developer can determine, through if statements, where the code is updated, whether the current version has been validated and the new function or code logic of the defect repair. For example if (vt ("v_1_0_1"). IsActive () = true) {.}, the code indicates that the current version is 1.0.1 and that the subsequent code logic can only be executed when it has been validated.
In some embodiments, after a proposal passes a majority committee node vote, the proposal passes and the state of the proposal on the chain is changed to passed. When the blockchain falls, whether the current blocknumber reaches the proposal validation blocknumber is judged, and when the proposal validation blocknumber is confirmed to be reached, the version of the corresponding proposal in the version update table is set to be in an activated state. The new version of the function is enabled up to now, i.e. the isActive () of the previous example returns true. In practical application, the realization of the function can be used for judging whether the proposal is effective or not and changing the value of whether the version in the version update table is enabled or not by adding a callback function when the block is settled. Therefore, the scheme of the invention can realize the dynamic upgrading of the block chain node through the on-chain treatment and daemon without unifying time windows, simultaneous operation of operation and maintenance personnel and the like, thereby effectively simplifying the node upgrading operation.
Fig. 5 is a schematic block diagram illustrating a blockchain system 500 in accordance with an embodiment of the invention. The blockchain system 500 may include a device 501, and its peripherals and external networks, in which a node program of a blockchain may be installed in the device 501, and/or a daemon that oversees the node program, according to embodiments of the present invention. As previously described, the device 501 may implement listening to proposal transactions regarding upgraded node versions, triggering operations of upgraded node versions, etc. to implement the solution of the present invention described above in connection with fig. 2-4.
As shown in fig. 5, the device 501 may include a CPU5011, which may be a general purpose CPU, a special purpose CPU, or other unit of execution for information processing and program execution. Further, the device 501 may also include a mass memory 5012 and a read only memory ROM5013, wherein the mass memory 5012 may be configured to store various types of data and various programs required for blockchain, and the ROM5013 may be configured to store power-on self-test for the device 501, initialization of various functional blocks in the system, drivers for basic input/output of the system, and data required for booting the operating system.
Further, the device 501 also includes other hardware platforms or components, such as the illustrated TPU (Tensor Processing Unit ) 5014, GPU (Graphic Processing Unit, graphics processor) 5015, FPGAs (Field Programmable GATE ARRAY, field programmable gate arrays) 5016 and MLU (Memory Logic Unit), memory logic unit) 5017. It will be appreciated that while various hardware platforms or components are shown in device 501, this is by way of example only and not limitation, and that one of skill in the art may add or remove corresponding hardware as desired. For example, device 501 may include only a CPU as a well-known hardware platform and another hardware platform as a test hardware platform of the present invention.
The device 501 of the present invention further comprises a communication interface 5018 whereby it is possible to connect to a local area network/wireless local area network (LAN/WLAN) 505 through the communication interface 5018 and further to a local server 506 or to the Internet ("Internet") 507 through the LAN/WLAN. Alternatively or additionally, the device 501 of the present invention may also be directly connected to the internet or cellular network via the communication interface 5018 based on wireless communication technologies, such as third generation ("3G"), fourth generation ("4G"), or 5 th generation ("5G") wireless communication technologies. In addition, device 501 may also communicate with external devices 508 and 509 as desired.
The peripheral devices of the device 501 may include a display means 502, an input means 503 and a data transmission interface 504. In one embodiment, the display device 502 may include, for example, one or more speakers and/or one or more visual displays. The input device 503 may include, for example, a keyboard, mouse, microphone, gesture-capturing camera, or other input buttons or controls configured to receive input of data or user instructions. The data transfer interface 504 may include, for example, a serial interface, a parallel interface, or a universal serial bus interface ("USB"), a small computer system interface ("SCSI"), serial ATA, fireWire ("FireWire"), PCI Express, and high definition multimedia interface ("HDMI"), etc., configured for data transfer and interaction with other devices or systems.
The above-described CPU 5011, mass memory 5012, read only memory ROM 5013, TPU 5014, GPU 5015, FPGA 5016, MLU 5017, and communication interface 5018 of the device 501 of the present invention can be connected to each other through a bus 5019, and data interaction with peripheral devices can be achieved through the bus. In one embodiment, through the bus 5019, the cpu 5011 may control other hardware components in the device 501 and its peripherals.
In operation, the processor CPU 5011 of the device 501 of the present invention may obtain a proposal transaction for an upgrade node version via the input means 503 or the data transfer interface 504 and invoke computer program instructions or code stored in the memory 5012 to process the obtained proposal transaction in order to trigger the operation of the upgrade node version based on the proposal transaction. .
From the above description of the modular design of the present invention, it can be seen that the system of the present invention can be flexibly arranged according to the application scenario or requirement and is not limited to the architecture shown in the drawings. Further, it should also be appreciated that any module, unit, component, server, computer, or device that performs the operations of the examples of the invention may include or otherwise access a computer-readable medium, such as a storage medium, a computer storage medium, or a data storage device (removable) and/or non-removable) such as, for example, a magnetic disk, optical disk, or magnetic tape. Computer storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Based on this, the present invention also discloses a computer-readable storage medium having stored thereon computer-readable instructions for upgrading a node in a blockchain, which when executed by one or more processors, implement the methods and operations described above in connection with the accompanying drawings.
While various embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Numerous modifications, changes, and substitutions will occur to those skilled in the art without departing from the spirit and scope of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention. The appended claims are intended to define the scope of the invention and to cover such modular compositions, equivalents, or alternatives falling within the scope of the claims.
Claims (6)
1. A method for upgrading a node in a blockchain, wherein the blockchain includes a plurality of nodes, the method comprising performing at a node:
Monitoring whether proposal transactions related to upgrading node versions exist on the blockchain; and
In response to monitoring the proposal transaction, triggering an operation of upgrading a node version based on the proposal transaction;
Wherein a daemon process for monitoring the running state of the node is configured at the node, wherein monitoring the proposal transaction is performed by the daemon process and the following operations are performed in the process of triggering the upgrade of the node version: updating the new version according to the proposal transaction; triggering the monitored node to start the preset function in the new version;
Wherein completing the update of the new version according to the proposal transaction comprises: acquiring the new version according to the proposal transaction; and controlling the monitored node to withdraw from the old version and start the new version; the new version is stored in an upgrade catalog, the plurality of nodes comprise target nodes with voting authority, whether the target nodes on the blockchain vote on the proposal transaction or not is monitored, and the target nodes execute voting operation when determining that the new version exists in the upgrade catalog; and determining that the voting about the proposal transaction is monitored to pass after the target node is monitored to vote for the proposal transaction; in response to listening for a voting pass regarding the proposal transaction, an operation is performed to exit the old version and to initiate the new version.
2. The method of claim 1, wherein the proposal transaction includes installation information and verification information for a new version, wherein obtaining the new version from the proposal transaction includes:
Downloading the new version according to the installation information;
Detecting whether the check information is matched with preset reference information or not; and
And determining that the new version is acquired in response to the fact that the verification information is matched with the preset reference information.
3. The method of claim 1, wherein the proposal transaction further includes identification information that enables the predetermined function, wherein the node triggering its monitoring to enable the predetermined function in the new version includes:
Monitoring whether the proposal transaction is effective;
Monitoring whether a block currently in the block chain has the identification information or not; and
And in response to monitoring that the proposal transaction is effective and the block which is currently in account has the identification information, triggering the monitored node to start the preset function.
4. The method of claim 3, wherein listening for whether the proposed transaction is in effect and whether a block currently in charge has the identification information comprises:
And when the block account is found on the blockchain, judging whether the proposed transaction is effective or not and whether the block of the current account has the identification information or not through a preset callback function.
5. An electronic device, comprising:
A processor; and
A memory storing computer instructions for upgrading a node in a blockchain, which when executed by the processor, cause the electronic device to perform the method according to any of claims 1-4.
6. A computer program product comprising program instructions for upgrading a node in a blockchain, which program instructions, when executed by a processor, cause the method according to any of claims 1-4 to be implemented.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111454253.2A CN114189441B (en) | 2021-12-01 | 2021-12-01 | Method for upgrading nodes in blockchain and related products |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111454253.2A CN114189441B (en) | 2021-12-01 | 2021-12-01 | Method for upgrading nodes in blockchain and related products |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114189441A CN114189441A (en) | 2022-03-15 |
CN114189441B true CN114189441B (en) | 2024-06-21 |
Family
ID=80541939
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111454253.2A Active CN114189441B (en) | 2021-12-01 | 2021-12-01 | Method for upgrading nodes in blockchain and related products |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114189441B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112235137A (en) * | 2020-10-12 | 2021-01-15 | 杭州溪塔科技有限公司 | Method and device for upgrading block link point program and electronic equipment |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110557452B (en) * | 2019-09-04 | 2022-07-29 | 腾讯科技(深圳)有限公司 | Node management method and device of block chain, storage medium and computer equipment |
CN112035144B (en) * | 2020-09-01 | 2023-05-26 | 平安付科技服务有限公司 | Upgrading method and device of block chain system, computer equipment and storage medium |
CN112114852B (en) * | 2020-09-18 | 2024-07-19 | 山大地纬软件股份有限公司 | Blockchain node upgrade system and method for avoiding blockchain bifurcation |
CN112631641A (en) * | 2020-12-28 | 2021-04-09 | 杭州趣链科技有限公司 | Block chain service upgrading method and device, terminal equipment and storage medium |
-
2021
- 2021-12-01 CN CN202111454253.2A patent/CN114189441B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112235137A (en) * | 2020-10-12 | 2021-01-15 | 杭州溪塔科技有限公司 | Method and device for upgrading block link point program and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN114189441A (en) | 2022-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9787779B2 (en) | Analyzing deployment pipelines used to update production computing services using a live pipeline template process | |
US9436827B2 (en) | Attesting a component of a system during a boot process | |
US10754955B2 (en) | Authenticating a boot path update | |
CN102099811B (en) | A method and system for improvements in or relating to off-line virtual environments | |
US20170177324A1 (en) | Maintaining deployment pipelines for a production computing service using live pipeline templates | |
CN109670319B (en) | Server flash safety management method and system thereof | |
CN106415480B (en) | High-speed application for installation on a mobile device for enabling remote configuration of the mobile device | |
US10042744B2 (en) | Adopting an existing automation script to a new framework | |
US9268662B2 (en) | Method and system for a high availability framework | |
WO2016206514A1 (en) | Startup processing method and device | |
WO2018095107A1 (en) | Bios program abnormal processing method and apparatus | |
TW202030602A (en) | The method and system of bios recovery and update | |
CN108292342B (en) | Notification of intrusions into firmware | |
CN112099825A (en) | Method, device and equipment for upgrading component and storage medium | |
US20190187977A1 (en) | Dual boot operating system installation using multiple redundant drives | |
US20140297827A1 (en) | Computer-readable recording medium, verification method, and verification device | |
WO2017112801A1 (en) | Live pipeline templates-template creation and extensibility | |
CN115061871A (en) | Computer performance test method, device and medium | |
CN107077342B (en) | Firmware module operation authority | |
CN106909382B (en) | Method and device for outputting different types of system starting information | |
CN114189441B (en) | Method for upgrading nodes in blockchain and related products | |
US10268466B2 (en) | Software installer with built-in hypervisor | |
CN117499412A (en) | Cluster optimization processing method based on high-availability link and related equipment thereof | |
CN106708541A (en) | Version upgrading processing method and apparatus | |
CN114153503A (en) | BIOS control method, device and medium |
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 | ||
GR01 | Patent grant |