Method and program for storing transactions representing asset transfers in a distributed network
By processing transactions in parallel in multiple subnets and utilizing private key signatures and consensus signatures, the problem of reduced transaction processing speed in the blockchain network is solved, efficient asset transfer transaction processing is achieved, and the scalability of the blockchain is improved.
Patent Information
- Application Number
- CN202080026817.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-02-03
- Filing Date
- 2020-02-02
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2040-02-02
AI Technical Summary
At this stage, when the number of nodes in the blockchain network is increased to improve tamper resistance, the transaction processing speed is reduced and the scalability cannot be effectively improved. Especially in the case of managing asset transfers, it is difficult to process multiple transactions.
By processing transactions in multiple subnets in parallel, receiving transactions, generating blocks, and updating asset status after consensus is formed, sending transactions to subnets that can handle transfer destinations, using private key signatures and consensus signatures to ensure the validity of transactions sex and consistency.
It achieves a significant increase in transaction processing speed per unit time in multiple subnet distributed networks, can perform multiple transaction processing at the same time, and improves the scalability of the blockchain.
Smart Images

Figure CN113661683B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for storing transactions representing asset transfers in a distributed network having a plurality of nodes, a program for the method, and nodes for constituting the distributed network. Background Art
[0002] The blockchain network, which builds a database on a distributed network consisting of multiple nodes, has a high tamper-proof capability due to its decentralized nature. This is because even if the database is tampered with in a certain node, it is difficult to rewrite the entire distributed network. The blockchain stored in each node functions as a database in synchronization with each other.
[0003] Increasing the number of nodes increases the tamper-proof capability, but since each node must store the same blockchain, the processing speed for block selection is usually reduced. Intuitively, increasing the number of nodes can increase the processing speed per unit time, but in the blockchain, it will decrease, so at this stage, various attempts are being made to increase the block size and reduce the data capacity of one or more transactions contained in the block. Summary of the invention
[0004] Problem that the invention aims to solve
[0005] However, among the various attempts at the current stage, no attempt has been found to significantly improve scalability. Especially when considering the management of asset transfers in a database on a distributed network, there are also examples of being able to process several transactions per second. Scalability is an urgent issue in the practical application of blockchain.
[0006] The present invention has been completed in view of such problems, and its purpose is to significantly improve the transaction processing speed per unit time in a method for storing transactions representing asset transfers in a distributed network having multiple nodes, a program for the method, and nodes for constituting the distributed network.
[0007] Technical means of solving problems
[0008] In order to achieve such an object, the first mode of the present invention is a method for storing transactions representing asset transfers in a distributed network having multiple subnets, the method being characterized in that a node constituting a first subnet among the multiple subnets performs the following steps: receiving a first transaction, the first transaction representing an asset transfer from a transfer source identifier that can be processed in the first subnet to a transfer destination identifier that cannot be processed in the first subnet; generating a block including the first transaction; updating the asset status of the transfer source identifier after a consensus on the selection of the block is formed in the first subnet; and after a consensus on the selection of the block is formed in the first subnet, sending a second transaction to a second subnet that can process a transfer source identifier consistent with the transfer destination identifier of the first transaction, the second transaction being used to reflect the asset transfer to the transfer destination identifier represented by the first transaction.
[0009] Furthermore, a second aspect of the present invention is characterized in that, in the first aspect, a signature of a private key of the transfer source identifier is added to the first transaction.
[0010] Furthermore, a third aspect of the present invention is characterized in that, in the first aspect or the second aspect, the amount of the asset to be transferred is a positive value.
[0011] Furthermore, a fourth aspect of the present invention is characterized in that, in any one of the first to third aspects, a signature indicating that a consensus has been reached in the first subnet is attached to the second transaction.
[0012] Furthermore, a fifth aspect of the present invention is characterized in that, in the fourth aspect, the signature of the second transaction is a single signature.
[0013] In addition, the sixth mode of the present invention is characterized in that, in the fourth mode or the fifth mode, the signature of the second transaction is a signature for a block header, which includes a Merkle root of a Merkle tree based on multiple transactions including the first transaction in the block.
[0014] In addition, the seventh mode of the present invention is a program for causing a node constituting the first subnet among multiple subnets to execute a method for storing transactions representing asset transfers in a distributed network having the multiple subnets, the method being characterized in that the node performs the following steps: receiving a first transaction, the first transaction representing an asset transfer from a transfer source identifier that can be processed in the first subnet to a transfer destination identifier that cannot be processed in the first subnet; generating a block including the first transaction; updating the asset status of the transfer source identifier after a consensus on the selection of the block is formed in the first subnet; and after a consensus on the selection of the block is formed in the first subnet, sending a second transaction to a second subnet that can process a transfer source identifier consistent with the transfer destination identifier of the first transaction, the second transaction being used to reflect the asset transfer to the transfer destination identifier represented by the first transaction.
[0015] In addition, the eighth mode of the present invention is a node configured to store transactions representing asset transfers in a distributed network having multiple subnets, the node being characterized in that it receives a first transaction representing an asset transfer from a transfer source identifier that can be processed in the first subnet to a transfer destination identifier that cannot be processed in the first subnet, generates a block containing the first transaction, updates the asset status of the transfer source identifier after a consensus on the selection of the block is formed in the first subnet, and after a consensus on the selection of the block is formed in the first subnet, sends a second transaction to a second subnet that can process a transfer source identifier consistent with the transfer destination identifier of the first transaction, the second transaction being used to reflect the asset transfer to the transfer destination identifier represented by the first transaction.
[0016] In addition, the ninth aspect of the present invention is a method for storing transactions representing asset transfers in a distributed network having a plurality of subnets, wherein the node constituting the first subnet of the plurality of subnets performs the following steps: receiving a first transaction, the first transaction representing an asset transfer from a transfer source identifier that can be processed in the first subnet to a transfer destination identifier that cannot be processed in the first subnet; generating a first block including the first transaction; after a consensus on the selection of the first block is formed in the first subnet, updating the asset status of the transfer source identifier; and After a consensus is formed on the selection of the first block in the first subnet, a second transaction is sent to a second subnet that can process a transfer source identifier that is consistent with the transfer destination identifier of the first transaction, and the second transaction is used to reflect the asset transfer to the transfer destination identifier represented by the first transaction. The nodes constituting the second subnet perform the following steps: accept the second transaction; generate a second block containing the second transaction; and after a consensus is formed on the selection of the second block in the second subnet, update the asset status of the transfer destination identifier of the second transaction.
[0017] In addition, the tenth mode of the present invention is a distributed network having multiple subnets for storing transactions representing asset transfers, wherein the distributed network is characterized in that it has a first subnet and a second subnet among the multiple subnets, and the nodes constituting the first subnet perform the following steps: receiving a first transaction, the first transaction representing an asset transfer from a transfer source identifier that can be processed in the first subnet to a transfer destination identifier that cannot be processed in the first subnet, generating a first block including the first transaction, and updating the transfer source identifier after a consensus on the selection of the first block is formed in the first subnet. The asset status of the first block is determined by the node of the second subnet, and after a consensus is formed on the selection of the first block in the first subnet, a second transaction is sent to a second subnet that can process a transfer source identifier consistent with the transfer destination identifier of the first transaction, and the second transaction is used to reflect the asset transfer to the transfer destination identifier represented by the first transaction. The nodes constituting the second subnet perform the following steps: receive the second transaction, generate a second block including the second transaction, and after a consensus is formed on the selection of the second block in the second subnet, update the asset status of the transfer destination identifier of the second transaction.
[0018] Effects of the Invention
[0019] According to one embodiment of the present invention, by forming a distributed network with a plurality of subnets and defining a transfer source identifier that can be processed in each subnet, transactions can be processed in parallel, and the processing of a plurality of transactions can be executed simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a diagram showing a distributed network according to one embodiment of the present invention.
[0021] Figure 2 This is a schematic diagram of a normal transaction according to one embodiment of the present invention.
[0022] Figure 3 This is a diagram for explaining the flow of a storage transaction method according to one embodiment of the present invention.
[0023] Figure 4 It is a schematic diagram of an anchor transaction according to one embodiment of the present invention.
[0024] Figure 5 This is a diagram for explaining the consensus formation process in one embodiment of the present invention.
[0025] Figure 6 It is a flowchart of a key generation method for consensus formation in one embodiment of the present invention.
[0026] Figure 7 This is a flowchart of a method for determining block selection in one embodiment of the present invention.
[0027] Figure 8 It is a schematic diagram of an anchor transaction according to another embodiment of the present invention.
[0028] Fig. 9 This is a diagram of Merkle tree data for explaining another embodiment of the present invention.
[0029] Fig.10 It is a schematic diagram of an anchor transaction according to another embodiment of the present invention. DETAILED DESCRIPTION
[0030] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0031] Figure 1 The distributed network 100 is an embodiment of the present invention. The distributed network 100 has a plurality of sub-networks, and the plurality of sub-networks perform different operations depending on the transfer source of the asset in the transaction to be stored in the database built on the distributed network 100. Figure 1 Although the first subnet 110, the second subnet 120, and the third subnet 130 are shown in FIG. 1 , the number of subnets is not limited to three.
[0032] Each subnet is composed of a plurality of nodes, each node is provided with a communication unit 111A such as a communication interface, a processing unit 111B such as a processor, a CPU, and a storage unit 111C including a storage device or a storage medium such as a memory, a hard disk, and can be configured by executing a program for executing each process. Each node can include one or more devices or servers, and the program can include one or more programs and can be recorded in a computer-readable storage medium as a non-transitory program product.
[0033] In the user terminal 140, a transaction is generated, which indicates the transfer from the transfer source identifier 201 such as the transfer source address of the asset 203 to the transfer destination identifier 202 such as the transfer destination address. An application for generating such a transaction is installed on the user terminal 140, or can be used on the user terminal 140 via a computer network such as the Internet.
[0034] Reference Figure 3 The method of storing a transaction representing an asset transfer according to the present embodiment is described below. First, a transaction 200 is generated in the user terminal 140 (S301), which represents a transfer from a transfer source identifier 201 of an asset 203 to a transfer destination identifier 202. In the transaction 200, the transfer source identifier 201, the transfer destination identifier 202, and the amount of the transferred asset 203 are described, and a signature 204 of a private key associated with the transfer source identifier 201 is attached. For example, the private key of the transfer source identifier 201 is managed so that only the user terminal 140 or the user of the user terminal 140 can access it, and only the user can legally perform the asset transfer from the transfer destination identifier 201.
[0035] Next, the user terminal 140 sends a request for a record entrustment of the transaction 200 to the distributed network 100 (S302). In each subnet, a value or range of a transfer source identifier that can process received transactions by itself is set. In this embodiment, the application of the user terminal 140 refers to the correspondence between the transfer source identifier and the value or range of the transfer source identifier that each subnet can process to determine the destination of the request for a record entrustment of the transaction 200. Figure 1 as well as Figure 2 In the example of , the first subnet 110 receives transaction 200 .
[0036] More specifically, when sending transaction 200 to the first subnet 110, it is sent to one or more nodes constituting the first subnet. The node 111 that receives transaction 200 stores transaction 200 in its storage unit 111C or a storage medium or storage device that can be accessed from the node, so as to subsequently process transaction 200. The node 111 that receives transaction 200 sends transaction 200 to other nodes constituting the first subnet 110 as needed, and stores it in a node that participates in the consensus formation of block selection among the multiple nodes constituting the first subnet 110.
[0037] Then, any one of the nodes 111 constituting the first subnet 110 generates a block including one or more transactions among the previously stored transactions, and performs a consensus formation process for selecting the block in the first subnet 110 (S303). When consensus formation is performed, each node participating in the consensus formation adds the block to the blockchain stored by each node. Each node of the first subnet 110 stores a public key corresponding to a private key of a transfer source identifier that can be processed in the first subnet 110, and can verify the validity of the signature 204 when receiving a transaction or when generating a block. The details of the consensus formation process performed in the first subnet 110 will be described later. The public key may not be stored in advance by each node, and the transaction 200 may include a public key corresponding to a private key of the signature 204 attached to the transaction 200, or the public key may be attached to the transaction 200, or may be calculated based on the signature 204.
[0038] In addition to the blockchain, each node also stores the correspondence between the identifier that maintains the asset status associated with the transfer source identifier that each node can process and the asset status, and after appending the block to the blockchain, records the asset transfer from the transfer source identifier described in one or more transactions included in the appended block (S304). The correspondence is not limited to the form of a table, but is sometimes referred to as an "asset table" for convenience. In addition, the correspondence can also be stored in a storage medium or storage device that can be accessed from each node.
[0039] More specifically, as an example, consider a case where the transfer source identifier and the transfer destination identifier that can be processed in the distributed network 100 are a 10-digit string starting with "A", a 10-digit string starting with "B", and a 10-digit string starting with "C". Then, it is assumed that the first subnet 110 is set to be able to process the transfer source identifier starting with "A", the second subnet 120 is set to be able to process the transfer source identifier starting with "B", and the third subnet 130 is set to be able to process the transfer source identifier starting with "C". When consensus formation is performed on a block including a transaction 200 in which the transfer source identifier 201 "A13afb3sdf" is recorded in the first subnet 110, each node 111 of the first subnet 110 updates the asset balance of the identifier "A13afb3sdf" in the asset table stored therein. Specifically, the asset balance of the transfer source identifier "A13afb3sdf" is reduced by 10 BTC.
[0040] Then, the node that generated the appended block or other nodes in the first subnet sends transaction 400 to the subnet whose transfer destination identifier is consistent with the transfer source identifier that can be processed in its own network, and the transaction 400 corresponds to a transaction whose transfer destination identifier in one or more transactions included in the appended block is inconsistent with the transfer source identifier that can be processed in the first subnet 110 (S305).
[0041] Here, the case where the generation of transaction 400 is performed after the update of the asset table is described, but the reverse may also be true. When the consensus formation process (S303) includes verification that the amount of the asset transferred from the transfer source identifier of each transaction included in the block is greater than the balance of the transfer source identifier, the order may be reversed, but if it is not included, verification that the amount of the asset transferred is greater than the balance may be included in the asset table update process (S304), and the sending of transaction 400 is executed under the condition that the verification result is positive.
[0042] With Figure 2 The transaction 200 shown corresponds to Figure 4 For example, transaction 400 causes the transfer of asset 203 represented by transaction 200 stored in first subnet 110 to be reflected in second subnet 120 that can handle a transfer source identifier that matches transfer destination identifier 202, and describes transfer source identifier 401, transfer destination identifier 402, and the amount of transferred asset 403. Figure 2 The transaction is different in 200 Figure 4 In the transaction 400, the attached signature 404 indicates that the block containing the transaction 200 has reached a consensus on the selection of the block in the first subnet 110, that is, it indicates the signature that is appended to the blockchain. Figure 4 In FIG. 4 , the signature 404 is shown as “A”. The details of the signature 404 will be described later.
[0043] In the following, transaction 400 is to maintain the consistency of asset status between subnets, which is called anchoring (ペグ), so it is sometimes called "anchor transaction" (ペグトランザクション), and signature 404 is sometimes called "anchor signature".
[0044] In the second subnet 120 that receives the anchor transaction 400, a block including the anchor transaction 400 is generated at any node, and after consensus formation processing (S306) on the selection of the block is performed, the block is appended to the blockchain of each node. Each node of the second subnet 120 stores a public key corresponding to the private key of the transfer source identifier that can be processed in the second subnet 120, and stores a public key associated with the anchor signature of another subnet. The anchor signature 404 of the transaction 400 is verified as valid by the public key, so that the transaction 400 can be determined to be an anchor transaction. The public key may not be pre-stored by each node, and the anchor transaction 400 may include a public key corresponding to the private key of the signature 404 attached to the transaction 400, or the public key may be attached to the transaction 200. In any case, each subnet can confirm which subnet the public key corresponding to the private key of the signature 404 attached to the anchor transaction 400 corresponds to, which private key can sign. In other words, it can confirm which subnet the so-called holder of the public key is.
[0045] In order to distinguish whether a transaction received by a certain subnet is a normal transaction 200 or an anchor transaction 400, as described above, it can be considered to be determined by the public key used for signature verification, but it can also be considered to be determined based on the identifier. That is, if the transfer source identifier is not a transfer source identifier that can be processed in the own network, and the transfer destination identifier is consistent with any one of the transfer source identifiers that can be processed in the own network, then the transaction can be determined as the anchor transaction 400.
[0046] After the block is added, for the anchor transaction 400 included in the block, each node updates the asset balance of the transfer destination identifier 402 of the anchor transaction 400 and records the transfer of the asset 203 (S307). In the normal transaction 200, as described above, the asset balance of the transfer source identifier 201 of the asset 203 is updated, and in the anchor transaction 400, the asset balance of the transfer destination identifier 402 is updated. The transfer destination identifier 402 of the anchor transaction 400 can be consistent with any one of the transfer source identifiers that can be processed in the second subnet 120, and each node of the second subnet 120 can refer to the corresponding relationship between the transfer source identifier that can be processed in its own network and the asset state associated with the identifier in the storage unit of each node or the storage medium or storage device that can be accessed from each node to perform the update.
[0047] As described above, the distributed network is composed of multiple subnets, and the transfer source identifiers that can be processed are defined in each subnet, so that transactions can be processed in parallel and multiple transactions can be processed simultaneously. Therefore, the transaction processing speed per unit time can be greatly improved.
[0048] In the above description, in the application used by the user terminal 140, the corresponding relationship between the transfer source identifier and the value or range of the transfer source identifier that can be processed is referred to to determine the sending destination of the record entrustment request of the transaction 200, but it can also be sent to one or more subnets. If the transaction 200 is not a transaction that can be processed by the receiving subnet, the transaction 200 can be forwarded to the subnet that can process it. In addition, a forwarding node (not shown) can also be set in the distributed network 100, and the transaction 200 originally sent from the user terminal 140 is received in the forwarding node, and the subnet that can process the transaction 200 is determined based on the value of the transmission source identifier 201.
[0049] In the above description, the destination of the anchor transaction 400 is described as being defined in the first subnet 110 , but it may be considered that the anchor transaction 400 is sent in the same manner as the destination of the normal transaction 200 .
[0050] In the above description, the amount of the asset 203 is not particularly limited, but it is preferably a positive value, and if there is an insufficient balance during verification of the transaction 200, it is preferably processed as an invalid transaction. When it is a negative value, that is, when the transfer source identifier 201 receives the asset 203, since the asset balance of the transfer destination identifier 202 is not managed in the asset table of the first subnet 110, it is impossible to verify whether the balance is insufficient. Therefore, although the block containing the transaction is added in the first subnet 110, it may be processed as invalid in the second subnet 120 due to the insufficient balance of the transfer destination identifier 202.
[0051] Note that if "only" is not described as in the descriptions "only based on ××", "only according to ××", and "only in the case of ××", additional information may be considered in this specification. It should also be noted that as an example, the description of "in the case of a, do b" does not necessarily mean "in the case of a, always do b" unless explicitly stated.
[0052] In addition, for the sake of caution, even if there are aspects of performing actions different from the actions described in this specification in certain methods, programs, terminals, devices, servers or systems (hereinafter referred to as "methods, etc."), the various modes of the present invention are aimed at actions that are the same as any of the actions described in this specification. It is also pointed out that the existence of actions different from the actions described in this specification does not exclude the method, etc. from the scope of various aspects of the present invention.
[0053] Details of consensus formation
[0054] Consensus formation in the subnet can be carried out under various consensus algorithms. As an example, an algorithm that requires signatures of k nodes (k is an integer satisfying 2≤k≤N) out of N nodes (N is an integer greater than 2) participating in the consensus formation can be cited. If we consider the example of N=5 and k=3, this means that signatures of more than half of the nodes participating in the consensus formation are required. Then, in order to indicate that consensus formation has been carried out and the selection of the block for the consensus formation object has been determined, more than k signatures need to be added as a basis.
[0055] Depending on the values of N and k, there may be many combinations of nodes that can make the signatures of k nodes satisfy the specified conditions in the consensus algorithm, which may complicate the signature processing for the block on which the consensus is formed. Because, for example, in order to verify the signature of a block afterwards, it is necessary to confirm individually whether the multiple signatures attached to the block meet the specified conditions. Therefore, preferably, a single signature as described below indicates in the subnet that a consensus related to the selection of the block has been reached. This is true not only for the formation of consensus related to the selection of the block, but also for the formation of consensus for attaching the anchor signature 404 to the anchor transaction 400.
[0056] Figure 5The network 500 shown, for example, sets N to 5, and has a first node 510, a second node 520, a third node 530, a fourth node 540, and a fifth node 550. As shown in the figure for the first node 510, each node is a computer having a communication unit 511 such as a communication interface, a processing unit 512 such as a processor or a CPU, and a storage unit 513 including a storage device or a storage medium such as a memory or a hard disk, and can implement each of the processes described below by executing a prescribed program. The node 510 sometimes includes one or more devices or servers. In addition, the program sometimes includes one or more programs and can be recorded in a computer-readable storage medium as a non-transient program product. The hardware structure of other nodes is also the same. The following description is centered on the first node 510, but the same processing can also be performed in other nodes. In addition, sometimes the network 500 also includes nodes that do not participate in the formation of consensus.
[0057] In the prescribed program, rules related to the consensus algorithm and rules related to the establishment (セットアップ) are defined and can be pre-stored in the storage unit 513 or a storage device or storage medium that can be accessed by the first node 510 via the network.
[0058] The process that should be performed to enable the N nodes participating in consensus formation to move from a state where they can communicate with each other to a state where they can form a consensus related to block selection is called "establishment". When an establishment request is received outside or inside the network 500, establishment is started. Figure 5 An example of sending the request from the outside is shown in FIG. The request may include the number of signatures k required for consensus formation, which may also be pre-defined in the rules related to establishment. In addition, the request may include the designation of N nodes participating in consensus formation, which may also be pre-defined in the rules related to establishment.
[0059] When the values of N and k are determined in an arbitrary form and the execution establishment process is advanced, each node maintains a public key assigned to all nodes participating in the consensus formation, N public key shares assigned to each node participating in the consensus formation, and a private key share assigned to the node. In addition, each node also maintains the values of N and k or the value of k / N. The value of N can also be obtained based on the number of public key shares.
[0060] The private key and the public key have a relationship that the plain text signed by the private key can be verified by the public key, and the same is true for the private key share and the public key share corresponding thereto. Here, "private key share" refers to any one of a set of private key shares generated in such a way that the signature of the private key can be generated using the signature of a specified number k of private key shares in a set of N private key shares. Therefore, it is possible to generate a signature corresponding to the public key based on k private key shares without knowing the private key, and attach the signature to the block that is the object of consensus formation. The attached signature can be verified by the public key.
[0061] If further explained Figure 5 For example, a public key assigned to the entire network 500 is recorded as PK (short for Public Key), a private key corresponding to the public key is recorded as SK (short for Secret Key), and the public key shares and private key shares respectively assigned to the first node 510, the second node 520, the third node 530, the fourth node 540, and the fifth node 550 are recorded as PK1 and SK1, PK2 and SK2, PK3 and SK3, PK4 and SK4, PK5 and SK5. After establishment, for example, the first node stores PK, PK1 to PK5, and SK1 in the storage unit 513 of the node, or in a storage device or storage medium that can communicate with the node. The stored data can be accessed from the node in the subsequent consensus formation or its determination process.
[0062] Here, the public key PK is required for the verification of the signature that is finally attached, but sometimes the public key PK is not generated during the establishment phase. This is because the node or device that verifies the signature only needs to have the public key PK at the time of verification, and it is not necessary for each node of the network 500 to have the public key PK at the time of initial setting.
[0063] Figure 6 Here, as an example, consider a (k-1)th order polynomial f(x), and take the value of f(xi) (i is an integer from 1 to N representing the i-th node, and xi is an arbitrary integer) as the private key share SKi for each node.
[0064] First, the i-th node decides to use a im (m is an integer from 0 to k-1) with coefficients of (k-1) degree polynomial f i (x)(S601). Each node can select or generate a im and store it, and calculate f i (x).
[0065] [Formula 1]
[0066]
[0067] Next, the i-th node uses the generator g1 of the cyclic group G1 to send a of each m from 0 to k-1 to other nodes. im · The value of g1 or a message containing the value (S202). In addition, the i-th node sends f to the j-th node (j is an integer from 1 to N). i (x j ) or a message containing that value. Here, f i (x j ) can be sent at m and a im ·Sent before g1 or at the same time as g1.
[0068] The generator g1 is set to be stored in each node and known, or provided from any node to the N nodes participating in the consensus formation so that the N nodes can access and use it. Similarly, the value of the integer xi for the private key share f(xi) provided by the i-th node is set to be accessible and used by the N nodes. For example, these values can be stored in the storage unit of each node, or in a storage device or storage medium accessible from each node.
[0069] Then, in the jth node, add f to i from 1 to N i (x j ), calculate f(x j ), namely the private key share SKj (S204). The polynomial f(x) is defined as follows.
[0070] [Formula 2]
[0071]
[0072] Although it is unknown to any node, by considering f(xj) as shown in the following equation, each node can calculate the value of f(xj) without knowing f(x) itself.
[0073] [Formula 3]
[0074]
[0075] In addition, since each node can calculate m and a in its own node im g1, and has received m and a from other nodes im ·g1, so SKj·g1 can be calculated according to the following formula as the public key share PKj (S206).
[0076] [Formula 4]
[0077]
[0078] Because m and aim g1 and xi are known for all i, so all nodes can calculate the public key share PKi through this formula even if they do not know f(x).
[0079] The pairing of the public key share and the private key share obtained in this way is established as an encryption method by defining a bilinear map that satisfies the following formula: the bilinear map is to use the hash function of the hash value h of the block providing the consensus formation object as a mapping from arbitrary data to the cyclic group G2 with g2 as the generator, and multiply h by SKj to obtain SKj·h as the signature s j From G1×G2 to g T The cyclic group G of the generator T Here, a and b are arbitrary integers.
[0080] [Formula 5]
[0081]
[0082] That is, in the i-th node, after receiving the hash value h and signature s of the block of the consensus object from the j-th node j When , the known public key share PKj is used according to the above algorithm to obtain the following formula 6.
[0083] [Formula 6]
[0084] e(PKj,h)=e(SKj·g1,h)=e(g1,SKj·h)=e(g1,s j )
[0085] Therefore, the signature s received from the jth node can be verified using the known generator g1 j By defining the hash function in the establishment rules in advance, the hash value can be calculated in each node based on the block of the consensus object.
[0086] The number of bits of the generators g1 and g2 is preferably a prime number. As an example, the number of elements of the cyclic groups G1 and G2 generated by each generator is preferably 32 bytes, that is, about 256 bits or more. Here, the operations in the cyclic groups G1 and G2 are described additively. For example, the operation of repeatedly adding the generator g1 a times is recorded as a·g1, which is called "multiplying a by the generator g1". In addition, the multiplication of the elements of the set of integers such as ax is also used as a notation in this specification, but for the sake of caution, it is noted that this is different from the multiplication in the cyclic addition group.
[0087] In the above description, the premise is that the value of the (k-1)th degree polynomial function f(x) is defined as the private key share, and the value obtained by multiplying the private key share by the generator of the cyclic group is used as the signature method of the public key share, but as long as the signature of the private key can be generated using the signatures of a specified number k of private key shares in a group of N private key shares, a different signature method can also be used. In addition, at this time, it is preferred that each private key share can be generated in a distributed manner in each node, rather than providing a group of private key shares generated by any node of the network 500 or a node outside thereof to each node.
[0088] In the above description, the public key share PKj and the private key share SKj in the j-th node are used as an example, but it is noted that when describing the processing performed centered on the i-th node, the subscripts are naturally changed appropriately.
[0089] Figure 7 The flow of a determination method related to the selection of a block according to an embodiment of the present invention is shown. Starting from the state of completing the establishment, the first node 510 generates a block and sends a first message containing the block to the N nodes participating in the consensus formation (S701). The sending node itself can also receive the block. Here, messages can be sent and received directly or indirectly between nodes, and data related to consensus formation can be sent to other nodes constituting the network 100 and received from other nodes.
[0090] Each node that receives the first message evaluates the validity of the block according to the rules formed by consensus specified in the respective programs (S702). The details of the validity evaluation may include various rules such as whether the sender is a legitimate sending node, whether the data format of the block meets the prescribed format or other prescribed conditions corresponding to the purpose, whether a branch is generated, etc., and different rules may exist for different nodes. In addition, on the basis of the validity evaluation, it may also be necessary to send and receive messages with other nodes.
[0091] If it is evaluated as valid, the node sends a signature s to each node. i The second message (S703-1) of i It is a signature of the hash value h of the block that is the object of consensus formation based on the private key share f(xi) that the node can access. The signature can be performed by multiplying the private key share provided to the node by the hash value. The sending destination can also include the node itself. If it is evaluated as invalid, the block is rejected (S703-2).
[0092] After k signatures are gathered at the jth node, the node synthesizes these signatures and generates a signature corresponding to the public key PK (S704). Specifically, each node periodically or intermittently determines whether the k / N condition is satisfied. If it is satisfied, it can calculate f(0)·h as the signature SK·h of the private key SK corresponding to the public key PK based on the signatures of k or more private key shares received. Here, if more than k points (xi, f(xi)) are known, the (k-1)-order polynomial f(x) can be uniquely determined, using the case where the value of f(0) is considered to be the value of the unknown private key SK. If k points (xi, f(xi)·h) are known based on k signatures, the function f(x)·h can be determined. The calculation of f(0)·h can be performed, for example, using Lagrange interpolation.
[0093] In addition, for example, the public key PK can be calculated based on k or more points (xj, PKj) = (xj, f(xj)·g1) through Lagrange interpolation. This can be performed during the establishment phase and distributed as needed, or it can be generated based on k public key shares PKj by a node or device inside or outside the network 500 that performs signature verification during or before verification.
[0094] Then, if necessary, the generated single signature SK·h is broadcast or sent to other nodes (7305). Since the validity of more than k nodes has been evaluated, the block can be appended to the blockchain of the node at the time of successful synthesis, but as an example, the node after successful synthesis can send the synthesized signature to other nodes, and then each node can append the block based on the fact that more than the specified number of synthesized signatures have been received.
[0095] Finally, the block to which consensus is to be formed is signed SK·h and added to the blockchain of each node (S706). Thus, the selection of the block in the network 100 is finalized.
[0096] In the above description, the case where a private key share is provided to each node is considered, but the case where the number of shares provided to a node is set to multiple can also be considered. In addition, in the above description, although the details of the block as the object of validity evaluation are not mentioned, the block can include one or more transactions, or can include any one or more data. Moreover, the spirit of the present invention can also be applied to the evaluation of the validity of one or more data that may not form a chain in a computer network having multiple nodes.
[0097] Anchor Signature Details
[0098] The anchor signature 404 may be generated by a consensus algorithm that is the same as or corresponds to the consensus algorithm used in forming the consensus related to the selection of the block in the first subnet 110. Alternatively, the anchor signature 404 may be generated by a consensus algorithm that is different from the consensus algorithm used in the selection of the block in the first subnet 110.
[0099] In any case, as an example, the anchor signature 404 can be one or more signatures of one or more private key signatures for the hash value of the anchor transaction 400 or a portion thereof. In the second subnet 120 that receives the anchor transaction 400, when the anchor transaction 400 is received or when a block containing the anchor transaction 400 is generated, the validity of the anchor signature 404 is verified.
[0100] In this manner, although consensus formation has been performed once for block selection, for all transactions included in the block whose transfer destination identifiers are inconsistent with the transfer source identifiers that can be processed in the first subnet 110, anchor transactions 400 corresponding to them are generated, and consensus formation for signing as the first subnet 110 must be performed for each. The greater the number of subnets, the greater the number of transactions whose transfer destination identifiers are inconsistent with the transfer source identifiers that can be processed in the first subnet 110, and the more consensus formation processing is performed.
[0101] Therefore, in another method, a Merkle tree is used. In order to generate the anchor signature 404, first, a Merkle root of a Merkle tree based on a plurality of transactions included in a block added in the first subnet 110 or a transaction in which a transfer destination identifier in the transaction is inconsistent with a transfer source identifier that can be processed in the first subnet 110 is calculated. Then, a signature of a private key for the Merkle root is used as the anchor signature 404.
[0102] The anchor transaction 400 corresponds to a normal transaction 200 whose destination identifier is inconsistent with the transfer source identifier that can be processed in the first subnet 110. In addition to attaching the anchor signature 404, Merkle tree data M related to one or more nodes required for verifying the validity of the anchor signature 404 is also attached. Here, in this specification, "Merkle tree data" is data of one or more nodes constituting the Merkle tree, specifically, one or more hash values. The anchor transaction 400 is consistent with or includes data of the normal transaction 200, and a hash value of the anchor transaction 400 or a part thereof is generated. The hash value and the Merkle tree data M received together with the anchor transaction 400 are used to calculate the Merkle root, and the public key of the first subnet 110 is used to verify whether the anchor signature 404 is a signature for the Merkle root. As an example, the encryption method can use ECDSA. In the case of ECDSA, the public key can be calculated based on the signature.
[0103] Fig. 9 An example of a Merkle tree is shown. Assume that a block containing four transactions is added to the first subnet 110. Then, assume that the anchor transaction 400 corresponding to the second transaction tx2 is sent to the second subnet 120. In this case, since the hash value of the second transaction tx2 can be obtained as the hash value of the anchor transaction 400 or a part thereof, if the hash value of node 1 and the hash value of node 6 are added to the anchor transaction 400 as the Merkle tree data M, the Merkle root of node 7 can be calculated in the second subnet 120.
[0104] If the signature for the appended block in the first subnet 110 is a signature for the block header of the block, and the signature includes the Merkle root of the Merkle tree of the block, the signature for the block can be directly used as the anchor signature 404. In this case, in addition to the Merkle tree data M, the block header or the data B with the Merkle root removed from the block header can be attached to the anchor transaction 400, and the block header is generated in the second subnet 120, and the public key of the first subnet 110 is used to verify whether the anchor signature 404 is a signature for the block header.
[0105] In addition, as another method, it is possible to consider sending all blocks added in the first subnet 110 to the second subnet 120 as anchor transactions 400. In this case, since the block includes a transaction whose transfer destination identifier is inconsistent with the transfer source identifier that can be processed in the second subnet 120, unnecessary data will be sent, but the additional signature for the anchor transaction 400 in the first subnet 110 can be omitted, and the signature attached in the consensus formation on the selection of the block can be directly regarded as the anchor signature 404.
[0106] In this method, in the second subnet 120 that receives the block (equivalent to the "first block"), a block (equivalent to the "second block") containing one or more transactions contained in the block and whose transfer destination identifier is consistent with the transfer source identifier that can be processed in the second subnet 120, or transactions corresponding to them, is generated as the object of consensus formation.
[0107] Explanation of symbols
[0108] 100 distributed networks
[0109] 110 Subnet 1
[0110] 111 Node of the first subnet
[0111] 111A Communications Department
[0112] 111B Processing Department
[0113] 111C Storage Department
[0114] 120 Second Subnet
[0115] 130 3rd subnet
[0116] 140 User Terminal
[0117] 200 Normal transaction
[0118] 201 Transfer Source Identifier
[0119] 202 Transfer destination identifier
[0120] 203 Assets
[0121] 204 Signatures
[0122] 400 Anchor Transaction
[0123] 401 Transfer Source Identifier
[0124] 402 Transfer Destination Identifier
[0125] 403 Assets
[0126] 404 Anchor Signature
[0127] 500 Network
[0128] 510 Node 1
[0129] 511 Ministry of Communications
[0130] 512 Processing Department
[0131] 513 Storage
[0132] 520 Node 2
[0133] 530 Node 3
[0134] 540 4th Node
[0135] 550 5th Node
[0136] B block header or data with the Merkle root removed from the block header
[0137] M Merkle Tree Data
[0138] 1 to 7 are the nodes of the Merkle tree.
Claims
1. A method for storing transactions representing asset transfers in a distributed network having multiple subnets, The method is characterized in that the nodes constituting the first subnet of the plurality of subnets perform the following steps: receiving a first transaction representing an asset transfer from a transfer source identifier that can be processed in the first subnet to a transfer destination identifier that cannot be processed in the first subnet; Generate a block including the first transaction; After a consensus on the selection of the block is formed in the first subnet, updating the asset status of the transfer source identifier; as well as After consensus on the selection of the block is formed in the first subnet, a second transaction is sent to a second subnet that can handle a transfer source identifier consistent with the transfer destination identifier of the first transaction, and the second transaction is used to reflect the asset transfer to the transfer destination identifier represented by the first transaction.
2. The method according to claim 1, characterized in that The first transaction is signed by a private key of the transfer source identifier.
3. The method according to claim 1 or 2, characterized in that: The amount of the asset being transferred is a positive value.
4. The method according to claim 1, characterized in that: The second transaction is attached with a signature indicating that consensus has been reached in the first subnet.
5. The method according to claim 4, characterized in that The signature of the second transaction is a single signature.
6. The method according to claim 4 or 5, characterized in that: The signature of the second transaction is a signature for a block header, and the block header includes a Merkle root of a Merkle tree based on multiple transactions including the first transaction in the block.
7. A computer program product comprising a program, characterized in that When the program is executed by a processor, a method for causing a node constituting a first subnet among a plurality of subnets to execute a transaction representing an asset transfer stored in a distributed network having the plurality of subnets is implemented. The method is characterized in that the node performs the following steps: receiving a first transaction, the first transaction representing an asset transfer from a transfer source identifier that can be processed in the first subnet to a transfer destination identifier that cannot be processed in the first subnet; Generate a block including the first transaction; After a consensus on the selection of the block is formed in the first subnet, updating the asset status of the transfer source identifier; as well as After consensus on the selection of the block is formed in the first subnet, a second transaction is sent to a second subnet that can handle a transfer source identifier consistent with the transfer destination identifier of the first transaction, and the second transaction is used to reflect the asset transfer to the transfer destination identifier represented by the first transaction.
8. A node configured to store, in a distributed network having a plurality of subnets, a transaction representing a transfer of an asset, in a first subnet of the plurality of subnets, The node is characterized by having: a communication unit that receives a first transaction indicating an asset transfer from a transfer source identifier that can be processed in the first subnet to a transfer destination identifier that cannot be processed in the first subnet; and a processing unit that generates a block including the first transaction and updates the asset state of the transfer source identifier after a consensus on the selection of the block is formed in the first subnet, After consensus on the selection of the block is formed in the first subnet, the communication unit sends a second transaction to a second subnet that can handle a transfer source identifier consistent with the transfer destination identifier of the first transaction, and the second transaction is used to reflect the transfer of the asset to the transfer destination identifier represented by the first transaction.
9. A method for storing transactions representing asset transfers in a distributed network having multiple subnets, The method is characterized in that the nodes constituting the first subnet of the plurality of subnets perform the following steps: receiving a first transaction, the first transaction representing an asset transfer from a transfer source identifier that can be processed in the first subnet to a transfer destination identifier that cannot be processed in the first subnet; Generate a first block including the first transaction; After a consensus on the selection of the first block is formed in the first subnet, updating the asset status of the transfer source identifier; as well as After consensus on the selection of the first block is formed in the first subnet, a second transaction is sent to a second subnet that can handle a transfer source identifier that is consistent with the transfer destination identifier of the first transaction, the second transaction being used to reflect the transfer of the asset to the transfer destination identifier represented by the first transaction, The nodes constituting the second subnet perform the following steps: receiving the second transaction; generating a second block including the second transaction; and After a consensus on the selection of the second block is formed in the second subnet, the asset status of the transfer destination identifier of the second transaction is updated.
10. A distributed network having a plurality of subnets for storing transactions representing asset transfers, The distributed network is characterized by having: The first subnet and the second subnet in the plurality of subnets, The nodes constituting the first subnet perform the following steps: receiving a first transaction, the first transaction representing an asset transfer from a transfer source identifier that can be processed in the first subnet to a transfer destination identifier that cannot be processed in the first subnet, Generate a first block including the first transaction, After consensus on the selection of the first block is formed in the first subnet, the asset status of the transfer source identifier is updated, After consensus on the selection of the first block is formed in the first subnet, a second transaction is sent to a second subnet that can handle a transfer source identifier that is consistent with the transfer destination identifier of the first transaction, the second transaction being used to reflect the transfer of the asset to the transfer destination identifier represented by the first transaction, The nodes constituting the second subnet perform the following steps: receiving the second transaction, Generate a second block including the second transaction, After a consensus on the selection of the second block is formed in the second subnet, the asset status of the transfer destination identifier of the second transaction is updated.
