METHOD AND APPARATUS FOR PROPAGATING BLOCKS IN A BLOCKCHAIN NETWORK
The method of relaying double-spend notifications with miner identifiers and reputation-based validation in blockchain networks addresses the challenge of hidden double-spending, enhancing detection and reducing network flooding.
Patent Information
- Application Number
- JP2022560012
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-04-03
- Filing Date
- 2021-04-06
- Publication Date
- 2024-12-16
- Estimated Expiration
- 2041-04-06
AI Technical Summary
Blockchain networks face challenges in detecting double-spending attempts, which are often hidden from the original merchant and user, leading to undetected malicious activities and potential network flooding with invalid transactions.
A method for relaying double-spend attempt notifications in a blockchain network, where nodes verify and propagate notifications with a miner identifier, reducing network load by only sending the first occurrence of a double-spend attempt and using reputation scores to validate notifications.
Enhances the detection of double-spending attempts, reduces network flooding, and minimizes computational burden on nodes by validating notifications based on miner reputation, ensuring timely dissemination of double-spend occurrences.
Smart Images

Figure 0007600260000011 
Figure 0007600260000012 
Figure 0007600260000013
Abstract
Description
[Technical field]
[0001] The present disclosure relates to blockchain networks, and in particular to detecting attempted double spends in blockchain networks. [Background technology]
[0002] One of the main obstacles to the creation and use of truly digital assets such as cryptocurrencies is the problem of "double spending." That is, when an asset (such as a coin) is digital, it can easily be copied and allegedly transferred to more than one recipient. Thus, most such systems have historically required a third-party trusted intermediary to regulate transfers and prevent double spending. Cryptocurrencies built on the blockchain model, such as the Bitcoin network as demonstrated by the BitcoinSV™ protocol, solve the double spending problem through decentralized consensus and protocols that prevent double spending as one of the conditions for a transaction's validity. Specifically, each node that receives a transaction evaluates the transaction for compliance with a number of validity criteria. This includes the fact that the transaction's inputs exist, are unspent (are in an unspent transaction output (UTXO)), and have not been used as inputs to an unconfirmed transaction already observed by the node, sitting in a memo pool awaiting confirmation. If a second transaction is received that uses an input that has been spent or used in an input to an unconfirmed transaction, the node discards the second transaction as invalid and does not propagate it on the blockchain network.
[0003] While this prevents double spending, it also hides the fact that a double-spend attempt occurred: the original merchant and / or user associated with the first transaction will not be aware that an attempted double-spend occurred if the second transaction is erased and discarded by the first set of nodes that learned of it. This hampers the detection of malicious activity or actors and the implementation of preventative or punitive measures.
[0004] One option would be to modify the protocol to have nodes that detect a double-spend transaction forward the transaction despite the fact that it was determined to be invalid, so that other nodes in the network would also know about the invalid transaction and the original merchant node would be aware of the attempted double-spend. The problem with such a modification is that it would open the blockchain network to potential attacks, such as denial-of-service attacks, that would flood the network with invalid double-spend transactions, requiring each node to perform the process of evaluating and detecting them as invalid, at little or no cost to the creators of such transactions. [Brief description of the drawings]
[0005] By way of example, reference is made to the following accompanying drawings which illustrate exemplary embodiments of the present application:
[0006] [Figure 1] One simple exemplary method for registering a miner identity on the blockchain is illustrated in the form of a flowchart.
[0007] [Diagram 2] 1 illustrates, in flow chart form, an exemplary method for setting a fast revocation option for registering a minor identity.
[0008] [Diagram 3] One exemplary method for recording miner identities on a blockchain is illustrated in the form of a flowchart.
[0009] [Figure 4] 1 illustrates an exemplary method for verifying a minor identity in the form of a flow chart.
[0010] [Diagram 5] We present one exemplary method for recording work history on a blockchain.
[0011] [Figure 6] 1 illustrates an exemplary method for verifying work history using a blockchain.
[0012] [Figure 7] 1 illustrates an exemplary method for determining a reputation score for a mining node based on a recorded operation history.
[0013] [Figure 8] 1 illustrates, in block diagram form, a simplified example of a computing node, such as a mining node.
[0014] [Figure 9] 1 illustrates, in flow chart form, one example of a method for generating a double spend notification.
[0015] [Figure 10] 1 illustrates, in flow chart form, one example of a method for relaying double-spend notifications.
[0016] [Figure 11] An example of a method for resolving conflicts between double-spend notifications and denial notifications is illustrated in the form of a flow chart.
[0017] Like reference numbers in the figures are used to denote like elements and features. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0018] In one aspect, a computer-implemented method for relaying double spend attempt notifications in a blockchain network may be provided, the method comprising: receiving a double spend notification from a node of the blockchain network, the double spend notification including two transaction identifiers and signed by a miner identifier; obtaining transaction data for two transactions corresponding to the two transaction identifiers; determining whether the two transactions have at least one matching input, identifying the double spend notification as valid if the two transactions have at least one matching input, and thereby transmitting the double spend notification to at least one other node on the blockchain network; if the two transactions do not have at least one matching input, identifying the double spending notification as invalid and, as a result, not propagating the double spending notification on the blockchain network; Includes.
[0019] In some implementations, the method may further include validating the minor identifier prior to determining whether the two transactions have at least one matching input. In some cases, the double-spend notification includes the minor identifier, which may include a minor public key; The step of validating the minor identifier comprises: tracing the miner identifier to a coinbase transaction that includes the publication of the miner public key; verifying a signature on the double-spend notification using the minor public key; may include:
[0020] In some implementations, the method may further include determining that the double spend notification should be validated prior to obtaining transaction data for the two transactions. In some cases, determining that the double spend notification should be validated includes: generating a random value; determining that the random value is below a validation threshold; may include:
[0021] In some implementations, transmitting the double spending notification on the blockchain network comprises: The method may further include the step of adding a signature to the double-spend notification before transmitting. In some cases, the step of adding a signature includes: determining that fewer than a maximum number of signatures have been added to the double-spend notification.
[0022] In some implementations, the method may further include generating and sending a denial notice if the two transactions do not have at least one matching input. In some cases, the denial notice includes at least an identifier of the double-spend notice, and generating may include appending a current node signature. In some cases, the current node signature is generated based on a current node minor identifier.
[0023] In some implementations, receiving a denial notification from another node, the denial notification including an identifier of the double spend notification and signed by a second minor identifier; In some cases, the method may further include determining that the double spend notification should be validated by obtaining reputation scores associated with the minor identifier and the second minor identifier and determining whether the two transactions have at least one matching input based on the relative reputation scores; It may further include.
[0024] In some implementations, obtaining the transaction data may include reading transaction data for one of the transactions from a memo pool and requesting a copy of the other transaction from another node.
[0025] In another aspect, a computing device may be provided for relaying double spend attempt notifications in a blockchain network, the computing device may include memory, one or more processors, and computer-executable instructions that, when executed, cause the processors to perform one or more of the methods described herein.
[0026] In yet another aspect, a computer-readable medium may be provided having processor-executable instructions stored thereon for relaying double-spend attempt notifications in a blockchain network, the processor-executable instructions, when executed by one or more processors, causing the processors to perform at least one of the methods described herein.
[0027] Other exemplary embodiments of the present disclosure will become apparent to those skilled in the art from a reading of the following detailed description in conjunction with the drawings.
[0028] As used herein, the term "and / or" is intended to cover all possible combinations and subcombinations of the listed elements, including the listed elements alone, any subcombination, or all of the elements, and does not necessarily exclude additional elements.
[0029] As used herein, the term "at least one of ... or ..." is intended to cover all possible combinations and subcombinations of the recited elements, including the recited elements alone, any subcombination, or all of the elements, and does not necessarily exclude additional elements, and does not necessarily require all of the elements.
[0030] This application refers to hashing or hash function, which is intended to include any one of a number of cryptographic hash functions that, when applied to any data set or "message," deterministically produces a unique fixed-length alphanumeric string. The result of a hash function may be referred to as a hash value, fingerprint, hash result, or equivalents thereof. Examples include, but are not limited to, SHA-2, SHA-3, and BLAKE2.
[0031] As used herein, the term "blockchain" is understood to encompass all forms of electronic, computer-based, distributed ledgers. These include consensus-based blockchain and transaction chain technologies, permissioned and permissionless ledgers, shared ledgers, and variations thereof. Although other blockchain implementations have been proposed and developed, the most widely known application of blockchain technology is the Bitcoin ledger. Bitcoin, as exemplified by the Bitcoin SV protocol, may be referenced herein for convenience and illustrative purposes, although it should be noted that the present invention is not limited to use with the Bitcoin blockchain, and alternative blockchain implementations and protocols are within the scope of the present invention.
[0032] A blockchain is a peer-to-peer electronic ledger implemented using a computer-based decentralized distributed system. Blockchains are composed of blocks, which in turn are composed of transactions. Each transaction is a data structure that encodes, among other things, the transfer of control of a digital asset between participants in the blockchain system, and contains at least one input and at least one output. Each block header contains a summary of the block's contents, such as in the form of a Merkle root, and each block header contains a hash of the previous block header. As a result, blocks become strung together to create a permanent, immutable record of all transactions written to the blockchain since inception. Transactions contain small programs, known as scripts, that embed their inputs and outputs and specify how and by whom the transaction's outputs are accessible. In the Bitcoin platform, these scripts are written using a stack-based scripting language.
[0033] A blockchain is implemented by a network of nodes. Each node is a computing device with a network connection and running software that implements the applicable blockchain protocol. The nodes validate transactions and propagate them to other nodes in the network. Dedicated network nodes, called "mining nodes" or "miners," collect a set of unconfirmed or pending transactions into a block and attempt to "mine" the block. Mining, in these examples, represents solving a proof-of-work (POW) before other miners in the network succeed in solving their respective block's proof-of-work. In the Bitcoin example, the POW involves hashing a block header, including a nonce, until the result is below a threshold set by a mining difficulty parameter. The nonce is repeatedly incremented and hashing is repeated until the result is below the threshold or the miner receives a nonce that another miner has succeeded in. Variations in the mining process are well known to those skilled in the art.
[0034] Among other things checked, when validating a transaction, a node determines whether the inputs to the transaction are valid. In particular, the node evaluates whether the unlock script evaluates to true and determines whether the inputs reference an unspent transaction output (UTXO) from a previous transaction. Some nodes may maintain a running list or set of UTXOs to allow for fast determination of whether a referenced transaction output is in the UTXO set. A transaction may be identified by its unique transaction identifier TxID, which in some implementations is a hash of the transaction. Some transactions may have more than one output, and thus a unique transaction "outpoint" may be identified by the TxID and an index, where the index points to one of the outputs in the ordered set of outputs from the transaction. If a transaction output (e.g., an outpoint) is in the UTXO set, the transaction output is "unspent" and can serve as an input. The node also evaluates whether the transaction input has already been used as an input to a previously received transaction that is in its memopool of unconfirmed transactions waiting to be included in a mined block. If so, the second received transaction is considered invalid by the node and is not included in its memopool or propagated across the network.
[0035] One of the well-known challenges of electronic cash systems is the "double spend" problem. That is, when money or other assets are represented as digital tokens or other digital data, a mechanism must prevent a holder of that digital token or other data from simply duplicating it and providing it as a payment to two different recipients. The Bitcoin blockchain attempts to prevent double spend attacks by having the decentralized nodes of the network perform various validation checks on transactions and blocks. The proof-of-work requirements and consensus-based protocol for accepting a block as valid ensure that no block contains a transaction that contains an input that has been previously used, or a pair of transactions that intended to use the same input. If a second transaction is received by a node and uses an input that has been used or that was used in an input to an unconfirmed transaction, the node discards the second transaction as invalid and does not propagate it across the blockchain network. This prevents double spending, but also hides the fact that a double spending attempt occurred. The original merchant and / or user associated with the first transaction will not be aware that an attempted double-spend occurred if the second transaction is erased and reversed by the first set of nodes that learned of it, hindering the detection of malicious activity or actors and the implementation of preventative or punitive measures.
[0036] One option would be to modify the protocol to have nodes that detect a double-spend transaction forward the transaction despite the fact that it was determined to be invalid, so that other nodes in the network would also know about the invalid transaction and the original merchant node would be aware of the attempted double-spend. The problem with such a modification is that it would open the blockchain network to potential attacks, such as denial-of-service attacks, that would flood the network with invalid double-spend transactions, requiring each node to perform the process of evaluating and detecting them as invalid, at little or no cost to the creators of such transactions.
[0037] Thus, one option for detecting a double spend attempt is for a blockchain node that identifies a potential double spend associated with a new unconfirmed transaction to notify the remaining nodes on the network about the potential double spend attack, but not necessarily forward the complete double spend transaction itself. This may avoid imposing the computational burden on other nodes in the network to perform a transaction validation step on the second transaction. Additionally, nodes in the network may receive notification of the attempted double spend.
[0038] This can reduce the possible impact of flooding attacks since nodes do not necessarily have to perform a full validation of the second transaction, but it still leaves open the possibility of malicious notifications of double spending, as well as the possibility of flooding the network with notifications with little or no cost.
[0039] Thus, according to at least one aspect of the present application, a double-spend notification is sent only for the first double-spend seen in association with a particular input. This can avoid flooding the network with multiple notifications for multiple attempts at double-spending the same input. Additionally, the notification includes the transaction identifier (TXID) of the original transaction and the purported double-spend transaction. The notification may further include a timestamp of when the transaction was identified. This avoids the possibility of a second, second-in-time transaction being constructed that is too large.
[0040] The notification process described herein ensures timely dissemination of the fact that a double-spending attempt has occurred. Knowing that a double-spending attempt has occurred is more useful to the network than knowing that a single double-spending attempt of the same input has occurred. Thus, only the first occurrence needs to be included in the double-spending notification.
[0041] It is noted that the above process may leave the network open to attacks where a malicious node generates and sends fake double spend notifications. Thus, according to another aspect of the present application, the double spend notification is signed by a node identifier. In particular, the double spend notification may be signed by a miner identifier. The miner identifier may be an identifier in the form of a public key. The miner identifier may be a verifiable miner ID associated with the mining node and not revoked by checking validity check transactions. The miner ID may be established using coinbase transactions mined by the mining node. A detailed description of some examples of miner IDs, possible implementation processes, and use cases are provided below.
[0042] A valid double spend notification may therefore be signed with a verifiable miner identifier. A node receiving such a notification may verify that the miner ID is valid, subject to determining that the double spend notification is valid. The node may further verify that the double spend occurred by requesting a copy of one or both of the transactions (the node may already have one of the transactions in its local memo pool). If the node verifies that a double spend attempt occurred, it may add its own signature to the notification before passing it on to other nodes in the network. This can provide the notification with additional independent confirmation, further providing assurance to subsequent nodes that the double spend notification is valid.
[0043] If an intermediate node receives a double spend notification and determines from the transaction data that the alleged double spend notification is fake, the intermediate node may generate and broadcast a repudiation message rejecting the double spend notification. This may help to deter malicious mining nodes from generating fake double spend notifications, since notifications are associated with their miner ID, and the discovery and publication of a fake notification may negatively impact the reputation associated with that miner ID. This may be reflected in reputation scores or other metrics maintained by the nodes in the network. In this sense, the notification and repudiation process described herein takes advantage of the need for nodes to maintain high reputation scores to deter negative activity that may waste network capacity, such as bandwidth and computational resources.
[0044] 9, an example method 900 for generating a double spend attempt notification in a blockchain network is illustrated in flow chart form. Method 900 may be performed by a mining node in some examples. Method 900 may be implemented by processor-executable instructions stored in a memory. The processor-executable instructions, when executed by the processor, cause the processor to perform the operations described below.
[0045] Method 900 begins at operation 902 when a node, which may be a mining node, receives a transaction. Typically, the node performs transaction validation checks to ensure that the transaction meets the requirements of the applicable blockchain protocol. One of these checks is that the input to the transaction does not already appear as an input to another transaction in the memo pool, as shown by operation 904. The memo pool may be maintained locally by the node or may be available and accessible but maintained by a special node. The memo pool may be a database or a distributed database in some embodiments.
[0046] If the transaction meets validation requirements, including that each of its inputs is not already an input to another transaction in the memo pool, the node adds the received transaction to the memo pool and propagates it to other nodes on the blockchain network, as indicated by operation 906. However, if one of the inputs to the received transaction is identified as an input to a previously received transaction in the memo pool, method 900 proceeds to operation 908, where the node evaluates whether it already knows a double spend notification associated with the same input. If so, the transaction is discarded and method 900 returns to operation 902 to evaluate the next received transaction. As previously mentioned, a double spend notification is sent only once for a particular input to avoid flooding the network with notifications associated with a flood of double spend attempts on the same input.
[0047] If this is the first detection of a double spend on the impugned input, then in operation 910 the node generates a double spend notification. The double spend notification in this example includes the transaction identifier of the earlier received transaction in the memo pool, the transaction identifier of the later received transaction that is the suspected double spend, and a timestamp associated with each of the two transactions. The double spend notification further includes a node identifier. In this example, if the node is a mining node, the node identifier is the miner ID. In particular, the double spend notification includes a miner ID signature that unambiguously proves that the mining node generated the double spend notification. As explained below, the miner ID is recorded in the blockchain in the coinbase transaction and is easily verified as valid by other nodes by checking the associated validity check transaction to ensure that the output remains in the unspent transaction output database. By signing the double spend notification with its miner ID, the mining node gives its own identifier to the notification, thereby attaching its reputation to the reliability of the notification.
[0048] Note that a mining node may additionally store the alleged double-spend transaction in local memory. A mining node does not store the double-spend notification in its memo pool because the transaction has not been validated and cannot be included in a candidate block. However, a copy of the transaction may be kept in memory to enable the mining node to provide a copy of the suspected double-spend transaction to other nodes that are verifying that a double-spend attempt occurred. To this end, the mining node may maintain a data structure of other memory storage areas allocated to the alleged double-spend transaction.
[0049] In operation 912, the mining node propagates the double-spend notification to the blockchain network.
[0050] 10, an example method 1000 for relaying a double spend attempt notification in a blockchain network is illustrated in flowchart form. Method 1000 may be performed by a blockchain network in some examples. The nodes may be full nodes, mining nodes, storage and validation nodes, or other types of network nodes. Method 1000 may be implemented by processor-executable instructions stored in memory. The processor-executable instructions, when executed by the processor, cause the processor to perform the operations described below.
[0051] Method 1000 begins with a node receiving a double spend notification over a blockchain network at operation 1002. As described above, the double spend notification may be digitally signed by the miner identifier or an equivalent node identifier. At operation 1004, the node may verify that the notification is signed and that the miner ID is valid. This may include verifying the signature and validating the miner ID. Validating the miner ID may include verifying that the miner ID is included in a coinbase transaction on the blockchain and that the associated validity check transaction has an output in the UTXO database, thereby ensuring that the miner ID has not been revoked. If the miner ID cannot be verified, the node may discard the double spend notification.
[0052] If the miner ID is verified, then in operation 1006 the node may determine whether to check the validity of the double spend notification. In this example, to reduce the computational load on the network and improve the speed of notification propagation, only a portion of the nodes in the network checks the validity of the notification. In this example, the proportion is approximately 10% of the nodes, but other proportions can be used in other implementations. The decision in operation 1006 may be based on random number generation and checking whether the random number is below a threshold, where the threshold is set to 10% of the random number space. Other mechanisms may also be used to probabilistically select a random subset of nodes to perform the validity check.
[0053] If it is determined that the node does not check the validity of the notification, method 1000 proceeds to operation 1018, where the node propagates the double spend notification further on the blockchain network. Otherwise, method 1000 proceeds to operation 1008, where the node retrieves the alleged double spend transaction. Either transaction may be present in the node's memo pool. The missing transaction may be retrieved from the mining node that generated the double spend notification. In some example implementations, the node may use a "getdata" message to request a copy of the transaction from the mining node.
[0054] Once the node has both transactions, it can verify that they are indeed the attempted double spend by comparing the inputs, as shown in operation 1010. If not, the node may generate a denial message at operation 1012. An example of a denial message is described further below. In this example, the denial message can be thought of as a message that challenges the authenticity of the double spend notification. The node can broadcast the denial message on the blockchain network and forgo the propagation of the double spend notification.
[0055] If the node verifies in operation 1010 that the double spending attempt described in the double spending notification is real, it may propagate the double spending notification further on the blockchain network. In some examples, the node may append its own signature to the double spending notification as a signal to other nodes that it has verified the notification. To prevent the size of the double spending notification from growing, the number of appended signatures may be limited at a maximum in some implementations. Thus, in operation 1014, the node may evaluate whether the number of appended signatures has reached a maximum. If not, in operation 1016, the node appends its own signature to the double spending notification. In either case, the node propagates the double spending notification to other nodes on the blockchain network in operation 1018.
[0056] In this way, the double spend notification is propagated on the blockchain network and simultaneously validated and verified by at least some of the blockchain nodes. Whenever a mining node receives a double spend notification and has previously received any of the transactions directly from the merchant node, for example via the MerchantAPI, it can perform a validation operation to verify the alleged double spend and, if verified, notify the merchant node regarding the alleged double spend. This notifies the merchant node that there may be some potential problem with the transaction, and the merchant node may output a message or other notification to the merchant device. The merchant node can use the MerchantAPI to perform subsequent or more frequent queryTransactionStatus checks.
[0057] As mentioned above, if a blockchain node determines that the double-spending allegation in the double-spending notification is false, it may generate and send a denial notice. A denial notice indicates that the blockchain node has identified that the two alleged double-spending transactions do not share a common input. We do not refer to the order in which transactions are received or which of them are double-spending attacks, as this may vary from node to node. The denial message may, by way of example, include the contents of the original double-spending notification, as well as a public key and signature from the node generating the denial message. If the node is a mining node, the public key and signature may be a miner ID.
[0058] Another node in the blockchain network that receives the double-spending and repudiation notifications is in a position to determine which one is correct. It could, of course, do so by obtaining a copy of the transaction and verifying for itself whether a double-spending attempt occurred. To reduce the potential computational and bandwidth burden on the network, nodes could follow a process to determine which notification is correct that relies in part on the miner ID and associated reputation score to decide whether to accept the notification at face value or perform a validation. In this process, at least some of the nodes would perform a validation of the double-spending allegation.
[0059] 11, an example method 1100 for resolving double spend claim and denial conflicts in a blockchain network is illustrated in flowchart form. Method 1100 may be performed by a blockchain network in some examples. The nodes may be full nodes, mining nodes, storage and validation nodes, or other types of network nodes. Method 1100 may be implemented by processor-executable instructions stored in memory. The processor-executable instructions, when executed by the processor, cause the processor to perform the operations described below.
[0060] The node receives the double spend notification and the rejection notification at operation 1102. In some cases, only the node (or the first one) receives the rejection notification, but the rejection notification may include a copy of the double spend notification. In this example, the double spend notification was generated by a first mining node and the rejection notification was generated by a second mining node.
[0061] At operation 1104, the node may first verify that the node identifiers that signed the double spend notice and the denial notice are valid; that is, the node may verify that the miner ID of the first mining node and the miner ID of the second mining node are valid and have not been revoked. If the miner ID of the first mining node is valid and the miner ID of the second mining node is invalid, then at operation 1106 the node may "accept" the double spend notice and reject the denial notice. This involves performing a validation process on the double spend notice, as described above with respect to FIG. 10. If the miner ID of the first mining node is invalid and the miner ID of the second mining node is valid, then the node may "accept" the denial notice and reject the double spend notice at operation 1106.
[0062] If both miner IDs are legitimate, the node must determine which mining node is correct; that is, the one claiming a double spend, or the one claiming a double spend is fake. In one implementation, the node simply independently retrieves the transaction data and determines whether the attempted double spend occurred. However, in this example, to reduce the computational burden on the network nodes, the node may first determine whether it needs to verify the double spend allegation, since in this example not all nodes in the network necessarily need to do so. To determine whether to verify, in this example the node utilizes reputation scores associated with the mining nodes to influence the likelihood of needing to independently verify. For example, in operation 1110, the node may evaluate whether the miner IDs of the first and second mining nodes have reputation scores associated with them. In some cases, the blockchain network may be configured to track reputation scores of mining nodes. As described below in connection with miner IDs, the reputation score may reflect the work history of the mining node, i.e., blocks mined or computational resources consumed in mining blocks. However, in some implementations, other factors may be used to influence the reputation score upon consensus. For example, detecting a false notification, if confirmed by consensus by the network, may negatively impact a mining node's reputation score, whereas proactive behavior such as publishing a denial notification that is confirmed by consensus by the network may positively impact a mining node's reputation score.
[0063] In operation 1112, the node can evaluate whether either mining node has no reputation score (or a default reputation score, i.e., no history). If both mining nodes have reputation scores, or if neither mining node has a reputation score, the node may always verify whether the double-spend allegation is correct, since it cannot rely on reputation to determine whether it needs to resolve the conflict. Operation 1118 reflects the verify operation. Furthermore, because either of the nodes is incorrect, it may need to adjust that node's reputation score, if it exists, as reflected in operation 1120. However, since operation 1112 shows that one of the mining nodes has a reputation score and the other does not, in operation 1114 the node may determine whether to verify the double-spend allegation. This decision may be similar to the decision in operation 1010 of FIG. 10, for example, in that only a randomly selected subset of nodes on the network may evaluate whether the double-spend notification is correct. Other nodes may accept that the notification or announcement issued by the mining node with the reputation score is most likely correct, since the mining node has a reputation score at stake. In this sense, "acceptance" may include further propagation of accepted notifications and not propagating rejected notifications.
[0064] It will be appreciated that the above example method 1100 is an implementation of one example of a method for resolving conflicts between double spending notifications and denial notifications. Additionally, it will be appreciated that certain operations may be modified, substituted, or performed in a different order without materially impacting the operation of method 1100. Nodes may use various techniques to determine whether to validate a double spending notification and resolve conflicts based on relative reputation scores, lack of reputation scores, the number of additional node signers to the notification or announcement, or a combination thereof.
[0065] The above processing example proposes sending notifications. In many blockchain systems, data is exchanged between nodes using a predefined syntax for notifications, data transfers, requests, etc. Non-limiting examples of the types of notifications considered here are outlined below:
[0066] A double-spend notification has the following message structure and syntax:
number
[0067] The minor identification signature block can be structured as follows:
number
[0068] As a further example, a denial notice regarding a duplicate payment claim may take the following form:
number
[0069] It will be understood that the above examples are illustrative and other implementations may have different syntax.
[0070] It is also understood that in some implementations, double-spend notification and / or disapproval notification processing may be selectively applied when a double-spend transaction is larger than a threshold size. For small double-spend transactions that are compact and easy to verify, a mining node may choose to propagate the transaction through the blockchain network. To that end, a new inventory type, DOUBLE_SPEND, may be defined to mark the availability of double-spend transactions and distinguish them from properly verified transactions. Even then, a node may choose to request double-spend transactions frequently on a random basis to avoid overloading the network. In some cases, a 10% threshold may be used. Even at that level, it is enough for a node to see multiple DOUBLE_SPEND inventory messages, cast doubt on the transaction, identify its status as a potential double-spend attack, and notify the merchant node.
[0071] Establishing a verifiable minor identity As mentioned above, a miner may establish a miner identity by mining a block that includes a declaration of the miner identity in the coinbase transaction. The validity of the newly mined block and all transactions therein are verified by the blockchain network. The inclusion of a mining node's own miner identity in the coinbase transaction is a declaration of identity backed by proof-of-work. The miner identity in the following example is a public key. A third-party CA does not need to verify the association between a mining node and its declared public key because the association is backed by the blockchain network and the proof-of-work.
[0072] To realize possible revocation of a miner identity, for example if the corresponding private key is compromised, the miner first generates a validity check transaction in which the miner identity is declared and for which there are outputs controlled by the miner. The coinbase transaction may contain a reference to this validity check transaction. Part of the identity verification operation performed by another node may be to verify that the validity check transaction has not been "revoked" through the transfer of outputs controlled by the miner. That is, the miner may invalidate its own miner identity by "spending" the output of the validity check transaction, thereby removing it from the unspent transaction (UXTO) set. This provides a fast revocation mechanism that does not rely on mining new blocks to revoke the miner identity.
[0073] Referring to FIG. 1, one exemplary method 100 of establishing a miner identity in a blockchain network is illustrated in the form of a flow chart. The method 100 includes a configuration operation 102 and a registration operation 104. The configuration operation 102 includes generating and propagating a validity-check transaction (VCT). The VCT includes an arbitrary input and two outputs. One output is an output controlled by the miner that assigns arbitrary tokens to addresses controlled by the miner. The second output of the VCT is a public key PK, chosen by the miner in this example. ID The miner then has to provide the corresponding private key, sk ID The information field may be the OP_RETURN field in a Bitcoin-based implementation. The miner identity (e.g., miner ID) is, in this example, the public key PK ID It is.
[0074] The VCT propagates across the blockchain network and is eventually finalized through inclusion in a mined block, thereby making the VCT on-chain.
[0075] The registration operation 104 includes the mining node successfully mining a new block. Mining the block includes assembling a candidate block that includes multiple transactions selected from a memopool of unconfirmed transactions. The mining node also inserts the coinbase transaction into its candidate block. The mining node then attempts to mine the block by repeatedly incrementing the nonce in the header and hashing the block header to find a hash that is lower than the mining difficulty setting. If another mining node is successful, the miner verifies that the other mining node's new block is valid, then generates a new candidate block and tries again.
[0076] In operation 104, the mining node successfully mines a new block, and the new block includes a coinbase transaction. The coinbase transaction itself contains a miner identity, e.g., PK ID and a reference to the VCT. The reference is a transaction identifier in the VCT, e.g., TxID VCT It may be.
[0077] When a mining node successfully mines a block containing a coinbase transaction that declares its miner identity, it has successfully established its own miner identity. The identity is verifiable and can be revoked or updated by the mining node, if necessary, in a provable and traceable manner. Furthermore, the identity and its association with the mining node are backed by proof-of-work and secured by the network, making it possible for a third party to verify the miner's identity (e.g., its public key, PK), without requiring trust in a certification authority.ID ), which allows for reliance on the miner identity. The miner identity may then be used for a number of purposes, including, among others, tracking miner activity, proving miner identity or status, establishing or engaging in secure encrypted communications with miners, and ranking miners for various purposes.
[0078] 2, there is shown one exemplary configuration method 200 that may be used in the method 100 for establishing a miner identity. The method is, in this example, performed by a mining node.
[0079] In operations 202 and 304, the mining node generates a private key ssk ID Select the corresponding public key PK ID Find the public key PK ID is the minor identifier.
[0080] In operation 206, the mining node then generates a validity check transaction that includes an arbitrary input and two outputs. The input may be any UTXO for which the mining node holds the corresponding private key; that is, any UTXO is controlled by the miner. In many implementations, the input may be a coin or token amount sufficient to offset the transaction cost associated with the VCT to ensure that the VCT is included in a block. In some implementations, the minimum token amount may be established by policy.
[0081] One of the outputs is to an address controlled by the mining node, i.e., the output is to an address for which the mining node holds the corresponding private key that allows the mining node to unlock the associated locking script. In some instances, the output address is VCT may be labeled as PK VCT is an arbitrary public key chosen by the mining node, and PK VCTFor each bitcoin, the mining node holds the corresponding private key. The output may be, for example, a pay to public key hash (P2PKH) operation specifying a transfer to a public key hash (e.g., a Bitcoin address) selected and controlled by the mining node.
[0082] Other outputs include a non-operational information field into which information may be inserted. In particular, the field includes a minor identifier. In Bitcoin-based implementations, outputs may provide the information field using the OP_RETURN opcode.
[0083] There may be blockchain protocols in which non-operational information fields may be included in transactions for the purpose of publishing information within the transaction that is not necessarily implemented as an "output" of the transaction as that term is understood. However, the term "output" in these examples referring to information fields is intended to include such possible implementations in alternative blockchain protocols.
[0084] Once the VCT is generated in operation 206, the mining node then propagates the VCT across the blockchain network in operation 208. Those skilled in the art will appreciate that propagation of the VCT may involve each node in the network validating the transaction and then sending it to all other nodes to which the VCT is connected, resulting in the transaction being rapidly propagated throughout the entire blockchain network. As an unconfirmed transaction, it is inserted into a memo pool. From the memo pool, individual mining nodes select the transaction for inclusion in a candidate block. Thus, it is finally "confirmed" by inclusion in a mined block. In operation 210, the mining node evaluates whether the VCT is confirmed by inclusion in a mined block. Once confirmed, in operation 212, the mining node sends the transaction identifier TxID to the mined block. VCTIt is understood that in some implementations, the mining node may record the transaction identifier before the VCT is mined.
[0085] The VCT portion of the blockchain allows PK VCT That first output to forms part of the UXTO set of "unspent" outputs until a mining node chooses to move / transfer the tokens associated with that output. This UXTO acts as a validity check transaction. As long as it is part of the UTXO set, the miner identifier in the VCT remains valid and cannot be revoked. As soon as it is no longer present in the UTXO set, the miner identifier in the VCT is no longer valid.
[0086] 3, there is shown an exemplary registration method 300 that may be used in the method 100 for establishing a minor identity. The method is performed by a mining node in this example. The method 300 assumes that a setup operation has already occurred that generates a validity check transaction associated with the minor identifier.
[0087] At operation 302, the mining node generates a candidate block. The candidate block includes a number of transactions selected from the memopool of unconfirmed transactions. As reflected by operation 304, the mining node then inserts a coinbase transaction into the candidate block. In addition to mining a predetermined number of new tokens or coins for the mining node, the coinbase transaction also includes a miner identifier PK ID and an information field containing a reference to the VCT. The reference is a transaction identifier TxID VCT The information field may be provided, for example, using an OP_RETURN code or an expression.
[0088] In addition to the miner identifier and a reference to the VCT, the information field may contain additional information. For example, it may contain an action identifier or code indicating what action is implemented by the coinbase transaction. In this example, the action may be "register", indicating that the mining node is publicly registering its miner identifier. It may alternatively contain a signature. For example, the signature may be a signature of the rest of the information field. For example,
number
[0089] Once a candidate block with this coinbase transaction is generated, the mining node attempts to mine the block, as indicated by operation 306. It also evaluates whether the competing node will be successful in mining another block, as indicated by operation 308. If the competing node wins the race to mine the block, the mining node evaluates the other block, adds it to the blockchain, and returns to operation 302 to build a new candidate block and try again.
[0090] If a mining node successfully mines a candidate block, it will receive the transaction identifier TxID of the coinbase transaction. REG Alternatively, note that since it only contains one coinbase transaction, we only need to note the block number, and other nodes can identify it based on the block number.
[0091] When a mining node successfully mines a block with a registration coinbase transaction, it successfully registers its own miner identifier and publishes it on the blockchain. The miner identifier, e.g., a public key PK IDAnother node receiving the public key may verify that the public key is valid and associated with the mining node without relying on trust in a separate certification authority.
[0092] 4 illustrates, in flow chart form, one example method 400 that a node may perform to verify a minor identifier, according to an aspect of the present application. ID PK. Verification can be, for example, by verifying or authorizing a request from a miner, by establishing a communication session with the miner, or by verifying the public key PK. ID The verification may occur as part of proving the validity of the sigma-based cryptocurrency and its association with a mining node.
[0093] At operation 402, the node receives the minor ID (PK ID ) and the registration transaction identifier (TxID REG , or in some examples, the block number in which the registered coinbase transaction appears. Operation 402 may further include retrieving or receiving a message that the mining node claims to have signed. The message m and the signature σ m may be provided by a mining node. In some examples, the message and its signature may be part of a digital certificate provided or issued by the mining node as proof of its identity.
[0094] At operation 404, the node registers a transaction identifier TxID REG ., it then verifies or validates certain data in the registered coinbase transaction from the blockchain at operation 406. For example, the node may parse the OP_RETURN field to extract the information in that field from the coinbase transaction. From the parsed information, it may extract the VCT transaction identifier TxID VCT It is obtained by using the same public key PK provided by the mining node in the OP_RETURN field.ID and that the "action" is "register".
[0095] At operation 408, the node may retrieve the VCT from the VCT transaction identifier issued in the registration coinbase transaction. As shown by operation 410, the node may search for a VCT whose OP_RETURN field in the VCT matches the same public key PK ID It may then evaluate whether other outputs in the VCT remain "unspent", i.e., remaining part of the UTXO set of available output points. This may involve querying the UTXO set database, either directly or through intermediate nodes. The query may include the transaction identifier TxID VCT The validation may be based on an outpoint identifier, which may include an index indicating which output. If the output does not appear in the UXTO set, the minor identifier is invalid because it has been cancelled or replaced. Therefore, validation fails.
[0096] However, if the outpoint is within the UXTO set, then at operation 414 the node ID can be treated as the verified public key of the mining node, and PK ID Operation 414 may verify the signature of the mining node using σ to verify the signature of the mining node. Operation 414 may include the node verifying the signature in the OP_RETURN field of the coinbase transaction, or, if present, the signature σ for message m. m Note that the signature check may involve verifying the mining identifier, i.e., the verified registered public key PK, or both. Obviously, if the signature check fails, the intended mining node cannot be verified as the holder of the corresponding private key, and the verification fails. If the signature check succeeds, the mining node will verify the mining identifier, i.e., the verified registered public key PK, ID The mining node associated with the
[0097] As mentioned above, a registered miner ID can be revoked by removing the first output of the VCT from the UXTO set. This is done through "spending" the output by using it as an input to any other transaction. This may include transferring any tokens assigned to the first output to a new address in the revocation transaction. The creation and propagation of the revocation transaction is sufficient to cause any validation of the miner ID to fail, as validating nodes will no longer be able to identify the output in the UXTO set. However, the miner may also register the revocation by including an OP_RETURN field in the coinbase transaction for its next mined block. In one example, the OP_RETURN may include the action "revoked" and the miner ID. In some implementations, it may further include the transaction identifiers and signatures of both the registration transaction and the revocation transaction.
[0098] In many cases, rather than simply revoking a miner ID by compromising its private key, a mining node may wish to "update" or replace its miner ID. This may be due to disclosure or theft of the private key, or may be done periodically as part of risk management to ensure regular updating of key material.
[0099] PK is the old minor ID ID-OLD To update, a mining node first creates a new public key, PK ID-NEW From that process, the mining node generates a new VCT transaction identifier TxID VCT-NEWThe mining node then mines a new block with the new coinbase transaction to register the new miner ID. However, to link it to the old ID and any history of work of the old ID, the miner may use the action "Update ID" or "Update ID" to signal that the coinbase transaction is not the initial registration of the miner ID, but is replacing the previous miner ID. The contents of the OP_RETURN field in the update coinbase transaction may include:
number
[0100] In this example, it is understood that the update operation involves the mining node providing up to three signatures, one associated with the old ID, one associated with the old VCT, and one associated with the new miner ID. In some examples, the old VCT signature may not be included.
[0101] It is also understood that a mining node may invalidate a previous miner ID through the use of the output from the old VCT as an input to some other transaction. In one example, the output may be an input to a new VCT. In another example, a mining node may wait to propagate a separate revocation transaction to invalidate its old miner ID until it has successfully mined a block and registered an updated miner ID.
[0102] The above-described system allows miners to establish and register their provable identifier on the blockchain. By including it in the coinbase transaction of a mined block, the miner proves that they are a bona fide mining node, and the validity of the identifier and associated materials is backed by the proof-of-work. The VCT provides a mechanism for rapid revocation, if necessary. In some exemplary implementations, the VCT may require, by policy, that at least a predefined token or coin value be assigned to the output, thereby backing up the proof-of-work with a proof-of-stake. Advantageously, the above-described system avoids the need for trust in a trust authority, involves no additional work for the mining node, and involves little additional data in the block.
[0103] The above described registration system and method allows miners to prove their identity and provides mining nodes with digital proof that can be verified by other nodes without relying on a trusted authority. Furthermore, as described below, the miner identifier may be used to provably chain together coinbase transactions from blocks mined by the miner. This provides miners with a verifiable history of operations associated with their miner ID. This history of operations may be useful in establishing a number of things including miner status, entitlement to access certain resources, ranking within a hierarchy of miners for some purpose, etc. In the following description, this history of operations may be referred to as a "proof of reputation" system.
[0104] Proof of reputation In one aspect, the present application provides a method and system for recording and verifying miner activity history on a blockchain. As described, in the following example, the activity history is recorded by a chain of linked coinbase transactions in a block mined by a mining node. The activity history may be used in some implementations to determine a reputation score for the mining node. The reputation score may be used in a number of applications, including, by way of example, miner voting behavior.
[0105] In some implementations described below, the coinbase documents each include a minor identifier in an information field. The minor identifier may, in some implementations, be established and verifiable using the methods and systems described above. However, in some implementations, other techniques or systems may be used to establish and verify minor identifiers. Thus, the work history and proof-of-reputation examples described below do not necessarily require the use of the minor identifier registration process described above in all implementations.
[0106] As mentioned above, one mechanism for registering a miner identifier is to include the miner identifier in the coinbase transaction of a block mined by the associated mining node. The miner identifier may appear in an information field, such as an OP_RETURN field, in the coinbase transaction. The information field may further include a signature or other data. As mentioned above, in some implementations, the information field may include a reference to a validity check transaction. This allows for fast revocation and easy verification of the miner identifier by others who have not revoked the miner identifier.
[0107] The coinbase transaction may further be used in conjunction with the registered miner identifier to record the activity of the mining node. FIG. 5 illustrates, in flow chart form, one exemplary method 500 for recording the activity of a miner in a blockchain. The method 500 is performed by a mining node associated with the miner identifier. The miner identifier may be a public key, and the mining node holds the corresponding private key of the public key, i.e., the miner identifier is a PK ID It may be.
[0108] The method 500 includes registering a miner identifier at operation 502. As described above, the registration operation includes publishing the miner identifier in a registration coinbase transaction in a block mined by the mining node.
[0109] At operation 504, the mining node continues to attempt to mine new blocks. In particular, the mining node constructs a new candidate block and inserts a coinbase transaction that includes an information field that includes the miner identifier. The information field of the coinbase transaction further includes a reference to a previous coinbase transaction in a block mined by the same miner. The previous coinbase transaction is a block that was recently mined, and the coinbase transaction includes the miner identifier. When a second block is mined, the reference is to the registered coinbase transaction. Subsequent mined blocks from the mining node include the coinbase transaction in the order they were mined, linked by a reference to the coinbase transaction of the recently mined block. The reference may be, for example, the transaction identifier of the coinbase transaction, such as the TxID. In some examples, the reference may be to a block number that includes the coinbase transaction, based on which the node can identify the coinbase transaction in the block. In some examples, the reference may be an "outpoint" that includes the TxID and an index that points to one of the outputs of the coinbase transaction, specifically the OP_RETURN output.
[0110] In some implementations, the information field includes additional information. For example, the information field may include a reference to the coinbase transaction from the most recently mined block from the mining node, as well as a reference to the registered coinbase transaction in all subsequent blocks mined by the mining node. As another example, the information field may include a digital signature generated based on the miner identifier, i.e., using a private key associated with the miner identifier. The digital signature may be, for example, of a reference included in the information field.
[0111] Once a candidate block with a coinbase transaction is generated in operation 504, the mining node attempts to mine the block in operation 506. In operation 508, the mining node further monitors to receive a notification of a new block from another mining node. If the other node is successful in finding the new block, the mining node verifies that the new block is valid according to the applicable blockchain protocol in operation 510 and adds the new block to the blockchain. If the mining node is successful in mining the candidate block before receiving a notification of the new block from another node, in operation 512, the mining node quickly propagates the successful mining of the candidate block on the blockchain network and adds the new block to the blockchain. Once a new block is found, whether the new block on the blockchain comes from the mining node or another node, the mining node returns to operation 504 and tries again to build a new candidate block.
[0112] Obviously, the above cycle will result in a chain of linked coinbase transactions linking blocks mined by a mining node, if the mining node is ever successful in mining a new block, back to the original registered coinbase transaction from the most recent block. Because the OP_RETURN data is visible on the blockchain, the linked set of coinbase transactions, each containing a miner identifier, is immediately identifiable as a public record of the mining node's work history.
[0113] 6, one exemplary method 600 for verifying miner activity history from a blockchain is shown. Method 600 may be performed by any computing node, whether or not it is part of a blockchain network of nodes.
[0114] At operation 602, the computing node identifies the coinbase transaction. This identification may occur in a number of possible ways. For example, a mining node may provide the computing node with its intended identity and a transaction identifier of the coinbase transaction. The transaction identifier may refer to a recently mined coinbase transaction generated by the mining node. In some circumstances, the mining node may provide this information to the computing node in connection with a request to participate, vote, communicate, or as part of an assertion that the mining node has an associated reputation, particularly of its identity and work history. This assertion may be issued by the mining node in the same manner, and the computing node may access and retrieve information from the reputation. Regardless of the context or mechanism, the computing node obtains information that identifies the particular coinbase transaction as part of the particular mining node's intended work history.
[0115] At operation 604, the computing node evaluates whether the coinbase transaction includes a miner identifier in the information field. In many circumstances, the computing node has obtained the intended identifier of the mining node, and operation 604 may include verifying that the same identifier appears in the coinbase transaction. If not, method 600 fails because the coinbase transaction does not verify the work history for the intended miner identity.
[0116] At operation 606, the computing node further determines whether the information field of the coinbase transaction includes a reference to a previous coinbase transaction. The reference may be, for example, a TxID number. In some examples, the reference may be a block number or height that identifies the block where the coinbase transaction should be found, or may be an outpoint of the previous coinbase transaction. If a reference exists and is to a previous (lower block height) mined coinbase transaction, at operation 608, the computing node retrieves a copy of the coinbase transaction from the blockchain and returns to operation 604 to verify that it points to the miner identifier and the previous coinbase transaction. In this manner, the computing device traces back through the linked set of coinbase transactions using a reference in the information field of the coinbase transaction that is linked to the previous one in the mined order.
[0117] At operation 606, if one of the coinbase transactions does not include a reference to a previous coinbase transaction, the computing node evaluates whether it is a registered coinbase transaction, i.e., the first in the chain. They may be verifiable from an information field that may include, for example, "Action: Registration" or an equivalent code or indicator, which may include an indication that it is a registered coinbase transaction. In some examples, alternatively or additionally, it may be verified based on all other coinbase transactions in the chain identifying it as a registered coinbase transaction. If it is not a registered coinbase transaction, the chain is broken and method 600 fails to verify the work history. If so, the work history is identified and at operation 612 the computing node may proceed to verify the minor identifier. As discussed above, in some embodiments, this may include utilizing a validity check transaction and a validation process.
[0118] The above process, as an example, allows a third-party computing node to verify that a particular mining node has a particular work history. That is, a computing node can immediately trace the work history of a mining node, which provides a verifiable reputation proof for the mining node. A mining node with a long history of producing valid blocks is considered more trustworthy, important, trustworthy, and delegable or invested in than a mining node with little or no work history. Based on this, the "proof-of-work" not only serves to determine which blocks are valid and which miners are currently being rewarded for their investment in computing power, but also serves to reinforce the foundation of miner reputation to invest in computing power and delegation to build a particular blockchain.
[0119] The mining process involves searching for a block header hash that is lower than a target mining difficulty threshold. The search involves incrementing a nonce value in the header, hashing the block header, evaluating whether the hash result yields a number lower than the mining difficulty threshold, and if not, incrementing the nonce value and trying again. The mining difficulty threshold is set by the protocol and is adjusted periodically based on the blockchain protocol to produce blocks approximately every 10 minutes. The adjustment occurs so that the blockchain network takes into account changes in the overall hash power in the network. As hash power is added, the mining difficulty is changed to ensure that it is not generated too quickly and too easily. In the Bitcoin Core protocol, for example, the mining difficulty is adjusted to 2016 blocks (approximately 14 days). In the Bitcoin Cash or Bitcoin SV protocol, the mining difficulty is adjusted to 144 blocks, for example.
[0120] The block header contains a field, nBits, that specifies the current mining difficulty threshold used for that block. The mining difficulty threshold is expressed in base 256 scientific notation. Thus, if A=a1a2a3a4 is 4 bytes, then the target T is defined as:
number
[0121] The value of a1 is always 2 256 To ensure that it remains smaller, it must be in the range 0≦a1≦34. It can therefore be represented as a 32-byte string. If we assume that the SHA256 function behaves like a random oracle (i.e., the SHA256 output is a random 256-bit string where each bit is equally likely to be 1 or 0 independently of any other bit), then the probability that the block header hash will be below target for any trial nNonce value is:
number
[0122] In another aspect of the present application, a reputation score may be determined for a mining node based on its verified operating history, which, as described above, may be represented by a chain of linked coinbase documents that attest to an association between the mining node, its miner identifier, and the set of blocks mined by the mining node.
[0123] In one exemplary implementation, a mining node's reputation score is determined based on the number of blocks it has mined, and thus the number of linked coinbase documents. This example provides equal weighting to any block at any point in the blockchain history if it forms part of a chain of mined blocks via a linked coinbase transaction.
[0124] In another example implementation, the reputation score may be determined based on a weighted number of blocks mined. That is, each block may have a weight associated with it. In one example implementation, the weight may be based on the block height. For example, one implementation may be to give a greater weight to older blocks. In another example, an implementation may be to give a greater weight to more recent blocks.
[0125] In another implementation, the weights assigned to blocks may be based on the block mining difficulty, i.e., blocks that have a lower mining difficulty threshold, i.e., require more hash power to mine on average, may be given a greater weight in determining the reputation score. In one example of such an implementation, the reputation score may be determined as a function of the target mining difficulty of each block that includes one of the coinbase documents in the chain of linked coinbase documents.
[0126] For example, if the minor reputation score is Rep ID and the target mining difficulty of block i is T i If B is the number of blocks in the work history, then the miner reputation score may be calculated as follows:
number
[0127] In some examples, the reputation score may be based on the entire history of work, or may be based on a window up to a maximum number of recent blocks, i.e., a "rolling" reputation score. In some examples, the window may be based on any blocks from the history of work that fall within the blockchain height, e.g., within X number of blocks of the current blockchain height.
[0128] In some example implementations, the current reputation score may be calculated by a mining node and included in an information field of each coinbase transaction.
[0129] In some examples, the reputation scores may be normalized, e.g., by dividing the reputation score by the maximum reputation score, e.g., the reputation scores resulting from all blocks in a blockchain or window. This ensures that all reputation scores are between 0 and 1.
[0130] 7, an example method 700 for determining a reputation score of a mining node is shown. The example method 700 may be performed by the mining node, by another blockchain node, or by a computing node external to the blockchain network.
[0131] At operation 702, the chain of coinbase transactions linked to a particular mining node is traced, for example as described above with respect to FIG. 6. From tracing the coinbase transactions, the work history of the mining node is identified. At operation 704, the mining difficulty thresholds of each block that contains one of the coinbase transactions are determined. Next, at operation 706, the reputation score of the mining node is determined by applying a function to the set of mining difficulty thresholds. As described above, this may include summing the mining difficulty thresholds (or their inverses). Additionally or alternatively, a weighted function may be applied. The result is the reputation score of the mining node, which is the output of operation 708.
[0132] The reputation score is a quantifiable measure of a mining node's contribution to the blockchain that can be used in many scenarios. Advantageously, all data determining and assessing the miner identity and its associated reputation score are publicly available from the blockchain and are verifiable thanks to the immutable properties of the blockchain backed by proof-of-work. To prevent malicious behavior, the reputation score of a mining node can only be improved through mining blocks, i.e., through positive contributions to the stability of the blockchain network.
[0133] Reputation scores are developed by mining nodes by including their miner identifier and linking it to the previous block in the coinbase document. The contents of the coinbase document are in the control of the mining node, meaning that mining nodes do not need to rely on third-party verification or attestation to build reputations. Furthermore, mining nodes cannot forge or tamper with reputations.
[0134] The ability to verifiably determine the reputation scores of mining nodes with associated miner identifiers can be used in a number of applications. For example, eligibility to participate in a particular protocol or activity may be predicted based on mining nodes having a minimum threshold reputation score, to allow only miners with a particular background to be involved. Another possible application is voting. In particular, when changes are proposed to the underlying blockchain protocol, miners are tasked with submitting a vote, which may be weighted in some way. One option is to weight the votes based on the reputation score, thereby giving more weight to miners with higher reputation scores based on the miners having done more work to build on the existing blockchain.
[0135] One exemplary voting scheme used in blockchain involves opening a time window during which miners can vote, then counting votes based on blocks mined during the time window. This awards the most votes to the miners with the most hash power during the time window, and does not consider the history of contributions. This can result in "hash wars" and makes the system vulnerable to "rented hashes," where a miner interested in skewing the voting results temporarily commits a huge amount of computing power to the blockchain in order to dominate the blockchain's hash power during the window, but does not have the resources or interest to commit such an amount of computing power to the blockchain for the long term. In some instances, "rented hashes" are sustainable in that they are an uneconomical allocation of resources, but incur a cost to the miner to enforce the outcome of the vote. Miners thus obtain voting influence that is out of proportion to the miner's actual involvement and investment in the blockchain.
[0136] In one example, the process by which miners vote is as follows: mining nodes vote by sending their miner identifier, e.g. PK ID and the associated reputation score Rep ID Once a person has registered, they may be allowed to participate. Voting occurs over an agreed upon time window from a start time to an end time (or from a start block height to an end block height). The mechanism for achieving agreement on the window and timing for any vote may be on-chain or off-chain.
[0137] To cast a vote, a mining node must mine a block during a voting window. In the block, the miner inserts its miner identifier and a reference to its recent coinbase transaction in the coinbase transaction. The miner may also include its calculated reputation score in some implementations. The mining node may also include a voting signal. Depending on the vote, the signal may be a binary "yes / no" or "for / against" value, or may be a multi-valued signal, such as a choice between three or more options, a ranking of three or more options, etc. In some examples, the coinbase transaction may further include a digital signature based on a private key corresponding to the miner identifier. The digital signature may be over other contents of information fields in the coinbase transaction.
[0138] In some implementations, a single miner may be eligible to vote multiple times during a voting window. In some other implementations, a single miner may be eligible to vote multiple times per miner, i.e., a single miner identifier PK ID Only one vote is allowed per window. In the latter case, if a miner mines more than one block in which they intend to cast a vote, a policy may be applied to determine which one to count. For example, the policy may be to take the earliest (lowest block height) vote. Alternatively, the policy may be to take the latest (highest block height) vote, allowing miners to change their vote during the window.
[0139] Any vote monitor may verify that a vote is valid by verifying the miner identifier as described above, and by verifying the reputation score associated with the miner identifier as described above. If a signature is required as part of the vote coinbase transaction, it prevents another miner from maliciously mining a block and their PK IDAfter the voting window has ended, all information is recorded and verifiable on the blockchain, so any observer may determine the outcome by adding up the votes weighted by the reputation score for each option.
[0140] By tallying votes using historical block data, rather than current and future block data, votes can be cast over a relatively short period of time during which vote weights are calculated with enough proof-of-work data to accurately reflect the chain. This allows for a relatively short voting period without the risk of vote weights being disrupted by temporary hash bursts.
[0141] However, voting is done by PK to mine a new block. ID Since it requires a block time of 10 minutes, sufficient time must be given for miners to be able to cast their votes. Assuming a 10 minute block time, PK ID If a miner with x has a network hashrate of x%, then the probability of mining at least one block in t time is:
number
[0142] Table 1 below gives P for various x and t. [Table 1]
[0143] From the above table, PK ID Even if a miner has only 1% of the network hashrate, the 72 hour voting period almost guarantees that they will be able to mine a voting block.
[0144] In at least one exemplary model of a possible hash war scenario, the reputation system described above can be shown to reduce the effectiveness of rented hashes, such that even if an attacker controls 75% of the network for 14 days, he or she can only accumulate 23% of the voting power.
[0145] It will be understood that some or all of the above operations of the various above-described exemplary methods may be performed in an order different from that shown and / or may be performed simultaneously without changing the overall operation of the methods.
[0146] Referring to FIG. 8, a simplified computing device 800 is illustrated in block diagram form according to an example of the present application. The computing device 800 may perform one or more of the functions described above. The computing device 800 may be, for example, a mining node. In some implementations, the computing device 800 may be a non-mining node that operates to verify data recorded in the blockchain, such as, for example, a miner identifier, a miner work history, a miner reputation score, or a miner voting block.
[0147] Computing device 800 includes a processor 802, which may include one or more microprocessors, application specific integrated circuits (ASICs), microcontrollers, or similar computer processing devices. Computing device 800 may further include memory 804, which may include permanent and non-permanent memory for storing values, variables, and in some examples, processor-executable program instructions, and a network interface 806.
[0148] Computing device 800 may include processor-executable applications 808 that include processor-executable instructions that, when executed, cause processor 802 to perform one or more of the functions or operations described herein.
[0149] The various embodiments described above are merely examples and are not meant to limit the scope of the present application. Various innovations described herein will be apparent to those skilled in the art, as will variations within the intended scope of the present application. In particular, features from one or more of the exemplary embodiments described above may be selected to generate alternative exemplary embodiments, including combinations of features not explicitly shown above. Furthermore, features from one or more of the exemplary embodiments described above may be selected and combined to generate alternative exemplary embodiments, including combinations of features not explicitly shown above. Features suitable for such combinations and combinations will be readily apparent to those skilled in the art upon review of the present application in its entirety. The subject matter described in the present specification and claims covers and encompasses all appropriate technical modifications.
Claims
1. 1. A computer-implemented method for relaying double spend attempt notifications in a blockchain network, the method comprising: receiving a double spend notification from a node of the blockchain network, the double spend notification including two transaction identifiers and signed by a miner identifier; obtaining transaction data for two transactions corresponding to the two transaction identifiers; determining whether the two transactions have at least one matching input, identifying the double spend notification as valid if the two transactions have at least one matching input, and thereby transmitting the double spend notification to at least one other node on the blockchain network; if the two transactions do not have at least one matching input, identifying the double spend notification as invalid and, as a result, not propagating the double spend notification on the blockchain network; The method includes:
2. 2. The method of claim 1, further comprising the step of validating the minor identifier prior to the step of determining whether the two transactions have at least one matching input.
3. the double-spend notification includes the minor identifier, the minor identifier including a minor public key; The step of validating the minor identifier comprises: tracing the miner identifier to a coinbase transaction that includes the publication of the miner public key; verifying a signature on the double-spend notification using the minor public key; The method of claim 2 , comprising:
4. 2. The method of claim 1, further comprising the step of determining that the double-spend notification should be validated prior to the step of obtaining transaction data for the two transactions.
5. determining that the double-spend notification should be validated comprises: generating a random value; determining that the random value is below a validation threshold; The method of claim 4 , comprising:
6. The step of transmitting the double spending notification on the blockchain network includes: The method of claim 1 , further comprising the step of adding a signature to the double-spend notification before sending it.
7. The steps to add a signature are:
7. The method of claim 6, comprising determining that fewer than a maximum number of signatures have been added to the double-spend notification.
8. 10. The method of claim 1, further comprising the step of generating and sending a rejection notice if the two transactions do not have at least one matching input.
9. 9. The method of claim 8, wherein the denial notice includes at least an identifier of the double spend notice, and generating includes adding a current node signature.
10. The method of claim 9 , wherein the current node signature is generated based on a current node minor identifier.
11. receiving a denial notification from another node, the denial notification including an identifier of the double spend notification and signed by a second minor identifier; The method of claim 1 further comprising:
12. determining that the double-spend notification should be validated by obtaining reputation scores associated with the minor identifier and the second minor identifier and determining whether the two transactions have at least one matching input based on the relative reputation scores; The method of claim 11 further comprising:
13. 2. The method of claim 1, wherein obtaining the transaction data comprises reading transaction data for one of the transactions from a memo pool and requesting a copy of the other transaction from another node.
14. 1. A computing device for relaying double spend attempt notifications in a blockchain network, the computing device comprising: one or more processors; Memory, computer-executable instructions stored in said memory, which, when executed by said one or more processors, cause said processors to perform a method according to any one of claims 1 to 13; 2. A computing device comprising:
15. 14. A computer readable medium storing processor executable instructions for relaying double spend attempt notifications in a blockchain network, the processor executable instructions, when executed by one or more processors, cause the processors to perform the method of any one of claims 1 to 13.
Citation Information
Patent Citations
Block chain abnormal data processing method and device, equipment and medium
CN110808839A
Smart contract life cycle management
JP2019008791A
Systems and methods for using distributed ledgers for data processing
JP2019532419A
System and methods for preventing reverse transactions in a distributed environment
US20190303935A1
