CN115686368A - Method, system, apparatus and medium for storage capacity expansion of nodes of block chain network - Google Patents

Method, system, apparatus and medium for storage capacity expansion of nodes of block chain network Download PDF

Info

Publication number
CN115686368A
CN115686368A CN202211336923.5A CN202211336923A CN115686368A CN 115686368 A CN115686368 A CN 115686368A CN 202211336923 A CN202211336923 A CN 202211336923A CN 115686368 A CN115686368 A CN 115686368A
Authority
CN
China
Prior art keywords
node
expanded
nodes
expansion
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211336923.5A
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.)
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Ant Blockchain Technology Shanghai 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 Ant Blockchain Technology Shanghai Co Ltd filed Critical Ant Blockchain Technology Shanghai Co Ltd
Priority to CN202211336923.5A priority Critical patent/CN115686368A/en
Publication of CN115686368A publication Critical patent/CN115686368A/en
Pending legal-status Critical Current

Links

Images

Abstract

Disclosed is a method for storage capacity expansion of a node of a blockchain network, comprising: automatically selecting a node set to be expanded based on a fault-tolerant algorithm; automatically checking the state of the node to be expanded to determine whether the state of the node to be expanded meets the storage expansion condition; executing automatic storage capacity expansion; and performing automatic check on the state of the nodes after storage and capacity expansion. The present application also relates to systems, apparatuses, and media for storage expansion of nodes of a blockchain network.

Description

Method, system, apparatus and medium for storage capacity expansion of nodes of block chain network
Technical Field
The present application relates to blockchains, and more particularly, to methods, systems, apparatuses, and media for storage capacity expansion of nodes of a blockchain network.
Background
Block chain techniques have been applied on a large scale. A blockchain network typically includes a large number of nodes. In order to enable a user to create, maintain and operate a Blockchain network more easily, a platform Service such as a Blockchain as a Service (BaaS) has been developed.
In the BaaS service, when a blockchain network is created, from the viewpoint of resource cost and traffic scale, a storage capacity allocated to a node in a blockchain is generally small. With the development of the blockchain network, it may be necessary to perform memory expansion on the memory capacity of the nodes in the blockchain network.
In the existing solution, in order to perform storage and capacity expansion on a blockchain network, generally, a service of the entire blockchain network needs to be suspended first, then, a complicated step is used to perform manual storage and capacity expansion on each node, and the service of the entire blockchain network is resumed after the capacity expansion is completed. This approach not only requires sacrificing the on-line time of the entire blockchain network, but also requires a lot of experts with expertise to operate, and is prone to problems in operation.
Therefore, there is a need for a storage capacity expansion scheme for blockchain network nodes that avoids blockchain service suspension, is automated, efficient, and reliable.
Disclosure of Invention
In order to overcome the defects of the prior art, one or more embodiments of the present disclosure avoid suspension of the blockchain service and improve efficiency and reliability of storage expansion by means of automatically selecting a node to be expanded, automatically performing storage expansion, and automatically performing pre-check and post-check.
One or more embodiments of the present specification achieve the above objects by the following technical solutions.
In one aspect, a method for storage expansion of a node of a blockchain network is provided, including: automatically selecting a node set to be expanded based on a fault-tolerant algorithm of the block chain network; automatically checking the state of each node to be expanded in the selected node set to be expanded to determine whether the state of the node to be expanded meets the storage expansion condition; executing automatic storage capacity expansion on the nodes to be subjected to capacity expansion which meet the storage capacity expansion conditions; and after executing automatic storage capacity expansion, automatically checking the state of the node after storage capacity expansion to determine whether the node works normally.
Preferably, the automatically selecting a set of nodes to be expanded based on the fault-tolerant algorithm of the blockchain network includes: automatically determining an upper limit of the number of allowable error nodes based on the fault-tolerant algorithm; and selecting the node set to be expanded from the block chain network, wherein the number of the nodes to be expanded is not more than the upper limit of the number of the error nodes.
Preferably, automatically selecting a set of nodes to be expanded based on the fault-tolerant algorithm of the blockchain network further includes: and determining the number of known error nodes in the block chain network, wherein the number of the nodes to be expanded is not more than the difference between the upper limit of the number of the error nodes and the number of the known error nodes.
Preferably, the number of the nodes to be expanded is not greater than a specified ratio of a difference between the upper limit of the number of the error nodes and the number of the known error nodes.
Preferably, automatically selecting a set of nodes to be expanded based on the fault-tolerant algorithm of the blockchain network includes: and selecting nodes to be expanded from the block chain network based on a predefined rule to form the node set to be expanded.
Preferably, the fault-tolerant algorithm is a byzantine fault-tolerant algorithm.
Preferably, the state of each node to be expanded in the selected node set to be expanded automatically includes one or more of the following: determining whether the difference value between the node block height of the node to be expanded and the whole network block height is smaller than a specified difference threshold value; determining whether the transaction success rate of the node to be expanded is greater than a specified transaction success rate threshold value; and determining whether the query success rate of the node to be expanded is greater than a specified query success rate threshold value.
Preferably, executing automatic storage capacity expansion on the to-be-expanded node meeting the storage capacity expansion condition includes: stopping the block chain service process of the node to be expanded; adjusting the storage capacity of the node to be expanded; and after the storage capacity of the node to be expanded is adjusted, recovering the block chain service process of the node to be expanded.
Preferably, adjusting the storage capacity of the node to be expanded includes: calling a resource service interface of a storage service to adjust the available storage capacity of the disk of the node to be expanded; unloading the disk of the node to be expanded; carrying out repartitioning on the disk; executing file system expansion on the disk; and mounting the disk.
Preferably, adjusting the storage capacity of the node to be expanded further includes: executing data backup on a node to be expanded before executing automatic storage expansion on the node to be expanded; and/or confirm file system consistency for the disk.
Preferably, the method further comprises: and after executing storage capacity expansion on the node set to be subjected to capacity expansion, automatically selecting nodes which are not subjected to capacity expansion based on the fault-tolerant algorithm to execute storage capacity expansion.
Preferably, the method further comprises: after the storage capacity expansion of the blockchain network is completed, checking the whole network state of the blockchain network, wherein the checking comprises checking the whole network state of the blockchain network, and the checking comprises determining whether the average block height growth rate of the nodes of the blockchain network is greater than an average growth rate threshold value and/or determining whether the transaction success rate of the blockchain network is greater than a blockchain transaction success rate threshold value.
Preferably, if the check finds an error, an error notification is automatically sent to the user.
Preferably, the method further comprises: and after the storage and the capacity expansion of the block chain network are finished, updating the block chain information. Preferably, performing the update to the blockchain information comprises updating one or more of: VPC deployment, switch ID, node computing resources, node storage resources, and node network resources.
In another aspect, a system for storage expansion of a node of a blockchain network is provided, including: the node selection module is used for automatically selecting a node set to be expanded based on the fault-tolerant algorithm of the block chain network; the checking module is used for automatically checking the state of each node to be expanded in the selected node set to be expanded so as to determine whether the state of the node to be expanded meets the storage expansion condition; the storage capacity expansion module is used for executing automatic storage capacity expansion on the nodes to be subjected to capacity expansion which accord with the storage capacity expansion condition; and the checking module is used for automatically checking the state of the node after the storage and the expansion after the automatic storage and the expansion are performed so as to determine whether the node works normally or not.
In yet another aspect, an apparatus for automatic storage capacity expansion of a node of a blockchain network is provided, comprising: a memory; and a processor configured to perform the above method.
In yet another aspect, a computer-readable storage medium storing instructions that, when executed by a computer, cause the computer to perform the above-described method is provided.
Compared with the prior art, one or more embodiments of the present specification can achieve one or more of the following technical effects:
the normal operation of the block chain network is not required to be stopped when the block chain storage capacity expansion is executed;
the capacity expansion efficiency is improved;
the labor cost is reduced; and/or
The error probability is reduced, and the reliability is improved.
Drawings
The foregoing summary, as well as the following detailed description of the embodiments, is better understood when read in conjunction with the appended drawings. It is to be noted that the appended drawings are intended as examples of the claimed invention. In the drawings, like reference characters designate the same or similar elements.
Fig. 1 illustrates a schematic flow chart of an example method for storage capacity expansion of a node of a blockchain network in accordance with an embodiment of the present description.
Fig. 2 is a schematic flow chart diagram illustrating a process for automatically selecting a set of nodes to be expanded according to an embodiment of the present specification.
FIG. 3 is a schematic flow chart diagram illustrating another process for automatically selecting a set of nodes to be expanded in accordance with an embodiment of the present description.
Fig. 4 is a schematic diagram illustrating a process for performing automatic storage and expansion on a node to be expanded according to an embodiment of the present specification.
Fig. 5 is a schematic diagram illustrating a system for storage capacity expansion of a node of a blockchain network according to an embodiment of the present description.
FIG. 6 shows a schematic block diagram of an apparatus for implementing a system in accordance with one or more embodiments of the present description.
Detailed Description
The following detailed description is presented to enable any person skilled in the art to make or use the teachings of one or more embodiments of the present disclosure, and it is intended that all objects and advantages associated with one or more embodiments of the present disclosure be readily understood by those skilled in the art from the description, claims and drawings disclosed herein.
In a blockchain service, especially a BaaS service, with the increase of services, there is often a need to perform storage capacity expansion on the storage capacity of a node in a blockchain network. It should be appreciated that "memory expansion" herein is different from what is commonly referred to as "blockchain expansion" or "expansion". The block chain expansion generally refers to operations of adjusting the block size of the block chain, adding a transaction network layer, and the like. In this context, storage capacity expansion refers to adjusting the storage capacity of a node in a blockchain network to expand the storage space available to the node.
In an existing block chain node storage capacity expansion scheme, the following method is generally adopted: firstly, stopping the operation of the whole block chain network; then, the experts manually store and expand the nodes (possibly all the nodes or part of the nodes) in the blockchain network one by one; and after the storage and the expansion of the nodes are finished, restarting the whole block chain network. This solution may have the following problems:
first, this conventional approach results in an extended service downtime. The above scheme requires that the operation of the blockchain network be stopped first, resulting in the blockchain service not working in the flash device. If the operation of the blockchain network is not stopped and the storage and expansion of the nodes are directly performed, the stopping operation of the nodes in the blockchain network during the storage and expansion may cause inconsistency of data of the nodes, and even the whole blockchain network cannot operate.
Second, this conventional solution requires a lot of human resources and expert knowledge, wastes a lot of time, and is inefficient.
Third, this conventional scheme is error prone and less reliable.
Referring to fig. 1, a schematic flow chart diagram of an example method 100 for storage capacity expansion of a node of a blockchain network is shown in accordance with an embodiment of the present description.
As shown in fig. 1, the method 100 may include: at operation 102, a set of nodes to be expanded may be automatically selected based on a fault tolerance algorithm of the blockchain network. Preferably, the number and characteristics of the selected nodes to be expanded may be based on preset criteria, as described in detail below. The selected multiple nodes to be expanded can form a node set to be expanded.
Referring to fig. 2, a schematic flow chart diagram of a process 200 for automatically selecting a set of nodes to be expanded is shown, according to an embodiment of the present description.
As shown in fig. 2, method 200 may include: at operation 202, an upper limit on the number of error-tolerant nodes may be automatically determined based on the fault tolerance algorithm.
For blockchain networks, it is generally required that a certain number of node networks still operate normally in the case of being unavailable, down, data missing or malicious behavior. The above nodes are collectively referred to herein as faulty nodes. A fault tolerance algorithm can be used to determine an upper bound on the number of error-tolerant nodes (i.e., the maximum number of error-tolerant nodes) in the blockchain network. The Fault-tolerant algorithm may be, for example, byzantine Fault-tolerant algorithm (BFT). One of the most common byzantine fault-tolerant algorithms is known as the practical byzantine fault-tolerant algorithm (pBFT). For example, for a practical Byzantine fault tolerance algorithm, the number of error-tolerant nodes is capped at 1/3 of the number of all nodes in the blockchain network.
Other variations of the Byzantine Fault-tolerant algorithm may also be employed, such as Giskard BFT algorithm, reputation-Based BFT algorithm (replay-Based Byzantine factory-Tolerance), lodestone algorithm, optimized BFT algorithm, and so forth.
Other fault tolerance algorithms may also be employed, such as the Paxos algorithm, the Raft algorithm, and any other suitable algorithm as will occur to those of skill in the art, and so forth.
Specifically, the total number of nodes of the entire blockchain network may be automatically determined first, and then the upper limit of the number of error-tolerant nodes may be determined based on a fault-tolerant algorithm. For example, for a blockchain network employing the applicable byzantine fault tolerance algorithm, the total number of nodes N of the entire blockchain network may be automatically determined first, and then the upper limit N x 1/3 of the number of nodes that are allowed to fail may be determined.
The method 200 may further include: at operation 204, the set of nodes to be expanded may be selected from the blockchain network, wherein the number of nodes to be expanded is not greater than the upper limit of the number of nodes that are allowed to have errors.
It can be appreciated that by making the number of the selected nodes to be expanded not greater than the upper limit of the number of error-tolerant nodes of the fault-tolerant algorithm, the probability that the blockchain network cannot work normally due to storage expansion of the nodes (and thus offline) can be reduced.
As described above, in the case of employing the practical byzantine fault-tolerant algorithm, the upper limit of the number of error-tolerant nodes is 1/3 of the total number of nodes of the blockchain network. In the case of other fault tolerance algorithms, the upper limit on the number of error-tolerant nodes may be different. By limiting the number of the nodes to be expanded to be not more than the upper limit of the number of error nodes allowed by the fault-tolerant algorithm, the invention allows the storage and expansion of the nodes to be expanded to be executed under the condition of not stopping the operation of the whole block chain network, and simultaneously allows the block chain network to normally work.
It should be appreciated that in actual practice, determining the number of nodes to be expanded manually may be difficult or even impossible to accomplish for a blockchain network that includes a large number of nodes that vary in real time. In the invention, by the above way, the scheme of the embodiment of the specification can automatically determine the maximum number of the allowed error nodes in real time.
Referring to fig. 3, a schematic flow chart diagram of another process 300 for automatically selecting a set of nodes to be expanded is shown, according to an embodiment of the present description.
As shown in fig. 3, process 300 may include: at operation 302, an upper limit on the number of allowable faulted nodes may be automatically determined based on the fault tolerance algorithm.
The specific details of operation 302 can refer to the description of operation 202 above, and are not repeated here.
The process 300 may also include: at operation 304, the number of known faulty nodes in the blockchain network may be determined.
As described above, a faulty node may include a node that fails to function properly due to network outages, data loss, etc., and such a node may be referred to herein as a faulty node. The faulty node may also include a malicious node that has malicious behavior.
Specifically, it may be determined whether a node is a failed node, for example, by checking each node in the blockchain network for the presence of a response. It may also be determined whether a node is a failed node by requesting the node to report its data integrity.
Further, in a preferred example, it may also be determined whether a node is a potentially malicious node in one or more ways. For example, if a node is determined to be doing malicious behavior multiple times through historical data, the node may be labeled as a potentially malicious node. As another example, detection of potentially malicious nodes may be achieved through a scoring system. Detection of potentially malicious nodes may be achieved in any other way that may be envisaged by a person skilled in the art, see: "Block chain-Based Wireless Sensor Networks for Wireless Node Detection: A Survey (Block chain-Based Wireless Sensor network for Wireless Node Detection)" (see https:// ieeexpolore. Ie. Org/document/9535517) volume 9 of IEEE Access, journal; "Block chain Trust Model for Malicious Node Detection in Wireless Sensor Networks" of volume 9 of IEEE Access journal (see https:// ieeexpore. IEEE. Org/document/8668748); artificial intelligence, big data and Algorithm 2021 International meeting paper "Block chain-based node data detection scheme for the Internet of Things system" (see https:// www.computer. Org/csdl/proceedings-arm/ca ibda/2021/249000a206/1xgBqRu8sY 8); computer science journal paper "Malcious Node Detection in Federated Learning via Malicious Node Detection in ranked Federation Learning" (see https:// axiv. Org/abs/2110.11736), and the like.
Potentially malicious nodes may be counted as known faulty nodes as discussed herein.
The process 300 may include: at operation 306, the set of nodes to be expanded may be selected from the blockchain network based on the upper limit of the number of nodes that are allowed to fail and the number of nodes that are known to fail. Preferably, the number of nodes to be expanded is not greater than the difference between the upper limit of the number of allowed faulty nodes and the number of known faulty nodes, that is, the difference between the upper limit of the number of allowed faulty nodes and the number of known faulty nodes.
By subtracting the number of the known error nodes from the upper limit of the number of the allowable error nodes, the embodiment of the specification can execute storage capacity expansion of the nodes to be expanded under the condition that normal operation of the block chain network is not influenced as much as possible even if the nodes have errors.
More preferably, the number of nodes to be expanded is not greater than a specified ratio of the difference between the upper limit of the number of allowable error nodes and the number of known error nodes. That is, the number of the nodes to be expanded is not greater than the difference between the number of the error-tolerant nodes and the number of the known error nodes multiplied by the specified ratio. The specified ratio is a number between 0 and 1. For example, the specified ratio may be 1/2. Alternatively, the specified ratio may be 1/3. Alternatively, the specified ratio may be 1/4. It can be appreciated that the smaller the ratio, the less probability that the blockchain network will not work properly during capacity expansion, but the less efficient the storage capacity expansion. Therefore, the specified ratio can be selected according to the specific situation.
In the preferred embodiment of the present specification, not only the number of nodes to be expanded may be determined, but also which nodes are specifically selected as nodes to be expanded may be determined.
In an example, a node to be expanded may be randomly selected from all nodes of the blockchain network. In the case of a large blockchain network, the random selection of nodes does not require a large amount of processing resources and enables a substantially uniform distribution of the selected nodes.
In another example, the node to be expanded may be randomly selected from all non-faulty nodes of the blockchain network. For example, the nodes to be expanded may be randomly selected from all the remaining nodes excluding the faulty node. By eliminating the error nodes, the storage capacity expansion can be executed by selecting as many non-error nodes as possible each time, so that the storage capacity expansion efficiency is improved.
In a more preferred example, instead of randomly selecting a node to be expanded, the node to be expanded may be selected from a blockchain network based on a predefined rule.
One example of a predefined rule is: the same number of nodes may be selected in various areas of the blockchain network. In some cases, the blockchain network may be divided into multiple regions. For example, a blockchain network may be divided into multiple regions based on geographic location. Alternatively, a blockchain network may be divided into multiple regions based on its network topology. By selecting the same or nearly the same number of nodes in each area, the number of nodes which are not offline in each area can be ensured to be approximately the same, so that the probability of normal operation of the block chain network is improved.
Another example of a predefined rule is: the nodes may be selected proportionally to the number of nodes in each region of the blockchain network. For example, assuming that the number of nodes in area a in the blockchain network is 3 times the number of nodes in area B in the blockchain network, the number of selected nodes in area a may be equal or nearly equal to 3 times the number of selected nodes in area B. By the method, the proportion of nodes which are not offline in each area is approximately the same, and the probability of normal operation of the block chain network can be improved.
Another example of a predefined rule is: a node to be expanded may be selected based at least in part on the type of node. The node type may be, for example, a full node, a consensus node, a routing node, other serving nodes, and the like. For example, the nodes to be expanded may be selected in proportion to the number of nodes of each type.
Another example of a predefined rule is: a node to be expanded may be selected based at least in part on a remaining capacity size of the node. For example, a node with a smaller remaining capacity may be preferentially selected to perform storage capacity expansion.
Any combination of the above schemes may also be employed.
Other predefined rules may be used as contemplated by those skilled in the art.
The method 100 may also include: at operation 104, after the nodes to be expanded are selected, before performing actual storage expansion on each node to be expanded, the state of the node to be expanded may be checked first to determine whether the node to be expanded meets the storage expansion condition. This step may be referred to as a pre-check step. Conceivably, if the state of a node is an abnormal state, the node is not suitable for storage capacity expansion; if a node is currently executing change operation, the node is also not suitable for storage capacity expansion; and so on.
Preferably, checking the state of the node to be expanded may include determining whether a difference between a node block height of the node and a full-net block height of the node is less than a specified difference threshold. It will be appreciated that if the difference between the node block height and the full block height is large, it is generally said that the node does not timely synchronize with other nodes in the blockchain network. Therefore, if the difference is greater than or equal to the specified difference threshold, it may be determined that the node to be expanded is not suitable for performing storage expansion.
Preferably, checking the state of the node to be expanded may include determining whether a transaction success rate of the node is greater than a specified transaction success rate threshold. It will be appreciated that if the transaction success rate is less than or equal to the threshold, the node may not be operating properly. Therefore, if the transaction success rate is greater than the specified transaction success rate threshold, it can be determined that the node to be expanded is not suitable for storage expansion.
Preferably, checking the state of the node to be expanded may include determining whether a query success rate of the node is greater than a specified query success rate threshold. It is understood that if the query success rate is less than or equal to the threshold, the node may not be operating properly. Therefore, if the query success rate is greater than the specified query success rate threshold, it may be determined that the node to be expanded is not suitable for storage expansion.
Checking the state of the node to be expanded may also include checking other conditions, such as whether the block height growth rate of the node is greater than a threshold; whether node traffic is normal, etc.
Preferably, checking the state of the node to be expanded may include a combination of any two or more of the above. More preferably, checking the state of the node to be expanded may include a combination of all of the above.
If the node to be expanded is determined to be not suitable for storage and expansion, the node to be expanded can be excluded from the selected node set to be expanded. In one example, after the node to be expanded is eliminated, the node may be reselected as the node to be expanded to replace the eliminated node to be expanded. In another example, after excluding the node to be expanded, no new node is selected to replace the excluded node to be expanded.
The method 100 may also include: at operation 106, automatic storage capacity expansion may be performed on the nodes to be capacity expanded that meet the storage capacity expansion condition.
In an embodiment of the present description, the execution of the storage volume expansion operation is performed automatically by the computing device. Through the storage capacity expansion operation of the automatic execution nodes, especially, the storage capacity expansion can be simultaneously executed on a large number of nodes, so that the labor can be saved, the efficiency can be improved, and the error probability can be reduced.
Further, it may also be appreciated that while some of the above operations may be performed manually by a user, there may be multiple operations that may be difficult or impossible for the user to perform. For example, it is difficult for a user to know the state, the located area, the node type, and the like of each node in a huge blockchain network in real time, calculate relevant parameters (such as a transaction success rate, an inquiry success rate, a block height difference value, and the like) of each node in real time, and perform identification of an error node in real time. From practical effects, in the existing scheme, it is originally difficult or even impossible to perform storage capacity expansion of a large number of nodes without stopping the operation of the blockchain network, and this can be achieved by the embodiments of the present specification, thereby solving the technical problem that is not solved in the prior art.
Referring to fig. 4, a schematic diagram of a process 400 for performing automatic storage capacity expansion on a node to be capacity expanded according to an embodiment of the present specification is shown.
As shown in fig. 4, process 400 may include: at operation 402, the blockchain service process of the node to be expanded may be stopped. Preferably, the third-party process of the node to be expanded, which is associated with the blockchain, can also be stopped. Examples of third party processes may include, but are not limited to: the node manages and controls agent processes, host security scanning processes, log collection processes, and the like.
Preferably, the stopping of the blockchain service process of the node to be expanded may include, for example, performing a preparation operation before the process is stopped, unlike the forced stopping of the blockchain service process when the shutdown is forced. The preparation operation prior to the process stopping may include, for example, performing a backup of data associated with the process (e.g., the blockchain service process and/or an associated third party process). Preferably, the data backup can be performed on the whole node to be expanded, and not only on the service process and/or the third-party process related to the blockchain.
The prepare operation before the process is stopped may also include performing a save of the state of the process. For example, any parameters related to the current state of the node may be saved.
The preparatory operations before the process stops may also include any other operations conceivable in connection with the blockchain, such as notifying other nodes of the blockchain network that the node is going to be down to perform capacity expansion of storage, and so on.
After stopping the process, process 400 may include: at operation 404, the storage capacity of the disk of the node to be expanded may be adjusted.
In a preferred example, adjusting the storage capacity of the node to be expanded may be performed in the following manner.
At operation 405, the available storage capacity of the disks of the node to be expanded may be adjusted. Preferably, a resource service interface of the storage service may be invoked to adjust the available storage capacity.
Preferably, the storage service is generally referred to as a cloud storage service, an object storage service, or other form of distributed storage service. Alternatively, the storage service refers to a storage service of a single computer.
Typically, the storage service provider will provide a resource service interface, especially for distributed storage services. The interface allows the user to adjust parameters associated with the storage, such as available storage capacity, storage type, and the like. Therefore, the resource service interface provided by the storage service can be automatically called to adjust the available storage capacity of the disk of the node to be expanded. For example, assuming the original available storage capacity of a disk is 10GB, the available storage capacity can be adjusted to 20GB by calling the resource service interface, and so on. In the case of storage capacity expansion, the adjustment is usually to increase the storage capacity. However, the storage capacity can also be reduced, if necessary.
Generally, the adjustment of the available storage capacity of the disk by using the resource service interface is only to adjust the storage capacity authorized to the node, that is, only to change the storage capacity quota of the disk usable by the node, and at this time, the newly added storage capacity cannot be directly used by the node. Therefore, in a preferred example, it is also necessary to enable the newly added storage capacity to be used by the node through a series of operations such as unloading, repartitioning, expanding the file system, mounting a disk, and the like, as described below.
Preferably, at operation 407, the disk of the node to be volume may be unloaded. In order to adjust the actual storage capacity of the disk, the disk of the node to be expanded should be unloaded first. For example, an associated interface of the node (e.g., an associated interface of a daemon of the node) may be invoked or a corresponding disk offload command (e.g., an umount command, etc.) may be used to offload a disk.
Preferably, the disk may be repartitioned in operation 409. In one example, the newly added available storage capacity may be merged with the original storage capacity into a new partition. In another example, the newly added available storage capacity may be divided into new partitions. In other examples, other ways may be used to repartition a disk. The relevant interface of the node (e.g., the relevant interface of the node's daemon) may be invoked or the disk may be repartitioned using a corresponding repartitioning command (e.g., fdisk command, etc.).
Preferably, at operation 411, the file system may be extended for the disk. For example, the relevant interface of the node (e.g., the relevant interface of the daemon of the node) may be invoked or the file system format of the disk may be set using a corresponding format command. For example, the type of the file system of the original disk may be first checked, and then a corresponding file system extension command, such as resize2fs, xfs _ growfs, btrfs filesystem resize, etc., may be selected according to the different file system types.
Preferably, the disk may be mounted in operation 413. The relevant interface of the node (e.g., the relevant interface of the daemon of the node) may be invoked or a corresponding mount command (e.g., mount command, etc.) may be used to mount the disk.
Preferably, during the storage capacity expansion process, before the file system is expanded, for example, consistency of the file system may also be confirmed. The node's associated interface (e.g., that of the node's daemon) may be invoked or a corresponding repartitioning command (e.g., fsck command, etc.) may be used to confirm file system consistency.
It is to be understood that the above describes only one example of adjusting the storage capacity of the node to be expanded. The storage capacity of the disks of the node to be expanded may be automatically adjusted in any other manner conceivable by those skilled in the art.
The process 400 may also include: at operation 414, after the storage capacity of the node to be expanded is adjusted, the service process of the node to be expanded may be automatically resumed. Preferably, the associated third party process is also resumed.
For example, the saved state of the process may be restored. Further, the backed up data may be restored, if necessary. In addition, other necessary operations required for the recovery process may also be performed. For example, a block-chain network may be re-registered.
In any of the above operation procedures, it is possible to automatically check whether an error has occurred in the operation. If an error occurs, the user may be notified of the specific information of the error and may pause the execution of the expansion if necessary. In the embodiments of the present specification, a user may refer to a user and/or manager of a blockchain network, etc. The user, upon receiving the notification, may intervene in the expansion process to perform manual processing.
By the method, automatic storage and expansion of each node to be expanded can be realized.
The method 100 may also include: at operation 108, after performing the automatic storage expansion, an automatic check may be performed on the status of the node after the storage expansion to determine whether the node is operating properly. Preferably, after each node to be expanded is stored and expanded, automatic check may be performed on the node to be expanded. For example, whether the storage capacity expansion is normally executed and the node returns to normal operation may be determined according to the status indicator of the node. For example, similar to the pre-check process, the difference between the node block height and the full-network block height of the storage-expanded node, the transaction success rate, the query success rate, the block height growth rate, and the node traffic may be checked to determine whether the node is operating properly. For a specific process, reference may be made to the above description for pre-check, which is not described herein again.
If an error is found in this automatic check (i.e., the discovery node is not working properly), an error notification may be automatically sent to the user. The error notification may include, for example, specific information related to the error in the automatic check.
If an error is detected in the automatic check, execution of the expansion process may also be suspended to await manual processing by the user.
By the method, storage expansion of the selected set of the nodes to be expanded can be executed.
Subsequently, other nodes may be iteratively selected to perform storage capacity expansion. That is to say, after the storage and expansion are performed on the set of nodes to be expanded, one or more nodes which are not expanded are automatically selected to perform the storage and expansion based on the fault-tolerant algorithm. The storage capacity expansion process may be iteratively performed until a completion condition is satisfied. This may be referred to as performing capacity expansion on the blockchain network.
The completion condition may be, for example, that storage expansion has been performed on all nodes of the blockchain network. The completion condition may be, for example, that storage expansion has been performed on all non-faulty nodes of the blockchain network. The completion condition may be that storage expansion has been performed on a certain proportion of all nodes of the blockchain network.
Preferably, after the memory expansion is completed for the blockchain network, a check is performed on the full network status of the blockchain network. In contrast to the preamble check, the check herein may be referred to as a "post check". The post-check can further confirm that there is no problem in the storage capacity expansion process and that the blockchain network is working normally.
For example, the post-check may include determining whether an average block high growth rate of a node of the blockchain network is greater than an average growth rate threshold. If the average block high growth rate is less than or equal to the average growth rate threshold, then the blockchain network is not operating properly.
As another example, the post-check may include determining whether a transaction success rate of the blockchain network is greater than a blockchain transaction success rate threshold. If the average block high growth rate is less than or equal to the average growth rate threshold, then the blockchain network is not operating properly.
The post-check may also include checking other parameters, such as whether traffic in the blockchain network is normal, whether the number of faulty nodes in the blockchain network is greater than a threshold, and so on.
Preferably, the post-inspection may comprise a combination of any two or more of the above. More preferably, the post-check may include a combination of all of the above.
If an error is found in this post-check, an error notification may be automatically sent to the user. The error notification may include, for example, specific information related to the error in the post-check.
If an error is found in the post-check, execution of the capacity expansion process may also be suspended to wait for manual processing by the user.
Preferably, after the storage capacity expansion of the blockchain network is completed, the update of the blockchain information may be performed. In particular, performing the update to the blockchain information may include updating one or more of: VPC deployment, switch ID, node computing resources, node storage resources, and node network resources.
VPC refers to a virtual private cloud. Updating the deployed private cloud means that the deployment of the block chain nodes on the VPC is adjusted to adapt to the change of the storage capacity of the disk of each node.
The switch ID is an identifier of a switch in the blockchain network used for data communication between nodes. Due to changes in storage capacity and corresponding changes in the deployment of VPCs, the switch ID can also typically be updated to reflect changes in the topology of the blockchain network.
Preferably, to accommodate changes in VPC deployment and changes in network topology, the allocation of respective resources of one or more nodes in the blockchain network is also updated. The resources of the node may include, but are not limited to: computing resources, storage resources, network resources, and the like. Examples of node computing resources may include, but are not limited to: an Elastic Cloud Server (ECS) instance, a cluster ID, a container group (POD) ID, and the like. Examples of node storage resources may include, but are not limited to: cloud disk ID, network Attached Storage (NAS) ID, etc. Examples of node network resources may include, but are not limited to: server Load Balancing (SLB)/resilient IP (EIP, which may include public network IP and/or intranet IP), and the like.
Referring to fig. 5, a schematic diagram of a system 500 for storage capacity expansion of nodes of a blockchain network according to an embodiment of the present description is shown. The system 500 may correspond to the methods 100-400 described above with reference to fig. 1-4, the details of which may be referenced above for the description of the operation of the methods.
As shown in fig. 5, the system 500 may include: a node selection module 502, which may be used to automatically select a set of nodes to be expanded based on a fault-tolerant algorithm of the blockchain network. The details of the operation of the node selection module 502 may be found in the description above for operation 102.
The system 500 may further include: the checking module 504 may be configured to automatically check a state of each node to be expanded in the selected node set to be expanded, so as to determine whether the state of the node to be expanded meets the storage expansion condition. The details of the operation of the verification module 504 may be found above in relation to the description of operation 104.
The system 500 may further include: and a storage capacity expansion module 506, configured to perform automatic storage capacity expansion on the to-be-expanded nodes meeting the storage capacity expansion condition. The details of the operation of the storage capacity expansion module 506 may be found in the description above with respect to operation 106.
The system 500 may further include: and a checking module 508, configured to perform automatic checking on the state of the node after performing the storage expansion after performing the automatic storage expansion. The details of the operation of the inspection module 508 may be found in the description above for operation 108.
It should be appreciated that system 500 may also include more modules for performing the various operations of the methods described above with reference to fig. 1-4.
Fig. 6 shows a schematic block diagram of an apparatus 600 for implementing a system (such as system 500 above) in accordance with one or more embodiments of the present description. The apparatus may include a processor 610 configured to perform any of the methods described above, such as the methods shown in fig. 1-4, and so on, and a memory 615. The memory may store, for example, articles acquired, information associated with a product or service, data that may be generated during processing, and algorithms necessary, etc.
The apparatus 600 may include a network connection element 625, which may include, for example, a network connection device that connects to other devices through a wired connection or a wireless connection. The wireless connection may be, for example, a WiFi connection, a Bluetooth connection, a 3G/4G/5G network connection, or the like. For example, the article acquisition module may connect to an information source through a network connection element to acquire the article. Inputs by a user from other devices or data transfer to other devices for display may also be received via the network connection element.
The device may also optionally include other peripheral elements 620 such as input devices (e.g., keyboard, mouse), output devices (e.g., display), etc. For example, in a method based on user input, a user may perform an input operation via an input device. Corresponding information may also be output to the user via the output device.
Each of these modules may communicate with each other directly or indirectly, e.g., via one or more buses, such as bus 605.
Also, the present application discloses a computer-readable storage medium comprising computer-executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method of the embodiments described herein.
Additionally, an apparatus is disclosed that includes a processor and a memory having stored thereon computer-executable instructions that, when executed by the processor, cause the processor to perform the method of the embodiments described herein.
Additionally, a system comprising means for implementing the methods of the embodiments described herein is also disclosed.
It is to be understood that methods according to one or more embodiments of the present description can be implemented in software, firmware, or a combination thereof.
It should be understood that the embodiments in the present specification are described in a progressive manner, and the same or similar parts in the embodiments are referred to each other, and each embodiment is described with emphasis on the differences from the other embodiments. In particular, the description of the apparatus and system embodiments is relatively simple in that they are substantially similar to the method embodiments, and reference may be made to some descriptions of the method embodiments for related aspects.
It should be understood that the above description describes particular embodiments of the present specification. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
It should be understood that an element described herein in the singular or shown in the figures only represents a limitation of the number of the element to one. Furthermore, modules or elements described or illustrated herein as separate may be combined into a single module or element, and modules or elements described or illustrated herein as single may be split into multiple modules or elements.
Throughout this specification, "nearly", "almost" and "approximately" mean that the deviation is not more than 10%.
It is also to be understood that the terms and expressions employed herein are used as terms of description and not of limitation, and that the embodiment or embodiments of the specification are not limited to those terms and expressions. The use of such terms and expressions is not intended to exclude any equivalents of the features shown and described (or portions thereof), and it is recognized that various modifications may be made within the scope of the claims. Other modifications, variations, and alternatives are also possible. Accordingly, the claims should be looked to in order to cover all such equivalents.
Also, it should be noted that while the present invention has been described with reference to specific exemplary embodiments, it should be understood by those skilled in the art that the above embodiments are merely illustrative of one or more embodiments of the present invention, and various changes and substitutions of equivalents may be made without departing from the spirit of the present invention, and therefore, it is intended that all changes and modifications to the above embodiments be included within the scope of the appended claims.

Claims (15)

1. A method for storage capacity expansion of a node of a blockchain network, comprising:
automatically selecting a node set to be expanded based on a fault-tolerant algorithm of the block chain network;
automatically checking the state of each node to be expanded in the selected node set to be expanded to determine whether the state of the node to be expanded meets the storage expansion condition;
executing automatic storage capacity expansion on the nodes to be subjected to capacity expansion which meet the storage capacity expansion conditions; and
and performing automatic check on the state of the node after storage and expansion to determine whether the node works normally.
2. The method of claim 1, wherein automatically selecting a set of nodes to be expanded based on a fault tolerant algorithm of the blockchain network comprises:
automatically determining an upper limit of the number of allowable error nodes based on the fault tolerance algorithm; and
and selecting the node set to be expanded from the block chain network, wherein the number of the nodes to be expanded is not more than the upper limit of the number of the error nodes.
3. The method of claim 2, wherein automatically selecting a set of nodes to be expanded based on a fault tolerant algorithm of the blockchain network further comprises:
and determining the number of known error nodes in the block chain network, wherein the number of the nodes to be expanded is not more than the difference between the upper limit of the number of the error nodes and the number of the known error nodes.
4. The method of claim 3, wherein the number of nodes to be expanded is not greater than a specified ratio of the difference between the upper limit of the number of faulty nodes and the number of known faulty nodes.
5. The method of claim 1, wherein automatically selecting a set of nodes to be expanded based on a fault tolerant algorithm of the blockchain network comprises:
and selecting nodes to be expanded from the block chain network based on a predefined rule to form the node set to be expanded.
6. The method of claim 1, wherein automatically checking the state of each node to be bulked in the selected set of nodes to be bulked comprises one or more of:
determining whether the difference value between the node block height of the node to be expanded and the whole network block height is smaller than a specified difference threshold value;
determining whether the transaction success rate of the node to be expanded is greater than a specified transaction success rate threshold value; and
and determining whether the query success rate of the node to be expanded is greater than a specified query success rate threshold value.
7. The method of claim 1, wherein performing automatic storage expansion on the nodes to be expanded that meet the storage expansion condition comprises:
stopping the block chain service process of the node to be expanded;
adjusting the storage capacity of the node to be expanded; and
and after the storage capacity of the node to be expanded is adjusted, recovering the block chain service process of the node to be expanded.
8. The method of claim 1, wherein adjusting the storage capacity of the node to be expanded comprises:
calling a resource service interface of a storage service to adjust the available storage capacity of the disk of the node to be expanded;
unloading the disk of the node to be expanded;
carrying out repartitioning on the disk;
executing file system expansion on the disk; and
the disk is mounted.
9. The method of claim 8, wherein adjusting the storage capacity of the node to be expanded further comprises:
executing data backup on a node to be expanded before executing automatic storage expansion on the node to be expanded; and/or
And confirming the file system consistency of the disk.
10. The method of claim 1, further comprising:
and after executing storage capacity expansion on the node set to be subjected to capacity expansion, automatically selecting nodes which are not subjected to capacity expansion based on the fault-tolerant algorithm to execute storage capacity expansion.
11. The method of claim 1, further comprising:
after the storage and capacity expansion of the blockchain network are completed, performing check on the whole network state of the blockchain network, wherein the check comprises determining whether the average block height growth rate of the nodes of the blockchain network is greater than an average growth rate threshold value and/or determining whether the transaction success rate of the blockchain network is greater than a blockchain transaction success rate threshold value; and
if the check finds an error, an error notification is automatically sent to the user.
12. The method of claim 1, further comprising:
after completing the capacity expansion of the blockchain network, performing an update of blockchain information of the blockchain network, wherein the update includes updating one or more of:
VPC deployment, switch ID, node computing resources, node storage resources, and node network resources.
13. A system for storage capacity expansion of a node of a blockchain network, comprising:
the node selection module is used for automatically selecting a node set to be expanded based on the fault-tolerant algorithm of the block chain network;
the checking module is used for automatically checking the state of each node to be expanded in the selected node set to be expanded so as to determine whether the state of the node to be expanded meets the storage expansion condition;
the storage capacity expansion module is used for executing automatic storage capacity expansion on the nodes to be subjected to capacity expansion which accord with the storage capacity expansion condition; and
and the checking module is used for performing automatic checking on the state of the node after storage and expansion after executing automatic storage and expansion.
14. An apparatus for automatic storage capacity expansion of a node of a blockchain network, comprising:
a memory; and
a processor configured to perform the method of any one of claims 1-12.
15. A computer-readable storage medium storing instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1-12.
CN202211336923.5A 2022-10-28 2022-10-28 Method, system, apparatus and medium for storage capacity expansion of nodes of block chain network Pending CN115686368A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211336923.5A CN115686368A (en) 2022-10-28 2022-10-28 Method, system, apparatus and medium for storage capacity expansion of nodes of block chain network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211336923.5A CN115686368A (en) 2022-10-28 2022-10-28 Method, system, apparatus and medium for storage capacity expansion of nodes of block chain network

Publications (1)

Publication Number Publication Date
CN115686368A true CN115686368A (en) 2023-02-03

Family

ID=85046017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211336923.5A Pending CN115686368A (en) 2022-10-28 2022-10-28 Method, system, apparatus and medium for storage capacity expansion of nodes of block chain network

Country Status (1)

Country Link
CN (1) CN115686368A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117424813A (en) * 2023-12-11 2024-01-19 北京云成金融信息服务有限公司 Node expansion method for block chain

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117424813A (en) * 2023-12-11 2024-01-19 北京云成金融信息服务有限公司 Node expansion method for block chain
CN117424813B (en) * 2023-12-11 2024-03-22 北京云成金融信息服务有限公司 Node expansion method for block chain

Similar Documents

Publication Publication Date Title
CN108633311B (en) Method and device for concurrent control based on call chain and control node
CN106776130B (en) Log recovery method, storage device and storage node
CN112463448B (en) Distributed cluster database synchronization method, device, equipment and storage medium
CN107508694B (en) Node management method and node equipment in cluster
CN111857998A (en) Configurable timing task scheduling method and system
JP4461262B2 (en) A method for manipulating multiple computer arrays in the event of a computer failure
CN105354102B (en) A kind of method and apparatus of file system maintenance and reparation
WO2017071384A1 (en) Message processing method and apparatus
CN115686368A (en) Method, system, apparatus and medium for storage capacity expansion of nodes of block chain network
CN113132176B (en) Method for controlling edge node, node and edge computing system
CN114490565A (en) Database fault processing method and device
CN110012111B (en) Data service cluster system and data processing method
US11695856B2 (en) Scheduling solution configuration method and apparatus, computer readable storage medium thereof, and computer device
CN107943615B (en) Data processing method and system based on distributed cluster
CN111198921A (en) Database switching method and device, computer equipment and storage medium
CN114416665A (en) Method, device and medium for detecting and repairing data consistency
CN105323271B (en) Cloud computing system and processing method and device thereof
CN110737543B (en) Method, device and storage medium for recovering distributed file system data
CN111614701B (en) Distributed cluster and container state switching method and device
CN113596195B (en) Public IP address management method, device, main node and storage medium
CN111767166A (en) Data backup method and device
CN114328033A (en) Method and device for keeping service configuration consistency of high-availability equipment group
CN111722932B (en) Control method and device for application system, computer system and storage medium
CN114816656A (en) Container group migration method, electronic device and storage medium
CN108874918B (en) Data processing device, database all-in-one machine and data processing method thereof

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