Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
COORDINATING PEER-TO-PEER DATA TRANSFER USING BLOCKCHAIN
Document Type and Number:
WIPO Patent Application WO/2023/227340
Kind Code:
A1
Abstract:
A computer-implemented method of using a blockchain to incentivise data transfer between nodes of a P2P network, comprising: obtaining a plurality of request transactions, each request transaction comprising a first output locked to the public key of a P2P node and locks an amount of a digital asset, each request transaction comprising a hash of a data request, the data request associated with a data item, and wherein each request transaction is associated with a timestamp; computing a regression model based on at least the amount and the timestamp of each request transaction; using the regression model to determine a target amount; generating a target request transaction comprising an output locked to the public key of a P2P node and locking the target amount, wherein the target request transaction comprises a target hash of a target data request, the target data request being associated with the target data item.

Inventors:
PAUNOIU ALEXANDRU (GB)
WRIGHT CRAIG STEVEN (GB)
Application Number:
PCT/EP2023/061664
Publication Date:
November 30, 2023
Filing Date:
May 03, 2023
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
NCHAIN LICENSING AG (CH)
International Classes:
H04L9/00; G06Q20/22; H04L45/00; H04L67/104
Foreign References:
CN113595738A2021-11-02
US20190342084A12019-11-07
Other References:
LIU GAO ET AL: "B4SDC: A Blockchain System for Security Data Collection in MANETs", IEEE TRANSACTIONS ON BIG DATA, IEEE, vol. 8, no. 3, 17 March 2020 (2020-03-17), pages 739 - 752, XP011908373, DOI: 10.1109/TBDATA.2020.2981438
Attorney, Agent or Firm:
MAHON, Thomas James (GB)
Download PDF:
Claims:
CLAIMS

1. A computer-implemented method of using a blockchain to incentivise data transfer between peer-to-peer, P2P, nodes of a P2P network, wherein the P2P network is associated with a network address and comprises a plurality of P2P nodes, wherein each of the plurality of P2P nodes is associated with a respective public key, wherein a target one of the P2P nodes has access to a target data item, and wherein the method is performed by a first P2P node and comprises: obtaining a plurality of respective request transactions, each respective request transaction comprising a respective first output locked to the respective public key of a respective P2P node, wherein the respective first output locks a respective amount of a digital asset, wherein each respective request transaction comprises a respective hash value generated by hashing a respective data request one or more times, the data request being associated with a respective data item, and wherein each respective request transaction is associated with a respective timestamp; computing a regression model based on at least the respective amount and the respective timestamp of each respective request transaction; using the regression model to determine a target amount; generating a target request transaction, wherein the target request transaction comprises a first output locked to the respective public key of a respective P2P node, wherein the first output locks the target amount of the digital asset, and wherein the target request transaction comprises a target hash value generated by hashing a target data request one or more times, the target data request being associated with the target data item.

2. The method of claim 1, wherein said obtaining comprises obtaining at least some of the plurality of respective request transactions from the blockchain.

3. The method of claim 1 or claim 2, wherein said obtaining comprises receiving at least some of the plurality of respective request transactions from a service provider.

4. The method of any preceding claim, wherein the regression model is a linear regression model.

5. The method of any of claims 1 to 4, wherein a chain of P2P nodes is formed between the requesting P2P node and the target P2P node, each P2P node in the chain being connected to a previous P2P node in the chain and/or a next P2P node in the chain, and wherein the target P2P node is configured to send the target data, in encrypted form, along the chain towards the requesting P2P node, and wherein each P2P node in the chain other than the target P2P node is configured to send a respective transaction to the next P2P node in the chain in return for receiving the encrypted target data.

6. The method of any of claims 1 to 4, wherein the first P2P node is a requesting P2P node, and wherein the requesting P2P node is a generator of the data request.

7. The method of claim 5 and claim 6, wherein the target amount is also based on the respective amounts locked by the respective transactions sent by the other P2P nodes in the chain, and wherein the method comprises causing the target request transaction to be submitted to one or more blockchain nodes of a blockchain network to be recorded on the blockchain.

8. The method of any of claims 1 to 4, wherein the first P2P node is an intermediate P2P node, and wherein the data request is generated by a requesting P2P node.

9. The method of claim 5 and claim 8, wherein the intermediate P2P node is the initial P2P node in the chain to send a respective transaction to the target P2P node, and wherein the method comprises: causing the target request transaction to be submitted to one or more blockchain nodes of a blockchain network to be recorded on the blockchain; receiving the encrypted target data from the target P2P node; and sending the encrypted target data to the next P2P node in the chain towards the requesting P2P node.

10. The method of any of claims 1 to 4, or claim 6 or claim 8, wherein each respective request transaction is associated with a respective response time, the respective response time indicating a time taken for the respective P2P node to respond to the respective request transaction, and wherein the method comprises: for each of the plurality of respective request transactions, computing a respective price-response value based on the respective amount of the digital asset and the respective response time, and wherein the regression model is based on the respective price-response values, and wherein the target amount is determined using the regression model given a target response time.

11. The method of claim 10, wherein the target request transaction is a primary request transaction, wherein the target hash value is a first hash value generating by hashing the target data request with a first hash function, and wherein the primary request transaction comprises at least one input referencing a first unspent transaction output controlled by the requesting P2P node, and one or more first outputs, each first output being locked to a respective public key associated with a respective intermediate P2P node connected to the requesting P2P node; and wherein the method comprises: sending a primary request message to at least one respective intermediate P2P node connected to the requesting P2P node, wherein the primary request message comprises a first signature over the primary request transaction and for unlocking the first unspent transaction output, a reference to the first unspent transaction output, and the second hash value; wherein each respective intermediate P2P node is configured to i) generate a respective secondary request transaction , wherein the respective secondary request transaction comprises the second hash value, a respective input referencing a respective unspent transaction output controlled by the respective intermediate P2P node, and one or more first outputs, each first output being locked to a respective public key associated with a respective intermediate P2P node connected to the respective intermediate P2P node, and ii) send a secondary request message to at least one respective intermediate P2P node connected to the respective intermediate P2P node, wherein the secondary request message comprises a respective signature for unlocking the respective unspent transaction output, a respective reference to the respective unspent transaction output, and a third hash value generated by hashing the second hash value with a third hash function, wherein a process of respective P2P nodes generating respective secondary request transactions and sending respective secondary request message to respective intermediate P2P nodes continues at least until a respective secondary request message is sent to the target P2P node, and wherein the method further comprises: obtaining the target data item from the target P2P node.

12. The method of claim 11, wherein the primary request message comprises a second signature over the primary request message, and wherein the first signature and second signature correspond to the same public key.

13. The method of claim 10 or claim 11, wherein the primary request message is encrypted such that only the respective intermediate P2P nodes to which the primary request message is sent can decrypt the encrypted primary request message.

14. The method of claim 11 or any claim dependent thereon, wherein said obtaining of the target data item from the target P2P node comprises receiving the target data item directly from the target P2P node.

15. The method of claim 11 or any claim dependent thereon, wherein the target P2P node is configured to submit a data transaction to the blockchain network, the data transaction comprising the target data item or an encrypted version thereof, and wherein said obtaining of the target data item from the target P2P node comprises obtaining the target data item from the data transaction.

16. The method of claim 11 or any claim dependent thereon, wherein the primary request transaction comprises a respective identifier associated with the requesting P2P node and/or a network address of the P2P network.

17. The method of claim 11 or any claim dependent thereon, wherein the primary request message comprises a respective public key of the respective intermediate P2P nodes.

18. The method of claim 6 or any claim dependent thereon, wherein the first and second hash functions are the same hash function.

19. The method of any of claims 11 to 17, wherein the first and second hash functions are different hash functions.

20. The method of claim 11 or any claim dependent thereon, wherein the first hash function is a cryptographic hash function and/or the second hash function is a cryptographic hash function.

21. The method of claim 11 or any claim dependent thereon, wherein the data request is based on a hash of the target data item.

22. The method of claim 8 and claim 10, comprising: receiving a primary request message from a requesting P2P node, wherein the primary request message comprises a third signature over a primary request transaction and for unlocking a first unspent transaction output controlled by the requesting P2P node, a reference to the first unspent transaction output, and a second hash value, wherein the second hash value is generated by hashing at least the target data request with a first hash function to generate a first hash value and then hashing at least the first hash value with a second hash function to obtain the second hash value; wherein the target request transaction is a secondary request transaction , wherein the target hash value is the second hash value, and wherein he secondary request transaction comprises a respective input referencing a respective unspent transaction output controlled by the first intermediate P2P node, and one or more first outputs, each first output being locked to a respective public key associated with a respective intermediate P2P node connected to the first intermediate P2P node; and wherein the method further comprises: sending a secondary request message to at least one respective intermediate P2P node connected to the first intermediate P2P node, wherein the secondary request message comprises a respective signature over the secondary request transaction and for unlocking the respective unspent transaction output, a respective reference to the respective unspent transaction output, and a third hash value generated by hashing the second hash value with a third hash function.

23. The method of claim 22, comprising: obtaining the first hash value; generating the primary request transaction, wherein the primary request transaction comprises the first hash value, at least one input referencing the first unspent transaction output controlled by the requesting P2P node, and one or more first outputs, wherein at least one of the first outputs is locked to a respective public key of the first intermediate P2P node, and wherein the first input comprises the first signature extracted from the primary request message; and submitting the primary request transaction to one or more nodes of a blockchain network.

24. The method of claim 22 or claim 23, wherein the secondary request message comprises a fourth signature over the secondary request message, and wherein the third signature and the fourth signature correspond to the same public key.

25. The method of any of claims 22 to 24, wherein the secondary request message is encrypted such that only the respective intermediate P2P nodes to which the secondary request message is sent can decrypt the encrypted primary request message.

26. The method of any of claims 22 to 25, wherein the secondary request message comprises a respective public key of the respective intermediate P2P nodes.

27. Computer equipment comprising: memory comprising one or more memory units; and processing apparatus comprising one or more processing units, wherein the memory stores code arranged to run on the processing apparatus, the code being configured so as when on the processing apparatus to perform the method of any of claims 1 to 26.

28. A computer program embodied on computer-readable storage and configured so as, when run on one or more processors, to perform the method of any of claims 1 to 26.

Description:
COORDINATING PEER-TO-PEER DATA TRANSFER USING BLOCKCHAIN

TECHNICAL FIELD

The present disclosure relates to methods of using a blockchain to coordinate the transfer of data between nodes of a peer-to-peer (P2P) network. The methods enable the attestation of the data transfer.

BACKGROUND

A blockchain refers to a form of distributed data structure, wherein a duplicate copy of the blockchain is maintained at each of a plurality of nodes in a distributed peer-to-peer (P2P) network (referred to below as a "blockchain network") and widely publicised. The blockchain comprises a chain of blocks of data, wherein each block comprises one or more transactions. Each transaction, other than so-called "coinbase transactions", points back to a preceding transaction in a sequence which may span one or more blocks going back to one or more coinbase transactions. Coinbase transactions are discussed further below.

Transactions that are submitted to the blockchain network are included in new blocks. New blocks are created by a process often referred to as "mining", which involves each of a plurality of the nodes competing to perform "proof-of-work", i.e. solving a cryptographic puzzle based on a representation of a defined set of ordered and validated pending transactions waiting to be included in a new block of the blockchain. It should be noted that the blockchain may be pruned at some nodes, and the publication of blocks can be achieved through the publication of mere block headers.

The transactions in the blockchain may be used for one or more of the following purposes: to convey a digital asset (i.e. a number of digital tokens), to order a set of entries in a virtualised ledger or registry, to receive and process timestamp entries, and/or to timeorder index pointers. A blockchain can also be exploited in order to layer additional functionality on top of the blockchain. For example blockchain protocols may allow for storage of additional user data or indexes to data in a transaction. There is no pre-specified limit to the maximum data capacity that can be stored within a single transaction, and therefore increasingly more complex data can be incorporated. For instance this may be used to store an electronic document in the blockchain, or audio or video data.

Nodes of the blockchain network (which are often referred to as "miners") perform a distributed transaction registration and verification process, which will be described in more detail later. In summary, during this process a node validates transactions and inserts them into a block template for which they attempt to identify a valid proof-of-work solution. Once a valid solution is found, a new block is propagated to other nodes of the network, thus enabling each node to record the new block on the blockchain. In order to have a transaction recorded in the blockchain, a user (e.g. a blockchain client application) sends the transaction to one of the nodes of the network to be propagated. Nodes which receive the transaction may race to find a proof-of-work solution incorporating the validated transaction into a new block. Each node is configured to enforce the same node protocol, which will include one or more conditions for a transaction to be valid. Invalid transactions will not be propagated nor incorporated into blocks. Assuming the transaction is validated and thereby accepted onto the blockchain, then the transaction (including any user data) will thus remain registered and indexed at each of the nodes in the blockchain network as an immutable public record.

The node who successfully solved the proof-of-work puzzle to create the latest block is typically rewarded with a new transaction called the "coinbase transaction" which distributes an amount of the digital asset, i.e. a number of tokens. The detection and rejection of invalid transactions is enforced by the actions of competing nodes who act as agents of the network and are incentivised to report and block malfeasance. The widespread publication of information allows users to continuously audit the performance of nodes. The publication of the mere block headers allows participants to ensure the ongoing integrity of the blockchain.

In an "output-based" model (sometimes referred to as a UTXO-based model), the data structure of a given transaction comprises one or more inputs and one or more outputs. Any spendable output comprises an element specifying an amount of the digital asset that is derivable from the proceeding sequence of transactions. The spendable output is sometimes referred to as a UTXO ("unspent transaction output"). The output may further comprise a locking script specifying a condition for the future redemption of the output. A locking script is a predicate defining the conditions necessary to validate and transfer digital tokens or assets. Each input of a transaction (other than a coinbase transaction) comprises a pointer (i.e. a reference) to such an output in a preceding transaction, and may further comprise an unlocking script for unlocking the locking script of the pointed-to output. So consider a pair of transactions, call them a first and a second transaction (or "target" transaction). The first transaction comprises at least one output specifying an amount of the digital asset, and comprising a locking script defining one or more conditions of unlocking the output. The second, target transaction comprises at least one input, comprising a pointer to the output of the first transaction, and an unlocking script for unlocking the output of the first transaction.

In such a model, when the second, target transaction is sent to the blockchain network to be propagated and recorded in the blockchain, one of the criteria for validity applied at each node will be that the unlocking script meets all of the one or more conditions defined in the locking script of the first transaction. Another will be that the output of the first transaction has not already been redeemed by another, earlier valid transaction. Any node that finds the target transaction invalid according to any of these conditions will not propagate it (as a valid transaction, but possibly to register an invalid transaction) nor include it in a new block to be recorded in the blockchain.

An alternative type of transaction model is an account-based model. In this case each transaction does not define the amount to be transferred by referring back to the UTXO of a preceding transaction in a sequence of past transactions, but rather by reference to an absolute account balance. The current state of all accounts is stored by the nodes separate to the blockchain and is updated constantly.

SUMMARY

Peer-to-Peer (P2P) networks have been one of the driving forces in the development of internet communication and information sharing. In particular, since 2009 blockchain networks have been the cryptographic breakthrough in P2P network services. Leading filesharing services, such as the BitTorrent networks, Kazaa or Gnutella are other examples of well-known P2P networks.

There is a problem with some P2P networks in that they lack trust and security amongst nodes, meaning that there is a reluctance to participate in the transfer of data between nodes of the network. In turn, this can lead to the P2P networks having difficulty scaling.

According to one aspect disclosed herein, there is provided a computer-implemented method of using a blockchain to incentivise data transfer between peer-to-peer, P2P, nodes of a P2P network, wherein the P2P network is associated with a network address and comprises a plurality of P2P nodes, wherein each of the plurality of P2P nodes is associated with a respective public key, wherein a target one of the P2P nodes has access to a target data item, and wherein the method is performed by a first P2P node and comprises: obtaining a plurality of respective request transactions, each respective request transaction comprising a respective first output locked to the respective public key of a respective P2P node, wherein the respective first output locks a respective amount of a digital asset, wherein each respective request transaction comprises a respective hash value generated by hashing a respective data request one or more times, the data request being associated with a respective data item, and wherein each respective request transaction is associated with a respective timestamp; computing a regression model based on at least the respective amount and the respective timestamp of each respective request transaction; using the regression model to determine a target amount; generating a target request transaction, wherein the target request transaction comprises a first output locked to the respective public key of a respective P2P node, wherein the first output locks the target amount of the digital asset, and wherein the target request transaction comprises a target hash value generated by hashing a target data request one or more times, the target data request being associated with the target data item. Embodiments of the present disclosure provide a mechanism for incentivising data requests and data transfer between nodes of a P2P network. A requesting node wishes to obtain target data from a target node, and sends a request for the data via one or more intermediate nodes. The requesting node (and in some examples, the intermediate nodes), use historical data of request transactions to determine a target amount to reward nodes (e.g. other intermediate nodes and the target node) for forwarding data requests and fulfilling the data request. A regression model is determined based on the previous amounts rewarded and timestamps associated with the transactions paying the reward. A response time taken to process the request may also taken into account. Incentivising data requests in this way has the effect of improving the speed at which the data request is propagated throughout the network to the target node, and the speed at which the target node sends the target data to the requesting node. Incentivizing data transfer in this way, in addition to having a speed related benefit in some use case, also has the effect of ensuring that nodes are rewarded the right amount for the requested data.

Embodiments of the present disclosure utilize the blockchain to improve the trust and security of P2P networks, particularly during data distribution. The blockchain is used to improve the coordination between P2P nodes so as to increase the efficiency of data transfer. A request for data is sent from the requesting node to the target node via one or more intermediate nodes.

In some embodiments, each request takes the form of a request message, either a primary request message (sent by the requesting node) or a secondary request message (sent by an intermediate node). Upon being notified of the data request, the target node transfers the data to the requesting node. The data may be sent via the blockchain or off-chain (e.g. via a secure communication channel). Once the data is sent from the target node to the target node, each forwarding of the request is attested to on the blockchain via blockchain transactions. This facilitates data transfer in three ways. First, the target node is able to easily determine that the requesting node has issued a request for data held by the target node. Secondly, the flow of requests is attested to in an immutable fashion. Thirdly, the sending of the data from the target node to the requesting node is attested to, since the transactions can only be recorded on the blockchain once the data has been sent. In effect, the blockchain is flooded with request transactions once the request reaches the target node. Since each forwarding of the request is recorded on the blockchain (in the form of request transactions), the security of the data transfer process is improved as the identity of each node involved is immutably recorded on the blockchain. In other words, there is a clear and permanent record of where the request initiated and how it passed to the target node. The transfer of the data from the target node to the requesting node may also be recorded (or at least attested to) on the blockchain.

In other embodiments, the requesting node sends the request to a first intermediate node along with its public key. The first intermediate node forwards the request, the requesting node's public key and its own public key to a second intermediate node (or the target node, if the first intermediate node is connected to the target node). Each intermediate node that receives the request performs the same process of forwarding the request, the received public keys, and its own public key to the next node, until the request is received by the target node. In this way, a chain is formed from the requesting node to the target node via one or more intermediate nodes, wherein each node in the chain is connected to at least one other node in the chain (the requesting node and target node are at the end of the chain and so may only be connected to one other node). The chain of nodes may represent the shortest possible path between the requesting node and the target node.

The target data is encrypted, by the target node, using the respective public key of each node in the chain, other than the target node's public key. This means that each of the nodes in the chain, other than the target node, are required to participate in the decryption of the target data. More specifically, the encrypted target data is sent from the target node to the requesting node along the chain of nodes. Each node in the chain partially decrypts the encrypted target data with its own public key. By the time the encrypted data reaches the requesting node it is only encrypted with the requesting node's public key, and therefore the requesting node can decrypt the encrypted target data to reveal the target data. The requesting node submits an attestation transaction to the blockchain to attest to the receiving of the data. Similarly, each other node may submit attestation transactions to the blockchain to attest to the receiving of the encrypted data from the previous node in the chain. In some embodiments, the target data is split into one or more chunks before being encrypted and transferred to the requesting node. The transmittal of each data chunks to the requesting node may be attested to on the blockchain.

The transmittal of the (encrypted) target data is therefore recorded on the blockchain (in the form of the attestation transactions), which improves the security of the data transfer process as the identity of each node involved is immutably recorded on the blockchain. In other words, there is a clear and permanent record of where the target data originated from and how it passed to the requesting node. The transfer of the request from the requesting node to the target node may also be recorded (or at least attested to) on the blockchain.

Note that as used herein, any reference to a "P2P network" shall be understood as meaning a P2P network other than the blockchain network, e.g. general P2P computer networks. Any reference to a P2P node shall be understood as meaning a node of the P2P network.

BRIEF DESCRIPTION OF THE DRAWINGS

To assist understanding of embodiments of the present disclosure and to show how such embodiments may be put into effect, reference is made, by way of example only, to the accompanying drawings in which:

Figure 1 is a schematic block diagram of a system for implementing a blockchain,

Figure 2 schematically illustrates some examples of transactions which may be recorded in a blockchain,

Figure 3 is a graph showing the output of the linear regression model (solid line) which is approximating the set of points,

Figure 4 schematically illustrates an example of a P2P network interacting with a blockchain network, Figure 5 illustrates an example of a directed acyclic graph with six nodes,

Figure 6 schematically illustrates an example P2P network with seven nodes, where edges represent direct network connections,

Figure 7 schematically illustrates an example flow of protocol messages and data transfer according to the Gnutella protocol,

Figure 8 is a flow diagram showing an example of the Onion routing protocol with three nodes,

Figure 9 schematically illustrates a P2P node receiving a data transfer and broadcasting an attestation transaction to the blockchain network,

Figure 10 schematically illustrates an example flow of request transactions forwarding a data request from a requesting node,

Figure 11 is a sequence diagram of example network communications between a requesting node and its connected nodes,

Figure 12 is a sequence diagram illustrating an example data request protocol,

Figure 13 schematically illustrates an example primary request transaction,

Figure 14 schematically illustrates an example secondary request transaction,

Figure 15 schematically illustrates an example flow of a data request and public keys starting from the requesting node, and

Figure 16 schematically illustrates an example routing protocol for transferring data to the requesting node. DETAILED DESCRIPTION OF EMBODIMENTS

1. EXAMPLE SYSTEM OVERVIEW

Figure 1 shows an example system 100 for implementing a blockchain 150. The system 100 may comprise a packet-switched network 101, typically a wide-area internetwork such as the Internet. The packet-switched network 101 comprises a plurality of blockchain nodes 104 that may be arranged to form a peer-to-peer (P2P) network 106 within the packet- switched network 101. Whilst not illustrated, the blockchain nodes 104 may be arranged as a near-complete graph. Each blockchain node 104 is therefore highly connected to other blockchain nodes 104.

Each blockchain node 104 comprises computer equipment of a peer, with different ones of the nodes 104 belonging to different peers. Each blockchain node 104 comprises processing apparatus comprising one or more processors, e.g. one or more central processing units (CPUs), accelerator processors, application specific processors and/or field programmable gate arrays (FPGAs), and other equipment such as application specific integrated circuits (ASICs). Each node also comprises memory, i.e. computer-readable storage in the form of a non-transitory computer-readable medium or media. The memory may comprise one or more memory units employing one or more memory media, e.g. a magnetic medium such as a hard disk; an electronic medium such as a solid-state drive (SSD), flash memory or EEPROM; and/or an optical medium such as an optical disk drive.

The blockchain 150 comprises a chain of blocks of data 151, wherein a respective copy of the blockchain 150 is maintained at each of a plurality of blockchain nodes 104 in the distributed or blockchain network 106. As mentioned above, maintaining a copy of the blockchain 150 does not necessarily mean storing the blockchain 150 in full. Instead, the blockchain 150 may be pruned of data so long as each blockchain node 150 stores the block header (discussed below) of each block 151. Each block 151 in the chain comprises one or more transactions 152, wherein a transaction in this context refers to a kind of data structure. The nature of the data structure will depend on the type of transaction protocol used as part of a transaction model or scheme. A given blockchain will use one particular transaction protocol throughout. In one common type of transaction protocol, the data structure of each transaction 152 comprises at least one input and at least one output. Each output specifies an amount representing a quantity of a digital asset as property, an example of which is a user 103 to whom the output is cryptographically locked (requiring a signature or other solution of that user in order to be unlocked and thereby redeemed or spent). Each input points back to the output of a preceding transaction 152, thereby linking the transactions.

Each block 151 also comprises a block pointer 155 pointing back to the previously created block 151 in the chain so as to define a sequential order to the blocks 151. Each transaction

152 (other than a coinbase transaction) comprises a pointer back to a previous transaction so as to define an order to sequences of transactions (N.B. sequences of transactions 152 are allowed to branch). The chain of blocks 151 goes all the way back to a genesis block (Gb)

153 which was the first block in the chain. One or more original transactions 152 early on in the chain 150 pointed to the genesis block 153 rather than a preceding transaction.

Each of the blockchain nodes 104 is configured to forward transactions 152 to other blockchain nodes 104, and thereby cause transactions 152 to be propagated throughout the network 106. Each blockchain node 104 is configured to create blocks 151 and to store a respective copy of the same blockchain 150 in their respective memory. Each blockchain node 104 also maintains an ordered set (or "pool") 154 of transactions 152 waiting to be incorporated into blocks 151. The ordered pool 154 is often referred to as a "mempool". This term herein is not intended to limit to any particular blockchain, protocol or model. It refers to the ordered set of transactions which a node 104 has accepted as valid and for which the node 104 is obliged not to accept any other transactions attempting to spend the same output.

In a given present transaction 152j, the (or each) input comprises a pointer referencing the output of a preceding transaction 152i in the sequence of transactions, specifying that this output is to be redeemed or "spent" in the present transaction 152j. In general, the preceding transaction could be any transaction in the ordered set 154 or any block 151. The preceding transaction 152i need not necessarily exist at the time the present transaction 152j is created or even sent to the network 106, though the preceding transaction 152i will need to exist and be validated in order for the present transaction to be valid. Hence "preceding" herein refers to a predecessor in a logical sequence linked by pointers, not necessarily the time of creation or sending in a temporal sequence, and hence it does not necessarily exclude that the transactions 152i, 152j be created or sent out-of-order (see discussion below on orphan transactions). The preceding transaction 152i could equally be called the antecedent or predecessor transaction.

The input of the present transaction 152j also comprises the input authorisation, for example the signature of the user 103a to whom the output of the preceding transaction 152i is locked. In turn, the output of the present transaction 152j can be cryptographically locked to a new user or entity 103b. The present transaction 152j can thus transfer the amount defined in the input of the preceding transaction 152i to the new user or entity 103b as defined in the output of the present transaction 152j . In some cases a transaction 152 may have multiple outputs to split the input amount between multiple users or entities (one of whom could be the original user or entity 103a in order to give change). In some cases a transaction can also have multiple inputs to gather together the amounts from multiple outputs of one or more preceding transactions, and redistribute to one or more outputs of the current transaction.

According to an output-based transaction protocol such as bitcoin, when a party 103, such as an individual user or an organization, wishes to enact a new transaction 152j (either manually or by an automated process employed by the party), then the enacting party sends the new transaction from its computer terminal 102 to a recipient. The enacting party or the recipient will eventually send this transaction to one or more of the blockchain nodes 104 of the network 106 (which nowadays are typically servers or data centres, but could in principle be other user terminals). It is also not excluded that the party 103 enacting the new transaction 152j could send the transaction directly to one or more of the blockchain nodes 104 and, in some examples, not to the recipient. A blockchain node 104 that receives a transaction checks whether the transaction is valid according to a blockchain node protocol which is applied at each of the blockchain nodes 104. The blockchain node protocol typically requires the blockchain node 104 to check that a cryptographic signature in the new transaction 152j matches the expected signature, which depends on the previous transaction 152i in an ordered sequence of transactions 152. In such an output-based transaction protocol, this may comprise checking that the cryptographic signature or other authorisation of the party 103 included in the input of the new transaction 152j matches a condition defined in the output of the preceding transaction 152i which the new transaction assigns, wherein this condition typically comprises at least checking that the cryptographic signature or other authorisation in the input of the new transaction 152j unlocks the output of the previous transaction 152i to which the input of the new transaction is linked to. The condition may be at least partially defined by a script included in the output of the preceding transaction 152i. Alternatively it could simply be fixed by the blockchain node protocol alone, or it could be due to a combination of these. Either way, if the new transaction 152j is valid, the blockchain node 104 forwards it to one or more other blockchain nodes 104 in the blockchain network 106. These other blockchain nodes 104 apply the same test according to the same blockchain node protocol, and so forward the new transaction 152j on to one or more further nodes 104, and so forth. In this way the new transaction is propagated throughout the network of blockchain nodes 104.

In an output-based model, the definition of whether a given output (e.g. UTXO) is assigned (e.g. spent) is whether it has yet been validly redeemed by the input of another, onward transaction 152j according to the blockchain node protocol. Another condition for a transaction to be valid is that the output of the preceding transaction 152i which it attempts to redeem has not already been redeemed by another transaction. Again if not valid, the transaction 152j will not be propagated (unless flagged as invalid and propagated for alerting) or recorded in the blockchain 150. This guards against double-spending whereby the transactor tries to assign the output of the same transaction more than once. An account-based model on the other hand guards against double-spending by maintaining an account balance. Because again there is a defined order of transactions, the account balance has a single defined state at any one time.

In addition to validating transactions, blockchain nodes 104 also race to be the first to create blocks of transactions in a process commonly referred to as mining, which is supported by "proof-of-work". At a blockchain node 104, new transactions are added to an ordered pool

154 of valid transactions that have not yet appeared in a block 151 recorded on the blockchain 150. The blockchain nodes then race to assemble a new valid block 151 of transactions 152 from the ordered set of transactions 154 by attempting to solve a cryptographic puzzle. Typically this comprises searching for a "nonce" value such that when the nonce is concatenated with a representation of the ordered pool of pending transactions 154 and hashed, then the output of the hash meets a predetermined condition. E.g. the predetermined condition may be that the output of the hash has a certain predefined number of leading zeros. Note that this is just one particular type of proof-of- work puzzle, and other types are not excluded. A property of a hash function is that it has an unpredictable output with respect to its input. Therefore this search can only be performed by brute force, thus consuming a substantive amount of processing resource at each blockchain node 104 that is trying to solve the puzzle.

The first blockchain node 104 to solve the puzzle announces this to the network 106, providing the solution as proof which can then be easily checked by the other blockchain nodes 104 in the network (once given the solution to a hash it is straightforward to check that it causes the output of the hash to meet the condition). The first blockchain node 104 propagates a block to a threshold consensus of other nodes that accept the block and thus enforce the protocol rules. The ordered set of transactions 154 then becomes recorded as a new block 151 in the blockchain 150 by each of the blockchain nodes 104. A block pointer

155 is also assigned to the new block 151n pointing back to the previously created block 151n-l in the chain. The significant amount of effort, for example in the form of hash, required to create a proof-of-work solution signals the intent of the first node 104 to follow the rules of the blockchain protocol. Such rules include not accepting a transaction as valid if it assigns the same output as a previously validated transaction, otherwise known as double-spending. Once created, the block 151 cannot be modified since it is recognized and maintained at each of the blockchain nodes 104 in the blockchain network 106. The block pointer 155 also imposes a sequential order to the blocks 151. Since the transactions 152 are recorded in the ordered blocks at each blockchain node 104 in a network 106, this therefore provides an immutable public ledger of the transactions. Note that different blockchain nodes 104 racing to solve the puzzle at any given time may be doing so based on different snapshots of the pool of yet-to-be published transactions 154 at any given time, depending on when they started searching for a solution or the order in which the transactions were received. Whoever solves their respective puzzle first defines which transactions 152 are included in the next new block 151n and in which order, and the current pool 154 of unpublished transactions is updated. The blockchain nodes 104 then continue to race to create a block from the newly-defined ordered pool of unpublished transactions 154, and so forth. A protocol also exists for resolving any "fork" that may arise, which is where two blockchain nodesl04 solve their puzzle within a very short time of one another such that a conflicting view of the blockchain gets propagated between nodes 104. In short, whichever prong of the fork grows the longest becomes the definitive blockchain 150. Note this should not affect the users or agents of the network as the same transactions will appear in both forks.

According to the bitcoin blockchain (and most other blockchains) a node that successfully constructs a new block 104 is granted the ability to newly assign an additional, accepted amount of the digital asset in a new special kind of transaction which distributes an additional defined quantity of the digital asset (as opposed to an inter-agent, or inter-user transaction which transfers an amount of the digital asset from one agent or user to another). This special type of transaction is usually referred to as a "coinbase transaction", but may also be termed an "initiation transaction" or "generation transaction". It typically forms the first transaction of the new block 151n. The proof-of-work signals the intent of the node that constructs the new block to follow the protocol rules allowing this special transaction to be redeemed later. The blockchain protocol rules may require a maturity period, for example 100 blocks, before this special transaction may be redeemed. Often a regular (non-generation) transaction 152 will also specify an additional transaction fee in one of its outputs, to further reward the blockchain node 104 that created the block 151n in which that transaction was published. This fee is normally referred to as the "transaction fee", and is discussed blow.

Due to the resources involved in transaction validation and publication, typically at least each of the blockchain nodes 104 takes the form of a server comprising one or more physical server units, or even whole a data centre. However in principle any given blockchain node 104 could take the form of a user terminal or a group of user terminals networked together.

The memory of each blockchain node 104 stores software configured to run on the processing apparatus of the blockchain node 104 in order to perform its respective role or roles and handle transactions 152 in accordance with the blockchain node protocol. It will be understood that any action attributed herein to a blockchain node 104 may be performed by the software run on the processing apparatus of the respective computer equipment. The node software may be implemented in one or more applications at the application layer, or a lower layer such as the operating system layer or a protocol layer, or any combination of these.

Also connected to the network 101 is the computer equipment 102 of each of a plurality of parties 103 in the role of consuming users. These users may interact with the blockchain network 106 but do not participate in validating transactions or constructing blocks. Some of these users or agents 103 may act as senders and recipients in transactions. Other users may interact with the blockchain 150 without necessarily acting as senders or recipients. For instance, some parties may act as storage entities that store a copy of the blockchain 150 (e.g. having obtained a copy of the blockchain from a blockchain node 104).

Some or all of the parties 103 may be connected as part of a different network, e.g. a network overlaid on top of the blockchain network 106. Users of the blockchain network (often referred to as "clients") may be said to be part of a system that includes the blockchain network 106; however, these users are not blockchain nodes 104 as they do not perform the roles required of the blockchain nodes. Instead, each party 103 may interact with the blockchain network 106 and thereby utilize the blockchain 150 by connecting to (i.e. communicating with) a blockchain node 106. Two parties 103 and their respective equipment 102 are shown for illustrative purposes: a first party 103a and his/her respective computer equipment 102a, and a second party 103b and his/her respective computer equipment 102b. It will be understood that many more such parties 103 and their respective computer equipment 102 may be present and participating in the system 100, but for convenience they are not illustrated. Each party 103 may be an individual or an organization. Purely by way of illustration the first party 103a is referred to herein as Alice and the second party 103b is referred to as Bob, but it will be appreciated that this is not limiting and any reference herein to Alice or Bob may be replaced with "first party" and "second "party" respectively.

The computer equipment 102 of each party 103 comprises respective processing apparatus comprising one or more processors, e.g. one or more CPUs, GPUs, other accelerator processors, application specific processors, and/or FPGAs. The computer equipment 102 of each party 103 further comprises memory, i.e. computer-readable storage in the form of a non-transitory computer-readable medium or media. This memory may comprise one or more memory units employing one or more memory media, e.g. a magnetic medium such as hard disk; an electronic medium such as an SSD, flash memory or EEPROM; and/or an optical medium such as an optical disc drive. The memory on the computer equipment 102 of each party 103 stores software comprising a respective instance of at least one client application 105 arranged to run on the processing apparatus. It will be understood that any action attributed herein to a given party 103 may be performed using the software run on the processing apparatus of the respective computer equipment 102. The computer equipment 102 of each party 103 comprises at least one user terminal, e.g. a desktop or laptop computer, a tablet, a smartphone, or a wearable device such as a smartwatch. The computer equipment 102 of a given party 103 may also comprise one or more other networked resources, such as cloud computing resources accessed via the user terminal.

The client application 105 may be initially provided to the computer equipment 102 of any given party 103 on suitable computer-readable storage medium or media, e.g. downloaded from a server, or provided on a removable storage device such as a removable SSD, flash memory key, removable EEPROM, removable magnetic disk drive, magnetic floppy disk or tape, optical disk such as a CD or DVD ROM, or a removable optical drive, etc.

The client application 105 comprises at least a "wallet" function. This has two main functionalities. One of these is to enable the respective party 103 to create, authorise (for example sign) and send transactions 152 to one or more bitcoin nodes 104 to then be propagated throughout the network of blockchain nodes 104 and thereby included in the blockchain 150. The other is to report back to the respective party the amount of the digital asset that he or she currently owns. In an output-based system, this second functionality comprises collating the amounts defined in the outputs of the various 152 transactions scattered throughout the blockchain 150 that belong to the party in question.

Note: whilst the various client functionality may be described as being integrated into a given client application 105, this is not necessarily limiting and instead any client functionality described herein may instead be implemented in a suite of two or more distinct applications, e.g. interfacing via an API, or one being a plug-in to the other. More generally the client functionality could be implemented at the application layer or a lower layer such as the operating system, or any combination of these. The following will be described in terms of a client application 105 but it will be appreciated that this is not limiting.

The instance of the client application or software 105 on each computer equipment 102 is operatively coupled to at least one of the blockchain nodes 104 of the network 106. This enables the wallet function of the client 105 to send transactions 152 to the network 106. The client 105 is also able to contact blockchain nodes 104 in order to query the blockchain 150 for any transactions of which the respective party 103 is the recipient (or indeed inspect other parties' transactions in the blockchain 150, since in embodiments the blockchain 150 is a public facility which provides trust in transactions in part through its public visibility). The wallet function on each computer equipment 102 is configured to formulate and send transactions 152 according to a transaction protocol. As set out above, each blockchain node 104 runs software configured to validate transactions 152 according to the blockchain node protocol, and to forward transactions 152 in order to propagate them throughout the blockchain network 106. The transaction protocol and the node protocol correspond to one another, and a given transaction protocol goes with a given node protocol, together implementing a given transaction model. The same transaction protocol is used for all transactions 152 in the blockchain 150. The same node protocol is used by all the nodes 104 in the network 106. When a given party 103, say Alice, wishes to send a new transaction 152j to be included in the blockchain 150, then she formulates the new transaction in accordance with the relevant transaction protocol (using the wallet function in her client application 105). She then sends the transaction 152 from the client application 105 to one or more blockchain nodes 104 to which she is connected. E.g. this could be the blockchain node 104 that is best connected to Alice's computer 102. When any given blockchain node 104 receives a new transaction 152j, it handles it in accordance with the blockchain node protocol and its respective role. This comprises first checking whether the newly received transaction 152j meets a certain condition for being "valid", examples of which will be discussed in more detail shortly. In some transaction protocols, the condition for validation may be configurable on a per-transaction basis by scripts included in the transactions 152. Alternatively the condition could simply be a built-in feature of the node protocol, or be defined by a combination of the script and the node protocol.

On condition that the newly received transaction 152j passes the test for being deemed valid (i.e. on condition that it is "validated"), any blockchain node 104 that receives the transaction 152j will add the new validated transaction 152 to the ordered set of transactions 154 maintained at that blockchain node 104. Further, any blockchain node 104 that receives the transaction 152j will propagate the validated transaction 152 onward to one or more other blockchain nodes 104 in the network 106. Since each blockchain node 104 applies the same protocol, then assuming the transaction 152j is valid, this means it will soon be propagated throughout the whole network 106.

Once admitted to the ordered pool of pending transactions 154 maintained at a given blockchain node 104, that blockchain node 104 will start competing to solve the proof-of- work puzzle on the latest version of their respective pool of 154 including the new transaction 152 (recall that other blockchain nodes 104 may be trying to solve the puzzle based on a different pool of transactionsl54, but whoever gets there first will define the set of transactions that are included in the latest block 151. Eventually a blockchain node 104 will solve the puzzle for a part of the ordered pool 154 which includes Alice's transaction 152j). Once the proof-of-work has been done for the pool 154 including the new transaction 152j, it immutably becomes part of one of the blocks 151 in the blockchain 150. Each transaction 152 comprises a pointer back to an earlier transaction, so the order of the transactions is also immutably recorded.

Different blockchain nodes 104 may receive different instances of a given transaction first and therefore have conflicting views of which instance is 'valid' before one instance is published in a new block 151, at which point all blockchain nodes 104 agree that the published instance is the only valid instance. If a blockchain node 104 accepts one instance as valid, and then discovers that a second instance has been recorded in the blockchain 150 then that blockchain node 104 must accept this and will discard (i.e. treat as invalid) the instance which it had initially accepted (i.e. the one that has not been published in a block 151).

An alternative type of transaction protocol operated by some blockchain networks may be referred to as an "account-based" protocol, as part of an account-based transaction model. In the account-based case, each transaction does not define the amount to be transferred by referring back to the UTXO of a preceding transaction in a sequence of past transactions, but rather by reference to an absolute account balance. The current state of all accounts is stored, by the nodes of that network, separate to the blockchain and is updated constantly. In such a system, transactions are ordered using a running transaction tally of the account (also called the "position"). This value is signed by the sender as part of their cryptographic signature and is hashed as part of the transaction reference calculation. In addition, an optional data field may also be signed the transaction. This data field may point back to a previous transaction, for example if the previous transaction ID is included in the data field.

2. UTXO-BASED MODEL

Figure 2 illustrates an example transaction protocol. This is an example of a UTXO-based protocol. A transaction 152 (abbreviated "Tx") is the fundamental data structure of the blockchain 150 (each block 151 comprising one or more transactions 152). The following will be described by reference to an output-based or "UTXO" based protocol. However, this is not limiting to all possible embodiments. Note that while the example UTXO-based protocol is described with reference to bitcoin, it may equally be implemented on other example blockchain networks.

In a UTXO-based model, each transaction ("Tx") 152 comprises a data structure comprising one or more inputs 202, and one or more outputs 203. Each output 203 may comprise an unspent transaction output (UTXO), which can be used as the source for the input 202 of another new transaction (if the UTXO has not already been redeemed). The UTXO includes a value specifying an amount of a digital asset. This represents a set number of tokens on the distributed ledger. The UTXO may also contain the transaction ID of the transaction from which it came, amongst other information. The transaction data structure may also comprise a header 201, which may comprise an indicator of the size of the input field(s) 202 and output field(s) 203. The header 201 may also include an ID of the transaction. In embodiments the transaction ID is the hash of the transaction data (excluding the transaction ID itself) and stored in the header 201 of the raw transaction 152 submitted to the nodes 104.

Say Alice 103a wishes to create a transaction 152j transferring an amount of the digital asset in question to Bob 103b. In Figure 2 Alice's new transaction 152j is labelled " TxT . It takes an amount of the digital asset that is locked to Alice in the output 203 of a preceding transaction 152i in the sequence, and transfers at least some of this to Bob. The preceding transaction 152i is labelled "Txo in Figure 2. Txo and Txi are just arbitrary labels. They do not necessarily mean that Txois the first transaction in the blockchain 151, nor that Txi is the immediate next transaction in the pool 154. Txi could point back to any preceding (i.e. antecedent) transaction that still has an unspent output 203 locked to Alice.

The preceding transaction Txo may already have been validated and included in a block 151 of the blockchain 150 at the time when Alice creates her new transaction Txi, or at least by the time she sends it to the network 106. It may already have been included in one of the blocks 151 at that time, or it may be still waiting in the ordered set 154 in which case it will soon be included in a new block 151. Alternatively Txo and Txi could be created and sent to the network 106 together, or Txo could even be sent after Txi if the node protocol allows for buffering "orphan" transactions. The terms "preceding" and "subsequent" as used herein in the context of the sequence of transactions refer to the order of the transactions in the sequence as defined by the transaction pointers specified in the transactions (which transaction points back to which other transaction, and so forth). They could equally be replaced with "predecessor" and "successor", or "antecedent" and "descendant", "parent" and "child", or such like. It does not necessarily imply an order in which they are created, sent to the network 106, or arrive at any given blockchain node 104. Nevertheless, a subsequent transaction (the descendent transaction or "child") which points to a preceding transaction (the antecedent transaction or "parent") will not be validated until and unless the parent transaction is validated. A child that arrives at a blockchain node 104 before its parent is considered an orphan. It may be discarded or buffered for a certain time to wait for the parent, depending on the node protocol and/or node behaviour.

One of the one or more outputs 203 of the preceding transaction Txo comprises a particular UTXO, labelled here UTXOo. Each UTXO comprises a value specifying an amount of the digital asset represented by the UTXO, and a locking script which defines a condition which must be met by an unlocking script in the input 202 of a subsequent transaction in order for the subsequent transaction to be validated, and therefore for the UTXO to be successfully redeemed. Typically the locking script locks the amount to a particular party (the beneficiary of the transaction in which it is included). Le. the locking script defines an unlocking condition, typically comprising a condition that the unlocking script in the input of the subsequent transaction comprises the cryptographic signature of the party to whom the preceding transaction is locked.

The locking script (aka scriptPubKey) is a piece of code written in the domain specific language recognized by the node protocol. A particular example of such a language is called "Script" (capital S) which is used by the blockchain network. The locking script specifies what information is required to spend a transaction output 203, for example the requirement of Alice's signature. Unlocking scripts appear in the outputs of transactions. The unlocking script (aka scriptSig) is a piece of code written the domain specific language that provides the information required to satisfy the locking script criteria. For example, it may contain Bob's signature. Unlocking scripts appear in the input 202 of transactions. So in the example illustrated, UTXOo'\x\ the output 203 of Txo com prises a locking script [Checksig PA] which requires a signature Sig PA of Alice in order for UTXOo to be redeemed (strictly, in order for a subsequent transaction attempting to redeem UTXOo to be valid). [Checksig PA] contains a representation (i.e. a hash) of the public key PA from a publicprivate key pair of Alice. The input 202 of Txi comprises a pointer pointing back to Txi (e.g. by means of its transaction ID, TxIDo, which in embodiments is the hash of the whole transaction Txo}. The input 202 of Txi comprises an index identifying UTXOo within Txo, to identify it amongst any other possible outputs of Txo. The input 202 of Txi further comprises an unlocking script <Sig PA> which comprises a cryptographic signature of Alice, created by Alice applying her private key from the key pair to a predefined portion of data (sometimes called the "message" in cryptography). The data (or "message") that needs to be signed by Alice to provide a valid signature may be defined by the locking script, or by the node protocol, or by a combination of these.

When the new transaction Txi arrives at a blockchain node 104, the node applies the node protocol. This comprises running the locking script and unlocking script together to check whether the unlocking script meets the condition defined in the locking script (where this condition may comprise one or more criteria). In embodiments this involves concatenating the two scripts:

<Sig PA> <PA> | | [Checksig PA] where "| |" represents a concatenation and "<...>" means place the data on the stack, and "[...]" is a function comprised by the locking script (in this example a stack-based language). Equivalently the scripts may be run one after the other, with a common stack, rather than concatenating the scripts. Either way, when run together, the scripts use the public key PA of Alice, as included in the locking script in the output of Txo, to authenticate that the unlocking script in the input of Txi contains the signature of Alice signing the expected portion of data. The expected portion of data itself (the "message") also needs to be included in order to perform this authentication. In embodiments the signed data comprises the whole of Txi (so a separate element does not need to be included specifying the signed portion of data in the clear, as it is already inherently present). The details of authentication by public-private cryptography will be familiar to a person skilled in the art. Basically, if Alice has signed a message using her private key, then given Alice's public key and the message in the clear, another entity such as a node 104 is able to authenticate that the message must have been signed by Alice. Signing typically comprises hashing the message, signing the hash, and tagging this onto the message as a signature, thus enabling any holder of the public key to authenticate the signature. Note therefore that any reference herein to signing a particular piece of data or part of a transaction, or such like, can in embodiments mean signing a hash of that piece of data or part of the transaction.

If the unlocking script in Txi meets the one or more conditions specified in the locking script of Txo (so in the example shown, if Alice's signature is provided in Txi and authenticated), then the blockchain node 104 deems Txi valid. This means that the blockchain node 104 will add Txi to the ordered pool of pending transactions 154. The blockchain node 104 will also forward the transaction Txi to one or more other blockchain nodes 104 in the network 106, so that it will be propagated throughout the network 106. Once Txi has been validated and included in the blockchain 150, this defines UTXOofrom Txoas spent. Note that Txi can only be valid if it spends an unspent transaction output 203. If it attempts to spend an output that has already been spent by another transaction 152, then Txi will be invalid even if all the other conditions are met. Hence the blockchain node 104 also needs to check whether the referenced UTXO in the preceding transaction Txo is already spent (i.e. whether it has already formed a valid input to another valid transaction). This is one reason why it is important for the blockchain 150 to impose a defined order on the transactions 152. In practice a given blockchain node 104 may maintain a separate database marking which UTXOs 203 in which transactions 152 have been spent, but ultimately what defines whether a UTXO has been spent is whether it has already formed a valid input to another valid transaction in the blockchain 150.

If the total amount specified in all the outputs 203 of a given transaction 152 is greater than the total amount pointed to by all its inputs 202, this is another basis for invalidity in most transaction models. Therefore such transactions will not be propagated nor included in a block 151.

Note that in UTXO-based transaction models, a given UTXO needs to be spent as a whole. It cannot "leave behind" a fraction of the amount defined in the UTXO as spent while another fraction is spent. However the amount from the UTXO can be split between multiple outputs of the next transaction. E.g. the amount defined in UTXOo 'm Txocan be split between multiple UTXOs in Txi. Hence if Alice does not want to give Bob all of the amount defined in UTXOo, she can use the remainder to give herself change in a second output of Txi, or pay another party.

In practice Alice will also usually need to include a fee for the bitcoin node 104 that successfully includes her transaction 104 in a block 151. If Alice does not include such a fee, TAT? may be rejected by the blockchain nodes 104, and hence although technically valid, may not be propagated and included in the blockchain 150 (the node protocol does not force blockchain nodes 104 to accept transactions 152 if they don't want). In some protocols, the transaction fee does not require its own separate output 203 (i.e. does not need a separate UTXO). Instead any difference between the total amount pointed to by the input(s) 202 and the total amount of specified in the output(s) 203 of a given transaction 152 is automatically given to the blockchain node 104 publishing the transaction. E.g. say a pointer to UTXOo\s the only input to Txi, and Txi has only one output UTXOi. If the amount of the digital asset specified in UTXOo is greater than the amount specified in UTXOi, then the difference may be assigned by the node 104 that wins the proof-of-work race to create the block containing UTXOi. Alternatively or additionally however, it is not necessarily excluded that a transaction fee could be specified explicitly in its own one of the UTXOs 203 of the transaction 152.

Alice and Bob's digital assets consist of the UTXOs locked to them in any transactions 152 anywhere in the blockchain 150. Hence typically, the assets of a given party 103 are scattered throughout the UTXOs of various transactions 152 throughout the blockchain 150. There is no one number stored anywhere in the blockchain 150 that defines the total balance of a given party 103. It is the role of the wallet function in the client application 105 to collate together the values of all the various UTXOs which are locked to the respective party and have not yet been spent in another onward transaction. It can do this by querying the copy of the blockchain 150 as stored at any of the bitcoin nodes 104.

Note that the script code is often represented schematically (i.e. not using the exact language). For example, one may use operation codes (opcodes) to represent a particular function. "OP_..." refers to a particular opcode of the Script language. As an example, OP_RETURN is an opcode of the Script language that when preceded by OP_FALSE at the beginning of a locking script creates an unspendable output of a transaction that can store data within the transaction, and thereby record the data immutably in the blockchain 150. E.g. the data could comprise a document which it is desired to store in the blockchain.

Typically an input of a transaction contains a digital signature corresponding to a public key PA. In embodiments this is based on the ECDSA using the elliptic curve secp256kl. A digital signature signs a particular piece of data. In some embodiments, for a given transaction the signature will sign part of the transaction input, and some or all of the transaction outputs. The particular parts of the outputs it signs depends on the SIGHASH flag. The SIGHASH flag is usually a 4-byte code included at the end of a signature to select which outputs are signed (and thus fixed at the time of signing).

The locking script is sometimes called "scriptPubKey" referring to the fact that it typically comprises the public key of the party to whom the respective transaction is locked. The unlocking script is sometimes called "scriptSig" referring to the fact that it typically supplies the corresponding signature. However, more generally it is not essential in all applications of a blockchain 150 that the condition for a UTXO to be redeemed comprises authenticating a signature. More generally the scripting language could be used to define any one or more conditions. Hence the more general terms "locking script" and "unlocking script" may be preferred.

3. SIDE CHANNEL As shown in Figure 1, the client application on each of Alice and Bob's computer equipment 102a, 120b, respectively, may comprise additional communication functionality. This additional functionality enables Alice 103a to establish a separate side channel 107 with Bob 103b (at the instigation of either party or a third party). The side channel 107 enables exchange of data separately from the blockchain network. Such communication is sometimes referred to as "off-chain" communication. For instance this may be used to exchange a transaction 152 between Alice and Bob without the transaction (yet) being registered onto the blockchain network 106 or making its way onto the chain 150, until one of the parties chooses to broadcast it to the network 106. Sharing a transaction in this way is sometimes referred to as sharing a "transaction template". A transaction template may lack one or more inputs and/or outputs that are required in order to form a complete transaction. Alternatively or additionally, the side channel 107 may be used to exchange any other transaction related data, such as keys, negotiated amounts or terms, data content, etc.

The side channel 107 may be established via the same packet-switched network 101 as the blockchain network 106. Alternatively or additionally, the side channel 301 may be established via a different network such as a mobile cellular network, or a local area network such as a local wireless network, or even a direct wired or wireless link between Alice and Bob's devices 102a, 102b. Generally, the side channel 107 as referred to anywhere herein may comprise any one or more links via one or more networking technologies or communication media for exchanging data "off-chain", i.e. separately from the blockchain network 106. Where more than one link is used, then the bundle or collection of off-chain links as a whole may be referred to as the side channel 107. Note therefore that if it is said that Alice and Bob exchange certain pieces of information or data, or such like, over the side channel 107, then this does not necessarily imply all these pieces of data have to be send over exactly the same link or even the same type of network.

4. LINEAR REGRESSION

Linear regressions are models that are used in statistics to model timeseries, where a timeseries is a series of data points indexed in time order. Consider a 2-dimensional plane T1 with the x-axis representing time and the y-axis representing price. Figure 3 shows an example of a data series, where the graphed line represents a linear regressive model and the points show the input to that model.

The data series represents prices y t , ... , y t at times t 1( t 2 , ... , t T . To build a linear regression model, one assumes the relationship between each price y t . and time is linear: where a, b are model parameters to be determined and E t are errors capturing any disturbances in the inputs from satisfying a linear equation. The values a and b are computed by minimising the squared sum of the error terms E t

Then the linear regression model is defined by the equation

Thus, the price at a future time t' is defined as

There is no general solution to model timeseries and in practice various models are tested to determine which may be the most accurate, such as GARCH, ARCH, or ARMA.

5. P2P NETWORK CONNECTIONS

Figure 4 illustrates an example system that may be used to transfer data between P2P nodes. The system comprises a peer-to-peer (P2P) network 500 and a blockchain network 106. The P2P network 500 comprises a plurality of nodes, which are referred to herein as P2P nodes. For instance, the P2P network comprises a first P2P node 501a, a second P2P node 501b, and so on. Whilst only five P2P nodes 501 are shown in Figure 4, it will be appreciated that in general the P2P network 500 may have any number of P2P nodes 501. Note that as used herein, "first", "second", etc., are used merely as arbitrary labels and do not necessarily imply an order, unless the context requires otherwise. The skilled person will be familiar with the concept of a P2P network - i.e. a distributed network where peers are equally privileged, equipotent participants in the network - and so the P2P network 500 per se will not be described in detail, other than to say that the P2P network has a network address. The network address may take any suitable form. For example, the network address may be an IP address or a domain name. The network address may be an address (or identifier) of the P2P network as a whole, or each P2P node may have an address on the network. The P2P network 500 may have one or more purposes or applications. For instance, the P2P network may be a content or file sharing network, or a communication (e.g. video calling) network, a cloud computing network, a remote desktop network, etc.

Each P2P node 501 comprises (or is comprised by) or is implemented in software run on respective computing equipment configured to perform the actions described below as being performed by the P2P nodes 501. In some embodiments, each P2P node 501 may be configured to perform some or all of the actions described as being performed by Alice 103a and/or Bob 103b with reference to Figures 1 and 2. Each P2P node 501 has a respective public key, i.e. has access to the corresponding private key.

As shown in Figure 4, several of the P2P nodes 501 have existing connections, which are shown by solid lines connecting the P2P nodes 501. For instance, a third P2P node 501c is shown connected to a fourth P2P node 501d and a fifth P2P node 501e. The second P2P node 501b is connected to the fourth P2P node 501d. Further connections are shown. Also shown in the diagram are connections that the first P2P node would like to form, which are shown by broken lines connecting the first P2P node 501a to other P2P nodes. For instance, the first P2P node 501a would like to connect to the second P2P node 501b and the third P2P node 501c, e.g. because these nodes are closest to the first P2P node 501a. Here, "closest" may be in geographical terms or otherwise.

In order to connect with the second P2P node 501b, the first P2P node 501a may obtain a public key associated with the second P2P node 501b. The first P2P node 501a may obtain the public key from memory, from publicly accessible resource, e.g. a webpage or the blockchain, from a trusted authority, or from another one of the P2P nodes 501. As another example, the first P2P node 501a may obtain the second P2P node's public key by querying a Domain Name System (DNS) service, e.g. using the P2P network address.

The first P2P node 501a may be configured to generate a blockchain transaction (which will be referred to as a first transaction). The first transaction comprises a first output locked to the second node's public key. E.g. the output may be a P2PKH output. The first output is used to alert the second P2P node 501b to the fact that a P2P is attempting to form a connection. For instance, the second P2P node 501b may operate a wallet application that monitors the blockchain for outputs that are locked to the second P2P node's public key. The skilled person will be familiar with other ways of identifying "payments" sent to a public key. The first transaction also comprises the P2P network address, which is used to identify the P2P network which the first P2P node 501a would like to connect to the second P2P node 501b on. The network address may be included as part of the first output of the first transaction, or a second output. The second output may be an unspendable output and/or an OP_RETURN output. The first transaction is signed with a signature that can be verified using the first P2P node's public key. This enables the second P2P node 501b to determine which P2P node 501 is attempting to form a connection.

The first P2P node 501a may submit the first transaction to the blockchain network 106, or alternatively to an intermediary who then submits the first transaction to the blockchain network 106.

The second P2P node 501b may be configured to determine that the first blockchain transaction has been submitted to (or recorded on) the blockchain 150. As mentioned above, this may be performed by a wallet application operated by the second P2P node 501b. Or, the second P2P node 501 may manually scan the blockchain 150 for transactions having outputs locked to the second P2P node's public key. As another example, a service provider may monitor the blockchain 150 on behalf of the second P2P node 501b and inform the second P2P node 501b when the first transaction is identified. In response to detecting or otherwise identifying the presence of the first transaction, the second P2P node 501b is configured to connect with the first P2P node 501a. Connecting with the first P2P node 501a may involve the second P2P node 501b adding the first P2P node 501a to a list of nodes that the second P2P node 501b will communicate with on the P2P network 500. Here, communicating with the first P2P node 501a is taken to mean accepting incoming data from and sending outgoing data to the first P2P node 501b. Additionally or alternatively, connecting with the first P2P node 501 may involve actively communicating with the first P2P node 501a, i.e. sending data to the first P2P node 501a.

The first transaction is not only beneficial for the first and second P2P nodes 501a, 501b but also for the P2P network 500 as a whole. The first transaction allows other nodes 501 to determine that the first and second P2P nodes 501a, 501b are connected. In other words, upon seeing the first transaction recorded on the blockchain 150, other nodes of the P2P network 500 know that they can communicate with the first or second P2P node via the second or first P2P node, respectively. This improves the connectivity of the P2P network 500 as nodes 501 become aware of more connections and more routes to other nodes 501.

6. COORDINATING DATA TRANSFER

6.1 Graph theory

Since the connections between each node on any P2P network form a graph, we recall some fundamental ideas in graph theory. A graph is a collection of objects (nodes) in which some pairs of objects are related (represented as edges). An example graph is shown in Figure 5, where the nodes of the graph are labelled by N b where i is a positive integer or an index set depending on the context. A directed graph is a special kind of graph where edges between nodes have a direction - also called directed edges.

Throughout the following we will manage graph information flow from node N ± to N k . If N ± is the information request node, then we call N ± the source node or the requesting node. Moreover, we call N k the sink node or the target node, when N k is the end node of the information flow.

Note that in a real-world implementation, P2P networks are not fixed, and nodes can arbitrarily connect and disconnect with peers. 6.2 Gnutella

By way of an example application context, Gnutella is one example of a decentralised P2P network file sharing service. To show how the protocol works, we assume a network structure as in Figure 6. Node N ± requests data D through the network and the Gnutella protocol allows N ± to find the node N 1 12 holding the data. Once the request reaches N 1 1 2 , it directly transfers the data to N ± outside the P2P network structure - also called an off- network transfer. Figure 7 shows a visualisation of this protocol.

The steps of the data transfer protocol are as follows:

1. Node N ± requests a file by sending a query message Query for data D to its adjacent peers N 1 ± and N 1 2 .

2. Each node N 1:i forwards the message Query to its adjacent peers

3. N 1 1 2 receives the message Query and sends a reply message QueryHit containing its identity to N 1 1 .

4. N 1 ± forwards the message QueryHit to N ±

5. N ± contacts N 1 1 2 and receives data D from it.

6.3 Onion routing

By way of an example implementation, the onion routing protocol is an example routing protocol which ensures communication privacy between nodes on a network, and it is used as part of the Tor network for example. To exemplify the routing protocol, we assume node N ± is connected to N 2 , which in turns is connected to node N 3 . This protocol enables node N ± to send data D to N 3 as in Figure 8, where we denote the public key of node N t by PK N ..

The steps of the protocol are as follows:

1. N ± sends its public key PK N1 to N 2 , and a request for the creation of a shared key S 2 through a Diffie-Hellman key exchange.

2. N 2 replies with its public key PK N2 , telling N ± that it created the shared key S 2 . N ± also privately computes the key S 2 .

3. N ± requests the public key of N 3 from N 2 . N ± attaches its public key to the request. N ± does not know the IP address of N 3 . 4. N 2 forwards the request to N 3 , requesting the creation of a shared key S 3 .

5. N 3 sends its public key to N 2 and confirms the creation of the key S 3 . S 3 is shared between N ± and N 3 .

6. N 2 further relays the public key to N ± together with the confirmation of the creation of key S 3 . N ± privately computes the key S 3 .

7. N ± encrypts data D first with the key S 3 and then with S 2 : Enc Sz N ± sends the encrypted data to N 2 .

8. N 2 decrypts the encrypted data using S 2 and obtains Enc s (D'). N 2 sends the encrypted data Enc s (O') to N 3 .

9. N 3 decrypts Enc S3 (D) and receives data D.

6.4 Data Transfer

Some embodiments of the present disclosure enable the blockchain network to act as a coordinator for the transfer of data between P2P nodes of a P2P network. An example system for implementing the described embodiments is shown in Figure 9. The system comprises a P2P network comprises a plurality of P2P nodes and a blockchain network 106. The system comprise the P2P nodes 501 of the P2P network illustrated in Figure 4. In some embodiments, the P2P nodes may undergo the process of forming connections as described above.

The P2P network comprises a target node with access to target data and a requesting node that requests the target data. The target data may comprise media data such as, for example, one or more images, one or more videos, one or more audio files, etc. The target data may comprise one or more documents. In general, the target data may take any form. The P2P network also comprises a plurality of intermediate nodes, including one or more nodes directly connected to the requesting node. The requesting node and the target node are connected via the intermediate nodes. That is, the requesting node is connected to one or more intermediate nodes, one or more of those intermediate nodes are connected to one or more further intermediate nodes, and so on, until an intermediate node is connected to the target node. For example ,as shown in Figure 9, the requesting node N ± is connected to nodes N 1 ± and N 1 2 , and node N 1 ± is connected to the target node N k . It will be appreciated that Figure 9 is just an example, and in practice there may be many more intermediate nodes connecting the requesting node to the target node. Each node of the P2P network is associated with a respective public key.

The requesting node obtains a hash value that is based on a request for the target data. More specifically, the request for the target data (the "target request") is hashed with a first hash function to obtain a first hash value, and the result is hashed with a second hash function to obtain a second hash value. The first and second hash functions may be the same, or they may be different. The first and/or second has functions may be cryptographic functions (e.g. from the SHA family of hash functions, such as SHA256). Alternatively, non- cryptographic hash functions may be used. In some examples, the requesting node generates the first and second hash values. In other examples, the requesting node may receive the first and/or second hash values from a different node, or from a trusted third party such as a centralised service that maps requests to data.

The target request may be based on the target data or an identifier thereof, e.g. the target request may be a hash of the target data. The target request may be mapped to the target data (e.g. by an optional centralised service) such that the target node may determine which data is being requested. For example, the target node may store a database of data requests mapped to the target data. The target node may inform a centralised service of the mappings. For instance, the target node may inform the centralised service that is has media file A mapped to request number 123. In some examples, such a centralised service may be provided by a collection of the network nodes. The requesting node may contact the centralised service and inform the service that it would like to obtain media file A. In response, the centralised service may provide the requesting node with request number 123. The manner in which the requesting node obtains the target request is not essential for implementing the described embodiments.

In some examples, the first hash value may be obtained by hashing the target request and additional data, such as a timestamp, or a secret value known to the requesting node and the target node. For example, as an option a centralised service may send the secret value to the requesting node and/or the target node. Note that any reference to the centralised service is optional and it is envisaged that in at least some embodiments such a centralised service does not exist.

6.4.1 Flooding Rewards

Some embodiments described herein involve the flooding of the P2P network with requests for the target data.

The requesting node generates a primary request transaction, which is a blockchain transaction. The primary request transactions includes the first hash value and one or more outputs. Each output is locked to a respective public key of a respective one of the intermediate nodes to which the requesting node is connected to on the P2P network. For example, if the requesting node is connected to two nodes (as shown in Figure 9), the primary request transaction may includes an output locked to a first one of the two nodes and a separate output locked to the second one of the two nodes. The first hash value may be included in the outputs that are locked to the respective public keys of the respective nodes. For instance, each output may include a locking script configured to implement a hash puzzle, wherein the hash puzzle comprises the first hash value. The hash puzzle may require an unlocking script of a spending transaction (i.e. a transaction attempting to unlock the locking script containing the hash puzzle) to include the target request. Additionally or alternatively, in some examples, the first hash value may be included in an OP_RETURN output. The primary request transaction may also comprise a network identifier of the requesting node (e.g. an IP address of the requesting node) and/or a certified identifier of the requesting node (e.g. an identifier certified by a certificate authority attesting to the identity of the requesting node). The primary request transaction includes a first input that references an unspent transaction output (UTXO) locked to a public key of the requesting node. That is, the UTXO is controlled by the requesting node. The requesting node generates a signature (a "first signature") that signs over the transaction.

In some examples, the requesting node may generate multiple primary request transactions, each having one output that is locked to the public key of a connected node. For instance, if the requesting node is connected to three intermediate nodes the requesting node may generate three primary request transactions, one for each connected node. The primary request transactions may take the same form and include the same data as described above, except for the number of outputs.

The requesting node does not submit the primary request transaction(s) to the blockchain network 106 or the intermediate nodes. Instead, the requesting node sends a primary request message to the relevant intermediate nodes, i.e. the nodes having the public keys to which the outputs of the transaction are locked. The primary request message includes at least an indication of the UTXO referenced by the first input of the primary request transaction, and the first signature that signs over the primary request transaction. At this point the first signature cannot be used to unlock the UTXO because the intermediate nodes do not have the full transaction data, namely the first hash value. The primary request message also includes the second hash value. The primary request message may include other items, such as a response time, an indication of the amount locked by the outputs of the primary request transaction, the public keys of the intermediate nodes to which those outputs are locked, a network address of the P2P network, a certified identifier of the requesting node, a public key of the requesting node. The primary request message may be signed by the requesting node. In some examples, the primary request message may be encrypted such that only the intermediate node to which it is sent can view its contents. For instance, the primary request message may be encrypted with an encryption key based on the public key of the intermediate node.

Each of the intermediate nodes that receive the primary request message then generates a respective secondary request transaction. Each secondary request transaction generated by a respective intermediate node is similar to the primary request transaction in that it includes one or more outputs, where each output is locked to a respective public key of a respective node to which the respective intermediate node is connected. For example, a first one of the intermediate nodes may be connected to three other intermediate nodes, and therefore the secondary request transaction generated by that node would contain three outputs locked to respective public keys (one key per output) of the three other intermediate nodes. Each secondary request transaction includes the second hash value, obtained from the primary request message. Similar to the primary request transaction, each respective secondary request transaction references a UTXO controlled by the respective intermediate node that generates the respective secondary request transaction. The respective intermediate node also generates a signature that signs over the respective secondary request transaction and is suitable for unlocking the UTXO. Figure 14 illustrates an example of a secondary request transaction.

As is the case for the primary request transaction, each intermediate node may generate a single secondary request transaction that includes a separate output for each connected node, or multiple secondary request transactions, one for each connected node.

The intermediate nodes do not send the respective secondary request transactions to the blockchain network 106. Instead, each intermediate node generates a respective secondary request message which is sent to the nodes connected to that intermediate node. Each secondary request message is similar to the primary request message in that it includes at least an indication of the UTXO referenced by the input of the respective secondary request transaction, and the signature that signs over the respective secondary request transaction. The secondary request message also includes a third hash value generated by hashing the second hash value. The secondary request message may include other items, such as a response time, an indication of the amount locked by the outputs of the secondary request transaction, the public keys of the intermediate nodes to which those outputs are locked, a network address of the P2P network, a certified identifier of the requesting node, a public key of the respective intermediate node. Each secondary request message may be signed by the respective intermediate node that generates the message. In some examples, each secondary request message may be encrypted such that only the intermediate node to which it is sent can view its contents. For instance, the secondary request message may be encrypted with an encryption key based on the public key of the intermediate node.

In some examples, one of the secondary request transactions generated by the first set of intermediate nodes (i.e. those nodes immediately connected to the requesting node) will be locked to the target node's public key. In other examples, the first set of intermediate nodes will each generate a respective secondary request transaction comprising one or more outputs locked to respective public keys of a second set of intermediate nodes. Similarly, in depending on the connections between the nodes of the P2P network, the target node may or may not receive a secondary request messages sent by the first set of intermediate nodes, or a later set of intermediate nodes. Either way, the process of intermediate nodes generating respective secondary transactions and sending respective secondary request messages continues until the target node receives a secondary request message. In this way, a path of nodes is formed from the requesting node to the target node via one or more intermediate nodes. With the exception of the target node, each node in the path is connected to the next node via the sending of a request message (primary in the case of the requesting node and secondary in the case of the intermediate nodes) to that node. For example, in Figure 9 a path is formed from the requesting node N ± to the target node N k via one intermediate node N 1 ± . Figure 10 illustrates the locking of outputs to the public keys along the path from the requesting node to the target node.

The target node is thus alerted to the request for the target data, and the target data is transferred to the requesting node. The target node may send the target data directly to the requesting node, or via one or more of the intermediate nodes. The target data may be encrypted, e.g. with an encryption key based on the requesting node's public key. In some examples, the target node may send the target data (e.g. in encrypted form) to the blockchain from which it may be obtained by the requesting node.

In some examples, the target node may determine that it has the target data by identifying a hash value included in a respective secondary request message that is based on the data request. For example, the target node may have access to the first hash value (e.g. stored in a database mapped to the target request), identify a hash value from a secondary request message, and verify that the first hash value hashes to the identified hash value. If it does, the target node has the corresponding target request.

Upon being alerted to the data request, the target node makes the first hash value available to the P2P network, either directly or indirectly. For example, the target node may broadcast the first hash value to each P2P node, or at least to each intermediate node that has sent a respective secondary request message. As another example, the target node may send the first hash value to one or more intermediate nodes (e.g. those connected directly to the target node), and those nodes may forward the first hash value to one or more nodes.

The target node uses the first hash value, together with the information from the secondary request message that it received, to generate a respective secondary request message, and send the request transaction to the blockchain network. The signature obtained from the secondary request message allows the target node to spend the UTXO referenced by the secondary request message. The secondary request transaction fulfils two purposes: it attests to the receiving of the data request and the sending of the target data; and it allows the target node to be rewarded for sending the data.

The signature obtained (i.e. extracted) from the secondary request message received by the target node signs over a transaction containing a hash value generated by hashing the target request a n-1 times, with the hash value included in the secondary request message being generated by hashing the target request n times. The target node hashes the target request n-1 times and generates a secondary request transaction containing the resulting hash value, such that the signature is valid for the secondary request transaction.

Each intermediate node performs similar actions to the target node in regard to generating a respective request transaction and submitting that transaction to the blockchain network 106, thus attesting to the forwarding of the data request. The intermediate nodes other than those directly connected to the requesting node (i.e. those that receive a respective secondary request message), generate a respective secondary request transaction using the data obtained from the secondary message and the first hash value received from the target node. The first hash value is used to generate the hash value that was included in the respective secondary request transaction signed with the signature extracted from the respective secondary request message.

The intermediate nodes immediately connected to the requesting, i.e. those that receive the primary request message from the requesting node, use the first hash value and the information obtained from the primary request message to generate the primary request transaction. As described above, the primary request transaction contains the first hash value. The intermediate nodes (or at least one of them) generates a transaction containing the first hash value such that the signature extracted from the primary request message is valid for that transaction, which is then sent to the blockchain network 106.

Optionally, the requesting node may submit an attestation transaction to the blockchain to attest to the obtaining of the target data. E.g. the attestation transaction may include a hash of the target data.

6.4.2 Chained Rewards

Some embodiments described herein involve sending a request for the target data via a chain of intermediate nodes to the target node.

The requesting node sends the second hash value (which is based on the request for the target data) to one or more intermediate nodes that are connected to the requesting node. The requesting node also sends its public key. For instance, as shown in Figure 15, the requesting node N r sends the second hash value Hi(Ho(Ry) and its public key PKm to each node that it is connected to, which in this example is intermediate node N ltl and intermediate node N 1 2 . Each intermediate node that receives the second hash value forwards the second hash value and the requesting node's public key PKm to one or more intermediate nodes that are connected to that intermediate node. The public key of the intermediate node is also sent along with the second hash value and the requesting node's public key PKm. For example, intermediate node N 1 2 sends the second hash value, the requesting node's public key PKm and its own public key PKm, 2 to intermediate node N 1;2;1 and intermediate node N 1 2 2 . This process continues until the second hash value reaches the target node. For example, as shown in Figure 15, intermediate node r forwards the second hash value, the requesting node's public key PKm and its own public key PKm,i to intermediate node N 1:1 1 and the target node N k . It will be appreciated that in practice there may be many more nodes in the P2P network and there may be many more rounds of intermediate nodes forwarding the second hash value, the received public keys and their own public key to other intermediate nodes until eventually the target node receives the second hash value. A chain of nodes is formed from the requesting node to the target node. The chain is formed by the forwarding of the second hash value and public keys from the requesting node to the target node. The chain may be represented by the public keys received by the target node. For example, in Figure 15 the chain is formed of the requesting node N r , intermediate node N ltl and the target node N k , and is represented by public keys PKm and PKNI,I. The requesting node is always at one end of the chain and the target node at the other end.

The requesting node may send the second hash value and its public key to the intermediate nodes via an off-chain channel, e.g. as part of the P2P network protocol. In other examples, the requesting node may send the second hash value and its public key to the intermediate nodes on-chain. That is, the requesting node may submit a request transaction to the blockchain, wherein the request transaction includes the second hash value and the requesting node's public key. The requesting node may also send the request transaction directly to the intermediate nodes via an off-chain channel. This improves performance as the nodes do not have to monitor the blockchain. The request transaction may include one or more outputs, wherein each output is locked to the respective public key of a respective intermediate node to which the requesting node is connected. For instance, if the requesting node is connected to three intermediate nodes, the request transaction may include three outputs, each locked to a respective intermediate node's public key.

Similarly, the intermediate nodes may forward the second hash value and the public keys via an off-chain channel of by submitting request transactions to the blockchain. Depending on how the second hash value and public keys are sent by the intermediate nodes, the target node either obtains the second hash value and public keys directly from an intermediate node (via an off-chain channel) or from the blockchain.

In some examples, the target node may recognise that the second hash value is associated with the target data item (or the target request), e.g. the second hash value may be included in a database mapped to the request. In other examples, the target node may have access to the first hash value (e.g. stored in a database mapped to the target request), receive the second hash value from the intermediate node, and verify that the first hash value hashes to the second hash value. If it does, the target node has the corresponding target request. In some examples, the second hash value may be obtained by hashing the first hash value with a timestamp. In these examples, the target node may try hashing the first value with a range of different time stamps to verify that the second hash is based on a known first hash value.

The target node uses the obtained public keys (i.e. the requesting node's public key and the respective public key of each other node in the chain) to encrypt the target data. That is, the target data is encrypted with each of the public keys, first with the requesting node's public key, then with the public key of the first intermediate node in the path, then with the public key of the second intermediate node in the path, and so on, until the target data has been encrypted with each public key. In some examples, the target data may first be split into one or more data packets, and each data packet may be encrypted with the set of public keys.

The data packet(s) encrypted with the set of public keys will be referred to as "final encrypted messages". The data packet(s) encrypted with only the requesting node's public key will be referred to as "first encrypted messages". That is, the data packets are each encrypted with the requesting nodes public key to obtain the first encrypted messages, and the first encrypted messages are each encrypted with the remaining public keys to obtain the final encrypted messages.

The target node sends the final encrypted message(s) to the final intermediate node in the path, i.e. the intermediate node that submitted the secondary request transaction having an output locked to the target node's public key. The final intermediate node decrypts the final encrypted message(s) using the private key corresponding to that node's public key in order to obtain a set of encrypted messages. Each of the encrypted message in the set of encrypted messages is encrypted with the public keys of the other intermediate nodes and the requesting node. The final intermediate node sends the set of encrypted messages to the next intermediate node in the path (in the direction of the requesting node) or, if there is only one intermediate node in the path, to the requesting node. Each intermediate node that receives a set of encrypted messages decrypts the messages with their respective private key and sends the resulting set of encrypted messages to the next node in the path. Eventually, the requesting node receives the one or more first encrypted messages. The requesting node may then decrypt the one or more first encrypted messages with its private key to obtain reveal the one or more data packets. The target data is then obtained by combining the data packets.

In some examples, the encrypted messages are submitted from node to node in one batch. In other examples, the encrypted messages are submitted from node to node one at a time.

The encrypted messages may be sent node to node via an off-chain channel. Alternatively, the encrypted message may be sent via the blockchain. E.g. each node may send one or more data transactions to the blockchain, wherein each data transaction comprises one or more encrypted messages.

The requesting node submits one or more attestation transactions (also referred to below as primary request transactions) to the blockchain to attest to the obtaining of the data packet(s). E.g. the attestation transaction may include a hash of the target data. The attestation transaction(s) may comprise an output locked to the public key of the node (i.e. an intermediate node) in the chain that send the first encrypted message(s) to the requesting node. The requesting node may submit a single attestation transaction to the blockchain, or a respective attestation transaction may be submitted for each data packet, e.g. each transaction may include a hash of a respective data packet. Similarly, each intermediate node may submit to one or more respective attestation transactions (also referred to below as secondary request transactions) to the blockchain to attest to receiving the one or more encrypted messages from the previous node in the path. Additionally or alternatively, the target node may submit one or more attestation transactions to the blockchain to attest to the sending of the final encrypted messages to the node in the chain that is connected to the target node.

Figure 16 illustrates the process of sending the encrypted messages to the requesting node via an intermediate node. As shown, the target node encrypts multiple data packets to obtain multiple encrypted messages. The encrypted messages are sent, one at a time, to the intermediate node. The intermediate node submits an attestation transaction to the blockchain network in return for, or in order to, receive the encrypted messages. The encrypted messages are decrypted using the intermediate node's public key to reveal the first encrypted messages. The first encrypted messages are then sent to the requesting node, which attests to the receiving of the first encrypted messages. The first encrypted messages are decrypted to reveal the target data.

In some examples, the target node may encrypt the target data (or respective chunks of the target data) together with the first hash value to generate the first encrypted message(s). That is, each data packet (whether it be the target data as a whole or a chunk thereof) is combined with the first hash value before being encrypted with the requesting node's public key. When decrypting the first encrypted message(s), the requesting node may verify that the decrypted first hash value is the correct first hash value upon which the second hash value was based. In this way, the requesting node can be sure that the data packet(s) have been provided by the target node, since the target node had access to the first hash value, e.g. by hashing the data request.

7. INCENTIVISING DATA TRANSFER

Embodiments of the present disclosure provide a mechanism for incentivising data request and data transfer between nodes of a P2P network. As discussed above, a requesting node wishes to obtain target data from a target node, and sends a request for the data via one or more intermediate nodes.

The requesting node may generate a primary request transaction, as described in section 6.4.1, having one or more first outputs locked to respective public keys of one or more intermediate nodes. The requesting node may determine an amount of digital asset to be locked by each first output of the primary request transaction so as to incentivise the intermediate nodes to forward the data request. The amount of digital asset may be determined based on previous primary request transactions. The previous primary request transactions may be related to data requests from the requesting node and/or from different nodes (i.e. a node other than the requesting node) of the P2P network. The requesting node may gather a plurality of previous primary request transactions recorded on the blockchain 150. The requesting node may obtain one or more of the transactions directly from the blockchain 150, e.g. by querying a blockchain node 104. The requesting node may additionally or alternatively obtain one or more of the transactions from a different entity, such as a dedicated service provider.

Each previous primary request transaction was submitted to the blockchain by a respective P2P node and has one or more outputs locked to a respective public key of a respective P2P node. Each output locks an amount of the underlying digital asset of the blockchain, e.g. bitcoin. Each primary request transaction includes a hash of a data request. Each primary request transaction may comprise the network address of the P2P network. Each previous primary request transaction is associated with a respective timestamp. The timestamp may take any suitable form. The timestamp may indicate the time that the transaction was made, submitted to the blockchain network 106, or recorded on the blockchain. This allows the primary request transactions to be used for creating a regression model. For example, the timestamp may be Unixtime. In addition, each previous primary request transaction may be associated with a response time. The response time indicates the amount of time taken to respond to the request for data, where responding means the target node broadcasting the first hash of the data request. Whilst the response time may be determined by either the requesting node or by the service provider, it is likely to be set by the requesting node based on their preference or requirements, e.g. very fast response times.

Having obtained the plurality of previous request transactions, the requesting node computes a regression model based on the respective amounts, and the respective timestamps (each value and timestamp being associated with the same transaction). The model may be a linear regression model. An example model is shown in Figure 3. The requesting node then uses the regression model to determine a target amount to be locked by the first output. Here, the timestamp refers to a time in the future at which the requesting node will generate the primary request transaction, i.e. a future time at which the price is to be predicted. In some embodiments, having obtained the plurality of previous request transactions, the requesting node determines, for each transaction, a respective price-response value based on the amount of digital asset locked by the outputs of the transaction and the response time associated with the transaction. The price-response value may be computed as a multiplication of the amount and response time, or in other suitable ways.

In these embodiments, having computed the price-response values, the regression model is computed based on the respective price-response values, and the respective timestamps (each value and timestamp being associated with the same transaction). That is, from each transaction is determined a data pair comprising a respective price-response value and a respective timestamp, and those data pairs are used to compute the regression model. In these embodiments, the requesting node then uses the regression model to determine a target amount to be locked by the first output given a target response-time and a given timestamp. These embodiments are referred to as the "flooding reward" embodiments, whereby it is advantageous to incentivise data requests. This improves the speed of a data request reaching a target node. The response time is the time frame within which the target node has to identify itself as the holder of the target data, e.g. by broadcasting the "first hash".

The intermediate nodes may similarly determine the amounts to be locked by the output(s) of their respective secondary request transactions so as to incentivise the forwarding of the data request. A requirement for these amounts is that they are to be lower than the amounts locked by the output(s) of the primary request transaction, i.e. the amounts that those intermediate nodes are receiving.

In embodiments whereby a chain of nodes is formed from the requesting node to the target node, with the target node sending the (encrypted) data to the requesting node via each intermediate node in the chain, each intermediate node and the requesting node may determine the amount to lock by the output of each transaction (primary or secondary) using a similar method. For instance, each of the intermediate nodes and requesting node that performs the protocol described in section 6.4.2 may determine the amounts by computing a regression model. That is, the amounts may be determined by gathering previous transactions (primary or secondary, depending on the node), and computing a target amount based on a regression model computed using historical data. In these embodiments, the target amount may or may not be dependent on the response time of the previous transactions.

The intermediate node that is directly connected to the target node generates a first secondary request transaction. The amount of digital asset by the output that is locked to the public key of the target node is determined by computing a regression model based on similar transactions, i.e. transactions locked to the respective public key of respective target nodes (not necessarily the same target node). The next intermediate node in the chain (i.e. the intermediate node directly connected to the node that is connected to the target node, or in other words, the intermediate node two nodes from the target node) performs similar actions of computing a regression model based on similar transactions, i.e. transactions locked to the respective public key of respective intermediate nodes at the same position in the chain. However, the amount must be greater than the amount locked by the secondary request transaction locked to the public key of the target node. The intermediate node therefore chooses a larger amount than the amount determined by (i.e. paid by) the previous intermediate node.

This process continues along the chain until the requesting node has submitted a transaction to the blockchain network 106 with an output locked to the public key of the intermediate node in the chain directly connected to the requesting node. The requesting node computes a regression model based on other primary request transactions and determines a target amount to be locked by the output of the primary request transaction. The target amount must be larger than the amount locked by the output of the secondary request transaction generated by the immediately connected intermediate node.

8. EXAMPLE IMPLEMENTATION

The following provides further examples of the described embodiments. To add P2P data transfer incentives, nodes may attest each transfer on the blockchain using transactions which are then received by nodes involved in the transfer process. By using the blockchain network, an auditable trail of communications is created such that nodes that cheat may be held liable. Figure 10 offers a visualisation of the transfer between nodes and N 1 ± . Consider the source node N ± requesting data D from the P2P network and assume the sink node N k = N 1 1 2 owns the data. The requested data can be a file, network query or proof of identity for example. To transfer it from N k to N ± , there are two layers to the implementation:

• Incentivise P2P network flooding of data requests.

• Incentivise data distribution to the node requesting it.

Depending on the network, nodes can combine the two layers into a protocol that incentivises both request flooding and data distribution. It is assumed that each node has an associated public key through which it is uniquely identifiable in the P2P network.

8.1 Incentivising flooding reward protocol

As described above in section 6.4.1, node N ± sends a request R for data D stored at an unknown node on the network. To incentivise its adjacent nodes N 1 ± and N 1 2 to forward the request R in the network, node N ± may price this network communication, i.e., determine how much value to assign to each UTXO addressed to N 1 ± and N 1 2 . The pricing may be adapted based on a response time within which N ± requires the data from network nodes. For example, N ± may want to incentivise its adjacent nodes to answer requests in seconds.

The high-level pricing and flooding reward protocol is shown in Figure 11. The price estimation has three phases: data collection, model building and price prediction. The data collection steps that N ± executes are the following:

1. N ± records a data request R t at time t, an associated UTXO of value p t and response time 8 t from one of the network nodes.

2. N ± computes p t = p t x 6 t . The value p t links prices with response times. 3. repeats Step 1 and 2 in order to compute multiple values p t corresponding to requests R t at different times t.

Once enough data has been collected, N ± creates the model. Data collection should continue to be executed in the background by N ± so that the model is updated accordingly.

4. N ± creates a regression model as we have seen in Section 2.1 of the data inputs from Steps 1 to 3 (with y t set to be p t ).

Using the model, N ± can predict an appropriate price that it can pay its adjacent nodes to forward the request.

5. N ± now computes the predicted price from the regression model at current time t':

Pt' = Pt' / 5 t' -

Note that if N ± wants a faster response time, then they are expect to offer a higher reward. When N ± forwards the request to its adjacent nodes N 1 ± and N 1 2 , the nodes will forward the request to their own adjacent nodes with a lower response time <5 t „ < 6 tl . However, since they are not the initiators of the request the prices p t „ offered by N 1 ± and N 12 do not scale with <5 t „ and are lower than p tl . Indeed if p t „ were to scale, then it might be bigger than p tl , leading to a loss for N 1 ± and N 1 2 .

Figure 12 illustrates an example sequence for requesting and obtaining data. The steps of the flooding reward protocol are as follows.

Off-chain steps:

1. N ± creates transaction Tx instant -N 1 (Figure 13). This is not relayed to the network.

2. Node N ± generates and sends the request message (shown in the left-hand box below) to its adjacent nodes N 1A and N 1 2 . In particular, the message contains data such as: • Payment amount p t , is given to each node and is computed using the Price Estimation protocol above.

• The signature Sig Ni -inst extracted from Tx instant: -N 1 .

• The outpoint TxID_N 1 \ \o of Tx^^-N^ • The signature Sig Ni over all the information in the request message. N 1A and N 1 2 do not receive transaction Tx instant -N 1 at this stage and they cannot create it because they cannot compute H 0 (R). 3. Step 1 repeats with N ltl and N 1 2 sending request messages to their adjacent nodes. For example, N 1 ± sends the message (shown in the right-hand side box above) to N 1 1 1 and N 1 1 2 . The information in the message may include:

• The response time 8 t " < 8g.

• The payment amount p t „ < pg.

• The signature Sig Ni i -inst extracted from Tx^^^-N^ (Figure 14).

Win do not receive transaction Tx instant: -N 1 1 at this stage. While N 1 ± has knowledge of Wi(W 0 (/?)), the nodes N 1 1 1 and N 1 1 2 only have knowledge of H 2 at this stage and therefore they cannot create T%i nstant -Wi

4. The node that stores data D broadcasts W o (/?) to the P2P network.

Note that the communication between nodes in Step 2 and 3 has to be encrypted, otherwise nodes can listen on each other's message. For example, N 1 11 could learn the hashed request H 1 (W 0 (/?)) by listening on the communication between N ± and its adjacent nodes.

Broadcasting of transactions to the Bitcoin network:

5- If W111 an d W112 receive the value W o (/?) before the response time Sgg they compute Wi(W 0 (/?)) and create transaction Tx^t^-N^.

Similarly, the adjacent nodes of W i 2 receive the value W o (/?) and create a transaction T % instant "^1,2 ■

6. Win an d Wi i 2 broadcast Tx instant: -N 1 1 to the Bitcoin network.

7. If Wi i and N 12 receive the value W o (/?) before the response time 8g, they create transaction Tx instant: -N 1 .

8. Wi i and N 12 broadcast Tx instant -N 1 to the Bitcoin network. The protocol does not prevent sending a refund transaction before the response time

6 t ', cancelling the request. This invalidates the payment for N 1 ± and N 1 2 . In this case by having nodes listen to the blockchain, they see that N ± cancelled the request. Consequently N 1 ± and N 12 send their own refund transactions.

N ± can be made liable if it cheats by, for example, sending a request message that refers to an inexistent outpoint. Given a request message such as shown above, its validity depends on:

1. the validity of the signature Sig Ni create using the message,

2. whether the UTXO corresponding to the outpoint TXID NI \ \O exists on the blockchain, and

3. whether the UTXO has enough value to cover the payment for the two nodes N 1 ± and N 1 2 .

If these checks fail, then node N ± has cheated and can be made liable.

8.2 Incentivising chain rewards protocol

Let's assume the data propagation chain N k -> N k-± -> ••• -> N 2 -> N ± , where N k is sending data D to the source node N ± , e.g. as described in section 6.4.2 above. To do so, N k sends the data to N k-± requesting a reward of z BSV. To propagate the data D further along the chain, N k-± sends the data to N k-2 for a reward of z + w BSV. This process repeats with each Ni adding a propagation fee and forwarding the data until it reaches N ± .

We exemplify the reward process by considering the following chain of propagation:

N 4 -+ N 3 -+ N 2 -+ N1_ in which node N 4 propagates the required data D to node N ± . The data is split into data packets that are sent one by one through the chain to node N ± . The payment steps for each data packet are the following:

1. Node N 3 estimates the price z expected by N 4 using the regression model in Section 2.1. Thus, node N 3 pays z BSV to node N 4 for the data D: 2. In order to further propagate the data, node N 2 predicts a price w ± using the regression model in Section 2.1. N 2 offers N 3 a payment of z + w ± BSV.

3. Node N ± predicts a price w 2 to pay node N 2 using the regression model in Section 2.1. N ± offers N 2 a payment of z + w 4 + w 2 BSV. This leads to the following reward chain:

Thus, node N 4 pays for the whole propagation, as expected.

9. FURTHER REMARKS

Other variants or use cases of the disclosed techniques may become apparent to the person skilled in the art once given the disclosure herein. The scope of the disclosure is not limited by the described embodiments but only by the accompanying claims.

For instance, some embodiments above have been described in terms of a bitcoin network 106, bitcoin blockchain 150 and bitcoin nodes 104. However it will be appreciated that the bitcoin blockchain is one particular example of a blockchain 150 and the above description may apply generally to any blockchain. That is, the present invention is in by no way limited to the bitcoin blockchain. More generally, any reference above to bitcoin network 106, bitcoin blockchain 150 and bitcoin nodes 104 may be replaced with reference to a blockchain network 106, blockchain 150 and blockchain node 104 respectively. The blockchain, blockchain network and/or blockchain nodes may share some or all of the described properties of the bitcoin blockchain 150, bitcoin network 106 and bitcoin nodes 104 as described above.

In preferred embodiments of the invention, the blockchain network 106 is the bitcoin network and bitcoin nodes 104 perform at least all of the described functions of creating, publishing, propagating and storing blocks 151 of the blockchain 150. It is not excluded that there may be other network entities (or network elements) that only perform one or some but not all of these functions. That is, a network entity may perform the function of propagating and/or storing blocks without creating and publishing blocks (recall that these entities are not considered nodes of the preferred bitcoin network 106).

In other embodiments of the invention, the blockchain network 106 may not be the bitcoin network. In these embodiments, it is not excluded that a node may perform at least one or some but not all of the functions of creating, publishing, propagating and storing blocks 151 of the blockchain 150. For instance, on those other blockchain networks a "node" may be used to refer to a network entity that is configured to create and publish blocks 151 but not store and/or propagate those blocks 151 to other nodes.

Even more generally, any reference to the term "bitcoin node" 104 above may be replaced with the term "network entity" or "network element", wherein such an entity/element is configured to perform some or all of the roles of creating, publishing, propagating and storing blocks. The functions of such a network entity/element may be implemented in hardware in the same way described above with reference to a blockchain node 104.

It will be appreciated that the above embodiments have been described by way of example only. More generally there may be provided a method, apparatus or program in accordance with any one or more of the following Statements.

Statement 1. A computer-implemented method of using a blockchain to incentivise data transfer between peer-to-peer, P2P, nodes of a P2P network, wherein the P2P network is associated with a network address and comprises a plurality of P2P nodes, wherein each of the plurality of P2P nodes is associated with a respective public key, wherein a target one of the P2P nodes has access to a target data item, and wherein the method is performed by a first P2P node and comprises: obtaining a plurality of respective request transactions, each respective request transaction comprising a respective first output locked to the respective public key of a respective P2P node, wherein the respective first output locks a respective amount of a digital asset, wherein each respective request transaction comprises a respective hash value generated by hashing a respective data request one or more times, the data request being associated with a respective data item, and wherein each respective request transaction is associated with a respective timestamp; computing a regression model based on at least the respective amount and the respective timestamp of each respective request transaction; using the regression model to determine a target amount; generating a target request transaction, wherein the target request transaction comprises a first output locked to the respective public key of a respective P2P node, wherein the first output locks the target amount of the digital asset, and wherein the target request transaction comprises a target hash value generated by hashing a target data request one or more times, the target data request being associated with the target data item.

Statement 2. The method of statement 1, wherein said obtaining comprises obtaining at least some of the plurality of respective request transactions from the blockchain.

Statement 3. The method of statement 1 or statement 2, wherein said obtaining comprises receiving at least some of the plurality of respective request transactions from a service provider.

Statement 4. The method of any preceding statement, wherein the regression model is a linear regression model.

Statement 5. The method of any of statements 1 to 4, wherein a chain of P2P nodes is formed between the requesting P2P node and the target P2P node, each P2P node in the chain being connected to a previous P2P node in the chain and/or a next P2P node in the chain, and wherein the target P2P node is configured to send the target data, in encrypted form, along the chain towards the requesting P2P node, and wherein each P2P node in the chain other than the target P2P node is configured to send a respective transaction to the next P2P node in the chain in return for receiving the encrypted target data. Statement 6. The method of any of statements 1 to 4, wherein the first P2P node is a requesting P2P node, and wherein the requesting P2P node is a generator of the data request.

Statement 7. The method of statement 5 and statement 6, wherein the target amount is also based on the respective amounts locked by the respective transactions sent by the other P2P nodes in the chain, and wherein the method comprises causing the target request transaction to be submitted to one or more blockchain nodes of a blockchain network to be recorded on the blockchain.

Statement 8. The method of any of statements 1 to 4, wherein the first P2P node is an intermediate P2P node, and wherein the data request is generated by a requesting P2P node.

Statement 9. The method of statement 5 and statement 8, wherein the intermediate P2P node is the initial P2P node in the chain to send a respective transaction to the target P2P node, and wherein the method comprises: causing the target request transaction to be submitted to one or more blockchain nodes of a blockchain network to be recorded on the blockchain; receiving the encrypted target data from the target P2P node; and sending the encrypted target data to the next P2P node in the chain towards the requesting P2P node.

Statement 10. The method of any of statements 1 to 4, or statement 6 or statement 8, wherein each respective request transaction is associated with a respective response time, the respective response time indicating a time taken for the respective P2P node to respond to the respective request transaction, and wherein the method comprises: for each of the plurality of respective request transactions, computing a respective price-response value based on the respective amount of the digital asset and the respective response time, and wherein the regression model is based on the respective price-response values, and wherein the target amount is determined using the regression model given a target response time.

Statement 11. The method of statement 10, wherein the target request transaction is a primary request transaction, wherein the target hash value is a first hash value generating by hashing the target data request with a first hash function, and wherein the primary request transaction comprises at least one input referencing a first unspent transaction output controlled by the requesting P2P node, and one or more first outputs, each first output being locked to a respective public key associated with a respective intermediate P2P node connected to the requesting P2P node; and wherein the method comprises: sending a primary request message to at least one respective intermediate P2P node connected to the requesting P2P node, wherein the primary request message comprises a first signature over the primary request transaction and for unlocking the first unspent transaction output, a reference to the first unspent transaction output, and the second hash value; wherein each respective intermediate P2P node is configured to i) generate a respective secondary request transaction , wherein the respective secondary request transaction comprises the second hash value, a respective input referencing a respective unspent transaction output controlled by the respective intermediate P2P node, and one or more first outputs, each first output being locked to a respective public key associated with a respective intermediate P2P node connected to the respective intermediate P2P node, and ii) send a secondary request message to at least one respective intermediate P2P node connected to the respective intermediate P2P node, wherein the secondary request message comprises a respective signature for unlocking the respective unspent transaction output, a respective reference to the respective unspent transaction output, and a third hash value generated by hashing the second hash value with a third hash function, wherein a process of respective P2P nodes generating respective secondary request transactions and sending respective secondary request message to respective intermediate P2P nodes continues at least until a respective secondary request message is sent to the target P2P node, and wherein the method further comprises: obtaining the target data item from the target P2P node. Statement 12. The method of statement 11, wherein the primary request message comprises a second signature over the primary request message, and wherein the first signature and second signature correspond to the same public key.

Statement 13. The method of statement 10 or statement 11, wherein the primary request message is encrypted such that only the respective intermediate P2P nodes to which the primary request message is sent can decrypt the encrypted primary request message.

For example, the primary request message sent to the respective intermediate P2P node may be encrypted with a respective public key associated with that respective intermediate P2P node.

Statement 14. The method of statement 11 or any statement dependent thereon, wherein said obtaining of the target data item from the target P2P node comprises receiving the target data item directly from the target P2P node.

Statement 15. The method of statement 11 or any statement dependent thereon, wherein the target P2P node is configured to submit a data transaction to the blockchain network, the data transaction comprising the target data item or an encrypted version thereof, and wherein said obtaining of the target data item from the target P2P node comprises obtaining the target data item from the data transaction.

Statement 16. The method of statement 11 or any statement dependent thereon, wherein the primary request transaction comprises a respective identifier associated with the requesting P2P node and/or a network address of the P2P network.

The network identifier may be an IP address.

Statement 17. The method of statement 11 or any statement dependent thereon, wherein the primary request message comprises a respective public key of the respective intermediate P2P nodes. Statement 18. The method of statement 6 or any statement dependent thereon, wherein the first and second hash functions are the same hash function.

Statement 19. The method of any of statements 11 to 17, wherein the first and second hash functions are different hash functions.

Statement 20. The method of statement 11 or any statement dependent thereon, wherein the first hash function is a cryptographic hash function and/or the second hash function is a cryptographic hash function.

Statement 21. The method of statement 11 or any statement dependent thereon, wherein the data request is based on a hash of the target data item.

Statement 22. The method of statement 8 and statement 10, comprising: receiving a primary request message from a requesting P2P node, wherein the primary request message comprises a third signature over a primary request transaction and for unlocking a first unspent transaction output controlled by the requesting P2P node, a reference to the first unspent transaction output, and a second hash value, wherein the second hash value is generated by hashing at least the target data request with a first hash function to generate a first hash value and then hashing at least the first hash value with a second hash function to obtain the second hash value; wherein the target request transaction is a secondary request transaction , wherein the target hash value is the second hash value, and wherein he secondary request transaction comprises a respective input referencing a respective unspent transaction output controlled by the first intermediate P2P node, and one or more first outputs, each first output being locked to a respective public key associated with a respective intermediate P2P node connected to the first intermediate P2P node; and wherein the method further comprises: sending a secondary request message to at least one respective intermediate P2P node connected to the first intermediate P2P node, wherein the secondary request message comprises a respective signature over the secondary request transaction and for unlocking the respective unspent transaction output, a respective reference to the respective unspent transaction output, and a third hash value generated by hashing the second hash value with a third hash function.

Statement 23. The method of statement 22, comprising: obtaining the first hash value; generating the primary request transaction, wherein the primary request transaction comprises the first hash value, at least one input referencing the first unspent transaction output controlled by the requesting P2P node, and one or more first outputs, wherein at least one of the first outputs is locked to a respective public key of the first intermediate P2P node, and wherein the first input comprises the first signature extracted from the primary request message; and submitting the primary request transaction to one or more nodes of a blockchain network.

Statement 24. The method of statement 22 or statement 23, wherein the secondary request message comprises a fourth signature over the secondary request message, and wherein the third signature and the fourth signature correspond to the same public key.

Statement 25. The method of any of statements 22 to 24, wherein the secondary request message is encrypted such that only the respective intermediate P2P nodes to which the secondary request message is sent can decrypt the encrypted primary request message.

Statement 26. The method of any of statements 22 to 25, wherein the secondary request message comprises a respective public key of the respective intermediate P2P nodes.

Statement 27. Computer equipment comprising: memory comprising one or more memory units; and processing apparatus comprising one or more processing units, wherein the memory stores code arranged to run on the processing apparatus, the code being configured so as when on the processing apparatus to perform the method of any of statements 1 to 26. Statement 28. A computer program embodied on computer-readable storage and configured so as, when run on one or more processors, to perform the method of any of statements 1 to 26. According to another aspect disclosed herein, there may be provided a method comprising the actions of the requesting P2P node and the target P2P node.

According to another aspect disclosed herein, there may be provided a system comprising the computer equipment of the requesting P2P node and the target P2P node.