PoW improved algorithm combining computing power utilization and space quantity proving
By combining the improved algorithm of computing power utilization and space proof, the low consensus efficiency and resource waste of PoW algorithms are solved, as well as the centralized risks of PoSpace algorithm, and the efficient and secure operation of the blockchain system is achieved.
Patent Information
- Application Number
- CN202410781924.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-12-13
AI Technical Summary
PoW algorithms have problems such as low consensus efficiency, waste of computing resources, and high energy consumption. PoSpace algorithms may have main chain forks and centralization risks.
Combining computing power utilization and spatial proof PoW improved algorithm, the Merkel root is generated through the Merkel tree algorithm, the difficulty value is adjusted, and the problem is solved by hashing operations in the node competition stage, and the node space-time weight is used after the calculation time exceeds the upper limit. Allocation of block rights to reduce centralized risks.
It improves the consensus efficiency of the blockchain system, avoids waste of computing resources and main chain forks, and ensures the efficient and safe operation of the system.
Smart Images

Figure CN119135327A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of PoW algorithms, and specifically is an improved PoW algorithm that combines computing power utilization with space quantity proof. Background Art
[0002] Blockchain is divided into public chain, consortium chain and private chain according to the degree of decentralization. The Proof of Work (PoW) consensus algorithm is the most mainstream consensus algorithm in the current public chain. Its core idea is to ensure data consistency and consensus security by introducing computing power competition among distributed nodes. It has the advantages of decentralization and high security, and can enable participants to reach consensus in a completely trustless environment. When generating blocks, the system allows all nodes to calculate a random number fairly. The node that first finds the random number is the producer of this block and obtains the corresponding block reward. However, since the algorithm selects nodes and generates blocks by solving mathematical problems, it leads to serious waste of resources and long transaction time. Therefore, there are problems such as low consensus efficiency, waste of computing resources, and high energy consumption.
[0003] Due to the above problems with the PoW consensus algorithm, the Proof of Space (PoSpace) consensus algorithm was proposed. It uses the hard disk space paid by the user as proof of payment, and occupies hard disk space by downloading files. The larger the space occupied, the more the user pays. Then it generates a hash value through verification to prove its own credibility. However, after the node pays the hard disk space price once, it does not need to pay for subsequent participation in the competition. The node only needs to read the data at the corresponding position of each random challenge to generate a proof, which makes it easy for the node to extend multiple forked chains, and the main chain may fork. In addition, using hard disk space as a single proof has the risk of centralization. Individual users can achieve monopoly by purchasing a large amount of hard disk space, so this needs to be improved. Summary of the invention
[0004] The purpose of the present invention is to provide an improved PoW algorithm that combines computing power utilization and space proof to solve the problems raised in the above background technology.
[0005] In order to achieve the above purpose, the present invention provides the following technical solution: an improved PoW algorithm combining computing power utilization and space proof, the specific steps are as follows:
[0006] Step 1: Preparation stage:
[0007] After the PSUP-PoW algorithm starts, each node obtains the client request data, packages the data according to the block structure and generates a block body, and uses the Merkle tree algorithm to generate a Merkle root.
[0008] Step 2: Difficulty value adjustment stage:
[0009] After completing the preparations, the PSUP-PoW algorithm will compare the block time of the previous round with the upper limit range of the calculation time. If the value is within the range, it proves that the current difficulty value is set reasonably and there is no need to adjust the difficulty, and the algorithm enters the next stage; if the value is less than, it proves that the current difficulty value is too low and the difficulty value needs to be increased to ensure system security; if the value is greater than, it proves that the current difficulty value is too high and the difficulty value needs to be lowered to improve consensus efficiency and avoid the risks of centralization and block forks;
[0010] Step 3: Node competition phase:
[0011] After completing the difficulty adjustment, the node generates a block header and enters the node competition phase. Each node first inputs its assigned small question (Question) and block header (BlockData) into the first hash gate, and generates the first round of hash value (FHash) through the SHA256 hash operation function. The process of calling the SHA256 hash operation function this time is:
[0012] SHA256(Question,BlockData)→FHash
[0013] Next, the node will call the function to solve the answer to the small problem. This is the main way for each node to use its own computing power to compete for the right to produce blocks. When the node completes the problem solution, it will input the calculated answer (Answer) together with the first round of hash value into the second hash gate, and call the SHA256 hash operation function again to generate the final hash value (LHash). The first node to complete the above process is the node that successfully competes for the right to produce blocks. The process of calling the SHA256 hash operation function this time is:
[0014] SHA256(Answer,FHash)→LHash
[0015] The block header (BlockData) includes information such as the version number (Version), the hash value of the previous block (PreHash), the timestamp (TimeStamp), the block height (Height), the Merkle root hash value (Merkle-root), etc. If a node completes the solution to its own problem within the upper limit of the calculation time and generates the final hash value, the node obtains the right to generate the block, and generates the block with the hash value it calculates. The PSUP-PoW algorithm broadcasts the block, and other nodes in the system perform block consensus. After the consensus is completed, this round of requests ends, and the system adds the block to the blockchain main chain and continues the next round of block generation. If the calculation time reaches the upper limit of the calculation time set by the system, and no node has successfully solved its own problem to obtain the right to generate the block, then this stage ends and enters the node time-space weighted block generation stage;
[0016] Step 4: Node space-time weighted block generation stage:
[0017] When the node calculation time exceeds the upper limit of the calculation time and the block generation right competition has not yet been completed, each node uses the node time and space weight calculation formula to calculate its own node time and space weight. The size of the node time and space weight depends on the node's time and hard disk space. As the number of times the node participates in the competition for the block generation right and fails to compete successfully increases, the node's time weight will gradually increase. This makes the block generation right allocation of the blockchain system in the node time and space weight block generation stage not only depend on the hard disk space size of each node. Only nodes that can provide large-capacity hard disk space can obtain block generation rights, but all nodes have the opportunity to obtain block generation rights, which effectively reduces the risk of system centralization. After completing the time and space weight calculation of all nodes, the PSUP-PoW algorithm collects and sorts the time and space weights of each node, and enables the node with the highest time and space weight value to obtain the block generation right. The node generates the hash value it calculates, and other nodes that have not obtained the block generation right participate in the subsequent consensus process. After the consensus is completed, this round of requests ends, and the system adds the block to the blockchain main chain and continues the next round of block generation.
[0018] As a preferred technical solution of the present invention, the block structure described in step 1 includes a version number (Version), a hash value of the previous block (PreHash), a hash value of this block (Hash), a timestamp (TimeStamp), a difficulty value (DiffTarget), a block height (Height), a random number (Nonce), transaction information (TradeInfo), a Merkle root hash value (Merkle-root), a space amount (Space), a work question library (WQLirary), and a calculation time upper limit (LimitTime).
[0019] As a preferred technical solution of the present invention, the upper limit range value of the calculation time described in step 2 is determined by the time taken by each node to solve the small problem assigned to it, so the split small problems should meet the condition of consistent difficulty.
[0020] As a preferred technical solution of the present invention, the difficulty value adjustment stage described in step 2 needs to optimize the difficulty value of the current consensus process before each round of consensus begins, and adjust the proportion of the two schemes of node competition for block rights and using node time and space weights to allocate block rights in the consensus process according to the actual situation, so as to avoid the situation where the PSUP-PoW algorithm cannot complete the consensus within the time required by the system. The difficulty optimization model calculation formula is:
[0021]
[0022] As a preferred technical solution of the present invention, the computing power described in step three is mainly used to solve the problem by utilizing hash calculation, thereby solving the problem of computing power waste in the PoW consensus algorithm. It consists of a work function and two hash gates.
[0023] As a preferred technical solution of the present invention, the node spatiotemporal weight calculation formula described in step 4 is:
[0024] As a preferred technical solution of the present invention, W in the node spatiotemporal weight calculation formula is st represents the spatiotemporal weight of the node, P f The number of times the representative node failed to compete for the right to generate blocks, P t It represents the total number of times the node participates in the competition for the right to generate blocks. T represents the node time. The value of this variable is not equivalent to the upper limit of the calculation time set by the system, but the node time of each node in the competition stage. S represents the amount of hard disk space of the node. This variable is submitted for verification by each node when joining the blockchain system. After verification, each node does not need to verify its own hard disk space in the subsequent system consensus process to improve the system operation efficiency.
[0025] As a preferred technical solution of the present invention, the Merkle tree algorithm described in step one is a hash-based data structure, which is a tree structure, in which each leaf node is the hash value of a data block, and each non-leaf node is the hash of the hash value of its child node.
[0026] As a preferred technical solution of the present invention, the hash algorithm described in step three and step four refers to mapping a binary value of arbitrary length into a shorter binary value of fixed length, which is also called a hash value.
[0027] The beneficial effects of the present invention are as follows:
[0028] The present invention combines the consensus algorithm PoW based on proof of work with the consensus algorithm PoSpace based on proof of space, and adds a mechanism of computing power utilization. When the blockchain system processes a block request, it first solves the problem provided by the system through the method of computing power utilization, and the nodes compete for the right to generate blocks. If the competition for the right to generate blocks is not completed within the upper limit of the computing time set by the system, the node time and space weights proposed by the algorithm are used to allocate the right to generate blocks. Based on the above scheme, the PSUP-PoW algorithm not only solves the problems of low consensus efficiency and waste of computing power resources of the PoW algorithm, but also solves the main chain fork and centralization risks that may occur in the PoSpace algorithm, ensuring the efficient and safe operation of the blockchain system. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is a flowchart of the PSUP-PoW algorithm operation of the present invention;
[0030] Figure 2 The PSUP-PoW algorithm block structure of the present invention;
[0031] Figure 3 The computing power of the present invention utilizes a hash calculation process. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] like Figures 1 to 3 As shown, the embodiment of the present invention provides an improved PoW algorithm that combines computing power utilization and space quantity proof, and the specific steps are as follows:
[0034] Step 1: Preparation stage:
[0035] After the PSUP-PoW algorithm starts, each node obtains the client request data, packages the data according to the block structure and generates a block body, and uses the Merkle tree algorithm to generate a Merkle root.
[0036] Step 2: Difficulty value adjustment stage:
[0037] After completing the preparations, the PSUP-PoW algorithm will compare the block time of the previous round with the upper limit range of the calculation time. If the value is within the range, it proves that the current difficulty value is set reasonably and there is no need to adjust the difficulty, and the algorithm enters the next stage; if the value is less than, it proves that the current difficulty value is too low and the difficulty value needs to be increased to ensure system security; if the value is greater than, it proves that the current difficulty value is too high and the difficulty value needs to be lowered to improve consensus efficiency and avoid the risks of centralization and block forks;
[0038] Step 3: Node competition phase:
[0039] After completing the difficulty adjustment, the node generates a block header and enters the node competition phase. Each node first inputs its assigned small question (Question) and block header (BlockData) into the first hash gate, and generates the first round of hash value (FHash) through the SHA256 hash operation function. The process of calling the SHA256 hash operation function this time is:
[0040] SHA256(Question,BlockData)→FHash
[0041] Next, the node will call the function to solve the answer to the small problem. This is the main way for each node to use its own computing power to compete for the right to produce blocks. When the node completes the problem solution, it will input the calculated answer (Answer) together with the first round of hash value into the second hash gate, and call the SHA256 hash operation function again to generate the final hash value (LHash). The first node to complete the above process is the node that successfully competes for the right to produce blocks. The process of calling the SHA256 hash operation function this time is:
[0042] SHA256(Answer,FHash)→LHash
[0043] The block header (BlockData) includes information such as the version number (Version), the hash value of the previous block (PreHash), the timestamp (TimeStamp), the block height (Height), the Merkle root hash value (Merkle-root), etc. If a node completes the solution to its own problem within the upper limit of the calculation time and generates the final hash value, the node obtains the right to generate the block, and generates the block with the hash value it calculates. The PSUP-PoW algorithm broadcasts the block, and other nodes in the system perform block consensus. After the consensus is completed, this round of requests ends, and the system adds the block to the blockchain main chain and continues the next round of block generation. If the calculation time reaches the upper limit of the calculation time set by the system, and no node has successfully solved its own problem to obtain the right to generate the block, then this stage ends and enters the node time-space weighted block generation stage;
[0044] Step 4: Node space-time weighted block generation stage:
[0045] When the node calculation time exceeds the upper limit of the calculation time and the block generation right competition has not yet been completed, each node uses the node time and space weight calculation formula to calculate its own node time and space weight. The size of the node time and space weight depends on the node's time and hard disk space. As the number of times the node participates in the competition for the block generation right and fails to compete successfully increases, the node's time weight will gradually increase. This makes the block generation right allocation of the blockchain system in the node time and space weight block generation stage not only depend on the hard disk space size of each node. Only nodes that can provide large-capacity hard disk space can obtain block generation rights, but all nodes have the opportunity to obtain block generation rights, which effectively reduces the risk of system centralization. After completing the time and space weight calculation of all nodes, the PSUP-PoW algorithm collects and sorts the time and space weights of each node, and enables the node with the highest time and space weight value to obtain the block generation right. The node generates the hash value it calculates, and other nodes that have not obtained the block generation right participate in the subsequent consensus process. After the consensus is completed, this round of requests ends, and the system adds the block to the blockchain main chain and continues the next round of block generation.
[0046] Since the PoW algorithm has problems such as low consensus efficiency and waste of computing power resources, and the PoSpace algorithm may have risks such as main chain fork and centralization, these two consensus algorithms cannot be well applied to various application scenarios of public chains. Therefore, the PSUP-PoW consensus algorithm combines the above two consensus algorithms, and introduces the concepts of computing power utilization and node space on the basis of the PoW consensus algorithm, and sets an upper limit on the node's calculation time. The algorithm no longer relies on the PoW algorithm for a long time to complete the competition for the right to produce blocks. When the calculation time exceeds the limit, the node time-space weight calculated based on the node time and node space is used to elect nodes to produce blocks. This solution not only solves the problems of low consensus efficiency and waste of computing power resources of the PoW algorithm, but also solves the main chain fork and centralization risks that may occur in the PoSpace algorithm, ensuring the efficient and secure operation of the blockchain system.
[0047] Among them, the block structure in step 1 includes version number (Version), previous block hash value (PreHash), current block hash value (Hash), timestamp (TimeStamp), difficulty value (DiffTarget), block height (Height), random number (Nonce), transaction information (TradeInfo), Merkle root hash value (Merkle-root), space (Space), work question library (WQLibrary), and calculation time limit (LimitTime).
[0048] Compared with the original PoW algorithm, the PSUP-PoW algorithm adds information such as space volume, work problem library, and upper limit of computing time, so that each node can extract problems fairly and ensure the normal competition of nodes for the right to produce blocks; it ensures the authenticity of the block hard disk space information and the upper limit of computing time, which is convenient for other nodes to check.
[0049] The upper limit of the computation time in step 2 is determined by the time taken by each node to solve the small problem assigned to it, so the split small problems should meet the condition of consistent difficulty.
[0050] Taking matrix multiplication as an example, if a computing power utilization problem is expressed as the multiplication of two matrices to obtain another matrix, when an n*m matrix a is multiplied by an m*z matrix b, an n*z result matrix will be output; the matrix a and the matrix b can be split into n 1*m row vectors and z m*1 column vectors, and the output value after each group of row and column vectors are multiplied is a value in the result matrix. In this way, the splitting of the original problem in computing power utilization is completed. When the difficulty value changes, one or more small problems can be assigned to each node according to the requirements of the difficulty value, so that the difficulty of the problems solved by each node when competing for the right to produce blocks is the same.
[0051] Among them, the difficulty value adjustment stage in step 2 needs to optimize the difficulty value of the consensus process before each round of consensus begins. According to the actual situation, the proportion of the two schemes of node competition for block rights and using node time and space weights to allocate block rights in the consensus process is adjusted to avoid the situation where the PSUP-PoW algorithm cannot complete the consensus within the time required by the system. The difficulty optimization model calculation formula is:
[0052]
[0053] DT n Represents the difficulty value of this round of consensus process; DT n-1 Represents the difficulty value of the previous round of consensus process; t n-1 Represents the time spent on the last round of block generation by the system; LT represents the upper limit of the calculation time set by the system; α represents the difficulty optimization adjustment factor; β represents the tolerable error of the upper limit of the calculation time. The values of α, β and LT can be set and adjusted according to actual needs. According to the deduction of the formula, when the time spent on the last round of block generation by the system is within the range, it proves that the current difficulty value is set reasonably and does not need to be optimized; when the time spent on the last round of block generation exceeds the range, it proves that the current difficulty value is set unreasonably. Too low a difficulty value will lead to a series of problems such as block forks, chain reorganization, and imbalance of incentive mechanisms, affecting the security of the system; and too high a difficulty value will make the system rely solely on the node time and space weights for block generation rights allocation, which will lead to the risk of centralization and block forks and too low consensus efficiency.
[0054] Among them, the computing power in step three will be mainly used to solve the problem by utilizing hash calculation, solving the problem of computing power waste in the PoW consensus algorithm. It consists of a work function and two hash gates.
[0055] Before performing hash calculation, the system splits the problem according to the difficulty value of each round of the algorithm, and each node solves the split small problems. Usually, computers perform large operations in the form of matrix multiplication, summation, and continuous product operations. Taking matrix multiplication as an example, the small problems split out are multiplications of row vectors and column vectors, and a value in the result matrix is output. When each node hashes the block header, it first inputs the small problem assigned to it together with the block header into the first hash gate; then calls the function to solve the answer to the small problem, and inputs the answer and the output of the first hash gate into the second hash gate for operation, and outputs the final hash value. From the above process, it can be observed that if the node does not solve the answer to the problem assigned to it, it will not be able to complete the calculation of the final hash value.
[0056] Among them, the calculation formula of node spatiotemporal weight in step 4 is:
[0057] When the PSUP-PoW consensus algorithm is competing for the right to produce blocks through each node, if the competition for the right to produce blocks is not completed after exceeding the upper limit of the calculation time, in order to improve the consensus efficiency of the blockchain system and reduce the waste of system computing power, the system switches to using the node time and space weights to complete the allocation of block production rights.
[0058] Among them, W in the node spatiotemporal weight calculation formula st represents the spatiotemporal weight of the node, P f The number of times the representative node failed to compete for the right to generate blocks, P t It represents the total number of times the node participates in the competition for the right to generate blocks. T represents the node time. The value of this variable is not equivalent to the upper limit of the calculation time set by the system, but the node time of each node in the competition stage. S represents the amount of hard disk space of the node. This variable is submitted for verification by each node when joining the blockchain system. After verification, each node does not need to verify its own hard disk space in the subsequent system consensus process to improve the system operation efficiency.
[0059] The purpose of setting this fraction here is that when a node participates in the competition for block production rights for many times and fails to obtain the block production right, it can be given a better chance to win the competition for block production rights by appropriately increasing its node time and space weight. Therefore, it can better motivate the nodes in the system to participate in the election of the master node to prevent the nodes from passively participating in the consensus. The purpose of using node time as a variable is twofold: one is to prevent the previous behavior of each node from losing its effect, and when the timeout behavior occurs, it is not appropriate to complete the determination of the block production right only by relying on the node space amount as an indicator; the second is to prevent some nodes from deliberately participating passively in the competition stage, waiting for the system to time out and relying on their own hard disk space to obtain the block production right.
[0060] Among them, the Merkle tree algorithm in step one is a hash-based data structure, which is a tree structure, in which each leaf node is the hash value of a data block, and each non-leaf node is the hash of the hash value of its child node.
[0061] The Merkle tree can efficiently calculate and compare the hash value of data without accessing all the data. It can also generate a unique identifier (Merkle root) to represent the entire data set, proving whether a certain data block belongs to a certain data set without providing the entire data set, thereby reducing storage space and network transmission overhead.
[0062] The hash algorithm in step 3 and step 4 refers to mapping a binary value of any length into a shorter binary value of a fixed length, which is also called a hash value.
[0063] A hash value is a unique and extremely compact numerical representation of a piece of data. The one-way characteristics of the hash function and the fixed length of the output data enable it to generate messages or data.
[0064] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0065] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. An improved PoW algorithm that combines computing power utilization and space proof, It is characterized in that The specific steps are as follows: Step 1: Preparation stage: After the PSUP-PoW algorithm starts, each node obtains the client request data, packages the data according to the block structure and generates a block body, and uses the Merkle tree algorithm to generate a Merkle root. Step 2: Difficulty value adjustment stage: After completing the preparations, the PSUP-PoW algorithm will compare the block time of the previous round with the upper limit range of the calculation time. If the value is within the range, it proves that the current difficulty value is set reasonably and there is no need to adjust the difficulty, and the algorithm enters the next stage; if the value is less than, it proves that the current difficulty value is too low and the difficulty value needs to be increased to ensure system security; if the value is greater than, it proves that the current difficulty value is too high and the difficulty value needs to be lowered to improve consensus efficiency and avoid the risks of centralization and block forks; Step 3: Node competition phase: After completing the difficulty adjustment, the node generates a block header and enters the node competition phase. Each node first inputs its assigned small problem (Question) and block header (BlackData) into the first hash gate, and generates the first round of hash value (FHash) through the SHA256 hash operation function. The process of calling the SHA256 hash operation function this time is: SHA256(Question,BlockData)→FHash Next, the node will call the function to solve the answer to the small problem. This is the main way for each node to use its own computing power to compete for the right to produce blocks. When the node completes the problem solution, it will input the calculated answer (Answer) together with the first round of hash value into the second hash gate, and call the SHA256 hash operation function again to generate the final hash value (LHash). The first node to complete the above process is the node that successfully competes for the right to produce blocks. The process of calling the SHA256 hash operation function this time is: SHA256(Answer,FHash)→LHash The block header (BlockData) includes information such as version number (Version), previous block hash value (PreHash), timestamp (TimeStamp), block height (Height), Merkle root hash value (Merkle-root), etc. If a node completes the solution to its own problem within the upper limit of the calculation time and generates the final hash value, the node obtains the right to generate the block, and generates the block with the calculated hash value. The PSUP-PoW algorithm broadcasts the block, and other nodes in the system perform block consensus. After the consensus is completed, this round of requests ends, and the system adds the block to the blockchain main chain and continues the next round of block generation; If the calculation time reaches the upper limit of the calculation time set by the system, and no node has successfully solved its own problem to obtain the right to produce a block, this stage ends and enters the node time-space weighted block production stage; Step 4: Node space-time weighted block generation stage: When the node calculation time exceeds the upper limit of the calculation time and the block generation right competition has not yet been completed, each node uses the node time and space weight calculation formula to calculate its own node time and space weight. The size of the node time and space weight depends on the node's time and hard disk space. As the number of times the node participates in the competition for the block generation right and fails to compete successfully increases, the node's time weight will gradually increase. This makes the block generation right allocation of the blockchain system in the node time and space weight block generation stage not only depend on the hard disk space size of each node. Only nodes that can provide large-capacity hard disk space can obtain block generation rights, but all nodes have the opportunity to obtain block generation rights, which effectively reduces the risk of system centralization. After completing the time and space weight calculation of all nodes, the PSUP-PoW algorithm collects and sorts the time and space weights of each node, and enables the node with the highest time and space weight value to obtain the block generation right. The node generates the hash value it calculates, and other nodes that have not obtained the block generation right participate in the subsequent consensus process. After the consensus is completed, this round of requests ends, and the system adds the block to the blockchain main chain and continues the next round of block generation.
2. According to claim 1, an improved PoW algorithm combining computing power utilization and space quantity proof, Features: The block structure described in step 1 includes version number (Version), previous block hash value (PreHash), current block hash value (Hash), timestamp (TimeStamp), difficulty value (DiffTarget), block height (Height), random number (Nonce), transaction information (TradeInfo), Merkle root hash value (Merkle-root), space (Space), work question library (WQLibrary), and calculation time limit (LimitTime).
3. According to claim 1, an improved PoW algorithm combining computing power utilization and space quantity proof, Features: The upper limit of the computation time described in step 2 is determined by the time taken by each node to solve the small problem assigned to it, so the split small problems should meet the condition of consistent difficulty.
4. According to claim 1, an improved PoW algorithm combining computing power utilization and space quantity proof, Features: The difficulty adjustment phase described in step 2 needs to optimize the difficulty value of the consensus process before each round of consensus begins. The proportion of the two schemes of node competition for block generation rights and using node time and space weights to allocate block generation rights in the consensus process is adjusted according to the actual situation to avoid the situation where the PSUP-PoW algorithm cannot reach consensus within the time required by the system. The difficulty optimization model calculation formula is:
5. According to claim 1, an improved PoW algorithm combining computing power utilization and space quantity proof, Features: The computing power described in step three will be mainly used to solve the problem by utilizing hash calculations, thereby solving the problem of computing power waste in the PoW consensus algorithm. It consists of a work function and two hash gates.
6. According to claim 1, an improved PoW algorithm combining computing power utilization and space quantity proof, Features: The calculation formula for the node spatiotemporal weight described in step 4 is:
7. According to claim 6, an improved PoW algorithm combining computing power utilization and space quantity proof, Features: In the node spatiotemporal weight calculation formula, W st represents the spatiotemporal weight of the node, P f The number of times the representative node failed to compete for the right to generate blocks, P t It represents the total number of times the node participates in the competition for the right to generate blocks. T represents the node time. The value of this variable is not equivalent to the upper limit of the calculation time set by the system, but the node time of each node in the competition stage. s represents the amount of hard disk space of the node. This variable is submitted for verification by each node when joining the blockchain system. After verification, each node does not need to verify its own hard disk space in the subsequent system consensus process to improve the system operation efficiency.
8. According to claim 1, an improved PoW algorithm combining computing power utilization and space quantity proof, Features: The Merkle tree algorithm described in step 1 is a hash-based data structure, which is a tree structure, in which each leaf node is the hash value of a data block, and each non-leaf node is the hash of the hash value of its child node.
9. According to claim 1, an improved PoW algorithm combining computing power utilization and space quantity proof, Features: The hash algorithm described in step 3 and step 4 refers to mapping a binary value of arbitrary length into a shorter binary value of fixed length, which is also called a hash value.
Citation Information
Cited By
Block chain consensus method, device and equipment
CN120602497A
