Block propagation by poisoned transactions in blockchain networks

By pre-distributing ordered transaction lists and using poisoned transactions to maintain validation integrity, the method addresses block propagation delays and ensures rapid, secure block validation in blockchain networks.

JP7785908B2Active Publication Date: 2025-12-15NCHAIN LICENSING AG
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2024230361
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-04-21
Filing Date
2024-12-26
Publication Date
2025-12-15
Estimated Expiration
2041-04-16

AI Technical Summary

Technical Problem

In blockchain networks, as block sizes and transaction counts increase, block propagation delays exacerbate the problem of temporary forks and orphan blocks, which are costly for miners and the system as a whole, necessitating solutions that prevent violations of consensus rules.

Method used

A method for block propagation in blockchain networks involves mining nodes hashing their candidate blocks while providing information about their respective candidate blocks to other miners, allowing them to pre-distribute an ordered list of transactions, minimizing the data needed to be transmitted upon successful block discovery, and optionally including poisoned ordered sets with invalid transactions to ensure validation integrity.

Benefits of technology

This approach reduces block propagation time, minimizes computational waste, and maintains consensus security by ensuring rapid validation and propagation of blocks, while also preventing reliance on potentially compromised validation work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007785908000010
    Figure 0007785908000010
  • Figure 0007785908000011
    Figure 0007785908000011
  • Figure 0007785908000012
    Figure 0007785908000012
Patent Text Reader

Abstract

To provide a method and a device for reducing delays in block propagation between mining nodes in a blockchain network.SOLUTION: A method includes transmitting a first message specifying transactions in a first ordered set of transactions included in a first candidate block and their order to other mining nodes while hashing a first block header of the first candidate block by a first mining node, seeding the first ordered set with one or more invalid transactions to create a poisoned ordered set, transmitting an encrypted list identifying the invalid transactions to the other mining nodes, decrypting the encrypted list once a proof of work (POW) is found for the candidate block, and transmitting a decryption key to identify the invalid transactions to the other mining nodes.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to blockchain networks, and in particular to the propagation of blocks between miner nodes. [Background technology]

[0002] In a proof-of-work blockchain system, when a miner finds a valid block, it attempts to quickly communicate its success to all other miners. This involves propagating information about the block to all mining nodes throughout the blockchain network. In some cases, this may involve sending the complete block data. In other cases, this may involve sending the block header and transaction list information. The receiving miner validates the new block by hashing the header and verifying that it matches the hash value provided by the successful miner.

[0003] As block sizes and transaction counts increase, block propagation delays can exacerbate the problem of temporary forks and orphan blocks. These situations are costly for miners and the system as a whole. Solutions to block propagation delays must be structured to prevent any potential violation of consensus rules. [Brief explanation of the drawings]

[0004] Reference will now be made, by way of example, to the accompanying drawings which illustrate exemplary embodiments of the present application. [Figure 1] 1 illustrates an exemplary block structure for a blockchain network. [Figure 2] 1 shows a flowchart of an exemplary method for block propagation. [Figure 3A] 1 illustrates an exemplary sequence of messages and operations in an exemplary implementation of block propagation according to the present application. [Figure 3B]1 illustrates an exemplary sequence of messages and operations in an exemplary implementation of block propagation according to the present application. [Figure 3C] 1 illustrates an exemplary sequence of messages and operations in an exemplary implementation of block propagation according to the present application. [Figure 3D] 1 illustrates an exemplary sequence of messages and operations in an exemplary implementation of block propagation according to the present application. [Figure 3E] 1 illustrates an exemplary sequence of messages and operations in an exemplary implementation of block propagation according to the present application. [Figure 3F] 1 illustrates an exemplary sequence of messages and operations in an exemplary implementation of block propagation according to the present application. [Figure 3G] 1 illustrates an exemplary sequence of messages and operations in an exemplary implementation of block propagation according to the present application. [Figure 3H] 1 illustrates an exemplary sequence of messages and operations in an exemplary implementation of block propagation according to the present application. [Figure 3I] 1 illustrates an exemplary sequence of messages and operations in an exemplary implementation of block propagation according to the present application. [Figure 4] 1 illustrates, in flowchart form, one exemplary method for block propagation in a blockchain network. [Figure 5] 1 illustrates, in flowchart form, one exemplary method for validating blocks in a blockchain network. [Figure 6] 1 shows a simplified example of a mining node in block diagram form.

[0005] In the drawings, like reference numbers are used to denote like elements and features. DETAILED DESCRIPTION OF THE INVENTION

[0006] In one aspect, a computer-implemented method for block propagation in a blockchain network may be provided. The method may include, while hashing a first block header of a first candidate block at a first mining node, sending a first message to other mining nodes specifying transactions in a first ordered set included in the first candidate block and their order, and receiving a second message identifying transactions in a second ordered set included in a second candidate block being mined by a second mining node and their order.

[0007] In another aspect, a method of block propagation in a blockchain network is described. The method may include, at a first mining node, constructing a first candidate block including transactions in a first ordered set, the first candidate block having a first block header, placing one or more invalid transactions in the first ordered set to create a poisoned ordered set, constructing a list identifying the one or more invalid transactions in the poisoned ordered set and encrypting the list to create an encrypted list of invalid transactions, and sending a first message including the poisoned ordered set and the encrypted list of invalid transactions to other mining nodes while hashing the first block header.

[0008] In some implementations, the method may further include the first mining node finding a proof of work for the first block header and, as a result, transmitting a decryption key for the encrypted list of invalid transactions.

[0009] In some implementations, including the one or more invalid transactions includes inserting the one or more invalid transactions into the first ordered set of transactions.

[0010] In some implementations, the step of introducing the one or more invalid transactions includes, for each invalid transaction in the one or more invalid transactions, replacing a respective valid transaction in the first ordered set. In some cases, the encrypted list of invalid transactions further includes each valid transaction. In some cases, the method may further include, at another mining node, constructing a first candidate block by decrypting the encrypted list of invalid transactions, and replacing the one or more invalid transactions with each valid transaction in the poisoned ordered set to reconstruct the first ordered set and generate the first candidate block.

[0011] In some implementations, the one or more invalid transactions may include transactions that violate at least one validity criterion defined by a blockchain protocol for the blockchain network.

[0012] In some implementations, the method may further include creating, at the first mining node, at least one of the one or more invalid transactions.

[0013] In some implementations, the method may further include selecting, at the first mining node, an invalid transaction received from another mining node as one of the one or more invalid transactions.

[0014] In some implementations, the method may further include the first mining node finding a proof of work for the first block header and, as a result, transmitting the proof of work and a decryption key for the encrypted list of invalid transactions, where the proof of work includes the coinbase transaction from the first candidate block and the nonce and timestamp from the first block header.

[0015] In some implementations, the method may further include receiving a second message identifying transactions and their order in a second poisoned ordered set derived from a second candidate block being mined by a second mining node while hashing the first block header, and receiving a second encrypted list, wherein the second encrypted list identifies invalid transactions in the second poisoned ordered set. In some cases, the method further includes validating the transactions in the second poisoned ordered set and identifying a set of one or more invalid transactions in the second poisoned ordered set. In some examples, the method may then include receiving from the second mining node a coinbase transaction, a decryption key, and second block header information indicating successful completion of the proof of work for the second candidate block, where the second block header information includes at least a timestamp and a nonce; decrypting the second encrypted list using the decryption key; determining that the second encrypted list identifies the same invalid transactions as in the set of one or more invalid transactions; assembling a second block header based on the coinbase transaction, the second block header information, and the second poisoned ordered set modified to replace the one or more invalid transactions in the second poisoned ordered set; and validating the second candidate block by hashing the second block header to validate the proof of work.

[0016] In another aspect, a computing device may be provided that implements a first mining node for mining blocks on a blockchain. The computing device may include memory, one or more processors, and computer-executable instructions that, when executed, cause the processor to perform one or more of the methods described herein.

[0017] In yet another aspect, a computer-readable medium may be provided that stores processor-executable instructions for implementing a first mining node for mining blocks on a blockchain network, the processor-executable instructions including instructions that, when executed by one or more processors, cause the processors to perform at least one of the methods described herein.

[0018] Other exemplary embodiments of the present disclosure will become apparent to those skilled in the art from a review of the following detailed description in conjunction with the drawings.

[0019] In this application, the term "and / or" is intended to cover all possible combinations and subcombinations of the listed elements, including any one of the listed elements alone, any subcombination, or all of the elements, but not necessarily excluding additional elements.

[0020] In this application, the phrase "at least one of ... or ..." is intended to cover any one or more of the listed elements, including any one of the listed elements only, any subcombination, or all of the elements, but not necessarily excluding any additional elements, and not necessarily requiring all of the elements.

[0021] This application refers to hashing or a hash function, which is intended to include any one of several cryptographic hash functions that, when applied to any set of data or "message," deterministically produce a unique, fixed-length alphanumeric string. The result of a hash function may be referred to as a hash value, fingerprint, hash result, etc. Examples include, but are not limited to, SHA-2, SHA-3, and BLAKE2. Any reference below to a miner hashing a block or candidate block will be understood to mean applying a cryptographic hash function to the header portion of the candidate block.

[0022] As used herein, the term "blockchain" is understood to include 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. The most widely known application of blockchain technology is the Bitcoin ledger, although other blockchain implementations have been proposed and developed. For convenience and illustrative purposes, reference may be made herein to Bitcoin as exemplified by the Bitcoin SV protocol; however, 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.

[0023] A blockchain is a peer-to-peer electronic ledger implemented as a computer-based, decentralized, distributed system composed of blocks, which in turn are made up of transactions. Each transaction is a data structure that encodes 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 contains a hash of the previous block, and blocks are chained together to create a permanent, immutable record of all transactions that have been written to the blockchain since inception. Transactions contain small programs, known as scripts, embedded in their inputs and outputs that specify how and by whom the transaction's outputs can be accessed. On the Bitcoin platform, these scripts are written using a stack-based scripting language.

[0024] A blockchain is implemented on a network of nodes. Each node is a computing device with network connectivity and runs software implementing the applicable blockchain protocol. Nodes validate transactions and propagate them to other nodes in the network. Specialized network nodes, called "mining nodes" or "miners," collect sets of unconfirmed, or pending, transactions into blocks and attempt to "mine" the blocks. Mining, in these examples, refers to solving a proof-of-work (POW) before any other miners in the network successfully solve the proof-of-work for the respective block. In the Bitcoin example, the POW involves hashing a block header containing a nonce until the result falls below a threshold set by a difficulty parameter. The nonce is repeatedly incremented and hashing is repeated until the result falls below the threshold or the miner receives notification that another miner has succeeded. Variations on the mining process are familiar to those skilled in the art.

[0025] A typical block contains two data structures: a block header and transactions. Figure 1 schematically illustrates an example block structure 100 from the Bitcoin protocol. The block structure 100 includes a block header 102 and a payload 104. The block header 102 in this example includes fields for a version number 106, a hash value 108 of the previous block, a Merkle root 110, a timestamp 112, a target difficulty parameter 114, and a nonce 116. The hash value 108 of the previous block chains this block to the previous block in the chain, thereby resulting in a "blockchain" structure that links successive blocks to each other through cryptographic hashes. The Merkle root 110 references a Merkle tree structure based on all transactions contained in the block. The nonce 116 is an arbitrary value that mining nodes can repeatedly increment or decrement to change the contents of the block header 102, resulting in different hash results when mining.

[0026] The payload 104 includes a transaction count value 118 and a list of transactions 120. The list of transactions 120 may, in some implementations, be a list of transaction ID numbers.

[0027] If a mining node successfully finds a block header that results in a hash result below the threshold, it subsequently notifies other nodes using an updated inventory message containing the successful hash result value, after which other nodes can request a copy of the new block and independently verify its validity.

[0028] Fast Block Propagation The blockchain ecosystem is maturing to accommodate a significant increase in transaction volume and the concomitant increase in block size to provide improved usability. As blocks become larger, potentially exceeding 128MB, it takes time to propagate a successfully mined new block to other nodes throughout the network. Propagation delays are costly. First, miners unaware that a successfully mined block has been created will continue to try to mine their own candidate block in vain if the new block turns out to be valid. Second, propagation and validation delays can increase the likelihood of (temporary) forks and orphan blocks.

[0029] It will be appreciated that in many blockchain protocols, miners send hash results in inventory messages rather than sending a full copy of the block. The receiving mining node determines that it has not seen this purported new block and sends a GETBLOCK or GETDATA message to the successful miner. Rather than sending a full copy of the block, the successful miner sends the block header, the transaction count field from the payload, and an ordered list of the transactions contained in the block. The ordered list may include a set of complete transaction IDs (TXIDs) for the transactions. In some embodiments, the TXIDs may be a fixed-length hash of the transactions. The TXIDs may be, for example, a 256-bit (32-byte) number obtained by hashing the transactions using SHA-256. The receiving node may reassemble the complete block by retrieving the identified transactions from the mempool by their TXIDs.

[0030] Nevertheless, as modern block sizes grow to 128MB or more, the size of the data to be transmitted can still be significant if the transaction count is large. For example, a block containing 500,000 transactions would have an ordered list of TXIDs that is 16MB.

[0031] Thus, in one aspect, the present application describes a method and system for a blockchain network in which mining nodes hash their candidate blocks while simultaneously providing information about their respective candidate blocks to other miners. In this way, each miner takes advantage of the time delay between successful block discoveries (approximately 10 minutes in the Bitcoin example) to provide other miners with details about the structure and contents of the candidate block. By providing this information in advance, when a successful block is found, the successful miner only needs to transmit information from the block header, and possibly the coinbase transaction, to ensure that all other nodes can assemble and validate the complete new block. This data can be as little as a few hundred bytes. This increases the speed at which successful new blocks are propagated throughout the network.

[0032] It will be appreciated that unconfirmed transactions are propagated and validated through a network of nodes before being confirmed by inclusion in a valid block. While in this unconfirmed state, the unconfirmed transaction is held in memory. This memory may be referred to as a "mem pool." Each miner, in some implementations, may maintain its own copy of the mem pool from which it can select a set of transactions for assembling a candidate block. In some alternative architectures, the mem pool may be implemented as a distributed mem pool across several nodes. In some architectures, the blockchain network may employ specialized nodes to manage the mem pool and provide transactions to mining nodes for inclusion in candidate blocks. The present application contemplates the use of the described methods and devices with any such variations in blockchain network architecture. For simplicity of explanation, it is assumed herein that each mining node maintains its own mem pool of unconfirmed transactions.

[0033] Mining nodes use the mempool as a source of new transactions for constructing candidate blocks. Because each block contains an ordered list of transactions, mining nodes may further use the mempool when validating new blocks from other miners. The ordered list may identify transactions by unique transaction identifiers, such as TXIDs. Thus, a receiving mining node takes transactions from the ordered list, validates the block against block-level criteria, and validates the transactions against transaction-level criteria. In this way, miners prevent double-spend and other attacks.

[0034] To illustrate aspects of the present application, reference is now made to FIG. 2, which depicts, in flowchart form, one exemplary method 200 of blockchain mining. Method 200 is performed by a mining node. The mining node may be implemented on a computing device that may include one or more processing units. As will be appreciated by those skilled in the art, the processing unit may include a specialized processing unit with dedicated hardware designed to perform computational operations associated with blockchain mining with significant speed and efficiency. However, it may also, or alternatively, include a general-purpose computing device. The computing device includes processor-executable software that includes processor-readable instructions that, when executed, cause the one or more processing units to perform the described operations. The computing device includes memory and a network connection with associated hardware and software for obtaining network connectivity and sending and receiving messages according to applicable network protocols.

[0035] Method 200 includes, at operation 202, selecting a set of transactions from a mempool of unconfirmed transactions to construct a candidate block. The selection may be based on the age of the transactions, the fees payable for mining the transactions, or any other factor. The transactions form an ordered list of transactions. The mining node further determines a Merkle root based on the ordered list of transactions and forms a block header, which includes setting an initial value for a nonce in the header.

[0036] In operation 204, the mining node begins repeated hashing of the block header and incrementing the nonce as part of its search for a POW that satisfies the difficulty setting. While engaged in searching for a POW for its candidate block, the mining node transmits information about its ordered list of transactions to other mining nodes, as indicated by operation 206. While operation 204 is in progress, the mining node also receives messages from other mining nodes containing information about the respective ordered lists of transactions in the candidate block being worked on by those mining nodes, as indicated by operation 208. While operations 204, 206, and 208 are shown sequentially, it will be understood that they generally occur in parallel. The received information about the respective ordered lists of transactions from other miners is stored locally by the mining node. The mining node may store the information in a table or other data structure.

[0037] The search for the POW continues until the mining node successfully finds the POW, as indicated by operation 210, or until it receives notification from another mining node that it has found the POW, as indicated by operation 212. If it finds the POW, the mining node sends some header information to other mining nodes to propagate the block details, in operation 214. Notably, it does not need to send a payload; however, it can send a coinbase transaction.

[0038] When a mining node receives header information from another mining node, it assembles a new block based on the stored ordered list of transactions for that mining node in operation 216. When a coinbase transaction is received, it is added to the block, and the mining node can build a Merkle tree to ensure that the Merkle root is valid. The mining node then validates the new block in operation 218, and if invalid, may discard the new block and continue searching for its own proof of work. Note that there may be specific validity checks that, if unsuccessful, may prompt the mining node to take other actions, such as requesting additional data from successful mining nodes, as described below. If the block is validated, it is added to the blockchain in operation 220 and propagated to additional mining nodes. The mining node then returns to operation 202 to construct a new candidate block and begin the search anew.

[0039] It will be appreciated that the described method of pre-distributing candidate block information so that each miner knows the ordered list of transactions for each other miner ensures that the amount of information that needs to be propagated after the POW is found is minimized. This ensures that mining nodes have the information they need to validate a new block as soon as possible, thereby reducing time wasted searching for a POW when another miner has already succeeded. Mining nodes have every intention of propagating and validating a new block as quickly as possible so that they can move on to searching for the next block. Potential delays due to network latency are less of an issue when pre-distributing an ordered list of transactions for a period of approximately 10 minutes between successive blocks.

[0040] In one exemplary implementation, the ordered list of transactions from the candidate block can be communicated to another miner by adding ordering information to the transaction data packet. Each miner can uniquely identify each other. In one exemplary implementation, a message can be sent that uniquely identifies the miner and the block level at which the miner is working and lists the TXIDs of that miner's candidate blocks in order.

[0041] In another exemplary implementation, the messaging protocol may provide for adding transactions to an ordered list for miners, removing or deleting transactions from an ordered list, replacing a transaction with another transaction, or reordering transactions. Typically, miners are likely to use only “add” messages that specify an ordered list of transactions. However, there are cases where a miner may wish to remove and replace transactions. For example, subsequently received information may indicate a potential double-spend with one of the transactions or some other potential problem with its validity. As another example, a miner may wish to cycle all increments of nonce and reorder or otherwise adjust transactions in order to change the Merkle root and thereby modify the header to continue mining the block. The exact format of the message structure may vary depending on the implementation.

[0042] Further compression of block-propagating messages can be achieved by shortening the TXID string. In some examples, the TXID is a 32-byte string. However, in some cases, a compressed TXID may be used, which relies on transmitting only a portion of the TXID. In one example, only the first 8 bytes are transmitted.

[0043] While the first 8 bytes of a TXID are not guaranteed to uniquely identify a transaction, the chances of two TXIDs colliding within a single message or in general are small. Assuming the output of a SHA256 is a pseudo-random 256-bit string, the exact chance of a collision between two random TXIDs, i.e., the chance that the first 4 bytes of any two TXIDs will be the same, is:

number

[0044] where TXID i [0:n] is "TXID i Furthermore, the probability that a message containing N compressed TXIDs contains one or more collisions can be expressed as:

number

[0045] As an example, if a block contains 1 million transactions, such that a message contains 1 million compressed TXIDs (N=1,000,000), the probability of a collision is:

number

[0046] This probability is very small, and even if a collision occurs, the message receiver may simply request the same message in uncompressed form. Alternatively, the sending mining node may first check to ensure that the ordered set of compressed TXIDs does not contain a collision before sending, and if a collision is detected, send the message with the uncompressed TXID. A flag or other signal in the message may indicate whether the TXID in the payload is in compressed or uncompressed format.

[0047] According to the process described herein, each miner participating in a blockchain network may receive a message from each other miner specifying an ordered list of transactions to be included in the other miner's candidate block. To track this information, each miner may store the ordered list in association with its respective miner identity. The miner identity may be determined by an IP address or some other unique identifier. In one exemplary implementation, each miner maintains a table or similar data structure in which each row is associated with one of the transactions in the mempool and each column is associated with a miner in the network. For each miner, order information may then be stored in a cell of the table indicating the order in which the miner placed transactions in its candidate block. It will be understood that not all transactions will have an order value because not all transactions will be included in every candidate block. The following table shows one simplified example of a miner ordering data table: [Table 1]

[0048] In this simplified example table, there are four miners with miner IDs A, B, C, and D. Each miner has received and validated transactions TX1, TX2, TX3, TX4, and TX5. The table can be updated to add a transaction to a miner's ordered list, replace a transaction in the order with another, or remove a transaction from the ordered list, which can result in an adjustment to the ordering of the remaining transactions in that ordered list.

[0049] When a miner, such as miner A, receives a block header message from, say, miner C, indicating that a block has been found, miner A constructs a Merkle tree based on the TXID and the order specified for miner C. Miner A hashes the block header and verifies the hash value. If the block is verified, miner A constructs a complete block with the transaction data in the specified order, adds it to the blockchain, and continues mining by constructing a new candidate block.

[0050] In some example implementations, the block header sent by a successful miner does not include all fields. For example, it may include only the nonce and timestamp, along with the hash value obtained by miner C when hashing the complete block header. The receiving miner may add missing fields such as the version, prev_block hash, the miner-computed Merkle root, and the difficulty setting. The reconstructed header can then be validated by hashing it and compared to the received hash value.

[0051] In some example implementations, messaging from miners indicating their ordered lists of transactions for their respective candidate blocks is sent automatically once the candidate blocks are constructed. In some other example implementations, the ordered list information is provided in response to a request from another miner.

[0052] In some implementations, a template identifier TmID may be defined. The template identifier is specific to the miner and block level, and thus can effectively refer to a specific candidate block, i.e., a specific ordered list of transactions. Any messaging from the miner related to that ordered list of transactions may include the template identifier to ensure that the receiving miner associates the change with the correct specific ordered list of transactions. In one implementation, the template identifier may be a hash of the miner identifier (Miner ID) and the prev_block field in the block header, i.e., the block of the previous hash, such as:

number

[0053] This ties the template identifier to the block level and to a specific miner.

[0054] Each message associated with the ordered list of transactions may include a template identifier and may further include a sequence number. The sequence number may be an unsigned integer value used to indicate the relative order of messages from a miner. The sequencing helps message receivers uniquely determine the TXID ordering for a particular miner in the event that some messages are not received or are received out of order.

[0055] As mentioned above, the miner ID may be the IP address of the mining node or some other unique identifier for the mining node. In some embodiments, an initial authentication operation occurs when a miner connects to the network, resulting in a unique miner ID being associated with that mining node. The authentication operation may include a handshaking operation in which each miner provides a public key and a digital signature. The authentication is tied to verifying the digital signature. In some cases, the miner ID may be based on a public key, a digital signature, or some combination thereof.

[0056] In some cases, the handshaking operations during the authentication phase may include establishing a shared secret between miners. Many techniques exist for establishing a shared secret. Subsequent messaging, such as messaging related to the ordered list of transactions, may be encrypted for confidentiality and to reduce the likelihood of man-in-the-middle attacks on the mining process.

[0057] In some embodiments, mining nodes perform an authentication procedure after connecting to the network and opening peer-to-peer connections with each other. The authentication procedure may involve sending an authentication challenge message and receiving an authentication response. Failure to receive a valid authentication response will cause a mining node to close or drop its connection to other mining nodes. In some cases, mining nodes may have different endpoints for authenticated connections than their regular public network connections.

[0058] In one exemplary implementation, the authentication challenge message involves the requesting mining node sending a message to the responding mining node. This message is a message that the responding mining node has not seen before. In some cases, the message may be a random code or string of characters. The content of the message is not important, but the responding mining node should not have seen the content before so that it cannot reuse previously generated material.

[0059] Upon receiving the authentication challenge message, the responding mining node concatenates the received message with a nonce value. The nonce value may be generated by the responding mining node using any pseudo-random process. The responding mining node then signs the concatenated nonce and message using the private key of a previously published public-private key pair. In these examples, the public-private key pair is associated with the miner identity. In some cases, the public key may be the miner ID used to communicate on the blockchain network. The requesting mining node may have a whitelist or other record of miner IDs (public keys) for mining nodes connected to the blockchain network.

[0060] Once the responding mining node has signed the concatenated nonce and message using its private key, it then generates and sends an authentication response message. The authentication response message may include a public key, e.g., the miner ID, the nonce value used, and the generated digital signature. The requesting mining node may receive the authentication response message and use the public key to verify that the mining node is the owner of the public key and that the public key matches a key on the whitelist that corresponds to the particular mining node.

[0061] The authentication response message may be sent along with a corresponding authentication challenge message so that the responding mining node can mutually authenticate the identity of the requesting mining node.

[0062] In one example, the format of the authentication challenge message may be in the following form:

number

[0063] In one example, the format of the authentication response message may take the following form:

number

[0064] In some implementations, the public key is an ECDSA key over the secp256k1 elliptic curve. The signature may be a signature over the concatenation of the nonce value and the contents of the message field from the authentication challenge message. The concatenation may be (nonce|message) or (message|nonce), depending on the implementation.

[0065] Reference is now made to Figures 3A-3I, which schematically illustrate exemplary operating states and messaging flows between two miners, according to one implementation of the present application.

[0066] In Figure 3A, it can be seen that a first miner 302, Minor A, and a second miner 304, Minor B, are part of a blockchain network and that there is an existing blockchain 306. In this example, the first miner 302 and the second miner 304 both have locally stored copies of the blockchain 306. The blockchain 306 is at a particular "height" or block level.

[0067] 3B, each of the miners 302, 304 selects a set of transactions from their respective mempools to construct a candidate block. Specifically, the first miner 302 constructs a first candidate block 308 containing a first ordered set of transactions, and the second miner 304 constructs a second candidate block 310 containing a second ordered set of transactions. Because the miners 302, 304 are free to select transactions from any mempool they wish and group them in any order they wish, the first and second ordered sets may or may not contain the same transactions and may or may not have them in the same or partially the same order.

[0068] As shown in FIG. 3C, miners 302, 304 begin mining each candidate block 308, 310 in an attempt to find a nonce that will result in the hash of the block header being below a threshold set by the difficulty.

[0069] While searching for a successful proof of work, miners 302, 304 exchange information about the ordered set of transactions in their respective candidate blocks 308, 310. As shown in FIG. 3D , a first miner 302 may send an “add” message 312 to a second miner 304, providing a first ordered list of transactions from the first candidate block 308. From that information, the second miner 304 may construct a template 314 of the first candidate block 308. In some example implementations, the template 314 may be a first ordered list of transactions in TXID format. In some example implementations, the template 314 may be a table, examples of which are provided above. In still other example implementations, the template 314 may be a copy of the complete candidate block, excluding certain unavailable header fields, including the complete transaction data.

[0070] In a similar manner, the second miner 304 may send an "add" message 316 to the first miner 302 containing a second ordered list of transactions from the second candidate block 310, as shown in Figure 3E. From that data, the first miner 302 builds a template 318 of the second candidate block 310. Now, each miner has its own candidate block that it continues to mine, as well as templates of candidate blocks that other miners are working on.

[0071] FIG. 3F shows that the first miner 302 successfully finds a block header hash that meets the proof-of-work requirement. Therefore, the first candidate block 308, which has the most recently tested nonce in its header, becomes the valid block. Then, FIGS. 3G and 3H show that the first miner 302 adds a new block 322 to the blockchain 306 and sends a message containing the coinbase transaction 320 and block header information 324. The block header information 324 includes at least the nonce and a timestamp. It may or may not further include other block header fields, such as a merkle_root field. In some cases, this may be sent as part of the block header information 324, even if the second miner 304 is able to calculate it, so that the second miner 304 can double-check its Merkle root calculation. In some cases, the first miner 302 sends the complete block header of the new block 322 to the second miner 304. The first miner 302 may also send the hash value obtained by hashing the block header to the second miner 304, so the second miner 304 can verify that the hash is not only below the difficulty threshold, but also matches the hash that the first miner 302 claims to have found. The hash value may be sent in the coinbase transaction message 320, in the block header information message 324, or in a separate message.

[0072] Once the second miner 304 has the coinbase transaction, it can complete the transaction portion of the template 314 of the first candidate block and thus calculate the Merkle root. If the merkle_root field was included in the block header information message 324, it can verify from the calculation that the field is accurate. If not, it can complete the merkle_root field and any other missing fields, such as the version, prev_block value, and bit field, to assemble the block header 326 of the new block 322. Other fields of the block header 326, such as the nonce and timestamp, are provided by the block header information message 324. The second miner 304 can then validate the new block by hashing the assembled block header 326.

[0073] Assuming the assembled block at the second miner 304 is validated, the second miner 304 then adds the new block 322 to its copy of the blockchain 306, as shown in FIG. 3I.

[0074] While the above sequence shows the coinbase transaction message 320 being sent before the block header information message 324, it will be understood that in some implementations the block header information message 324 may be sent first, or both messages may be combined into a single message. Other variations in the order of operations or implementation details of a particular instance may be made without changing the overall functional operation of the described systems and methods.

[0075] Those skilled in the art of blockchain networks will appreciate that in some cases, blocks may be mined sooner than expected. In Bitcoin, for example, difficulty settings ensure that a valid block is found approximately every 10 minutes, but the timing is not certain. It is possible to find a valid block much earlier. Additionally, some messages propagating transactions or transaction ordering information may experience network delays as they propagate through the network.

[0076] Thus, there is a small but likely possibility that a valid block is found by a miner and the header information is sent to other miners, but at least one of those miners does not have all the transactions included in the block or has an incomplete or incorrect ordered list of transactions for the successful miner. When that miner attempts to validate the Merkle root field of the new block header, a mismatch is found and the block is considered invalid. One option is for the miner to consider the block invalid and discard it. However, in another embodiment, the miner may send a request message to the successful miner for a set of Merkle roots, i.e., an ordered list of TXIDs. Upon receiving the leaf transmission, the miner may determine where the error in the Merkle root calculation occurred. If the cause is incorrect or incomplete ordering of transactions, the miner may update the ordering and validate a new block. If the cause is missing transactions, the miner may request new transactions and continue the validation process. Note that in some embodiments, if a miner receiving an ordered list of transactions for another miner's candidate block finds that it does not have one of the TXIDs in its mempool, the missing transaction may be detected before the block is successfully discovered. In that case, the receiving miner can request a copy of that transaction and update its mempool.

[0077] In some implementations, one or more miners may wish to maintain some degree of secrecy over their transaction selection and ordering. In such implementations, miners may be able to encrypt the ordered list of transactions when distributing it during the mining phase. When a valid block is found, the miner distributes a decryption key along with the header information and / or coinbase transaction to enable the receiving miner to decrypt the ordered list of transactions and validate the new block.

[0078] The following table describes one set of example messages for one example implementation of messaging for propagation of ordered transaction lists among miners. [Table 2]

[0079] The receiving miner modifies the candidate block template corresponding to the template identifier in the message. For a particular template identifier, messages received out of sequence according to sequence number may be queued until an intervening message is received.

[0080] Presumably, the receiving miner has an applicable transaction corresponding to the TXID in its mempool, but if the transaction is missing, it can request a copy of the missing transaction.

[0081] It will be appreciated that the exemplary messaging protocol described above is one exemplary implementation.

[0082] Block propagation with poisoned transactions As a result of early propagation of candidate block details from one miner to another, another miner may rely on the validation work of one miner. That is, each mining node is assumed to validate transactions before adding them to the mempool and to construct a candidate block from those validated transactions. If a first mining node constructs a candidate block from validated transactions and then sends an ordered set of block header data and transaction identifiers to a second mining node, that second mining node could conceivably choose to rely on the fact that the underlying transactions are valid because the first mining node has already performed its validation work or because the first mining node did not include them in the candidate block it is mining. This allows the second mining node to avoid the computational cost of validation work. If enough mining nodes begin piggybacking on other mining nodes' validation work, the consensus-based security of the blockchain network could be compromised.

[0083] Therefore, in one aspect, the present application provides a block propagation method and system structured to prevent such reliance. In particular, a mining node that creates an ordered set of transactions for a candidate block may include one or more invalid transactions in the ordered set that is propagated to other mining nodes. Upon successfully mining a candidate block, the mining node reveals which transactions in the ordered set are invalid.

[0084] In this way, the second mining node cannot rely on the propagated block information from the first mining node in identifying validated transactions because the information has been seeded with at least one invalid transaction. Invalid transactions may be referred to as "poisoned" transactions, and a set of ordered transactions modified to include invalid or poisoned transactions may be referred to as a "poisoned" ordered set.

[0085] The first mining node does not mine a candidate block containing a poisoned ordered set. Instead, it builds a candidate block containing an ordered set of validated transactions. This is the block header of the valid candidate block that the first mining node attempts to mine by iterating through a nonce value and modifying the timestamp and / or coinbase transaction data. However, the block data forwarded to other mining nodes during block propagation before the proof-of-work is the poisoned ordered set information.

[0086] In one implementation, after successfully mining a block, a first mining node may reveal one or more indexes of invalid transactions by transmitting its one or more index data along with POW solution data, such as the solution's nonce, timestamp, and coinbase data. In another implementation, the first mining node may prove prior knowledge of invalid transactions by providing a list of one or more indexes of invalid transactions in advance. The list may be encrypted to prevent a receiving mining node from immediately repairing the poisoned ordered set, and the first mining node may provide a decryption key for decrypting the encrypted list if the first mining node finds a POW solution for the candidate block.

[0087] An invalid transaction added to the poisoned ordered set may be a transaction created by the mining node that is constructed in such a way that it violates at least one validation criterion. In some cases, the invalid transaction may be one that the mining node received from another mining node in the other mining node's poisoned ordered set. By reusing invalid transactions used by other mining nodes, the mining node avoids recipients identifying an invalid transaction simply because it was seen only by that mining node as a single source.

[0088] The encrypted list may identify invalid transactions in the poisoned ordered set by their index within the set. In some implementations, the encrypted list further provides a replacement valid transaction for each invalid transaction. By replacing invalid transactions with valid transactions, the poisoned ordered set is restored to an ordered set that matches the candidate block. The receiving node may then fully build the Merkle tree and validate the POW solution. By providing replacement transactions rather than simply removing invalid transactions, the structure of the Merkle tree is maintained so that at least a portion of the validation and Merkle hashing work can be performed by the receiving node prior to receiving the POW solution.

[0089] Reference is now made to FIG. 4, which illustrates in flowchart form one exemplary method 400 for block propagation in a blockchain network. Method 400 in this example is performed by a mining node. A mining node may be a network-connected computing device configured to mine blocks according to a managed blockchain protocol. Mining a block may involve constructing a candidate block and then hashing the candidate block header until a proof-of-work solution is found or notification is received that another mining node has successfully mined its own candidate block. Method 400 may be implemented using processor-executable instructions stored in a memory that, when executed by a processor, cause the processor to perform the operations described below.

[0090] In operation 402, the mining node constructs a candidate block containing validated transactions. The transactions may be validated transactions stored in the mining node's mempool of unconfirmed but validated transactions. It may also begin mining the candidate block as soon as it is constructed, as indicated by operation 404. Mining involves hashing the candidate block header, determining if the hash result is lower than a difficulty threshold, and if not, iterating over the nonce value in the header or modifying the header contents by updating the timestamp or modifying the coinbase transaction, and then repeating. It will be appreciated that the candidate block contains an ordered set of transactions.

[0091] In operation 406, the mining node replaces one or more of the valid transactions in the copy of the ordered set of transactions with one or more invalid transactions to create a poisoned ordered set of transactions. The invalid transactions may be created by the mining node or may be copied from invalid transactions submitted by another mining node. The mining node then creates a list of indices that identify the invalid transactions in the poisoned ordered set of transactions, as shown in operation 408.

[0092] In this example, the encrypted list may also include replacement data. The replacement data may be the TXID of the valid transaction that the invalid transaction replaced. In some cases, the replacement data may be the valid transaction itself. The replacement data allows the recipient to "repair" the poisoned ordered set of transactions by removing the invalid transactions and replacing them with the respective valid transactions to reconstruct the correct ordered set of transactions that is the basis of the candidate block. The list of indexes of invalid transactions is encrypted by the mining node.

[0093] In some other instances, the encrypted list does not include the alternative data, and the alternative data is provided by the mining node along with the POW solution if the mining node manages to find a POW solution.

[0094] The mining node propagates the poisoned ordered set and encrypted list of transactions to other mining nodes in operation 410. The mining node may employ a messaging protocol, such as that described above, to signal transactions to be added, removed, or replaced in the poisoned ordered set.

[0095] After signaling its poisoned ordered set to other mining nodes, the mining node continues to search for a POW solution for the candidate block, as indicated by operation 412. It also monitors for notification that another mining node has found a POW solution for its own candidate block, as indicated by operation 414. If another node finds a valid block, the mining node returns to operation 402, constructs a new candidate block, and tries again. If the mining node finds a POW solution, it propagates the solution and the decryption key for the encrypted list in operation 416. Other nodes on the blockchain network can then decrypt the encrypted list, repair the ordered set of transactions to construct the candidate block, finish validating the candidate block, and further propagate the solution and decryption key.

[0096] 5 illustrates an example method 500 of validating a block by a node in a blockchain network. Method 500 in this example may be performed by a mining node, which may be a network-connected computing device configured to mine blocks according to a governed blockchain protocol. Method 500 may be implemented using processor-executable instructions stored in a memory that, when executed by a processor, causes the processor to perform the operations described below.

[0097] Method 500 begins at operation 502 by receiving candidate block template data and an encrypted list from a mining node. The candidate block template data may be data detailing an ordered set of transactions. In this example, the mining node is configured to send a "poisoned" ordered set of transactions, meaning that some of the transactions are invalid transactions. The candidate block template data may be received based on a message protocol, such as that described above, in which transactions may be added to, removed from, or replaced in a candidate block template associated with a particular mining node. The encrypted list, when decrypted, identifies the poisoned transactions in the candidate block template data.

[0098] In operation 504, the node may determine whether it has a copy of the identified transaction. The copy of the transaction may possibly be included in the message itself or may be obtained from the node's local mempool. In some cases, the node may not have a copy of the transaction in the candidate block template and may request a copy of any missing transactions from a mining node in operation 506.

[0099] At operation 508, the node validates any transactions that have not yet been validated. If any are identified as invalid, the node may flag them or otherwise record them as invalid, as indicated by operation 510. If the mining node is using a poisoned transaction block propagation protocol (which may be signaled in messaging associated with the propagation of the candidate block template), the node is notified that invalid transactions may have been intentionally placed in the ordered set. In addition, the node may have received an encrypted list that implicitly signals that there is at least one invalid transaction in the ordered set.

[0100] In this example, in operation 512, the node receives notification that the mining node has found a POW solution. The notification may include the POW solution, including the nonce used, a timestamp, and any other data the node needs to reconstruct and validate the candidate block. The notification further includes a decryption key to enable the node to decrypt the encrypted list, which it does in operation 514. In some example implementations, the notification further includes substitution data indicating which valid transaction should be used in place of the invalid transaction. In some cases, the substitution data is included in the encrypted list and is revealed when decrypted.

[0101] The decoded list reveals the index of the invalid transaction. The node also has alternative data from the decoded list or from the notification of the POW solution. In operation 516, the node determines whether the index identified in the decoded list matches a transaction that the node identified as invalid in operations 508 and 510. If there is no match, in operation 518, the block is rejected as invalid. That is, if the node identifies an invalid transaction in the candidate block template data and that same transaction is not identified as invalid in the decoded list, the block contains an invalid transaction and should be rejected. In some cases, if the decoded list identifies as invalid a transaction that the node determined to be valid, a replacement may occur, and the block may still be accepted, provided it meets all validation criteria.

[0102] At operation 520, the node replaces the invalid transaction with a valid transaction based on the substitution data in the decrypted list, and then completes the validation of the block at operation 522. In particular, with the valid transaction inserted in place of the invalid transaction, the node may complete building those portions of the Merkle tree, find the Merkle root, complete the block header, hash the header, and verify that the hash is below the difficulty setting.

[0103] In some implementations, the poisoned transaction index in the decrypted list is an array of varint indices. The value 0 may be reserved as a dummy entry that a node can ignore. A mining node may insert one or more zero-valued entries to obfuscate the number of poisoned transactions in a block by padding the data.

[0104] In some embodiments, the alternative data is transmitted along with the POW solution and decryption key rather than being included in an encrypted list.

[0105] One illustrative example of a message structure for transmitting the POW solution and decryption key is shown below:

number

[0106] In the above example, the template_id_len, template_id, and sequence_no fields identify the template to which the message pertains and ensure proper sequencing between messages related to the template. The aes_128_encryption_key field stores a decryption key to enable decryption of the encrypted list. In some cases, the decryption key can be used to decrypt encrypted AOL data.

[0107] The block_header and coinbase_tx fields store the data needed to complete the candidate block. The aol field provides any additional transactions to be added to the template, but this field may be empty.

[0108] The poison_tx_replacements field contains replacement data, i.e., transaction data to replace invalid transactions revealed in the encrypted list.

[0109] It will be appreciated that the foregoing message structures are examples, and other message structures may include additional, alternative, or fewer fields, depending on the implementation.

[0110] It will also be understood that some or all of the above-described operations of the various above-described exemplary methods may be performed in orders other than those illustrated and / or may be performed simultaneously without changing the overall operation of the methods.

[0111] Reference is now made to Figure 6, which illustrates in block diagram form a simplified mining node 600 according to one example of the present application. Mining node 600 includes a processor 602, which may include one or more microprocessors, application specific integrated circuits (ASICs), microcontrollers, or similar computer processing devices. Mining node 600 may further include memory 604, which may include persistent and non-persistent memory for storing values, variables, and in some cases, processor-executable program instructions, and a network interface 606.

[0112] The mining node 600 may include a processor-executable blockchain application 608 that includes processor-executable instructions that, when executed, cause the processor 602 to perform one or more of the functions or operations described herein.

[0113] The various embodiments presented above are merely examples and are not intended to limit the scope of the present application in any way. Variations of the innovations described herein will be apparent to those skilled in the art, and such variations are within the intended scope of the present application. In particular, features from one or more of the above-described exemplary embodiments may be selected to create alternative exemplary embodiments including subcombinations of features that may not be explicitly described above. In addition, features from one or more of the above-described exemplary embodiments may be selected and combined to create alternative exemplary embodiments including combinations of features that may not be explicitly described above. Features suitable for such combinations and subcombinations will be readily apparent to those skilled in the art upon review of the present application as a whole. The subject matter described in this specification and claims is intended to cover and encompass all appropriate modifications in technology.

Claims

1. 1. A computer-implemented method for block validation in a blockchain network, comprising: receiving, at a first mining node, a message providing an ordered set of transactions in a candidate block being mined by a second mining node, and receiving an encrypted list associated with the ordered set of transactions; receiving a block solution from the second mining node, the block solution including a decryption key, the block solution indicating successful completion of proof-of-work for the candidate block; decrypting the encrypted list using the decryption key to obtain a decrypted list, the decrypted list identifying one or more invalid transactions within the ordered set of transactions; modifying the ordered set to remove the one or more invalid transactions; Assembling a block header using the block solution and the ordered set modified to remove the one or more invalid transactions; validating the block solution by hashing the block header to validate the proof of work; A method comprising:

2. 2. The method of claim 1, wherein modifying the ordered set to remove the one or more invalid transactions comprises replacing the one or more invalid transactions with one or more respective valid transactions.

3. The method of claim 2 , wherein the decoded list includes the one or more respective valid transactions.

4. 3. The method of claim 2, wherein receiving the block solution comprises receiving data identifying the one or more respective valid transactions.

5. 5. The method of claim 1, wherein receiving the block solution comprises receiving a coinbase transaction and block header information, the block header information including at least a timestamp and a nonce.

6. 6. The method of claim 1, wherein the one or more invalid transactions include transactions that violate at least one validity criterion defined by a blockchain protocol for the blockchain network.

7. 7. The method of claim 1, wherein the step of receiving the message occurs while the first mining node is hashing its own candidate block header for proof of work.

8. 8. The method of claim 1, further comprising: at the first mining node, while hashing its own candidate block header, validating the ordered set of transactions obtained in the message and identifying the one or more invalid transactions; and wherein the decoding step comprises verifying that the one or more invalid transactions identified by the first mining node in the ordered set match the one or more invalid transactions in the decoded list.

9. 9. The method of claim 8, further comprising determining that the first mining node is using a poisoned transaction block propagation protocol.

10. The method of claim 1 , wherein the message includes a list of TxIDs specifying an ordered set of transactions.

11. The method of claim 1 , wherein the decoded list includes an index of the one or more invalid transactions.

12. 1. A computing device that implements a mining node for validating blocks on a blockchain network, comprising: one or more processors; Memory and computer-executable instructions stored in said memory; wherein the computer-executable instructions, when executed by the one or more processors, cause the processors to perform the method of any one of claims 1 to 11. Computing devices.

13. 12. A computer-readable medium storing processor-executable instructions for implementing a mining node for validating blocks on a blockchain network, 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

  • Method for building consensus in network and nodes constituting network

    JP2019012415A

  • Mitigating of offline ciphertext single attacks

    JP2019205152A

  • Computer-implemented system and method for controlling processing steps of distributed system

    WO2020016739A1

  • Short transaction identifier collision detection and reconciliation

    WO2020208596A1