Method and program for forming consensus in distributed ledger network system
By dividing nodes into units and applying S-BFTC within these units, the method reduces communication overhead while maintaining fault tolerance in distributed ledger networks, ensuring efficient consensus formation.
Patent Information
- Application Number
- JP2020199236
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-11-30
- Publication Date
- 2024-10-23
- Estimated Expiration
- 2040-11-30
AI Technical Summary
Existing distributed ledger network systems face challenges in reducing communication overhead between nodes while maintaining resistance to Byzantine faults without reducing the number of participating nodes.
The proposed solution involves dividing nodes into basic units and performing a Byzantine fault-tolerant consensus algorithm (S-BFTC) within these units, followed by a consensus determination step using pre-consensus values to establish consensus.
This approach reduces communication requirements without compromising resistance to Byzantine faults, ensuring efficient and reliable consensus formation in distributed ledger networks.
Smart Images

Figure 0007571997000001 
Figure 0007571997000002 
Figure 0007571997000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a method and device for forming consensus between two or more node computers that constitute a distributed ledger network system also known as a blockchain, and a program for forming consensus. [Background technology]
[0002] According to Non-Patent Document 1, a distributed ledger network system, also known as a blockchain, is composed of two or more computers that can directly communicate with each other in a peer-to-peer (P2P) manner. These computers are called nodes, and they carry out transaction processing (hereinafter also referred to as transactions) entrusted to the network system. By these multiple nodes operating cooperatively, the distributed ledger network system as a whole behaves like a single virtual computer, processes transactions entrusted to users, and stores the results.
[0003] In a distributed ledger network system, rather than nodes complementing each other, in many cases they perform the same processing in parallel and save the same results. And each node does not necessarily have to exist in one place, but may be distributed all over the world. Due to this redundant configuration, the distributed ledger network system is said to be resistant to failures and has a high uptime.
[0004] In addition, distributed ledger network systems are classified into public chains, private chains, and consortium chains depending on the management status, including the operating authority of the computers that are nodes. Public chains are distributed ledger network systems that are open to the general public, and anyone can freely participate as a node or withdraw. They are designed to continue to operate properly even though there is no specific authorized administrator. This differs from conventional systems that are based on trusting the organizers of the network system, and is said to be a trustless system that does not require a reliable organizer. Public chains are the fairest distributed ledger network system in that they cannot be arbitrarily manipulated by specific individuals.
[0005] On the other hand, in a private chain, the organizer has the authority to operate the nodes. It is relatively easy to upgrade the system and take measures to improve processing efficiency. While it has these advantages, it is also possible to increase fault tolerance and uptime by having multiple nodes perform the same process in parallel and store the same results. A consortium chain is a private chain operated jointly by two or more organizers.
[0006] A user of a distributed ledger network system must have his / her own account in the network system. The transactions that a user entrusts to the network can be as simple as transferring part of the assets (hereinafter, also called tokens) in his / her account to another person's account, or transferring part of the tokens in his / her account to another person's account when certain conditions are met.
[0007] Each node in the distributed ledger network system, for example, grasps the assets of each account before the transaction processing, judges whether or not certain conditions are met, and calculates the amount of assets in each account after the processing. Multiple nodes perform the same calculation processing for one transaction.
[0008] In a typical distributed ledger network system, one of the nodes is entrusted with a transaction from a user. The node that has been entrusted with the transaction serves as the leader node and distributes the transaction to the other nodes. Here, the other nodes are called backup nodes. The leader node and backup node each calculate the execution result of the same transaction. The calculated execution results are compared and verified within each node to confirm that they are error-free. The error-free transaction processing results are then blocked and linked as a chain.
[0009] Blocks connected to the chain are in a state where they cannot be tampered with without a huge amount of time-consuming processing. In a distributed ledger network system, the asset value of each account after a transaction is fulfilled and the transaction processing results are firmly protected through blocking. These blocks must be consistent with previously created blocks, making them extremely difficult to tamper with. On the other hand, fraud before being incorporated into a block must be prevented in a different way.
[0010] Problems in processing transactions are caused by node failures. There are at least two types of node failures: functional failures and intentional fraudulent failures. Examples of functional failures include communication failures that prevent communication with other nodes, calculation failures that prevent calculations from being performed correctly, and storage failures that prevent recorded information from being accessed correctly. These failures can be detected relatively easily and dealt with by performing operational tests on each node.
[0011] On the other hand, it is difficult to detect nodes that intentionally behave fraudulently and to take measures against them. These nodes easily pass the above operation tests. And usually, they process transactions correctly just like other normal nodes. However, at some point, they suddenly start processing transactions fraudulently. For example, they may transfer some assets to a specific account separately from the designated transfer destination. Nodes that usually blend in with other normal nodes and do not stand out, but sometimes behave fraudulently, are called "nodes with Byzantine faults" or simply "faulty nodes".
[0012] A node with a Byzantine fault is like a nasty spy who has infiltrated the core of an important organization. It usually operates normally and is not noticeable. However, when processing a specific transaction, it suddenly performs fraudulent processing. Such a node cannot be eliminated by normal operation tests.
[0013] There is a possibility that someone with the intention of obtaining fraudulent profits is intentionally causing this Byzantine fault. For example, anyone can freely participate in a public chain as a node. Therefore, it is relatively easy to incorporate multiple nodes with Byzantine faults into a distributed ledger network system. On the other hand, private chains and consortium chains are relatively safe because the organizer or organizer group maintains the node computers. However, these nodes may also have a Byzantine fault due to external hacking. It is necessary to take fraud prevention measures in light of the possibility that such nodes with Byzantine faults may be mixed into the network.
[0014] Here we will look at the process from when a user entrusts a transaction to be processed until it is finally made into a block. In the first process, the leader node distributes pre-execution transaction information to the backup node. In the second process, the node in charge of processing calculates the account balance after the transaction is executed. In the third process, the balance after the transaction is executed is organized into blocks, making it difficult to tamper with. In this way, three processes can exist.
[0015] The fraudulent behavior in the first process is the falsification of transaction contents by the leader node. For example, the transfer destination of the tokens or the fulfillment conditions may be changed. However, this type of fraud can generally be prevented by a digital signature using a private key. The presence or absence of falsification of the information sequence accompanying the digital signature can be easily confirmed by using the private key and the corresponding public key. Therefore, the backup node can easily detect the falsification of transaction contents by the leader node by using the public key.
[0016] Possible fraud in the second process is the alteration of transaction processing. It is not possible to unequivocally determine whether the result of a transaction is valid or not. Therefore, the same transaction is processed by multiple nodes, and the results are compared. If the results are the same for a certain number of nodes or more, the result is considered to be correct. However, multiple nodes with Byzantine faults may collude to produce the same fraudulent result, so measures against this are also necessary.
[0017] Patent document 1 describes how multiple nodes are made to process the same transaction and the results are compared; if the number of nodes with matching results exceeds a predetermined threshold, the results output by these nodes are deemed to be correct.
[0018] Non-Patent Document 2 and Patent Document 2 describe a method in which, when f is a natural number, 3f+1 consensus nodes are made to process the same transaction, and the results are compared to confirm the correctness. In this case, if the results from 2f+1 consensus nodes match, the result is deemed correct. In this case, the idea is that even if there are f consensus nodes with Byzantine faults, the correct result can be obtained by more than twice as many normal consensus nodes.
[0019] Patent Document 2 further describes that a time limit is set for transaction processing, and that any consensus node that requires processing time exceeding this limit due to communication failure or other failures is excluded from the consensus formation process and an alternative consensus node is assigned to this process. It also describes that the time required for consensus formation processing is reduced by finalizing the result of the consensus formation processing at the point when the results of the 2f+1 consensus nodes match.
[0020] If the number of nodes involved in the consensus formation process is small, it is easier for those who intend to commit fraud to commit fraud because there are fewer nodes to appease. Patent Document 3 also describes that the smaller the scale of a blockchain, the higher the risk of it being subjected to a collusion attack by a small number of attackers. This document attempts to reduce the risk of a collusion attack by randomly adding participating nodes in the consensus formation process from other blockchains to increase the number of nodes.
[0021] It is also necessary to prevent fraud in the third process. According to Non-Patent Document 1, the use of digital signatures and hash functions is also mentioned here, but details are omitted here.
[0022] The process of forming consensus is sometimes simply called consensus processing from here on. In consensus processing, transactions and their processing results are exchanged between participating nodes through P2P communication, and the results of each node are compared to determine the correct result. If a large number of nodes participate in this processing, more computing resources are required to process one transaction, and the amount of P2P communication required also increases. However, reducing the number of participating nodes in the processing makes it vulnerable to collusion attacks by faulty nodes. [Prior art documents] [Patent documents]
[0023] [Patent Document 1] Special Publication No. 2020-515939 [Patent Document 2] Special Publication No. 2020-504351 [Patent Document 3] JP 2020-061696 A [Non-patent literature]
[0024] [Non-Patent Document 1] "A textbook for understanding the mechanism and development of blockchain" by Consensus Base Co., Ltd., Gijutsu Hyoronsha, 2019. [Non-Patent Document 2] LESLIE LAMPORT, ROBERT SHOSTAK, and MARSHALL PEASE, "The Byzantine Generals Problem", ACM Transactions on Programming Languages and Systems, Vol. 4, No. 3, July 1982. Summary of the Invention [Problem to be solved by the invention]
[0025] Therefore, the object of the present invention is to provide a consensus formation method and a consensus formation program for a distributed ledger network system that can reduce the amount of communication required between these nodes without reducing the number of nodes participating in the consensus processing. [Means for solving the problem]
[0026] The above problem is solved by a consensus formation method that includes, when 16 node computers among those that make up a distributed ledger network system form a consensus, a unitization step of dividing the 16 node computers into four basic units of four computers each, and a pre-consensus formation step of comparing the four processing values processed by the four node computers belonging to each basic unit with each other for each basic unit, and if the processing values by three or more of the node computers match, setting the processed values as a pre-consensus value output by that basic unit, and in the subsequent consensus success / failure determination step, if there is a matching pre-consensus value that is uniquely the highest frequency, it is determined that consensus has been established, and the pre-consensus value is set as the processing result of the transaction. Effect of the Invention
[0027] The consensus formation method and program of the present invention have the advantage of being able to reduce the amount of communication required between nodes participating in the consensus process without reducing the number of nodes. [Brief description of the drawings]
[0028] [Figure 1] Figure 1 illustrates the transaction processing process in a distributed ledger network system. [Diagram 2] FIG. 2 is a diagram of the process flow of the Byzantine fault avoidance consensus formation algorithm. [Diagram 3] FIG. 3 is a diagram showing a specific example of a Byzantine failure avoidance consensus formation algorithm. [Figure 4] FIG. 4 is a diagram showing an estimation of the amount of communication required to implement the Byzantine failure avoidance consensus formation algorithm. [Diagram 5] Figure 5 summarizes the number of nodes participating in the consensus process and the number of communications required. [Figure 6] FIG. 6 is a diagram showing a tolerance evaluation with respect to the number of faulty nodes. [Figure 7] FIG. 7 is a diagram showing a method for calculating the probability that consensus will be established or not established in S-BFTC. [Figure 8] FIG. 8 is a diagram illustrating a first embodiment according to the present invention. [Figure 9] FIG. 9 is a diagram illustrating a specific example of pre-consensus formation by S-BFTC. [Figure 10] FIG. 10 is a process flow diagram of the consensus success / failure determination step. [Figure 11] FIG. 11 is a diagram for estimating the communication volume in the first embodiment of the present invention. [Figure 12] FIG. 12 is a diagram showing a method for calculating the probability that a consensus will be established or not established in the first embodiment of the present invention. [Figure 13] FIG. 13 is a diagram showing a specific method for calculating the "number of cases" when the number of normal nodes and the number of faulty nodes constituting each basic unit are specified. [Figure 14] FIG. 14 is a diagram illustrating an evaluation of resistance to a faulty node in the first embodiment. [Figure 15] FIG. 15 is a diagram showing a transaction processing process of the distributed ledger network system of the second embodiment according to the present invention. [Figure 16] FIG. 16 is a diagram for explaining the format of data transmitted from a node to a consensus success / failure determiner. [Figure 17] FIG. 17 is a diagram for explaining the configuration of the consensus success / failure determiner. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0029] <Transaction processing process of distributed ledger network system> Figure 1 shows the transaction processing process of the distributed ledger network system. Here, we explain the process in which 16 nodes that make up the distributed ledger network system process transactions through a consensus process to eliminate the effects of Byzantine faults. This consensus process is sometimes referred to as "Byzantine fault avoidance consensus formation" or BFTC.
[0030] In Figure 1, space is represented horizontally on the page, and the vertical arrows indicate the passage of time. Transaction processing in a distributed ledger network system goes through five stages, stpp1 to stpp5. First, leader node nx0 is entrusted with the execution of transaction TX by user CX1 (stpp1). The execution of transaction TX means, for example, transferring part of the assets of one account to another account. Specifically, it means deducting part of the assets of the transfer source account and increasing the assets of the transfer destination account. In some cases, part of the assets deducted from the transfer source account may be transferred to the node administrator's account as a transfer fee.
[0031] Leader node nx0, which has been entrusted with the execution of transaction TX by user CX1, distributes the transaction TX to backup nodes nx1 to nx15 (stpp2). As a result, the 16 nodes participating in the consensus process hold the same transaction information. The 16 nodes participating in the consensus process may or may not include leader node nx0. In the example shown here, there are 16 nodes participating in the consensus process, including leader node nx0.
[0032] Each node participating in the consensus process verifies the validity of the transaction using the digital signature attached to the transaction it holds. It then processes the transaction and calculates the result (stpp3). The result of transaction processing is, for example, the account balance of the parties that has changed due to the transaction.
[0033] Next, the nodes participating in the consensus process mutually transmit and collect the processing results of the transaction TX by other nodes through P2P communication (stpp4). After that, the consensus process is carried out within each node to compare and verify these processing results (stpp5).
[0034] After this step (stpp5) is completed, the memory area of each node holds the same result of the consensus process. The result of the consensus process may include records of whether the transactions of each node match or do not match, the final transaction process result, and information about nodes suspected of a Byzantine fault due to outputting a process result different from the final result. Although not shown, any of the nodes nx0 to nx15 may be referenced to block the process result of the transaction TX thereafter.
[0035] <Byzantine failure avoidance consensus formation algorithm> As an example of consensus processing, the Byzantine Fault Avoidance Consensus Formation Algorithm (hereinafter sometimes referred to as the BFTC algorithm) will be explained. The BFTC algorithm can be briefly described as follows. When all the results of the same transaction by the nodes participating in the consensus processing match, consensus is established, and the matched processing value is considered to be a valid transaction processing result. This is called the consensus value. Even if all the transaction processing results do not match, consensus is also established if the nodes that output matching results are in the majority and exceed twice the number of nodes that output results that do not match. On the other hand, if several transaction processing results appear and the number of nodes that output the most results does not exceed twice the number of nodes that output other results, consensus formation fails, and the consensus value is considered to be indefinite or non-existent. In this case, transaction TX is not fulfilled.
[0036] FIG. 2 is a diagram of the processing flow of the Byzantine fault avoidance consensus formation (BFTC) algorithm. In FIG. 2, consensus participating nodes nx0 to nx15 are made to process transaction TX, and all of the processed values are collected in each node nx0 to nx15 (stpx1). Subsequent processing is performed separately in nodes nx0 to nx15. Next, matching processed values are grouped together, and the number of processed values included in each group is set as the number of members (stpx2). The number of members is nothing other than the number of nodes that output the processed value. Then, it is determined whether or not there is a group with a unique maximum value in the number of members (stpx3). If there is no group with a unique maximum value, the result is 'false' and the process branches to step stpp6. In this case, consensus is not established, and the conclusion is reached that the transaction TX processing result is indeterminate, and the consensus process is completed (stpp6). Then, transaction TX is not fulfilled in this distributed ledger network system.
[0037] On the other hand, if there is a group with only one maximum value, the result is 'true' and the process branches to stpx4. Here, it is determined whether the number of members in the maximum value group exceeds twice the number of other processed values (stpx4). If the number of members in the maximum value group does not exceed twice the number of other processed values, the result is 'false' and the process branches to step stpp7. In this case, consensus is not established, and the conclusion is reached that the result of the transaction TX processing is indeterminate, and the consensus process is completed. In this case, transaction TX is not executed in this distributed ledger network system either.
[0038] On the other hand, if the number of members in the maximum value group is more than twice the number of other processing values, the result is 'true' and the process branches to step stpp5. In this case, consensus is established and the processing result of transaction TX is finalized. The processing value that matches within the maximum value group is the consensus value, which becomes the processing result of transaction TX. This processing result is eventually blocked and stored in a state that makes it difficult to tamper with. This is the processing flow of the Byzantine Fault Tolerance Consensus (BFTC) algorithm.
[0039] FIG. 3 is a diagram showing a specific example of the BFTC algorithm. FIG. 3(A) shows a case where the processing values of all 16 nodes participating in the consensus process are W. Matching processing values W are grouped together, and the number of members is set to 16, which is the number of processing values included in the group. This is the processing of step stpx2 described with reference to FIG. 2. Since the group with 16 members is a group with only one maximum value, step stpx3 is set as 'true' and the process branches to step stpx4. The number of processing values other than this group is zero. Therefore, the number of members of the maximum value group exceeds twice the number of other processing values, so stpx4 is set as 'true', consensus is established, and the processing result of transaction TX is determined. The processing value W that matches within the maximum value group is the consensus value, and this is set as the processing result of transaction TX.
[0040] FIG. 3(B) shows three cases where the processing values of the 16 nodes participating in the consensus process are W, M, and P. Matching processing values W, M, and P are grouped into three groups. The number of processing values contained in these groups is 8, 6, and 2, which are the number of members in each group. The group of processing value W is the group with only one maximum value of 8. Since the group of processing value W is the group with only one maximum value of 8, step stpx3 is judged as 'true' and branched to step stpx4. The number of processing values other than the group of processing value W is 6 for M and 2 for P, so the total is 8. The number of members of the maximum value group, 8, does not exceed twice the number of other processing values, 8, so the result is judged as 'false' and branched to step stpx7. In other words, consensus is not established. The consensus value is indefinite, and transaction TX is not processed.
[0041] FIG. 3(C) shows the case where the 16 nodes that participated in the consensus process have two processing values, W and M. If these processing values or the nodes that output these processing values are grouped based on the matching processing values, two groups are generated. The number of processing values, i.e. the number of members, belonging to each group is 11 for the group with processing value W, and 5 for the group with processing value M. Here, the group with the largest number of members is the group with processing value W, which has 11 members. The number of members of groups other than processing value W is 5. In this case, the number of members of the group with the largest number of members, 11, is more than twice the number of members of the other groups, which is 5. This is the branch of step stpx4 in FIG. 2. Here, it is judged as 'true' and proceeds to step stpx5, and consensus is established and the consensus value becomes W.
[0042] Above, the BFTC algorithm was explained using an example where 16 nodes participate in the consensus process. As shown in this example, when the BFTC algorithm is applied to 16 nodes, consensus is established and the consensus value is determined even if a maximum of five nodes output invalid processing values. Generalizing this with f being a natural number, if BFTC consensus processing is performed with 3×f+1 nodes, it is possible to determine valid transaction processing results with resistance to invalid outputs from a maximum of f nodes.
[0043] <Communication volume required for BFTC with (3f+1) nodes> Next, we estimate the amount of communication required for BFTC with (3f+1) nodes for a natural number f. Figure 4 is a diagram for estimating the amount of communication required to implement the BFTC algorithm. With reference to Figure 4, we will explain the flow of BFTC processing and the amount of communication required when the number of nodes participating in the consensus processing is (3f+1). In Figure 4, space is represented horizontally on the page, and the vertical arrows indicate the passage of time. First, user CX1 transfers the transaction TX that he or she wishes to process to one of the nodes that make up the distributed ledger network system. In the example of Figure 4, transaction TX is transferred to node nx0. One communication occurs here. The node that first receives the transaction transfer from user CX1 is called the leader node.
[0044] The leader node nx0 verifies the digital signature attached to the transaction TX to confirm that the transaction TX is legitimate. If it is confirmed to be a legitimate transaction, the leader node nx0 distributes the transaction TX to the nodes nx1 to nx (3f) participating in the consensus process via P2P. Here, 3f communications occur. The nodes participating in the consensus process are called backup (BKUP) nodes. In this example, the consensus process is performed by a total of (3f+1) nodes, including the leader node nx0 and (3f) backup nodes nx1 to nx (3f). Each backup node that receives the distributed transaction TX verifies the digital signature attached to it to confirm the validity of the transaction TX. This is because the leader node nx0 may have a Byzantine failure and may send fraudulent transactions to these backup nodes.
[0045] After the validity of transaction TX is confirmed, leader node nx0 and backup nodes nx1 to nx (3f) each independently process transaction TX to calculate a processing value. Each processing value is accompanied by a digital signature of the node that processed it. If there are no nodes that have Byzantine failures among the nodes participating in the consensus process, the processing values of the same transaction TX will naturally match. The processing values calculated by each node are distributed to all nodes participating in the consensus process by P2P communication. 3f × (3f + 1) communications are required to distribute this processing value. Ultimately, the number of communications required for BFTC with (3f + 1) nodes is 3f + 1 + 3f × (3f + 1) = (3f + 1) (3f + 1).
[0046] Figure 5 summarizes the number of nodes participating in the consensus process and the number of required communications. By substituting a specific natural number for f in the above formula, Figure 5 shows the number of nodes participating in the consensus process and the number of required communications. As shown in Figure 5, when f is increased from 1, 2, ..., 5, the number of nodes participating in the consensus process increases linearly from 4, 7, ..., 16. In contrast, the number of required communications increases rapidly as a parabola from 16, 49, ..., 256.
[0047] According to the BFTC algorithm described above, if the number of nodes with Byzantine faults is within f, transaction processing can be carried out without being affected by them. However, if the number of nodes with Byzantine faults exceeds 2f, care must be taken because the illegal processing results by the faulty nodes will be considered as legitimate results. Therefore, continuous maintenance is required so that the number of nodes with Byzantine faults does not exceed f. For example, the nodes that have performed illegal processing are revealed from the consensus establishment and consensus value held in each node. It is necessary to refer to this information and exclude the relevant node from the network system, or to renew the node by reinstalling the software of the relevant node computer. Here, the smaller the value of f, the more the number of required communications can be reduced. On the other hand, there is a problem that the resistance to an increase in illegal nodes is weakened.
[0048] <Evaluation of the resilience of a distributed ledger network system against the number of failed nodes> Next, we evaluate the resistance of a distributed ledger network system to which the BFTC algorithm is applied against the number of nodes that may have Byzantine faults and perform fraudulent processing. Take the case of consensus processing with 16 nodes as an example. We evaluate the probability that consensus is established by normal nodes and a valid transaction processing value is obtained as the number of faulty nodes gradually increases from 0 to 16. Figure 6 shows the resistance evaluation against the number of faulty nodes, and Figure 6 (A) shows the transition of the consensus establishment probability when the number of faulty nodes increases from 0 to 16 in consensus processing with 16 nodes to which the BFTC algorithm is applied. Figure 6 (B) will be described later, so the explanation will be omitted.
[0049] The figure (A) was created based on the following idea. If the 16 nodes participating in the consensus process are 16 normal nodes, the probability that 16 normal nodes are included is of course 100%. Also, if the 16 nodes participating in the consensus process are 15 normal nodes and 1 faulty node, the probability that 15 normal nodes are included is naturally 100%. Similarly, the number of faulty nodes is gradually increased. If the nodes participating in the consensus process are 12 normal nodes and 4 invalid nodes, the probability that 12 normal nodes are included is also naturally 100%. Furthermore, if the nodes participating in the consensus process are 11 normal nodes and 5 invalid nodes, the probability that 11 normal nodes are included is 100%. And when there are 11 or more normal nodes, a consensus by normal nodes is established by applying the BFTC algorithm and the consensus value is determined. In other words, even if the number of faulty nodes increases from 0 to 5, a consensus by normal nodes is established with a 100% probability. This is shown in FIG. 6(A).
[0050] The vertical axis of Figure 6(A) is the occurrence probability, and the horizontal axis is the number of faulty nodes. This figure shows that when the number of faulty nodes on the left side is 0 to 5, consensus by normal nodes is established with a 100% probability. In Figure 6(A), the white bars represent the probability that valid consensus is established by normal nodes. The diagonal-lined bars represent the probability that consensus is not established. The black bars represent the probability that invalid consensus is established by a faulty node that performs invalid processing due to a Byzantine fault.
[0051] Similarly, if there are 10 normal nodes and 6 invalid nodes participating in the consensus process, there is a 100% probability that the 6 invalid nodes will be included. In this case, there is a 100% probability that consensus will not be established. If there is a 100% probability that there are 10 invalid nodes, there is also a 100% probability that consensus will not be established. This is shown in the figure when there are 6 to 10 invalid nodes.
[0052] Furthermore, when the number of faulty nodes increases further and reaches 11 with a 100% probability, and these faulty nodes collude to output the same incorrect processing value, there is a risk that the consensus by the faulty nodes will be established with a 100% probability and the incorrect processing value will be regarded as legitimate. This is the case when the number of faulty nodes is 11 to 16 in the figure. From this figure, it can be seen that the number of faulty nodes must be at most 5 or less.
[0053] <S‐BFTC> As described above, the more nodes participate in the consensus process, the higher the tolerance to Byzantine faulty nodes. On the other hand, the fewer nodes participate in the consensus process, the less communication volume is required. To obtain a consensus processing method that combines both advantages, the S‐BFTC algorithm is proposed. This algorithm performs the BFTC algorithm on 4 nodes randomly selected from 16 nodes participating in the consensus process. This requires the communication volume when f = 1 described above using Figure 5. The number of communication times at this time is 16, which is 1 / 16 of the communication volume of 256 required for 16 nodes corresponding to f = 5. Since 4-node BFTC is the minimum unit capable of implementing the BFTC algorithm, the BFTC by 4 nodes collected from 16 nodes is referred to as small BFTC or S‐BFTC. The method of collecting 4 nodes from 16 nodes can be randomly collected. Also, it may be rotated for each transaction process.
[0054] <Evaluation of the Tolerance of S‐BFTC to the Number of Byzantine Faulty Nodes> Next, evaluate the tolerance of S‐BFTC to the number of Byzantine faulty nodes. In S‐BFTC, the consensus is established by normal nodes when the 4 collected nodes consist of 4 normal nodes and when they consist of 3 normal nodes and 1 faulty node. This is because if there is 1 faulty node and there are 3 or more normal nodes, the number of normal nodes exceeds twice the number of faulty nodes.
[0055] Consensus is not established when the four nodes collected for consensus processing consist of two normal nodes and two faulty nodes.Furthermore, consensus with faulty nodes is established when the four nodes collected for consensus processing consist of four faulty nodes and three or more of these nodes collude to output the same invalid value, or when the four nodes collected for consensus processing consist of three faulty nodes and one normal node and these three faulty nodes collude to output the same invalid value.
[0056] Therefore, by determining the probability of the above combination of four nodes participating in the consensus process, the Byzantine fault tolerance of the consensus process using the S-BFTC algorithm can be evaluated. Normal nodes always output correct processed values, while faulty nodes can output either correct or incorrect processed values. However, to simplify the explanation, we will assume that faulty nodes collude to always output the same incorrect processed value. This assumption is the assumption for the most serious fault inflicted on the distributed ledger network system in question.
[0057] FIG. 7 is a diagram showing a method for calculating the probability that consensus will be established or not established in S-BFTC. Here, the case where the four nodes collected for consensus processing are m normal nodes and (4-m) invalid nodes is represented as S-BFTC(m,4-m). There are five possible cases: S-BFTC(4,0), S-BFTC(3,1), S-BFTC(2,2), S-BFTC(1,3), and S-BFTC(0,4). Below, the probability that consensus will be established or not established by the S-BFTC algorithm will be explained with reference to FIG. 7.
[0058] The number CNALL when selecting 4 nodes from 16 nodes is the number of combinations of taking 4 nodes from 16 nodes, and can be calculated using the formula shown in FIG. 7(A), which is 1,820.
[0059] First, we will show the case where the 16 nodes consist of 16 normal nodes and 0 invalid nodes. In this case, the number of cases of S-BFTC(4,0), S-BFTC(3,0), S-BFTC(2,2), S-BFTC(1,3), and S-BFTC(0,4) are shown in Figure 7(B). For example, row 1 in the figure shows the number of cases (column B) where S-BFTC(4,0), i.e., 4 normal nodes are collected. In other words, the number of combinations where 4 nodes are collected from 16 normal nodes is 1,820, and the number of combinations where 0 nodes are collected from 0 invalid nodes is 1. The product of these, 1,820, is the number of cases of S-BFTC(4,0). By dividing this by the above CNALL, the probability (column C) is calculated as 100.0%.
[0060] Row 2 in the figure shows the number of cases (column B) where S-BFTC(3,1) is obtained, i.e., three normal nodes are obtained. In other words, the number of combinations for obtaining three normal nodes from 16 normal nodes is 560, and it is impossible to obtain one faulty node from zero, so the number is zero. The product of these zeros is the number of cases for S-BFTC(3,1). Dividing this by the above CNALL gives a probability (column C) of 0.0%. For rows 3, 4, and 5 in the figure, it is also impossible to obtain a faulty node, so the number of cases in column B is zero, and the probability in column C is also calculated as 0.0%. In the end, if no faulty nodes are included, there is a 100.0% probability that all four nodes are normal nodes, and a consensus is established by normal nodes.
[0061] Similarly, the number of cases is calculated by increasing the number of faulty nodes from 1 to 16. Here, we will specifically explain the case where 5 faulty nodes are included, and other cases will be omitted. Figure 7(C) shows the case where the 16 nodes consist of 11 normal nodes and 5 faulty nodes. Row 1 in the figure is the number of cases for S-BFTC(4,0), and 330 is calculated as the product of the number of cases where 4 nodes are selected from 11 normal nodes and the number of cases where 0 nodes are selected from 5 faulty nodes (column B). Row 2 in the figure is the number of cases for S-BFTC(3,1), and 825 is calculated as the product of the number of cases where 3 nodes are selected from 11 normal nodes and the number of cases where 1 node is selected from 5 faulty nodes (column B). Other cases are calculated in the same way, and these are divided by the above CNALL to calculate the probability in column C. The occurrence probabilities of S‐BFTC(4,0), S‐BFTC(3,0), S‐BFTC(2,2), S‐BFTC(1,3), and S‐BFTC(0,4) were 18.1%, 45.3%, 30.3%, 6.0%, and 0.3%, respectively (column C).
[0062] According to the S-BFTC algorithm, if the consensus process contains four or three normal nodes, the consensus is established by the normal nodes. If the consensus process contains only two faulty nodes, the consensus is not established. If the consensus process contains three or four faulty nodes and these nodes collude to output the same incorrect processing value, the consensus is established by the faulty nodes. Therefore, if the 16 nodes consist of 11 normal nodes and five faulty nodes, the probability that the consensus is established by the normal nodes is the sum of the probabilities in rows 1 and 2 in Figure 7(C), that is, 18.1 + 45.3 = 63.4%. From row 3 in the same figure, the consensus is not established with a probability of 30.3%. Furthermore, as the sum of the probabilities in rows 4 and 5 in the same figure, the consensus is established with a probability of 6.0 + 0.3 = 6.3%.
[0063] Returning to Figure 6, Figure 6 shows the evaluation of resistance to the number of faulty nodes, with (A) showing the transition in the probability of consensus establishment in consensus processing using the BFTC algorithm with 16 nodes when the number of faulty nodes increases from 0 to 16. (B) of the same figure shows the transition in the probability of consensus establishment in consensus processing using the S-BFTC algorithm with 16 nodes.
[0064] The vertical axis is the occurrence probability, and the horizontal axis is the number of faulty nodes. The white bars represent the probability that valid consensus will be established by normal nodes. The diagonal-lined bars represent the probability that consensus will not be established. The black bars represent the probability that invalid consensus will be established by a faulty node that performs invalid processing due to a Byzantine fault. From the same figure (B), we can see that when there is 0 or 1 faulty node on the left side, consensus will be established by normal nodes with a 100% probability. However, when there are two faulty nodes, there is a 5% probability that consensus will not be established. When there are three faulty nodes, there is a 12.9% probability that consensus will not be established, and a 0.7% probability that consensus will be established by the faulty nodes.
[0065] When five faulty nodes are included, the probability that consensus is established by normal nodes is 63.4%. There is a 30.3% probability that consensus is not established, and a 6.3% probability that consensus is established by the faulty nodes. A distributed ledger network system that performs consensus processing can determine whether consensus is established or not through the consensus processing. In this case, there is a 30.3% probability that consensus formation will fail, and the remaining 69.7% will be successful. However, among the successful consensuses, there is a 9.0% (= 6.3 × 100.0 / 69.7) probability that a consensus established on an invalid processing value by a faulty node is included. This is a serious problem. It can be seen that S-BFTC has weaker resistance to faulty nodes than the "16-node BFTC" which has 100% resistance to five faulty nodes.
[0066] <First embodiment: multiple S-BFTC> Therefore, we propose a consensus algorithm that reduces the amount of communication compared to 16-node BFTC while not reducing the tolerance to faulty nodes. FIG. 8 is a diagram showing a first embodiment of the present invention. FIG. 8 (A) shows an overview of the embodiment. There are 16 nodes participating in the consensus process. The same transaction TX is distributed to these nodes n0, n1, n2, . . . , n15, and then processed to output each processed value [transaction distribution processing step (stp0)]. Then, these nodes are divided into four basic units u0 and u1, u2, u3, each of which has four nodes [unitization step (stp1)]. Next, S-BFTC, i.e., BFTC by four nodes, is performed in each basic unit [pre-consensus formation step (stp2)]. Then, the success or failure of the final consensus for the transaction TX is determined based on the success or failure of the pre-consensus and the pre-consensus value [consensus determination step (stp3)]. Here, the processing in the basic units u0, u1, u2, and u3 is referred to as pre-consensus and pre-consensus value in order to distinguish it from the final consensus and consensus value for the transaction TX. In addition, this embodiment may be referred to as "multiple S-BFTCs" in the sense of an algorithm that integrates multiple S-BFTCs.
[0067] <Pre-consensus formation step (stp2)> When pre-consensus is established among the four basic units u0, u1, u2, and u3, the pre-consensus value is determined. In each basic unit, if the processing values of three or more nodes match, pre-consensus is established, and this value becomes the pre-consensus value. If the processing values of three or more nodes do not match, pre-consensus is not established, and the pre-consensus value is also indefinite.
[0068] <Consensus decision step (stp3)> In the consensus determination step (stp3), the pre-consensus values obtained in the pre-consensus formation step (stp2) are grouped together according to their agreement. The number of pre-consensus values belonging to each group is the number of members of that group. The number of members is nothing more than the number of basic units that output the pre-consensus value. The consensus value is determined by a so-called majority vote, and if the consensus value is determined, consensus is established. Therefore, if there are no pre-consensus values obtained in the pre-consensus formation step (stp2), the final consensus value is indeterminate and consensus is not established. Also, when the two pre-consensus values are the same in number, such as 1:1 or 2:2, the final consensus value is indeterminate and consensus is not established.
[0069] When there exists a unique group with the maximum number of members among the groups formed by the above-mentioned matching pre-consensus values, the matching pre-consensus value in that group becomes the final consensus value and consensus is established. Therefore, when there is only one pre-consensus value obtained in the pre-consensus formation step (stp2), the number of members of the group formed by that pre-consensus value is 1, which is the unique maximum value, so that pre-consensus value becomes the final consensus value and consensus is established. Also, when all the obtained pre-consensus values match, the consensus value is determined because the group formed by those pre-consensus values is the unique maximum in terms of number of members, and consensus is established. Also, when two or more obtained pre-consensus values do not all match, the number of members of the groups formed by each is 1, and there is no unique maximum group, so the consensus value is indefinite and consensus is not established.
[0070] Also, the number of members of the group may be regarded as the frequency of occurrence of the pre-consensus value. In other words, in the consensus determination step (stp3) for the pre-consensus values output one by one from all or some of the basic units u0 to u3, a pre-consensus value occurrence frequency counting step may be provided to count the occurrence frequency of matching pre-consensus values. When there is a pre-consensus value that is the only maximum frequency in the frequency distribution counted in the pre-consensus value occurrence frequency counting step, the pre-consensus value can be defined as the transaction TX processing result, and it can be determined that the consensus before blocking has been formed. On the other hand, when there is no pre-consensus value that is the only maximum frequency in the frequency distribution counted in the pre-consensus value occurrence frequency counting step, it can be determined that the consensus before blocking has not been formed.
[0071] FIG. 8(B) is a diagram of the processing flow of the embodiment. The transaction TX requested to be fulfilled is distributed to 16 nodes n0, n1, n2, . . . , n15 participating in the consensus processing. Then, each node processes it and obtains the processing value that is the processing result [transaction distribution processing step (stp0)]. In addition, the 16 nodes are divided into four basic units u0 and u1, u2, u3 [unitization step (stp1)]. Even though these nodes are divided into four basic units in this way, they can process the transaction stp0. Therefore, it may be possible to switch the execution order of stp0 and stp1. Next, a pre-consensus is formed by implementing S-BFTC within each of the four basic units to obtain a pre-consensus value [pre-consensus formation step (stp2)]. After that, the success or failure of the final consensus on the processing of the transaction TX is determined based on the pre-consensus value [consensus determination step (stp3)].
[0072] <How to divide into basic units in the unitization step (stp1)> In the unitization step (stp1), there are various methods for dividing the 16 nodes n0 to n15 participating in the consensus processing into basic units u0 to u3. For example, it may be determined in advance that the nodes belonging to the basic unit u0 are nodes n0, n1, n2, and n3, the nodes belonging to the basic unit u1 are nodes n4, n5, n6, and n7, the nodes belonging to the basic unit u2 are nodes n8, n9, n10, and n11, and the nodes belonging to the basic unit u3 are nodes n12, n13, n14, and n15. Also, based on this division state, each time a transaction is processed, a rotation may be performed such that node n0 is rearranged into the basic unit u3, node n4 into the basic unit u0, node n8 into the basic unit u1, and node n12 into the basic unit u2. Alternatively, each time a new transaction processing request is received from a user, the leader node may determine the division state, add the information to the transaction, and distribute it to the backup node. For example, as shown in Fig. 8(C), data such as a unitization table GTB containing node numbers may be sent with the digital signature of the leader node added. In this case, however, the unitization step (stp1) must be performed following the transaction distribution processing step (stp0). The leader node may randomly define the division state into basic units u0 to u3, or may define this division state based on a generated random number.
[0073] <Specific example of pre-consensus formation step (stp2)> Since the actual situation of pre-consensus formation by S-BFTC is BFTC by four nodes, its processing flow has already been explained with reference to Figure 2. Here, a specific example of pre-consensus formation is shown. Figure 9 is a diagram explaining a specific example of pre-consensus formation by S-BFTC. Figure 9 (A) shows the case where four nodes that belong to the same basic unit and participate in the pre-consensus process all output the same processing value W. Only one group with a matching processing value W occurs, and the number of processing values W, i.e., the number of members, is 4, which is the only maximum value group in terms of the number of members. Since the number of members in other groups is zero, this maximum value exceeds twice the number of members in other groups. Therefore, in this case, pre-consensus is established and the pre-consensus value is W.
[0074] FIG. 9(B) shows a case where two groups are generated: one containing three matching processed values W, and the other containing one processed value M. Of course, the number of processed values in each group is also the number of node computers that output these processed values. Here, the group with processed value W is the only one with the largest number of members. And the number of members in the group is more than twice that of the other groups, which is 1. Therefore, the pre-consensus is established and the pre-consensus value is W.
[0075] On the other hand, Figures 9(C) and (D) show cases where pre-consensus is not established and the pre-consensus value is indeterminate. In (C), the group with processing value W and the group with processing value M both have two members, and there is no group with the only maximum value. In (D), the group with processing value W, which is the only group with the largest number of members, cannot exceed twice the number of other members.
[0076] To summarize the above, in S-BFTC performed by four nodes, if the processed values match at three or more nodes, the condition for consensus establishment described with reference to Figure 2 is met. In other words, the condition that the number of members is the only maximum and exceeds twice the number of other members is met. When pre-consensus is established by S-BFTC in a basic unit, this basic unit is sometimes called the "pre-consensus establishment basic unit."
[0077] Furthermore, if there are two or less nodes with matching processing values, the above consensus conditions are not met, pre-consensus is not established in the basic unit, and the pre-consensus value is not determined. The basic unit is sometimes called a "basic unit for which pre-consensus is not established." An undefined consensus value is sometimes called an "undefined pre-consensus value." Through the pre-consensus formation step (stp2) described above, each of the basic units u0 to u3 is determined to be either a basic unit for which pre-consensus is established or a basic unit for which pre-consensus is not established.
[0078] Next, the consensus success / failure determination step (stp3) is performed. This is a process to determine whether or not the consensus for the execution of transaction TX is successful based on the pre-consensus values of the four basic units u0, u1, u2, and u3. Figure 10 is a diagram of the processing flow of the consensus success / failure determination step (stp3). In Figure 10, if the number of generated pre-consensus values is zero, the process branches to stpp6 as 'true'. In this case, the consensus is not established and the processing result of transaction TX is indeterminate (stpp6). In this case, transaction TX is not executed, and the balance state of the account in the distributed ledger network system is unchanged from the time when the transaction TX was requested. On the other hand, if the number of generated pre-consensus values is not zero, the process branches to stpp2 as 'false'.
[0079] If the number of generated pre-consensus values is 1, the result is 'true' and the process branches to step stpp7. In this case, consensus is established and the pre-consensus value becomes the consensus value. This is then used as the processing result of transaction TX, and the transaction is executed (stpp7). On the other hand, if the number of generated pre-consensus values is not 1, the result is 'false' and the process branches to step stpp3.
[0080] In stpp3, among the two or more pre-consensus values, the matching pre-consensus values are grouped together, and the number of pre-consensus values included is set as the number of members of that group. In the following stpp4, if there is only one maximum group in terms of the number of members, the process branches to stpp5 as 'true', consensus is established, and the matching pre-consensus value between the maximum group is determined as the processing result of transaction TX (stpp5). On the other hand, if there is not only one maximum group in terms of the number of members, the process branches to stpp8. In this case, consensus is not established and the processing result of transaction TX is indefinite. The above is the processing flow of the consensus success / failure determination step (stp3). This consensus success / failure determination step (stp3) is also performed in each node n0 to n15, and the same result is stored in the memory area of each node. Although not shown, any of nodes n0 to n15 may be referenced to block the processing result of the transaction TX thereafter.
[0081] <Evaluation of communication volume in the first embodiment> FIG. 11 is a diagram for estimating the amount of communication in the first embodiment of the present invention. The amount of communication in the first embodiment of the present invention will be estimated with reference to FIG. 11. First, a transaction TX entrusted with execution is communicated from a user CX1 to one of the nodes constituting the distributed ledger network system. Here, one communication occurs. The node that first accepts the transaction TX is the leader node n0. The leader node n0 distributes the transaction TX to the other backup nodes n1 to n15. Here, 15 communications occur. In FIG. 11, 16 nodes are collectively represented as four basic units u0, u1, u2, and u3. The node n0 belonging to the basic unit u0 communicates three times for distribution to other nodes belonging to the same basic unit, and communicates with each of the four nodes belonging to the other basic units, resulting in the above number of communications (16 communications).
[0082] S-BFTC is then performed for each basic unit. 3 x 4 communications occur for each basic unit, and four times this amount of communication is required for four basic units. In total, 48 communications [= (3 x 4) x 4] occur. And finally, in order for each node to determine whether the consensus was successful, the pre-consensus value generated by S-BFTC must be distributed to all nodes. Each node needs the pre-consensus values of basic units to which it does not belong. For one node in each basic unit to transmit the pre-consensus value to another basic unit, 48 communications [= (4 x 3) x 4] are required.
[0083] In sum, the number of communications required in the first embodiment is 112 (=16+48+48). This is greater than the number of communications required for the S-BFTC alone (16). However, it is less than the number of communications required for the 16-node BFTC (256) (see FIG. 5).
[0084] <Evaluating the resistance to Byzantine failure nodes in the first embodiment> Fig. 12 is a diagram showing a method for calculating the probability that a consensus will be established or not established in the first embodiment of the present invention. If we first select a node belonging to the basic unit u0 from 16 nodes n0, n1, n2, ..., n15, and then select nodes belonging to the basic units u1, u2, and u3 in that order, the number of cases can be calculated using the formula in Fig. 12 (A). From this formula, the number of cases for the selection method is CN2ALL = 63,063,000.
[0085] Here, the number of normal nodes and the number of faulty nodes included in the basic units u0, u1, u2, and u3, in which four nodes are collected from each of the basic units, are expressed as COMB(number of normal nodes in u0, number of faulty nodes in u0)(number of normal nodes in u1, number of faulty nodes in u1)(number of normal nodes in u2, number of faulty nodes in u2)(number of normal nodes in u3, number of faulty nodes in u3). In this case, the sum of the number of normal nodes and the number of faulty nodes in each basic unit is 4. As shown in Figure 12(B), there are a total of 625 combinations. This is because the number of combinations of the number of normal nodes and the number of faulty nodes in each basic unit is five, namely (4,0), (3,1), (2,2), (1,3), and (0,4), so for the four basic units, the calculation is 625 (=5 x 5 x 5 x 5) [Figure 12(C)].
[0086] Since we are evaluating resistance to Byzantine faulty nodes, we need to find the probability of consensus success or failure in a situation where the number of faulty nodes among the 16 nodes increases between 0 and 16. Therefore, we need to calculate the above 625 combinations for 17 variations in the number of faulty nodes: 0, 1, 2, ..., 16. In other words, we need to find the "number of cases" for 10,625 (= 625 x 17) combinations. Then, by dividing that "number of cases" by CN2ALL, we can find the probability that that "case" will occur.
[0087] FIG. 13 shows a specific calculation method for the "number of cases" when the number of normal nodes and the number of faulty nodes that compose each basic unit are specified. FIG. 13 (A) shows a condition where 9 normal nodes and 7 faulty nodes are included in the 16 nodes. In this case, the calculation method for the number of cases that generate COMB(3,1)(1,3)(3,1)(2,2) is shown. The number of combinations of three normal nodes and one faulty node that compose the basic unit u0 is the product of the number of combinations of three nodes that are picked from the nine normal nodes and the number of combinations of one node that is picked from the seven faulty nodes. The number of combinations of one normal node and three faulty nodes that compose the basic unit u1 is the product of the number of combinations of one node that is picked from the remaining six normal nodes and the number of combinations of three nodes that are picked from the remaining six faulty nodes. The basic units u2 and u3 can be calculated by similar multiplication. Multiplying all of these together, CN2=2,116,800. Dividing this by CN2ALL gives an occurrence probability of 3.35664%. Note that, according to the consensus success / failure determination step (stp3), a consensus is established by normal nodes for COMB(3,1)(1,3)(3,1)(2,2).
[0088] FIG. 13(B) shows a method for calculating the number of cases in which COMB(3,1)(0,4)(4,0)(2,2) occurs under the same condition that the 16 nodes include 9 normal nodes and 7 faulty nodes. Calculating in the same way as above, the number of cases CN2 = 132,300 is calculated. Dividing this by CN2ALL makes it possible to calculate the occurrence probability of 0.20979%. The same combination COMB(3,1)(0,4)(4,0)(2,2) also achieves consensus by normal nodes according to the consensus success / failure determination step (stp3).
[0089] FIG. 13(C) shows the same combination COMB(3,1)(0,4)(4,0)(2,2) as in (B), but the 16 nodes consist of 11 normal nodes and 5 faulty nodes. If the formula for CN2 is created in the same way as above, the final multiplier is the number of combinations that take 2 from 0 faulty nodes. Since this is impossible and cannot be realized, it is multiplied as zero. Then, CN2=0, and the occurrence probability is 0.0%. By finding the occurrence probability of all combinations using the method described above, the resistance to Byzantine faulty nodes in the first embodiment can be evaluated.
[0090] Fig. 14 is a diagram showing an evaluation of resistance to faulty nodes in the first embodiment, and shows the transition of the probability of consensus establishment when the number of faulty nodes increases from 0 to 16. In Fig. 14 (A), the vertical axis is the occurrence probability, and the horizontal axis is the number of faulty nodes. The white bar graph shows the probability that valid consensus is established by normal nodes. The diagonal line bar graph shows the probability that consensus is not established. The black bar graph shows the probability that fraudulent consensus is established by a faulty node that performs fraudulent processing due to a Byzantine fault.
[0091] According to FIG. 1(A), when the number of faulty nodes is between 0 and 5, consensus is established by normal nodes with a 100% probability. In addition, as the number of faulty nodes increases to 6 and 7, the probability of consensus failure increases to 1.2% and 22.2%. A distributed ledger network system that applies this consensus method can detect whether consensus is successful or not, so if consensus is not established, the probability of consensus establishment increases if it is retried. Therefore, if the number of faulty nodes is up to 7, the system can be operated provisionally as is until the faulty nodes are resolved. For example, when the number of faulty nodes is 6, the probability of consensus failure in two consecutive consensus processes is 0.0144%. In other words, if consensus processing is performed twice, consensus is established by normal nodes with a 99.9856% probability. Even when the number of faulty nodes is 7, consensus is established by normal nodes with a 95.0716% probability after two consensus processes.
[0092] Fig. 14(B) is a diagram comparing the probability of consensus establishment that changes with an increase in the number of faulty nodes between the first embodiment and the 16-node BFTC. In both cases, consensus is established by normal nodes with a 100% probability when the number of faulty nodes is 5 or less. Furthermore, when the number of faulty nodes is 6 to 7, the first embodiment has a higher probability of consensus establishment by normal nodes.
[0093] <Second embodiment> In both the BFTC with (3f+1) nodes (where f is a natural number) and the first embodiment of the present invention, the consensus result is stored in each node. In order to block this, it is necessary to read the consensus value from one of the nodes. However, if the node attempting to read the information happens to be a faulty node, there is a problem in that there is no guarantee that the information provided is legitimate. Therefore, a second embodiment of the present invention will be described, which uses only information read from highly reliable nodes.
[0094] Figure 15 is a diagram showing a transaction processing process of a distributed ledger network system according to a second embodiment of the present invention. The second embodiment is common to the first embodiment described with reference to Figure 8 in the transaction distribution processing step (stp0), unitization step (stp1), and pre-consensus formation step (stp2). However, the consensus determination step (stp3) is performed by the consensus success / failure determiner col1. The 16 nodes n0, n1, n2, and n15 that have completed the pre-consensus formation step (stp2) send the result of the pre-consensus formation step (stp2) to the consensus success / failure determiner col1 as data in a specified format.
[0095] Fig. 16 is a diagram explaining the data format sent from a node to the consensus success / failure judgement unit col1. Fig. 16 (A) is an example of the data format received by the consensus success / failure judgement unit col1. Here, each basic unit has a trust point voting area TPV that votes the trust points of the four nodes involved in the pre-consensus formation step (stp2), and a processing value storage area TEV that stores the processing value by the node itself. In addition, it has a unitization table GTB, which will be described later.
[0096] Figure (B) is an example of data sent by each node. This is an example where nodes n0, n2, and n3 output a processing value W in a certain basic unit, and node n1 outputs a processing value M. At this time, in the trust point voting area TPV of the data sent by n0, one point is voted for each of nodes n2 and n3 that output the same processing value as themselves, and for the area corresponding to n0 itself. And the processing value storage area TEV stores the processing value W output by itself.
[0097] In addition, in the transmitted data of n1, 1 point is voted for only its own region in the trust point voting area TPV. This is because the processing value does not match with other nodes. And the processing value storage area TEV stores the processing value M output by itself.
[0098] In the transmission data of n2 and n3, the trust point voting area TPV votes for the own area and for the two nodes that output the same processing value of the own area, and stores the processing value W output by the own area in the processing value storage area TEV. Each trust node can vote for 1 point each for the other three nodes.
[0099] FIG. 1C shows the results of the trust points tallied by the consensus success / failure judgement unit col1. In this example, nodes n0, n2, and n3 have each acquired three trust points. This indicates that the processing values between the three nodes match. Node n1 has only acquired one point for self-voting. If the processing values of all four nodes in a basic unit match, each node will acquire four trust points. Based on this, the consensus success / failure judgement unit col1 temporarily assumes that a node that has acquired three or more trust points is a provisionally trustworthy node, and as a result of the pre-consensus formation step (stp2) in the basic unit to which the node belongs, the pre-consensus value in the pre-consensus establishment is the processing value sent from the node in question, which is regarded as the pre-consensus value in that basic unit.
[0100] Fig. 17 is a diagram explaining the configuration of the consensus success / failure judgement unit col1. As shown in Fig. 17, the consensus success / failure judgement unit col1 is composed of a data receiving unit c1, a received data storage unit c2, a reliability point tallying unit c3, a pre-consensus establishment basic unit selection unit c4, a pre-consensus value frequency counter c5, a consensus judgement unit c6, a judgement result holding unit c7, a data distribution unit c8, and a unitization table verification unit c9.
[0101] The data transmitted from the 16 nodes n0 to n15 after the pre-consensus formation step (stp2) is received by the data receiving unit c1 and temporarily stored in the received data storage unit c2. The received data consists of a trust point voting area TPV, a processing value storage area TEV, and a unitization table GTB.
[0102] The unitization table verification unit c9 compares and verifies the unitization tables GTB transmitted from each node. The unitization table GTB defines how the 16 nodes are divided into basic units u0, u1, u2, and u3 determined by the leader node n0. The tables transmitted from each node should match. These tables are digitally signed by the leader node n0, and cannot be tampered with by each node without leaving a trace. Nevertheless, if the unitization tables GTB received from each node do not match, it means that the leader node n0 has cheated and transmitted different unitization tables GTB to each node. In this case, the reliability of the pre-consensus formation step (stp2) is not ensured, and the unitization step (stp1) and the pre-consensus formation step (stp2) are performed again. The fact that these will be performed again is transmitted to each node via the data distribution unit c8.
[0103] When the consensus process is rerun, the leader node n0 suspected of being a faulty node is excluded. A new leader node is selected from the other nodes for the rerun of the consensus process. It may be decided in advance which node will be the leader node when the consensus process is rerun. All nodes participating in the consensus process may be assigned consecutive numbers, and if a fault is found in the first leader node, a node with a higher or lower number may be selected as the new leader node. The new leader node redefines the unitization table GTB, attaches the node's digital signature to it, and distributes it to other consensus process participating nodes. The transaction TX to be processed has already been distributed to each node in a manner that makes it impossible to tamper with it using digital signatures, so there is no need to distribute it again.
[0104] Also, to increase the number of nodes participating in the consensus process to 16, one new node may participate. In this case, the new leader node may transmit the transaction TX and the unitization table GTB to the new node. Also, an operation in which the new leader node is treated as two nodes without increasing the number of nodes is possible. That is, when defining the unitization table GTB, the basic unit to which the new leader node belongs is configured with two other nodes belonging thereto, and the basic unit is composed of three nodes. Also, in the pre-consensus formation step (stp2), the processing value of the new leader node is counted as two. Also, which node is the leader node is clear from the digital signature attached to the unitization table GTB, or a mark that can distinguish between the leader node and other nodes (backup nodes) may be attached to the unitization table GTB.
[0105] The trust point tallying unit c3 tallies the points voted in the trust point voting area TPV. In addition, when the consensus process is re-executed, in an operation in which the new leader node is treated as two nodes, the voting points by the new leader node may be doubled. As a result of tallying the voted points, a node that has acquired three or more points is a provisionally trustworthy node. The pre-consensus establishment basic unit selection unit c4 selects a basic unit to which a node that has acquired three or more trust points belongs as a "pre-consensus establishment basic unit" and extracts the processing value by that node as the "pre-consensus value" of that pre-consensus establishment basic unit.
[0106] The pre-consensus value frequency counter c5 counts the frequency of the matching pre-consensus values extracted by the pre-consensus establishment basic unit selection unit c4. The number of pre-consensus values is the number of pre-consensus establishment basic units, and is between 0 and 4. If we take the frequency of the matching pre-consensus values, it is also between 0 and 4.
[0107] The consensus determiner c6 determines whether or not consensus has been achieved based on the frequency distribution output by the pre-consensus value frequency counter c5. If there is a single maximum frequency value in the frequency distribution, it determines that consensus has been achieved for the transaction TX. Then, it determines the pre-consensus value having this single maximum frequency value as the consensus value. Then, it refers to the processing values of each node stored in the received data storage unit c2, determines a node that matches this consensus value as a normal node, and determines a node that outputs a processing value other than this as a faulty node. In addition, this consensus value is eventually blocked as the processing value of the transaction TX.
[0108] On the other hand, when there is no pre-consensus value having a unique maximum frequency value in the frequency distribution output by the pre-consensus value frequency counter c5, the consensus determiner c6 determines that consensus on the transaction TX has not been formed.
[0109] In the consensus processing in the distributed ledger network system, many nodes exchange and process processing data to prevent fraudulent acts that occur when only some nodes are responsible for processing. In the BFTC algorithm, all nodes involved in the consensus processing exchange processing data. However, in the first and second embodiments of the present invention, all of these nodes are not involved in all pre-consensus processing, and there is a possibility that concerns will be raised about its opacity. Therefore, the judgment result holding unit c7 holds the consensus value determined by the consensus judger c6, all pre-consensus values found by the selection unit c4 of the pre-consensus establishment basic unit, and the processing values by each node extracted from the received data stored in the received data storage unit c2 for a certain period of time, and all nodes constituting this distributed ledger network system can read and verify the contents through the data distribution unit c8. In addition, when blocking the transaction TX after a certain period of time has passed, the consensus value can be obtained from here.
[0110] Since absolute reliability is required for the contents of the judgment result storage unit c7, it is preferable that the consensus success / failure determination unit col1 has a structure that does not cause or is difficult to cause a Byzantine fault. Therefore, it is preferable that the judgment result storage unit c7 is configured to realize only the minimum necessary functions, rather than a configuration with general-purpose functions, using a calculator, memory, and a program stored in the memory. For example, it is preferable that the configuration is configured with electronic circuits such as transistors, transistors, and logic, and does not include software processing that can cause hacking.
[0111] For this purpose, the pre-consensus value frequency counter c5 is required to simplify the operation of determining whether the pre-consensus value matches or does not match. For this reason, it is preferable that the processed values transmitted from each node are standardized. Standardization of the processed values may involve, for example, fixing the order or number of digits of the transfer source account number, transfer destination account number, transfer amount, and fees, which are the subject of the transaction. It is also preferable that the transfer conditions are classified into several types and standardized, such as by selecting one of them.
[0112] Since the nodes participating in the consensus process are capable of software processing, the description of the transaction TX from the user can be flexible. However, it is preferable that the processing value included in the data sent to the consensus success / failure judgement unit col1 is standardized.
[0113] <Evaluation of communication volume in the second embodiment> Returning to FIG. 15 again, the amount of communication in the second embodiment is evaluated. FIG. 15 is a diagram showing the transaction processing process of the distributed ledger network system of the second embodiment according to the present invention. In FIG. 15, one communication of transaction TX occurs from user CX1 to node n0. 15 communication of transaction TX occurs from node n0 to other nodes n1 to n15. In FIG. 15, four nodes are grouped together and described as basic units u0 to u3. Then, 48 [=(3×4)×4] communications occur in the pre-consensus process by S-BFTC. Finally, data is sent from each of the 16 nodes to the consensus success / failure judger col1, so 16 communications occur. In total, 80 (=1+15+48+16) communications are required. This is just over 30% of the number of communications required for the 16-node BFTC, 256, and it can be said that the second embodiment according to the present invention is highly effective in reducing the amount of communication. [Industrial Applicability]
[0114] An embodiment of the present invention can be used as a consensus formation method and a consensus formation program that reduce the amount of communication in a distributed ledger network system while being highly tolerant to failed nodes. [Explanation of symbols]
[0115] CX1: User, TX: Transaction, nx0~nx15, n0~n15... Nodes participating in the consensus process, col1: consensus success / failure judgement unit, u0~u3: basic unit, TPV: Trust point voting area, TEV: Processing value storage area, GTB: unitization table, c1: data receiving section, c2: received data storage section, c3: reliability point aggregation unit, c4: pre-consensus establishment basic unit selection unit, c5: Pre-consensus value frequency counter, c6: Consensus judger, c7: judgment result storage unit, c8: data distribution unit, c9: unitization table verification unit
Claims
1. A network system is constructed in which 16 or more computers each act as a node computer and share information in a peer-to-peer manner. By entrusting a series of transaction processes, such as transferring a portion of assets from one account to another account, to a first node computer among the node computers, the first node computer is called a leader node, Among the 16 or more node computers, the leader node selects 15 node computers, or 15 node computers selected in advance other than the first node computer are called backup nodes. The leader node distributes the contents of the series of transactions entrusted to the 15 backup nodes, Each of the 16 nodes consisting of the leader node and the backup node independently performs the series of transaction processes to obtain a processing value, The 16 nodes are grouped into four basic units, each consisting of four nodes, as a first basic unit, a second basic unit, a third basic unit, and a fourth basic unit, In each of the four basic units, the four nodes belonging to the basic unit compare the processed values with each other, and if the processed values by three or more nodes match, a pre-consensus is established in the basic unit, and the matching processed value is defined as the pre-consensus value output by the basic unit. After that, When there is one or more basic units for which the pre-consensus is established, the basic units having the same pre-consensus value form a pre-consensus group, and the number of the basic units belonging to each pre-consensus group is defined as the number of members of the pre-consensus group; A distributed ledger network system, also known as a blockchain, in which consensus is deemed to be established when there is a unique pre-consensus group with the maximum number of members, the results of the series of transaction processing are determined based on the pre-consensus value that matches in the unique pre-consensus group with the maximum number of members, and the determined results of the series of transaction processing are blocked to make them difficult to tamper with. Hmm.
2. A computer that constitutes a network system for sharing information peer-to-peer and operates as the leader node in the distributed ledger network system according to claim 1.
3. A computer that constitutes a network system for sharing information peer-to-peer and operates as the backup node in the distributed ledger network system described in claim 1.
4. a consensus success / failure determination unit that receives and operates on standard format data transmitted from the 16 nodes; The 16 nodes are grouped into four basic units, namely, the first basic unit, the second basic unit, the third basic unit, and the fourth basic unit, and for each of the four basic units, the four nodes belonging to the basic unit create the standard format data based on a result of comparing the processed values with each other, and transmit the standard format data to the consensus success / failure determiner, The fixed format data includes a trust point voting area in which each of the nodes votes points for other nodes that have output the processing value that matches the node itself, a processing value storage area in which the processing value obtained by the node itself is stored, and a unitization table in which node members constituting each of the basic units are recorded, The consensus success / failure determination device determines whether or not a consensus has been reached based on the received standard format data, counting the points voted in the trust point voting area, and regarding a node that has reached a predetermined number of points as a trustworthy node, and then determining the basic unit to which the trustworthy node belongs based on the records in the unitization table; It is assumed that a pre-consensus has been established for the basic unit to which the trusted node belongs, The processed value stored in the processed value storage area as obtained by the trusted node is defined as a pre-consensus value of the basic unit, when there is a pre-consensus value having a unique maximum frequency value in the occurrence frequency of each of the pre-consensus values determined through the template data, the series of transaction processing values are determined according to the pre-consensus value having the unique maximum frequency value, and the determined series of transaction processing values are blocked to make it difficult to tamper with the transaction processing values.
2. The distributed ledger network system of claim 1.
5. In a network system in which 16 or more computers each serve as a node computer and share information in a peer-to-peer manner, a transaction processing step of performing a series of transaction processes, such as transferring a part of assets from one account to another account, to determine the series of transaction processes and obtaining a self-processing value; a pre-consensus formation step in which the node computer receives three other processing values obtained by the same series of transaction processing independently performed by the other three computers belonging to the same group as the self node computer, and when there are three or more processing values that match among the four processing values consisting of the other processing values and the self processing values, the node computer defines the three or more matching processing values as a group pre-consensus value in the same group, determines that a pre-consensus has been established in the same group, and shares the group pre-consensus value in the same group in the network system; the node computers compare other group pre-consensus values in other groups shared by those not belonging to the same group using the network system with group pre-consensus values in the same group, and form a pre-consensus group based on the matching group pre-consensus values in the same group or the other group pre-consensus values in the other groups; The number of the same group and the other groups included in the formed pre-consensus group is defined as the number of members of the pre-consensus group; a consensus determination step of determining that consensus has been established when there is a unique pre-consensus group with the maximum number of members, and determining a group pre-consensus value in the same group or an other group pre-consensus value in the other group included in the unique pre-consensus group with the maximum number of members as a processing result of the series of transaction processing to be determined, A program for causing the self-node computer to
6. In a network system in which 16 or more computers each serve as a node computer and share information in a peer-to-peer manner, a transaction processing step of performing a series of transaction processes, such as transferring a part of assets from one account to another account, to determine the series of transaction processes and obtaining a self-processing value; a pre-consensus formation step in which the node computer receives three other processing values obtained by the same series of transaction processing independently performed by the other three computers belonging to the same group as the self node computer, and when there are three or more processing values that match among the four processing values consisting of the other processing values and the self processing values, the node computer defines the three or more matching processing values as a group pre-consensus value in the same group, determines that a pre-consensus has been established in the same group, and shares the group pre-consensus value in the same group in the network system; the node computers compare other group pre-consensus values in other groups shared by those not belonging to the same group using the network system with group pre-consensus values in the same group, and form a pre-consensus group based on the matching group pre-consensus values in the same group or the other group pre-consensus values in the other groups; The number of the same group and the other groups included in the formed pre-consensus group is defined as the number of members of the pre-consensus group; a consensus determination step of determining that consensus has been established when there is a unique pre-consensus group with the maximum number of members, and determining a group pre-consensus value in the same group or an other group pre-consensus value in the other group included in the unique pre-consensus group with the maximum number of members as a processing result of the series of transaction processing to be determined. A method of reaching consensus in a distributed ledger network system, also known as blockchain.
Citation Information
Patent Citations
Method, device, computer device and storage medium for electing representative node equipment
CN109165945A
Blockchain data structure and task processing method and device
CN110941673A
Blockchain management system, blockchain management method, and blockchain management program
JP2020061696A
Facilitating consensus and node synchronization for practical Byzantine fault-tolerant blockchains
JP2020504351A
Event-driven blockchain workflow processing
JP2020515939A
