Method and Apparatus for Secure Symbiosis Mining
Patent Information
- Application Number
- JP2022521289
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-10-09
- Filing Date
- 2020-10-08
- Publication Date
- 2025-03-27
- Estimated Expiration
- 2040-10-08
Smart Images

Figure 0007652767000005 
Figure 0007652767000006 
Figure 0007652767000007
Abstract
Description
[Technical field]
[0001] The present disclosure relates to blockchain networks, and more particularly, to mining in blockchain networks. [Background technology]
[0002] Mining nodes (or "miners") are the main elements of a blockchain network. In a "proof-of-work" blockchain network, mining nodes compete to achieve proof-of-work to "win" the race to mine a block, thereby collecting transaction fees and newly minted tokens that are reflected in the coinbase transaction in the new block. In this way, miners secure the network and ensure that transactions are valid and that all participating nodes follow the general blockchain protocol. Nodes validate transactions and blocks, including transactions and blocks, against prescribed validity criteria before propagating them throughout the blockchain network.
[0003] As networks scale and proof-of-work searches become computationally more difficult, mining functions require significant computing power (sometimes called "hash power"). Transaction volume and transaction size also imply heavy computing, storage, and bandwidth demands on validation and propagation functions. It would be advantageous to find mechanisms to better structure blockchain networks and blockchain nodes, and / or the operations performed by those nodes, to meet these demands while ensuring transaction security without the need for trusted intermediaries. Summary of the Invention
[0004] According to one aspect, a computer-implemented method of mining in a blockchain network, the blockchain network including non-mining nodes and a plurality of mining nodes, the method comprising: generating, by the non-mining node, a candidate block including a plurality of transactions, the plurality of transactions including a source transaction including a first output associated with the non-mining node, and a miner transaction including the first output of the source transaction as an input and a second output associated with a first mining node; determining a payload summary for the candidate block; sending a payload summary, the miner transaction, and a first summary path of the miner transaction to the first mining node; receiving a proof-of-work solution for the candidate block from the first mining node; and propagating the candidate block on the blockchain network.
[0005] In some implementations, the sending step may exclude sending the source transaction to the first mining node. In some cases, the sending step includes sending a candidate block header for the candidate block, the candidate block header including the payload summary.
[0006] In some implementations, the source transaction and the mining transaction are not propagated on the blockchain network and are not included in the memo pool prior to receiving the proof-of-work solution for the candidate block.
[0007] In some implementations, the sending step may include sending to the first mining node a hash of the source transaction and a second summary path for the source transaction.
[0008] The method may further include verifying, at the first mining node, that the minor transaction is included in the candidate block based on the payload summary and the first summary path. In such cases, in some examples, the sending step includes sending to the first mining node a hash of the source transaction and a second summary path for the source transaction, and the verifying step includes verifying that the source transaction is included in the candidate block based on the payload and the second summary path.
[0009] In some implementations, the payload summary includes a Merkle root, the first summary path includes a first Merkle path, and the first Merkle path includes a minimum set of hashes for reconstructing the Merkle root from the minor transactions.
[0010] In some implementations, the generating step comprises: The method may include generating, by the non-mining node, a second candidate block including a second plurality of transactions, the second plurality of transactions including the source transaction and a second miner transaction that includes the first output of the source transaction as an input and includes another output associated with a second mining node different from the first mining node.
[0011] In a further aspect, the present application provides a computer-implemented method of mining in a blockchain network, the blockchain network including non-mining nodes and mining nodes, the method comprising: receiving, at the mining node, a candidate block header for a candidate block, a payload summary for the candidate block, minor transactions, and a first summary path for the minor transactions from the non-mining node; verifying that the candidate block contains the minor transaction based on the payload summary and the first summary path; iteratively mining the candidate block headers with successive nonce values inserted into the candidate block headers until a proof-of-work is found; sending at least one of the nonce values corresponding to the proof-of-work to the non-mining nodes; The method described herein may include:
[0012] In yet a further aspect, the present application provides a computer-implemented method of mining in a blockchain network, the blockchain network including non-mining nodes and a plurality of mining nodes, the method comprising: generating, by the non-mining node, a candidate block including a plurality of transactions; sending at least a candidate block header of the candidate block to the plurality of mining nodes; receiving a hash of a proof-of-work solution from a first mining node of the plurality of mining nodes, the proof-of-work solution including a candidate block that includes a nonce; hashing the hash of the proof-of-work solution to generate a proof-of-work result and determining that the proof-of-work result satisfies a mining difficulty setting; generating a miner transaction associated with the first mining node and having an output locked by the proof-of-work solution in response to the proof-of-work result satisfying the mining difficulty setting; receiving the proof-of-work solution from the first mining node; completing and propagating the candidate block onto the blockchain network; The present invention provides a method that may include:
[0013] In an additional aspect, the present application provides a computer-implemented method of mining in a blockchain network, the blockchain network including non-mining nodes and mining nodes, the method comprising: receiving, by the mining node, from the non-mining node, a candidate block header for a candidate block that includes a plurality of transactions; iteratively mining the candidate block header with successive nonce values inserted into the candidate block header until a proof-of-work is found; sending a hash of the proof-of-work to the non-mining nodes; receiving a miner transaction from the non-mining node, the miner transaction having an output associated with the mining node and locked by the proof-of-work solution; propagating the minor transaction onto the blockchain network; The method described herein may include:
[0014] In another aspect, a computing device may be provided for implementing a node 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.
[0015] In yet another aspect, a computer-readable medium may be provided having processor-executable instructions stored thereon for differentiating nodes in a 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.
[0016] 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. [Brief description of the drawings]
[0017] By way of example, reference is made to the following accompanying drawings which illustrate exemplary embodiments of the present application:
[0018] [Figure 1] Showing a simplified example of a partial blockchain network with split mining and storage / validation nodes;
[0019] [Diagram 2] Showing in a flowchart form an example method of mining on a blockchain network;
[0020] [Diagram 3] An example Merkle tree is shown diagrammatically;
[0021] [Figure 4] Show another simplified example of a partial blockchain network with split mining and storage / validation nodes;
[0022] [Diagram 5] 1 illustrates, in flowchart form, another exemplary method for mining on a blockchain network.
[0023] [Figure 6]1 illustrates, in block diagram form, a simplified example of a computation node in a blockchain network.
[0024] Like reference numbers in the figures are used to denote like elements and features. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0025] 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.
[0026] 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.
[0027] This application refers to hashing or hash function, which is intended to include any one of a number of cryptographic hash functions that deterministically generate a unique fixed-length alphanumeric string when applied to any data set or "message." The result of a hash function may be referred to as a hash value, fingerprint, hash result, or equivalents thereof. Exemplary hash functions include, but are not limited to, SHA-2, SHA-3, and BLAKE2.
[0028] As used herein, the term "blockchain" is understood to encompass all forms of electronic, computer-based, distributed ledgers, including consensus-based blockchain and transaction chain technologies, permissioned and unpermissioned ledgers, shared ledgers, and variations thereof. Although exemplary blockchain protocols may be discussed below for illustrative purposes, the present application is not limited to use with any particular blockchain or blockchain protocol, and alternative blockchain implementations and protocols are within the scope of the present application.
[0029] A blockchain is a peer-to-peer electronic ledger implemented using a computer-based decentralized distributed system. A blockchain is 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 resource in the blockchain system, and includes at least one input and at least one output. Transactions may include small programs known as scripts. Scripts embed their inputs and outputs and specify how and under what conditions the transaction's output is accessible. In some platforms, these scripts are written using a stack-based scripting language. Access to the digital resource and the ability to further distribute some or all of the digital resource is governed by unlock conditions on the output. Exemplary conditions typically include a digital signature using a private key that corresponds to the public key used to lock the output, but many other conditions may be imposed.
[0030] 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, so that blocks become strung together to create a permanent, immutable record of all transactions written to the blockchain since inception.
[0031] A blockchain is implemented by a network of nodes. Each node is a computing device with a network connection and running software that implements an applicable blockchain protocol. The nodes validate transactions and propagate them to other nodes in the network. Dedicated network nodes, called "mining nodes" or "miners," attempt to collect a set of unconfirmed or pending transactions into a block and "mine" the block. Mining, in these examples, refers to solving a proof-of-work (POW) before other miners in the network succeed in solving their respective block's proof-of-work. In some examples, the POW involves hashing a block header, including a nonce, until the result of the hashing 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.
[0032] As mentioned above, mining nodes are key to securing the blockchain network. Mining nodes are compensated for their work when they win the race to find a valid new block. Compensation comes through transaction fees from individual transactions and from “coinbase” transactions included in the new block. Coinbase transactions have no input (or, more appropriately, an empty or null input field) and output a predefined amount of tokens (e.g., coins) to miners, effectively generating new tokens. Coinbase transactions may also be referred to as “generating transactions” and the terms may be used interchangeably herein. Coinbase or generating transactions have certain properties that distinguish them from regular transactions. For example, each valid block contains only one generating transaction. Each generating transaction has no input (or, if an input field is present, it has no effect on the transaction) and generates an output of an amount of tokens set by the then-prevailing block reward attributed to a successful miner according to the governing blockchain protocol. Generation transactions are "proof-of-work transactions" because they can only be generated by mining nodes that have successfully mined a block, i.e. achieved proof-of-work.
[0033] In at least one exemplary blockchain, hashing the block header to find the POW is a double hash, denoted here as H 2 (·). In some such examples, the hash function used is SHA-256. Other blockchain networks may use other hash functions.
[0034] In recent blockchain developments, a "full node" was generally considered ideal because it could perform all the functions of mining, validation, blockchain storage, and propagation. As blockchain networks mature, different computational demands arise in mining, storage, validation, and propagation. Mining requires a huge amount of computational power for hashing, storage requires a huge amount of disk space storage, validation requires very fast computational throughput and fast access memory, and propagation requires high bandwidth connections with as many other nodes as possible in the blockchain network in order to attempt to realize a small-world network model. It is advantageous to separate some of these functions to enable efficiency through the construction and operation of specialized nodes. However, any separation of functions should avoid introducing trust issues between nodes that would require third-party oversight or a trusted intermediary between nodes in order to maintain the decentralized nature of the blockchain network.
[0035] In one aspect, the present application describes a blockchain system and method in which mining functions are performed by mining nodes and some other functions, such as storage and validation functions, are performed by non-mining nodes. In some cases, non-mining nodes may perform validation and propagation functions. In some cases, non-mining nodes may perform validation and storage functions. In some cases, non-mining nodes may perform all of the functions of a full node except mining. In such systems and methods, non-mining nodes store or access a pool of pending transactions and the blockchain to construct one or more candidate blocks for mining by the mining nodes. The mining nodes perform hashing operations to find a proof-of-work for a candidate block provided to the mining node by one of the non-mining nodes. The non-mining nodes and the mining nodes are not necessarily owned or controlled by the same entity. In such a process, non-mining nodes may obtain a block reward when they successfully mine a block, and non-mining nodes may transfer resources to the mining nodes for their role in successfully mining a block.
[0036] To maintain security on the mining protocol and to prevent malicious or fraudulent manipulation, the mining protocol may be reconfigured to be performed collectively by multiple entities such as dedicated mining nodes and separate storage and validation nodes (i.e., non-mining nodes). The reconfiguration of the mining process between the separate nodes may be structured to ensure atomic exchanges between the non-mining nodes and the mining nodes. An atomic exchange is one in which a first node and a second node each have data or resources required by the other node, and a mutual exchange occurs due to the occurrence of an event and not otherwise. An exchange is considered atomic if the only possible outcomes are that both events occur (mutual exchange of data or resources) or neither event occurs. A significant technical challenge lies in how to configure the nodes, their interactions, and communication processes to ensure that an atomic exchange occurs. In some of the following examples, a double hash operation within the proof-of-work operation may be utilized to provide a proof of knowledge and may be trusted as a precondition for setting up an atomic exchange. In some cases, a candidate block may be constructed by non-mining nodes to include at least one transaction that establishes an atomic exchange, so that mining nodes can verify it prior to mining.
[0037] The terms “non-mining nodes” and “storage and validation nodes” may be used interchangeably herein.
[0038] In one exemplary implementation, a non-mining node provides candidate blocks to multiple mining nodes. Upon receiving a message from one of the mining nodes establishing a verifiable proof of success, but not an actual solution to the POW, the non-mining node may generate and provide to the successful mining node a mining transaction that transfers control of resources to the successful mining node contingent on disclosing the solution. Of note, the mining transaction is generated only by the non-mining node in response to determining that the mining node has provided a verified proof of knowledge that proves that the POW solution was determined by the mining node.
[0039] One of the challenges faced by blockchain networks is the need to rapidly propagate transactions and blocks through the network. This requires high bandwidth connections between nodes. In some cases, the bandwidth may be limited, resulting in propagation delays and resulting bottlenecks in the network. For example, the Chinese government imposes certain bandwidth restrictions as part of the firewalls it uses to control network traffic in and out of China. There are numerous mining rigs in China that are configured to provide large scale hash power to solve the POW problem. The delays in propagating transactions and blocks to Chinese miners, and the delays in successful miners in China propagating completed blocks with solved POWs to global miners make the use of China based mining rigs less than optimal. In some cases, this may increase the chances of orphaning blocks and / or creating temporary forks. It would be advantageous to provide a method and system for mining blockchain transactions that mitigates issues resulting from mining nodes having low bandwidth connections.
[0040] The methods and systems described herein can be used to minimize the data sent to and received from mining nodes by offloading much of the bandwidth consumption to non-mining nodes.
[0041] Some of the systems and methods described below allow for the separation of storage and mining functions, providing a mining marketplace where miners can compete to solve POWs for blocks prepared by non-mining nodes. There is no need to provide complete candidate blocks to mining nodes, and non-mining nodes may be trusted to propagate completed blocks. In some cases, non-mining nodes may provide partial candidate block headers to mining nodes, e.g., Merkle roots and other fields without nonce and timestamp. Mining nodes may then insert the nonce and timestamp and hash the candidate block headers in search of a POW solution.
[0042] Separate mining and validation with minimal bandwidth usage Reference is now made to FIG. 1. FIG. 1 diagrammatically illustrates an example of a partial blockchain network 100. The partial blockchain network includes a storage and validation node 102 (i.e., a non-mining node) and a number of mining nodes 104 (individually labeled as 104a, 104b, 104c, and 104n). The storage and validation node 102 constructs a candidate block, which includes determining a Merkle root and partially completing a candidate block header. The candidate block header may have an empty nonce field and a timestamp field. The storage and validation node 102 provides each mining node 104 with at least the header of the candidate block, which searches for a POW by inserting a nonce and a timestamp and hashing the candidate block header. The storage and validation node 102 may also provide, in some implementations, a TxID for the transaction included in the block along with the candidate block header. In some examples, the storage and validation node 102 may perform the role of a mining pool manager and may specify a portion of the nonce search space for each mining node 104. In some example implementations, the storage and validation node 102 does not specify any portion of the nonce search space, and the mining nodes 104 may compete with each other in searching for a solution. In some example implementations, one or more of the mining nodes 104 is a mining pool.
[0043] If one of the mining nodes 104 finds a POW solution, i.e., a nonce and timestamp that results in a double-hash block header that is less than the difficulty setting, that mining node 104 sends a message to the storage and validation node 102. In particular, that mining node 104 sends a single hash of the block header to the storage and validation node 102. The storage and validation node 102 then hashes the single hash to prove that the result satisfies the difficulty setting, thereby verifying that the mining node 104 found a POW solution. The storage and validation node 102 can then create an atomic exchange event with the mining node 104 by generating a transaction that transfers control over resources to the mining node 104, with the output locked by a condition that requires the disclosure of the POW solution.
[0044] A successful mining node 104 verifies that the transaction appears valid, and if so, it provides the POW solution to the storage and validation node 102, which then validates and broadcasts the block.
[0045] The storage and validation node 102 receives a single hash of the POW solution, i.e., H(φ). Therefore, the double hash is the double hash of the POW solution, H 2 When a miner transaction matches H(φ), it may establish a locking condition on the output of the miner transaction that requires the candidate block header φ along with a nonce and a timestamp. To access the output of the miner transaction, the mining node 104 must disclose the block header that was the basis of the proof of knowledge H(φ) that it sent to the storage and validation node 102 as a claim that it has solved the POW.
[0046] It will be appreciated that a mining node 104 can withhold its POW release until after other miners have mined the block, and can nevertheless access the output of the miner transaction by making a currently worthless POW release. However, the storage and validation node 102 provides the same candidate block to multiple miners, each of which is searching for a solution. If a second mining node 104 provides a different solution, the storage and validation node 102 then creates a second miner transaction for the second mining node 104 that spends the same UTXO. The first mining node 104 to disclose its solution will control the UTXO, and the other miner transactions will be invalid.
[0047] Reference is now made to FIG. 2, which illustrates a flow chart illustrating an example method 200 of mining on a blockchain network. The method 200 begins with operation 202, in which a storage and validator node (i.e., a non-mining node) constructs a candidate block that includes transactions from a mempool. The candidate block further includes a creation (coinbase) transaction with an output that allocates new resources to the control of the storage and validator node. In operation 204, the storage and validator node transmits at least the candidate block header to a number of miners. The term "mempool" refers to a collection of pending transactions in a blockchain network that have not yet been included in a mined block. Any one of a number of nodes in the network, such as a full node, a validator node, a storage node, or other types of nodes, can maintain a copy of the mempool that is constantly updated as new transactions are propagated through the network and blocks are mined.
[0048] Mining nodes search for a POW solution, i.e., nonce and timestamp, that results in a double-hashed candidate block header that satisfies the mining difficulty setting. As indicated by operations 208 and 210, hashing by mining nodes continues until they find a solution or until they are notified that another miner has found and propagated a solution (whether for the same candidate block or a different candidate block).
[0049] If one of the mining nodes finds a solution, the mining node sends a hash of the candidate block header containing the POW solution to the storage and validation node in operation 212. The storage and validation node evaluates whether the intended solution meets the difficulty setting by re-hashing to generate a double hash of the candidate block header and evaluating whether the result is below the number set by the difficulty setting in operation 214. If not, the search continues.
[0050] If the POW solution appears valid, the storage and validation node generates a miner transaction in operation 216. The miner transaction includes an output locked by a public key associated with the successful miner and locked to require a candidate block header from the hashed candidate block header provided by the mining node. The miner transaction is sent to the mining success node. The mining node verifies that the miner transaction is valid in operation 218, and once verified, the mining node discloses the POW solution in operation 220. This includes sending the candidate block header to the storage and validation node. This includes sending a nonce and a timestamp to the storage and validation node. The storage and validation node then propagates the entire block on the blockchain network.
[0051] The above method involves performing an atomic exchange after one of the mining nodes proves that it has found a solution to the POW. To address the technical issue of bandwidth limitations and allow the mining function to be separated from the storage and validation functions, another approach can be used. In one embodiment, the atomic exchange may be established before the mining activity. In this embodiment, the storage and validation nodes may construct candidate blocks specifically for each mining node. Each candidate block contains miner transactions with outputs unlockable by that mining node, i.e., locked by a public key associated with that mining node. To prevent a mining node from utilizing a miner transaction before solving the proof-of-work, the input to the miner transaction may be a source transaction in the same candidate block. This means that a miner transaction is only valid if the candidate block has been mined. Properties of the Merkle tree are exploited to allow a mining node to verify that a candidate block is properly constructed and contains mining transactions, even if the mining node does not have a copy of the complete candidate block.
[0052] In this embodiment, the storage and mining nodes provide the mining nodes with a partial candidate block header that includes the Merkle root, but not the complete block details, and in particular the source transaction. However, to allow the mining node to verify that the candidate block was properly created and contains the mining transaction, the storage and mining nodes provide the mining node with a copy of the mining transaction and a Merkle proof for the mining transaction (also referred to herein as a Merkle path). Once the mining node finds a solution, it sends the solution (nonce and timestamp, or the candidate block header that includes these values) to the storage and validation nodes. The storage and validation nodes verify that the solution is valid and propagate the block on the blockchain network. Then, both the source transaction and the miner transaction are valid on the blockchain, and the output of the miner transaction is available to the mining node.
[0053] The following description provides details regarding Merkle trees and uses the terms Merkle root and Merkle path, although the application is not necessarily limited to Merkle trees. The term "payload summary" may be used to refer to a value or parameter that is, in effect, a hash of the contents of a payload, thereby proving the contents of the payload. A Merkle root is an example of a payload summary. The term "summary path" may be used to refer to data that, along with a payload summary, may be used to prove a particular data item contained in the payload from which the payload summary was generated. A Merkle path is an example of a summary path.
[0054] Before describing example systems and methods in more detail, a brief explanation of Merkle trees and proofs is provided.
[0055] Merkle trees and proofreading 3 shows an example of a Merkle tree 300. Each node in the lattice is given an index pair (i,j) and represented as N(i,j). The indexes i,j are simply numerical labels relating to a particular position in the tree. Each node may be referenced by its index pair (i,j) and each node may have an associated value given by:
number
[0056] where k=(((i+j-1)) / 2 and H is a cryptographic hash function.
[0057] The case i=j corresponds to a leaf node, which is simply the data D i Note that, j is the hash of the corresponding i-th block of j, where j corresponds to an internal or root node. This is generated by recursively hashing and concatenating the child nodes in the tree until a particular node or root is reached.
[0058] The construction of a Merkle tree requires the use of a cryptographic hash function. In general, a hash function is considered cryptographically secure if it has the following properties:
[0059] 1) Preimage resistance: Given h = H(m), it is computationally intractable to find m;
[0060] 2) Second preimage resistance: Given h = H(m) and m, it is computationally intractable to find m' such that H(m') = h;
[0061] 3) Collision Resistance - It is computationally infeasible to find a pair of messages m and m' such that H(m) = H(m').
[0062] Since the transaction identifier TxID is generated using such a hash function, the identifier inherits the properties of the digest of the hash function. It can be shown that the Merkle tree root has very similar properties to the TxID.
[0063] The main function of Merkle trees in many applications is to store some block of data D i Let D∈{D1,…,D N The goal of the study is to realize proof that a given element is an element of}. Merkle root and candidate data block D i Given a set of ,this can be treated as an "existence proof" of the block in the set.
[0064] The mechanism for such proofs is known as a Merkle proof, where for a given block of data D i and a set of hashes known as a Merkle path for the Merkle root R. The Merkle path of a data block is the minimal set of hashes needed to reconstruct the root R by repeated hashing and concatenation, and is sometimes called the authentication path of the data block.
[0065] For all blocks D1,…,D N If k is known to the prover, then an existence proof is easy to perform. However, it requires a much larger memory overhead than a Merkle path, and it also requires that the entire dataset is available to the prover.
[0066] Starting from the Merkle root R, a data block D1 is partitioned into a set D∈{D1,...,D N} is proved to belong to:
[0067] 1) Get the Merkle root R and the Merkle path Γ, where Γ is the set of hashes: Γ={N(2,2),N(3,4),N(5,8)}
[0068] 2) Use D1 and Γ to calculate the Merkle proof as follows:
[0069] (a) Hash (or double-hash, depending on the implementation) the data block to get N(1,1) = H(D1);
[0070] (b) Concatenate N(2,2) with the hash to get N(1,2) = H(N(1,1)||N(2,2));
[0071] (c) Concatenate N(3,4) with the hash to get N(1,4) = H(N(1,2)||N(3,4));
[0072] (d) Concatenate N(5,8) and the hash to get the root: R' = N(1,8) = H(N(1,4)||N(5,8));
[0073] (e) Compare the computed root R' with root R'. If R'=R, then data block D1 is in the tree.
[0074] Performing a Merkle proof for a given block D1 and root R effectively walks "up" the Merkle tree by using only the minimum number of required hash values.
[0075] Method and Apparatus for Secure Symbiotic Mining In the following examples, the storage and validator nodes and the mining nodes establish an atomic exchange before engaging in any mining activity. In these examples, the candidate blocks that the storage and validator nodes create are unique to that mining node. The candidate blocks contain mining transactions that transfer control over resources to the mining node. However, the inputs to the miner transactions are source transactions, even in the candidate blocks, that are not generally broadcast on the blockchain network. The mining nodes are not provided with the full candidate block, and in particular, they are not provided with the full source transaction. This prevents the mining node from conducting mining transactions unless the candidate block itself is mined, i.e., unless it succeeds in finding a POW for the candidate block.
[0076] Before engaging in mining, a mining node receives a partial candidate block header from the storage and validation nodes, including the Merkle root, and also receives at least a portion of the miner transaction and the Merkle path of the miner transaction. From this received data, the mining node verifies that the miner transaction is included in the candidate block by performing a Merkle proof.
[0077] Reference is now made to Figure 4, which illustrates, in flow chart form, an exemplary method 400 of mining in a blockchain network using separate mining and validator nodes. Some of the operations illustrated in Figure 4 are performed by the storage and validator nodes, and some operations are performed by the mining nodes. The storage and validator nodes may be network connected to at least one mining node.
[0078] In operation 402, the storage and validation node constructs a partial candidate block for one of the mining nodes. In some cases, multiple candidate blocks can be constructed for individual mining nodes. In some implementations, the candidate blocks contain identical transactions, except for the miner transactions, which are unique to each miner. As part of constructing the candidate block, the storage and validation node calculates the Merkle root of the block and records the Merkle root value in a partially complete candidate block header. The candidate block header is a partial candidate block header that includes the version, previous block hash, Merkle root, and nBits value, but does not include the timestamp and nonce.
[0079]
number
number
[0080] A candidate block header includes a creation (coinbase) transaction with outputs associated with the public keys of the storage and validation nodes. In other words, the creation transaction allocates resources (e.g., block rewards) to the storage and validation nodes. It will be appreciated that some blockchain protocols stipulate that resources allocated by a creation transaction cannot be transferred for a certain period of time after creation, typically measured in block height. This is sometimes referred to as "coinbase maturity."
[0081] A miner transaction in a candidate block contains an output locked using a public key for that miner transaction and the mining node associated with the candidate block. The input to the miner transaction is the output of the source transaction included in the candidate block. The output of the source transaction is controlled by the storage and validation node, which digitally signs the input to the miner transaction. Notably, the source transaction is not included in the memo pool for the blockchain network and is not otherwise public. It is only broadcast if one of the storage and validation node's candidate blocks is successfully mined. This prevents the input from any of the mining transactions from being valid until one of the storage and validation node's candidate blocks is not mined or the mining node is not successful in mining that candidate block, preventing the mining node from simply broadcasting that mining transaction on the blockchain network.
[0082] In operation 404, the storage and validation node sends the partial candidate block header, a copy of the minor transactions from the candidate block, and the Merkle path for the minor transactions to the mining node so that the mining node makes the minor transactions available.
[0083] The mining node verifies in operation 406 that the minor transaction is included in the candidate block associated with the received candidate block header. This is done by determining a Merkle proof using the minor transaction and its Merkle path, both of which can be received from storage and validating nodes. The Merkle proof should be a value that matches the Merkle root included in the partial candidate block header. If so, and if the minor transaction has an output associated with the mining node's public key, the mining node verifies that the provided partial candidate block header is correctly constructed.
[0084] In some implementations, the storage and validating nodes exchange the hash of the source transaction and the Merkle path of the source transaction: H(T Source ), Γ(R,T Source ) to the mining nodes. In particular, it does not provide the actual source transaction, so that it does not compromise security. However, the mining node can still verify that the input to the miner transaction is present in a candidate block by determining the Merkle proof of the source transaction. ID Recall that the sigma , , is given by the hash of that transaction. Thus, while a mining node does not have the actual source transaction, it does have the hash of that transaction and can therefore verify that the source transaction was properly referenced in the input to the miner transaction and that it is present in the candidate block.
[0085] Therefore, even if the storage and validation node provides the mining node with the hash of the source transaction and its Merkle path, the amount of data it sends to the mining node is very small compared to sending a full candidate block. The transmitted data can be expressed using the following formula:
number
[0086] In operation 408, after verifying the received data, the mining node engages in a POW search for a candidate block, i.e., inserts a nonce and a timestamp into the partial candidate block header and hashes it according to the custodian blockchain protocol to find a value less than the mining difficulty threshold. As shown by operations 410 and 412, it continues hashing the candidate block header with the repeated nonce values and timestamps until another entity finds the block or the mining node is successful.
[0087] If the mining node succeeds in finding the POW, it sends the solution, e.g., the nonce and timestamp, or equivalently, the complete block header, to the storage and validation node 416 in operation 414. The storage and validation node 416 quickly verifies that the solution is valid and then broadcasts the new block on the blockchain network.
[0088] Discovering a new block results in the incorporation of a production transaction for the storage and validator node, which allocates a block reward to the storage and validator node. A source transaction and a miner transaction are also incorporated, which provide resources to satisfy the input to the miner transaction, and transfer control over resources to the mining node for output to the miner transaction that is locked using the mining node's public key.
[0089] It will be appreciated that the overall interaction between the storage and validation nodes and the mining nodes is an atomic exchange. A two-way information asymmetry is established between the two nodes. The asymmetry is resolved atomically once the proof-of-work is found and provided to the storage and validation nodes. This two-way information asymmetry is actually achieved by careful construction of the Merkle tree. The root R of the Merkle tree is present in the incomplete block header φ*.
[0090] The above exemplary process allows for the splitting of mining and storage / verification functions. Allowing for the split in this way allows for mining nodes to be located in areas with low bandwidth connectivity. It also means that the storage and verification nodes can operate independently from the mining nodes without the need for third-party trust, since the information asymmetry is structured such that neither node can take advantage of or defraud the other.
[0091] Reference is now made to FIG. 5, which diagrammatically illustrates a simplified exemplary blockchain network 500. The network 500 in this simplified example includes storage and validation nodes 502 and mining nodes 504. It will be appreciated that the storage and validation nodes 502 are interconnected by high-bandwidth high-speed network connections. The storage and validation nodes 502 in this example are sufficiently well connected to realize a small-world network. The mining nodes 504 are each connected to at least one storage and validation node 502. The connections between the mining nodes 504 and the storage and validation nodes 502 are not necessarily high-bandwidth connections, as the amount of data communication over these connections is relatively small.
[0092] In some cases, one or more mining nodes 504 may be connected to at least two storage and validation nodes 502. This allows the mining node 504 to provide hash power for mining on behalf of one of the storage and validation nodes 502, thereby allowing the mining node 504 to evaluate competing offers from the storage and validation nodes 502 for miner transactions included in each candidate block. Similarly, the storage and validation node 502 may be connected to multiple mining nodes 504 to solicit participation in mining from multiple possible mining nodes 504. This can effectively create market competition that is reflected in the miner transactions offered by the storage and validation nodes 502.
[0093] Because there is no need for high bandwidth connections between the mining nodes 504 and the storage and validation nodes 502, the storage and validation nodes 502 may be located where the resources available to fulfill their functions are best, such as high bandwidth, low latency connections to other storage and validation nodes 502. The mining nodes 504 do not need to be co-located with the storage and validation nodes 502, but may be located where the resources available that best suit their needs, such as abundant low cost electricity to run large scale mining rigs.
[0094] Referring to FIG. 6, a simple computing device 600 according to an example of the present application is illustrated in block diagram form. The computing device 600 may perform one or more of the functions described above. In some examples, the computing device 600 may be a mining node. In some examples, the computing device 600 may be a storage and validation node.
[0095] Computing device 600 includes a processor 602, which may include one or more microprocessors, application specific integrated circuits (ASICs), microcontrollers, or similar computer processing devices. Computing device 600 may further include memory 604, which may include permanent and non-permanent memory for storing values, variables, and in some examples, processor-executable program instructions, and a network interface 606.
[0096] Computing device 600 may include processor-executable applications 608 that include processor-executable instructions that, when executed, cause processor 602 to perform one or more of the functions or operations described herein.
[0097] 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 as a whole. The subject matter described in the present specification and claims covers and encompasses all appropriate technical modifications.
Claims
1. 1. A computer-implemented method of mining in a blockchain network, the blockchain network including non-mining nodes and a plurality of mining nodes, the method comprising: generating, by the non-mining node, a candidate block including a plurality of transactions, the plurality of transactions including a source transaction including a first output associated with the non-mining node, and a miner transaction including the first output of the source transaction as an input and a second output associated with a first mining node; determining a payload summary for the candidate block; sending a payload summary, the minor transaction, and a first summary path of the minor transaction to the first mining node; receiving a proof-of-work solution for the candidate block from the first mining node; Propagating the candidate block on the blockchain network; The method includes:
2. 2. The method of claim 1, wherein the sending step excludes sending the source transaction to the first mining node.
3. The method of claim 1 or 2, wherein the transmitting step comprises transmitting a candidate block header for the candidate block, the candidate block header including the payload summary.
4. The method of any one of claims 1 to 3, wherein the source transaction and the miner transaction are not propagated on the blockchain network and are not included in a memo pool prior to receiving a proof-of-work solution for the candidate block.
5. 5. The method of claim 1, wherein the sending step comprises sending to the first mining node a hash of the source transaction and a second summary path for the source transaction.
6. 6. The method of claim 1, wherein the plurality of transactions in the candidate block further comprises an origination transaction including a coinbase output associated with the non-mining node.
7. 7. The method of claim 1, further comprising: at the first mining node, verifying that the minor transaction is included in the candidate block based on the payload summary and the first summary path.
8. 8. The method of claim 7, wherein the transmitting step includes transmitting to the first mining node a hash of the source transaction and a second summary path for the source transaction, and the verifying step includes verifying that the source transaction is included in the candidate block based on the payload summary and the second summary path.
9. The method of any one of claims 1 to 8, wherein the payload summary includes a Merkle root, and the first summary path includes a first Merkle path, the first Merkle path including a minimum set of hashes for reconstructing the Merkle root from the minor transactions.
10. The generating step includes:
10. The method of claim 1, further comprising: generating, by the non-mining node, a second candidate block including a second plurality of transactions, the second plurality of transactions including the source transaction and a second minor transaction that includes the first output of the source transaction as an input and includes another output associated with a second mining node different from the first mining node.
11. 1. A computer-implemented method of mining in a blockchain network, the blockchain network including non-mining nodes and mining nodes, the method comprising: receiving, at the mining node, from the non-mining node, a candidate block header for a candidate block, a payload summary for the candidate block, minor transactions, and a first summary path for the minor transactions; verifying that the candidate block contains the minor transaction based on the payload summary and the first summary path; iteratively mining the candidate block headers with successive nonce values inserted into the candidate block headers until a proof-of-work is found; sending at least one nonce value corresponding to the proof-of-work to the non-mining nodes; The method includes:
12. 1. A computing device implementing a storage and validation node in a blockchain network, the blockchain network including a plurality of mining nodes, the computing device comprising: one or more processors; A memory for storing blockchain data; 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 11; 2. A computing device comprising:
13. 12. A computer readable medium storing processor executable instructions for implementing storage and validation nodes in a blockchain network, the blockchain network including a plurality of mining nodes, the processor executable instructions comprising instructions that, when executed by one or more processors, cause the processors to perform the method of any one of claims 1 to 11.
Citation Information
Patent Citations
Digital currency mining circuitry with adaptable difficulty compare capabilities
US20160330031A1
System and method for electronic currency mining
US20170249606A1
Blockchain mining using trusted nodes
US20180109541A1
System and method for operating a blockchain network
US20190303363A1
Script based blockchain interaction
WO2018215949A1