Streaming portion of data over side channel

The proposed method for streaming data on a per-portion basis using a side channel in blockchain systems addresses network congestion and blockchain bloat by allowing a single transaction pair to manage data streaming, ensuring secure payment without funding transactions.

JP2024149595AInactive Publication Date: 2024-10-18NCHAIN LICENSING AG
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2024124486
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-05-24
Filing Date
2024-07-31
Publication Date
2024-10-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing methods for micropayment channels in blockchain systems require each individual transaction for data streaming to be broadcast to the network, leading to network congestion and blockchain bloat with many small transactions, and often necessitate funding transactions.

Method used

A mechanism for streaming data on a per-portion basis, allowing a single pair of transactions to be sent to the network, with the ability for either party to stop streaming or payment at any time, using a side channel to manage transactions and ensure only one valid instance is recorded on the blockchain.

Benefits of technology

Reduces network congestion and blockchain bloat by minimizing the number of transactions, eliminates the need for funding transactions, and ensures secure payment for streamed data without premature channel closure issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024149595000001_ABST
    Figure 2024149595000001_ABST
Patent Text Reader

Abstract

To provide a method for recording a target transaction in a blockchain.SOLUTION: A method comprises: streaming a sequence of data portions to a first party over a side channel; and in response to each data portion, receiving back over the side channel an instance of a first transaction from the first party. The target transaction comprises an input pointing to an output of the first transaction, and the target transaction comprises an output specifying the amount of digital assets to be transferred from the output of the first transaction to a second party, the amount increasing in each successive instance of the target transaction. The method comprises causing the latest instance of the first transaction and a corresponding version of the target transaction to be propagated through a network and recorded in a blockchain.SELECTED DRAWING: Figure 7
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to streaming and exchanging data over "off-chain" side channels in the context of blockchain-based systems. [Background technology]

[0002] Blockchain refers to a form of distributed data structure in which a duplicate copy of the blockchain is held at each of multiple nodes in a peer-to-peer (P2P) network. A blockchain has a chain of blocks of data, with each block having one or more transactions. Each transaction may in turn point to previous transactions. Transactions may be submitted to the network for inclusion in a new block by a process known as "mining." Mining involves each of multiple mining nodes competing to perform a "proof of work," i.e., solving a cryptographic puzzle based on a pool of pending transactions waiting to be included in a block.

[0003] Traditionally, transactions in a blockchain are used to carry digital assets, i.e. data that acts as a store of value. However, blockchains may also be used to layer additional functionality on top of the blockchain. For example, blockchain protocols may allow for the storage of additional user data in the output of a transaction. Modern blockchains increase the maximum amount of data that can be stored within a single transaction, allowing more complex data to be incorporated. For example, this could be used to store electronic documents or even audio or video data on the blockchain.

[0004] Each node in the network can have any one, two, or all of the three roles: forwarding, mining, and storing. Forwarding nodes each propagate (valid) transactions to one or more other nodes, thus propagating transactions among themselves across the nodes of the network. Mining nodes each compete to mine transactions into blocks. Storage nodes each store their own copies of the mined blocks of the blockchain. To record a transaction in the blockchain, a party sends and propagates the transaction to one of the nodes of the network. Mining nodes that receive a transaction can compete to mine the transaction into a new block. Each node is configured to respect the same node protocol, which includes one or more conditions for a transaction to be valid. Invalid transactions are not propagated or mined into a block. Assuming the transaction is validated and thereby accepted onto the blockchain, the additional user data thus remains stored at each of the nodes in the P2P network as an immutable public record.

[0005] Miners who successfully solve the proof-of-work puzzle and generate an updated block are usually rewarded with a transaction called a "generation transaction" that generates a new amount of digital assets. The transaction may also optionally specify an extra mining fee for successful miners. Because miners require a large amount of computational resources to mine a block, and because blocks containing double-spending attempts may not be accepted by other nodes, proof-of-work incentivizes miners not to cheat the system by including double-spending transactions in their blocks.

[0006] In an “output-based” model (sometimes called a UTXO-based model), the data structure for a given transaction has one or more inputs and one or more outputs. Every spendable output has an element, sometimes called a UTXO (for “Unspent Transaction Output”), that specifies an amount of digital assets. The output may further have a locking script that specifies the conditions under which the output should be redeemed. Each input has a pointer to such an output in a previous transaction, and may further have an unlocking script that unlocks the locking script of the pointed-to output. Thus, consider a pair of transactions, call them a first transaction and a second transaction (or “target” transaction). The first transaction has at least one output that specifies an amount of digital assets and has a locking script that defines one or more conditions for unlocking the output. The second, target transaction has at least one input that has a pointer to an output of the first transaction and an unlocking script that unlocks the output of the first transaction.

[0007] In such a model, when a second, target transaction is sent to the P2P network to be propagated and recorded in the blockchain, one of the conditions for validity applied at each node is that the unlocking script satisfies the requirements defined in the locking script of the first transaction. Another condition for the target transaction to be valid is that the output of the first transaction has not already been redeemed by another valid transaction. Any node that determines the target transaction is invalid according to any of these conditions will neither propagate it for recording in the blockchain nor include it for mining in a block.

[0008] For example, suppose a target transaction is to carry an amount of digital assets from a first party ("Alice") to a second party ("Bob"). One of the requirements defined in the locking script of the preceding first transaction is usually that the unlocking script of the target transaction contains a cryptographic signature of Alice. The signature should be generated by Alice signing part of the target transaction.

[0009] It is also known to form side channels, sometimes called "payment channels", to exchange transactions between parties "off-chain" before the transactions are broadcast to the P2P network to be recorded on the blockchain. Side channels are separate from the P2P overlay network, and therefore any transaction sent on a side channel is not (yet) propagated across the network for recording on the blockchain until one of the parties chooses to publish it to the network. A typical payment channel requires a "funding transaction", whereby both parties effectively escrow their funds together. The funding transaction is broadcast to set up the channel, and then, once the service in question has been provided, a settlement transaction is broadcast to close the channel, using the funding transaction.

[0010] There are also several existing proposals for "micropayment channels", i.e., for sending a sequence of transactions from one party ("Alice") to Bob to pay another party ("Bob") in small installments. This does not require funding transactions. At least one existing proposal is to use a side channel to stream movie data in packets. Bob sends a sequence of packets of data to Alice, and in response to each packet, Alice returns a respective transaction. Bob then broadcasts it to the network and gets payment for each packet of the movie. Summary of the Invention

[0011] However, a problem with existing proposals for micropayment channels is that each individual transaction requires that for each individual piece of data that Bob sends to Alice (e.g., each packet of a movie) be broadcast to the P2P network and recorded on the blockchain. This creates more network traffic and bloats the blockchain with many small transactions. It is desirable to provide a mechanism that avoids flooding the network and bloating the chain with many small individual transactions, while avoiding the need for funding transactions.

[0012] The present disclosure provides a mechanism that allows for streaming of data in portions and payment for each portion of the streamed data while requiring only a pair of transactions to actually be sent to the network and recorded in the blockchain, regardless of the number of data portions in a sequence (e.g., anything from three or more to hundreds or thousands of portions in a sequence). A first receiving party ("Alice") can stop streaming data from a second sending party ("Bob") at any time, and Bob can still obtain payment for the portion of data streamed so far based solely on the publication of a pair of transactions to the network. Conversely, Bob can stop sending portions of data at any time, and Alice will simply enable Bob to obtain payment for the portion of data sent so far.

[0013] To this end, according to one aspect disclosed herein, there is provided a method of recording a target transaction in a copy of a blockchain maintained at each of at least a portion of a network of nodes, the method comprising the following operations executed by a computing device of a second party: forming a side channel between a first party and the second party, separate from the network; streaming a sequence of successive data portions over the side channel to the first party, up to a most recent data portion in the sequence; and receiving from the first party on the side channel, in response to each of the data portions, a respective distinct instance of a first transaction. The target transaction has an input including a pointer to a first output of the first transaction, the target transaction further having an output specifying an amount of the digital asset to be transferred from the first output of the first transaction to the second party, the amount increasing with each successive instance of the target transaction. The method further comprises causing a latest instance of the first transaction and a corresponding version of the target transaction to be propagated through the network and recorded in the blockchain, wherein the pointer in the corresponding version of the target transaction in turn points to the first output in the latest instance of the first transaction.

[0014] Two (or more) transactions may be said herein to be instances of (substantially) the same transaction if they both contain an input that references the same output (e.g., UTXO) of the same source transaction (or the “0th” transaction). They may redeem that input based on satisfying the same unlocking condition. They may, however, contain different input signatures (e.g., the signed messages in both instances are non-identical). The different instances may provide substantially the same functionality, but with different and augmented amounts of data portions of each. Some embodiments described below may also allow for different possible versions of a target transaction. Two transactions may be said to be versions of (substantially) the same transaction if they both contain an input that references the same output (e.g., the same UTXO) of the first transaction (regardless of instance). The different versions may provide different functionality by satisfying different unlocking conditions of that output. The different versions may also both contain the same input signatures (i.e., the signed messages in both instances are identical).

[0015] For each of the multiple transactions, including the target transaction, at least some nodes of the network are configured to propagate each transaction provided that the transaction is valid, and at least some nodes are configured to record each transaction in its copy of the blockchain provided that the transaction is valid. For example, the target transaction is typically conditioned on an unlocking script unlocking the output of the first transaction. However, each node in the network is also configured such that once one of the instances is validated at any given node, then other instances are not propagated by the node or recorded in the blockchain, as they are considered invalid by that node. Also, once one version of the target transaction is validated at a given node, then any other versions of the target transaction are not propagated by the node or recorded in the blockchain, as they are considered invalid by that node.

[0016] The first transaction instances (e.g., call them Tx1, Tx2, Tx3, ...) are effectively considered by each node in the network as instances of the same transaction, since each instance has an input that points to the same output of the same predecessor source transaction (or the "zeroth" transaction, denoted as Tx0 in the following examples). This means that as soon as one instance of the first transaction (e.g., one of Tx1, Tx2, ...) is mined, then the output of the source transaction (e.g., Tx0) is consumed, and therefore cannot be consumed by any other instance. Thus, only one instance can be recorded in the blockchain. Furthermore, it is possible that one of the first transaction instances may be mined at any given node, regardless of the version of the target transaction (e.g., Tx p or Tx pIf a first transaction is found to be validly cleared by a staking node, then any further target transactions that attempt to clear any instance of the first transaction will be considered invalid by that node and therefore will not be propagated by that node or recorded in the blockchain.

[0017] Any version of the target transaction (e.g., Tx p or Tx p When a version of the first transaction (Tx1, Tx2, Tx3, ...) is broadcast on the P2P network and detected at a given node as validly pointing to the first output of a particular instance of the first transaction (different instances defining different quantities), this means that only one target transaction can validly settle the output, and that the output cannot be settled again by any further versions. That is, if one of the instances of the first transaction (Tx1, Tx2, Tx3, ...) is found at a given node to be validly pointing to the first output of a particular instance of the first transaction (different instances defining different quantities), then the output cannot be settled again by any further versions. p or Tx p Once it is found that the last or most recent instance of the first transaction Tx ' is validly settled, then any further target transactions that attempt to settle any instance of the first transaction are considered invalid and therefore are not propagated by that node or recorded in the blockchain. Nevertheless, since the payment in each instance also increases with each piece of data exchanged, all the second party ("Bob") has to do is settle the last or most recent instance of the first transaction Tx n The version of the target transaction to settle (e.g., Tx p ') to be propagated and recorded on the blockchain. He then receives full payment for all pieces of data sent up to that point based on a single transaction pair.

[0018] If at any point Alice stops sending an instance of the first transaction (Tx1, Tx2, Tx3, ...) before the end of the sequence, Bob will stop sending further data portions to Alice and will need to update the target transaction version (e.g., Tx p ) to the network (thus losing only the most recently sent data portion). Conversely, if at any time Bob stops sending data portions, Alice can send a further instance of the first transaction Tx i , and Bob now only has the ability to settle payments for the portion of data Alice has received so far.

[0019] In any particular implementation, the method may include the second party receiving the first transaction from the first party on the side channel, the first transaction having one or more first inputs specifying an input amount, the first output of the first transaction specifying a first payment, the first transaction further having one or more further outputs specifying one or more further payments such that a sum of payments is more than the input amount, and the first transaction received by the second party from the first party has no other inputs to make up the difference. For example, the further outputs may include a second output specifying a second payment to the first party equal to the input amount minus the first payment, and a third output specifying a third payment to the second party equal to the second payment. The nodes of the network reject the first transaction as invalid if the first transaction specifies a total payment that is more than the total input amount. In such an embodiment, the method includes the second party adding a second input to a latest or latest instance of the first transaction to make up the difference, and transmitting the first transaction with the added second input for propagation through the network and recording to the blockchain.

[0020] This prevents a first party ("Alice") from cheating the system by sending her own target transaction to settle one of the earlier instances, thus preventing Bob from settling one of the later instances (or, indeed, any of the instances). This is because to do so, Alice would need to add an extra input that would cost her more of her digital assets. Thus, it is not worth it for Alice to try to cheat the system.

[0021] In a further optional embodiment, the first output of at least a last instance of the first transaction may include a locking script that specifies multiple alternative conditions for unlocking the first output of the first transaction, including at least a first condition and a second condition, and the input of the target transaction may include an unlocking script, wherein in the corresponding version of the target transaction that is propagated through the network and sent to be recorded in the blockchain, the locking script is configured to unlock the first output of the first transaction based on satisfying a second one of the alternative conditions but not the first one.

[0022] An output of each instance of the first transaction may have the locking script specifying the multiple alternative conditions, in which case the method may include providing functionality to enable a currently received instance of the first transaction prior to a last instance and a first version of the target transaction pointing to the current instance to be propagated through the network and recorded to the blockchain, wherein the locking script in the first version is configured to unlock the first output of the first transaction based on satisfying the first condition.

[0023] For example, the functionality may provide the second party at any point in the sequence with an option to manually select to have the currently received instance of the first transaction and the first version of the target transaction propagated through the network and recorded on the blockchain. Alternatively, or additionally, the functionality may be configured to automatically cause the current instance of the first transaction and the first version of the target transaction to be propagated through the network and recorded on the blockchain if the first party stops sending instances of the first transaction through the sequence.

[0024] The validity of the target transaction is contingent on the unlocking script unlocking the output of the first transaction according to any one of the conditions above, but once one of the versions has been validated at any given node, the other version will be considered invalid at that node and will therefore not be propagated by that node or recorded in the blockchain at that node.

[0025] Thus, the second party ("Bob") does not send both versions to be propagated and recorded on the blockchain, since neither version can validly settle the first transaction. He sends the second version to be propagated and recorded, based on satisfying the second condition, which is his preference. However, the fact that the first version existed gives him a fallback that the first version was recorded if the necessary condition for the second version is not satisfied. For example, the first condition may require that the data payload be included in the unlocking script of the target transaction, which would penalize Bob (e.g., because mining fees are proportional to the data size and / or because the data is proprietary to Bob and putting it on the blockchain would make it public). On the other hand, the second condition may require Alice's signature, thus requiring her approval.

[0026] According to a further aspect disclosed herein, there is provided a program for performing the method and / or a second party computing device programmed to perform the method.

[0027] To aid in the understanding of embodiments of the present disclosure and to show how such embodiments may be embodied, reference will now be made, by way of example only, to the accompanying drawings in which: [Brief description of the drawings]

[0028] [Figure 1] FIG. 1 is a simplified block diagram of a system implementing a blockchain. [Diagram 2] 1 illustrates diagrammatically some examples of transactions that may be recorded on a blockchain. [Diagram 3] FIG. 1 is a simplified block diagram of another system implementing a blockchain. [Figure 4] FIG. 2 is a schematic block diagram of a client application. [Diagram 5]5 is a schematic mockup of an example of a user interface that may be presented by the client application of FIG. 4. [Figure 6] FIG. 2 is a schematic diagram of a set of transactions. [Figure 7] 1 is a signaling chart illustrating a method for streaming data. [Figure 8] 8 is a graph illustrating input and output values ​​of an instance of a first transaction in an embodiment of the method of FIG. 7. [Figure 9] 8 is an example of a transaction format for a first transaction in the method of FIG. 7. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0029] As mentioned, there are several existing proposals for payment and micropayment channels, but they all require that an individual transaction be published on the P2P network and recorded on the blockchain for each increment in the payment (i.e., in the case of streaming, for each piece of data sent). This consumes network congestion on the P2P network and also bloats the blockchain with many transactions for small micropayments.

[0030] This disclosure instead provides a mechanism for Alice to send back to Bob, over the side channel, a different instance of a given transaction, each time with an increasing payment, in response to each piece of data received from Bob, and Bob can claim payment on only one of the instances of this transaction.

[0031] Furthermore, most of the existing protocols require funding transactions to establish trust. Any premature closure of a payment channel will cause funds to be locked for a period of time. Alternatively, they require a change in the consensus rules, i.e., introducing new opcodes that may compromise the stability of the protocol. Some others have expirations. However, combined with the overhead in the channel setup process, expirations become an undesirable property.

[0032] The embodiments disclosed herein provide the option of not having a funding transaction to set up a payment channel. Instead, participants can join and leave channels as they wish. The disclosed techniques can also be implemented with existing transaction and node protocols.

[0033] Embodiments may utilize the concept of malleability. Malleability refers to the ability to change at least a portion of a transaction without invalidating the transaction as a whole. Any signatures in a transaction that are signed with a related form of cryptographic signature (e.g., ECDSA signature) are not subject to the possibility of malleation.

[0034] For example, suppose the target transaction is to carry an amount of digital assets from a first party ("Alice") to a second party ("Bob"). One of the conditions defined in the locking script of the preceding first transaction is typically that the unlocking script of the target transaction contains a cryptographic signature of Alice. The signature must be generated by Alice signing a portion of the target transaction. Which portion this is may be flexibly defined by the locking script or may be an inherent feature of the node protocol, depending on the protocol being used. Nevertheless, the portion that is signed typically excludes other portions of the target transaction, e.g., some or all of the unlocking script itself.

[0035] This introduces the possibility of “malleability”: that is, parts of the target transaction that are not signed before mining can be “malleated” without invalidating the transaction. Malleability is a concept commonly known in cryptography, where it is usually viewed as a security concern where a message can be maliciously altered and still be accepted as authentic. In the blockchain concept, malleability is not necessarily a problem, but is simply known as an intriguing artifact where certain parts of a transaction can be altered without invalidating it. Any security concerns related to malleability are instead caused by improper implementations and not the protocol itself.

[0036] The embodiments disclosed herein optionally use malleability as a useful feature to facilitate fast, secure, and reliable payment channels. The idea is to identify which one or more parts in a transaction are not or should not be signed (e.g., by an ECDSA signature). The disclosed scheme takes advantage of the fact that any content in the unlocking script (e.g., the "scriptSig" field) of each input of a transaction is not signed by any signature. The embodiments may also take advantage of the SIGHASH flag to allow further flexibility to modify a transaction without invalidating it.

[0037] Here's an example: When exchanging data on a blockchain, one common method is to use a hash puzzle to ensure that data is published and a payment is received at the same time. To avoid this, transactions can be constructed such that a payment is solicited under one of two conditions: i) providing the data + Bob's signature, or ii) providing Alice's signature + Bob's signature.

[0038] Bob claims funds by providing the data and his signature and constructs a transaction to send it to Alice. Alice then replaces the data with her signature and broadcasts the transaction to the network. Alternatively, Bob obtains Alice's signature and replaces the data with it and broadcasts it to the network. In either case, since the data is not part of the message signed by Bob's signature, replacing it with Alice's signature does not invalidate the transaction. Furthermore, the transaction is still valid in that the inputs satisfy condition ii). If Alice does not broadcast the transaction to the network or does not provide a signature, Bob still has the option of broadcasting the original transaction to claim funds based on condition i) (this is less desirable since it would require Bob to upload data that may be large and / or proprietary). Alice may be prompted to provide her signature by approval requirements or discount incentives or to reward Bob for a well-performed service.

[0039] [System Overview] FIG. 1 illustrates an example system 100 for implementing a blockchain 150. The system 100 includes a packet-switched network 101, typically a wide area internetwork such as the Internet. The packet-switched network 101 includes a plurality of nodes 104 arranged to form a peer-to-peer (P2P) overlay network 106 within the packet-switched network 101. Each node 104 includes a peer's computing equipment, with different ones of the nodes 104 belonging to different peers. Each node 104 includes a processing unit having 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). Each node 104 also includes memory, i.e., computer-readable storage in the form of one or more non-transitory computer-readable media. The memory may include one or more memory units using one or more memory media, for example, 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.

[0040] The blockchain 150 comprises a chain of blocks 151 of data, each copy of which is held at each of the multiple nodes in the P2P network 106. Each block 151 in the chain comprises one or more transactions 152, where a transaction in this context refers to a type of data structure. The nature of the data structure depends on the type of transaction protocol used as part of the transaction model or scheme. A given blockchain typically uses one particular transaction protocol throughout. In one common type of transaction protocol, the data structure of each transaction 152 has at least one input and at least one output. Each output specifies an amount that represents the amount of digital assets belonging to the user 103 that the output is cryptographically locked (requiring that user's signature to be unlocked and redeemed or used). Each input points to the output of a previous transaction 152, linking the transactions.

[0041] At least some of the nodes 104 act as forwarding nodes 104F that forward and thereby propagate transactions 152. At least some of the nodes 104 act as miners 104M that mine blocks 151. At least some of the nodes 104 act as storage nodes 104S (sometimes also referred to as "full copy" nodes), each of which stores a respective copy of the same blockchain 150 in its respective memory. Each miner node 104M also holds a pool 154 of transactions 152 waiting to be mined into blocks 151. A given node 104 may be a forwarding node 104F, a miner 104M, a storage node 104S, or any combination of two or all of them.

[0042] For a given current transaction 152j, the (each) input has a pointer that references the output of a previous transaction 152i in the sequence of transactions and specifies that this output should be settled or "spent" in the current transaction 152j. In general, the previous transaction may be any transaction in the pool 154 or any block 151. The previous transaction 152i does not necessarily have to be present at the time the current transaction 152j is generated or sent to the network 106, but the previous transaction 152i must be present and validated for the current transaction 152j to be valid. Thus, "preceding" in this application refers to a predecessor in the logical order linked by a pointer, not necessarily the time of generation or transmission in the chronological order, and therefore it does not necessarily exclude transactions 152i, 152j from being generated or transmitted out of order (see the following discussion on orphan transactions). The previous transaction 152i may also be referred to as the antecedent or predecessor transaction.

[0043] The input of the current transaction 152j also has the signature of the user 103a to which the output of the previous transaction 152i is locked. That is, the output of the current transaction 152j may be cryptographically locked to the new user 103b. The current transaction 152j may thus transfer the amount defined in the input of the previous transaction 152i to the new user 103b defined in the output of the current transaction 152j. In some cases, a transaction 152 may have multiple outputs to split the input amount among multiple users (one of which may be the original user 103a to provide the change). In some cases, a transaction may also have multiple inputs to pool together both from multiple outputs of one or more previous transactions and redistribute them into one or more outputs of the current transaction.

[0044] The above is sometimes called an "output-based" transaction protocol, also sometimes called an Unspent Transaction Output (UTXO) type protocol (where the outputs are called UTXOs). A user's total balance is not defined by any one number stored in the blockchain, instead, the user needs a special "wallet" 105 to collate the values ​​of all of the user's UTXOs that are spread across many different transactions 152 in the blockchain 150.

[0045] An alternative type of transaction protocol is sometimes called 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 referencing the UTXO of the previous transaction in a sequence of past transactions, but rather by referencing the absolute account balance. The current state of all accounts is stored and constantly updated by miners separate from the blockchain. This disclosure is concerned with the output-based model, not the account-based one.

[0046] With any type of transaction protocol, when a user 103 wants to make a new transaction, he / she sends it from his / her computer terminal 102 to one of the nodes 104 (today usually a server or a data center, but in principle it could be another user terminal) of the P2P network 106. This node 104 checks if the transaction is valid according to a node protocol applied at each of them. The details of the node protocol correspond to the type of transaction protocol used in the blockchain 150 in question, and together they form the overall transaction model. The node protocol usually asks the nodes 104 to check that the cryptographic signature in the new transaction 152j matches an expected signature that depends on the previous transaction 152i in the ordered sequence of transactions 152. In the output-based case, this may consist in checking that the user's cryptographic signature included in the input of the new transaction 152j matches a condition defined in the output of the previous transaction 152i used by the new transaction. This condition typically involves at least checking that a cryptographic signature on the input of the new transaction 152j unlocks the output of the previous transaction 152i to which the input of the new transaction points. In some transaction protocols, the condition may be defined at least in part by custom scripts included in the inputs and / or outputs. Alternatively, it may be determined solely by the node protocol, or by a combination of both. In any case, if the new transaction 152j is valid, the current node forwards it to one or more other of the nodes 104 in the P2P network 106. At least some of these nodes 104 also act as forwarding nodes 104F, following the same node protocol and applying the same tests, and therefore forward the new transaction 152j to one or more further nodes 104, and so on.In this manner, the new transaction is propagated across the network of nodes 104.

[0047] In an output-based model, the definition of whether a given output (e.g., UTXO) is spent is whether it has still been validly redeemed by the input of another subsequent transaction 152j according to the node protocol. Another condition for a transaction to be valid is that the output of the previous transaction 152i that it is attempting to spend or redeem has not yet been spent / redeemed by another valid transaction. Again, if it is not valid, the transaction 152j is not propagated or recorded in the blockchain. This prevents double-spending, where a spender is attempting to spend the same transaction output more than once.

[0048] In addition to validation, at least some of the nodes 104M also compete to be the first to generate a block of transactions in a process known as mining. This is backed by a "proof of work." At the mining nodes 104M, new transactions are added to a pool of valid transactions that have not yet appeared in a block. Miners then compete to assemble a new valid block of transactions 152 from the pool of transactions 154 by attempting to solve a cryptographic puzzle. Typically, this involves searching for a "nonce" value such that when the nonce is concatenated with the pool of transactions 154 and hashed, the output of the hash satisfies a predefined condition. For example, the predefined condition may be that the output of the hash has a certain predefined number of leading zeros. A property of a hash function is that it has an unpredictable output with respect to its input. This search therefore consumes a significant amount of processing resources at each node 104M trying to solve the puzzle, since it can only be done by brute force.

[0049] The first miner node 104M to solve the puzzle will announce this to the network 106 and provide the solution as a proof. The solution can then be easily checked by other nodes 104 in the network (given the solution to the hash, it is easy to check that it satisfies the conditions on the output of the hash). The pool 154 of transactions in which the winner solved the puzzle will then be recorded as a new block 151 in the blockchain 150 by at least some of the nodes 104 acting as storage nodes 104S, based on checking the winner's announced solution at each such node. A block pointer 155 is also assigned to the new block 151n, pointing to the previously generated block 151n-1 in the chain. Proof-of-work helps to reduce the risk of double spending, since it takes a lot of effort to generate a new block 151, and mining nodes 104M are motivated not to allow double spending to be included in their blocks, since any block containing a double payment is likely to be rejected by other nodes 104. Once created, blocks 151 cannot be modified because they are known and maintained at each of the storage nodes 104S in the P2P network 106 according to the same protocol. Block pointers 155 also impose a sequential order on blocks 151. This therefore provides an immutable public ledger of transactions, as transactions 152 are recorded in ordered blocks at each storage node 104S in the P2P network 106.

[0050] Note that different miners 104M competing to solve the puzzle at any given time may be doing so based on different snapshots of the unmined transaction pool 154 at any given time, depending on when they started looking for a solution. Whoever solves the puzzle first defines which transactions will be included in the next new block 151n, and the current pool 154 of unmined transactions is updated. The miners 104M then continue competing to generate blocks from the newly defined outstanding pool 154, and so on. The protocol also exists to resolve any "forks" that may occur. A fork is when two miners 104M solve a puzzle very quickly from each other, which leads to the propagation of competing views of the blockchain. In essence, whichever end of the fork is the longest, results in a deterministic blockchain 150.

[0051] In most blockchains, the winning miner 104M is automatically rewarded with a special type of new transaction that generates a new digital asset out of thin air (as opposed to a regular transaction that transfers an amount of digital assets from one user to another). Thus, the winning node is said to have "mined" an amount of digital assets. This special type of transaction is sometimes called a "generation" transaction. It automatically forms part of a new block 151n. This reward motivates the miner 104M to participate in the proof-of-work competition. Often, a regular (non-generation) transaction 152 also specifies an additional transaction fee in one of its outputs to further reward the winning miner 104M that generated the block 151n in which the transaction was included.

[0052] Depending on the computational resources involved in mining, at least each of the miner nodes 104M typically takes the form of a server including one or more physical server units, or an entire data center. Each transfer node 104F and / or storage node 104S also takes the form of a server or data center. However, in principle, any given node 104 may take the form of a user terminal or a group of user terminals networked together.

[0053] The memory of each node 104 stores software configured to execute on a processing unit of the node 104 to perform its respective one or more roles and to process transactions 152 according to the node protocol. It is understood that any action attributed to a node 104 herein may be performed by software executing on a processing unit of the respective computing facility. Additionally, the term "blockchain" as used herein is a general term that refers to the type of technology in general, and is not limited to any particular proprietary blockchain, protocol, or service.

[0054] Also connected to the network 101 are computer devices 102 of a number of parties 103 each acting as a consuming user. They act as players and payees in a transaction, but do not necessarily participate in mining or propagating the transaction on behalf of the other parties. They do not necessarily execute the mining protocol. Two parties 103 and their respective devices 102 are shown for illustrative purposes: a first party 103a and his / her respective computer device 102a, and a second party 103 and his / her respective computer device 102b. It will be understood that many more such parties 103 and their respective computer devices 102 may exist and participate in the system, but for convenience they are not depicted. 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, although it will be understood that this is not limiting and that any reference herein to Alice or Bob may be replaced with "the first party" and "the second party," respectively.

[0055] The computing equipment 102 of each party 103 has a respective processing unit having one or more processors, for example one or more CPUs, GPUs, other accelerator processors, application specific processors, and / or FPGAs. The computing equipment 102 of each party 103 further has a memory, i.e. computer readable storage in the form of one or more non-transitory computer readable media. This memory may have one or more memory units using one or more memory media, for example magnetic media such as hard disks, electronic media such as SSDs, flash memories, or EEPROMs, and / or optical media such as optical disk drives. The memory in the computing equipment 102 of each party 103 stores software comprising a respective instance of at least one client application 105 arranged to be executed on the processing unit. It will be understood that any operation attributed to a given party 103 herein may be performed using software executed on the processing unit of each computing equipment 102. Each party's 103 computing equipment 102 has at least one user terminal, e.g., a desktop or laptop computer, a tablet, a smartphone, or a wearable device such as a smart watch. A given party's 103 computing equipment 102 may also have one or more other networked resources, such as cloud computing resources, accessed via the user terminal.

[0056] The client application or software 105 may initially be provided to the computing equipment 102 of any given party 103 on one or more suitable computer readable storage media, for example downloaded from a server or provided on a removable storage device such as a removable SSD, a flash memory key, a removable EEPROM, a removable magnetic disk drive, a magnetic floppy disk or tape, an optical disk such as a CD or DVD ROM, or a removable optical drive.

[0057] The client application 105 has at least a "wallet" function. It has two main functionalities. One of them is to allow each user party 103 to generate, sign and send transactions 152 to be propagated across the network of nodes 104 and thereby included in the blockchain 150. The other is to report back to each party the amount of digital assets he or she currently owns. In an output-based system, this second functionality consists in reconciling the amounts defined in the outputs of the various transactions 152 scattered across the blockchain 150 that belong to the party in question.

[0058] An instance of the client application 105 on each computing device 102 is operatively coupled to at least one of the forwarding nodes 104F of the P2P network 106. This allows the wallet function of the client 105 to send transactions to the network 106. The client 105 may also contact one, some, or all of the storage nodes 104S to query the blockchain 150 for any transactions in which the respective party 103 is a recipient (or, in an embodiment, to actually inspect the transactions of other parties in the blockchain 150, since the blockchain 150 is a public facility that provides trust in transactions in part through its public visibility). The wallet function on each computing device 102 is configured to formulate and transmit a transaction protocol 152 according to the transaction protocol. Each node 104 executes software configured to validate the transactions 152 in the case of a forwarding node 104F forwarding them for propagation across the network 106 according to the node protocol. The transaction protocol and the node protocol correspond to each other, and a given transaction protocol works in conjunction with a given node protocol to together implement a given transaction model. The same transaction protocol is used for all transactions 152 in the blockchain 150 (although the transaction protocol may allow transactions of different subtypes within it). The same node protocol is used by all nodes 104 in the network 106 (although it may handle transactions of different subtypes differently according to rules defined for that subtype, and different nodes may play different roles and therefore implement different corresponding aspects of the protocol).

[0059] As stated, the blockchain 150 has a chain of blocks 151, each of which has a set of one or more transactions 152 generated by the proof-of-work process as described above. Each block 151 also has a block pointer 155 that points to a previously generated block 151 in the chain to define a sequential order for the blocks 151. The blockchain 150 also has a pool 154 of valid transactions waiting to be included in a new block by the proof-of-work process. Each transaction 152 has a pointer to a previous transaction to define an order for the sequence of transactions (note that the sequence of transactions 152 is allowed to branch). The chain of blocks 151 stretches all the way back to a genesis block (Gb) 153, which was the first block in the chain. One or more original transactions 152 earlier in the chain 150 pointed to the genesis block 153 rather than to a preceding transaction.

[0060] When a given party 103, for example Alice, wants to submit a new transaction 152j to be included in the blockchain 150, she formulates the new transaction (for example, using a wallet function in her client application 105) according to the relevant transaction protocol. She then sends the transaction 152 from the client application 105 to one or more transfer nodes 104F to which she is connected. For example, this may be the transfer node 104F that is closest or best connected to Alice's computer 102. When any given node 104 receives a new transaction 152j, it processes the new transaction 152j according to the node protocol and its respective role. This involves first checking whether the newly received transaction 152j satisfies certain conditions to be "valid". An example of this is explained in more detail later. In some transaction protocols, the validity conditions may be configurable per transaction by a script included in the transaction 152. Alternatively, the conditions may simply be a built-in mechanism of the node protocol or may be defined by a combination of the script and the node protocol.

[0061] Provided that the newly received transaction 152j passes the tests to be considered valid (i.e., it is "validated"), any storage node 104S that receives the transaction 152j adds the new validated transaction 152 to a pool 154 in the copy of the blockchain 150 held by that node 104S. Additionally, any forwarding node 104F that receives the transaction 152j propagates the validated transaction 152 onward to one or more other nodes 104 in the P2P network 106. Since each forwarding node 104F applies the same protocol, it assumes that the transaction 152j is valid, which means that the transaction 152j will be propagated immediately throughout the P2P network 106.

[0062] With the copy of the blockchain 150 held in one or more storage nodes 104S, the miner nodes 104M then start racing to solve a proof-of-work puzzle for the latest version of the pool 154 that contains the new transaction 152. (Other miners 104M may still be trying to solve the puzzle based on their old view of the pool 154, but whoever gets there first will define where the next new block 151 ends and the new pool begins, and eventually someone will solve the puzzle for the part of the pool 154 that contains Alice's transaction 152j.) Once the proof-of-work is done for the pool 154 that contains the new transaction 152j, it immutably becomes part of one of the blocks 151 in the blockchain 150. Since each transaction 152 has a pointer to the previous transaction, the order of the transactions is also immutably recorded.

[0063] Figure 2 depicts an example transaction protocol. This is an example of a UTXO-based protocol. A transaction 152 (abbreviated as "Tx") is the basic data structure of the blockchain 150 (each block 151 contains one or more transactions 152). The following is described by reference to an output-based or "UTXO-based" protocol. However, this is not a limitation to all possible embodiments.

[0064] In the UTXO-based model, each transaction ("Tx") 152 has a data structure that includes one or more inputs 202 and one or more outputs 203. Each output 203 may have an unspent transaction output (UTXO), which can be used as a source for inputs 202 of other new transactions (if the UTXO has not yet been redeemed). The UTXO specifies an amount of a digital asset (store of value). It may also include, among other information, a transaction ID of the transaction from which it originated. The transaction data structure may also have a header 201, which may have indicators of the sizes of the input fields 202 and the output fields 203. The header 201 may also include an ID of the transaction. In an embodiment, the transaction ID is a hash of the transaction data (excluding the transaction ID itself) and is stored in the header 201 of the raw transaction 152 submitted to the miner 104M.

[0065] For example, Alice 103a wants to generate a transaction 152j that transfers an amount of the digital asset in question to Bob 103b. In FIG. 2, Alice's new transaction 152j is labeled "Tx1". It in turn takes the amount of digital asset locked to Alice in the output 203 of the previous transaction 152i and transfers at least some of this to Bob. The previous transaction 152i is labeled "TX0" in FIG. 2. Tx0 and Tx1 are simply arbitrary labels. They do not necessarily mean that Tx0 is the first transaction in the blockchain 150, nor that Tx1 is the immediate next transaction in the pool 154. Tx1 may point to any previous (i.e., preceding) transaction that still has unspent outputs 203 locked to Alice.

[0066] The previous transaction Tx0 may already be validated and included in the blockchain 150 by the time Alice generates the new transaction Tx1, or at least by the time she sends it to the network 106. It may already be included in one of the blocks 151 at that point, or it may still be waiting in the pool 154, in which case it will soon be included in the new block 151. Alternatively, Tx0 and Tx1 may be generated and sent to the network 106 together, or Tx0 may be sent after Tx1 if the node protocol has the capacity to buffer "orphan" transactions. The terms "preceding" and "subsequent" as used herein in relation to a sequence of transactions refer to the order of the transactions in the sequence defined by the transaction pointers specified in the transactions (which transactions point to which other transactions, and so forth). They may similarly be replaced with "predecessor" and "successor," or "antecedent" and "descendant," "parent" and "child," etc. It does not necessarily imply the order in which they are generated, sent to the network 106, or arrive at any given node 104. Nevertheless, a subsequent transaction (a following transaction or "child") that points to a previous transaction (a preceding transaction or "parent") is not validated unless the parent transaction is validated. A child that arrives at a node 104 before its parent is considered orphaned. It may be discarded or buffered for a certain amount of time waiting for the parent, depending on the node protocol and / or minor behavior.

[0067] One of the one or more outputs 203 of the previous transaction Tx0 has a particular UTXO, here labeled UTXO0. Each UTXO has a value that specifies the amount of the digital asset represented by that UTXO, and a locking script that defines the conditions that must be satisfied by an unlocking script in the input 202 of the subsequent transaction for the subsequent transaction to be validated, and thus for the UTXO to be successfully liquidated. Typically, the locking script locks the amount to a particular party (the recipient of the transaction in which it is included). That is, the locking script defines the unlocking conditions, and typically has a condition that the unlocking script in the input of the subsequent transaction contains a cryptographic signature of the party to which the previous transaction is locked.

[0068] A locking script (aka scriptPubKey) is a piece of code written in a domain-specific language recognized by the node protocol. A specific example of such a language is called "Script" (capital S). A locking script specifies what information is needed to use the transaction output 203, e.g., the requirements of Alice's signature. An unlocking script appears in the output of a transaction. An unlocking script (aka scriptSig) is a piece of code written in a domain-specific language that supplies the information needed to satisfy the locking script criteria. For example, it may include Bob's signature. An unlocking script appears in the input 202 of a transaction.

[0069] Thus, in the depicted example, UTXO0 in the output of Tx0 must have Alice’s signature Sig P for UTXO0 to be redeemed (or, more precisely, for a subsequent transaction that attempts to redeem UTXO0 to be valid). A Locking script that requires [Checksig P A ]. [Checksig P A] is the public key P from Alice’s public-private key pair. A The input 202 of Tx1 includes a pointer to Tx1 (e.g., with its transaction ID TxID0, which in an embodiment is a hash of the entire transaction Tx0). The input 202 of Tx1 has an index that identifies UTXO0 within TX0, in order to identify it among any other possible outputs of Tx0. The input 202 of Tx1 includes an unlocking script that contains Alice's cryptographic signature, which was generated by Alice applying her private key from a key pair to a predefined portion of data (sometimes called a "message" in cryptography). <Sig P A What data (or "message") needs to be signed by Alice to result in a valid signature may be defined by the locking script, or by the node protocol, or by a combination thereof.

[0070] When a new transaction Tx1 arrives at node 104, the node applies the node protocol. This involves running the locking script and the unlocking script together to check if the unlocking script satisfies the conditions defined in the locking script (which may include one or more criteria). In an embodiment, this involves concatenating the two scripts: <Sig P A > <P A >||[Checksig P A ] Here, "||" represents concatenation, "<...>" means to put data on the stack, and "[...]" is a function constructed by the unlocking script (in this example, a stack-based language). Equivalently, the scripts may be executed one after the other with a common stack rather than concatenating the scripts. In either case, when executed together, the scripts use Alice's public key P, which is included in the locking script in the output of Tx0, to authenticate that the locking script in the input of Tx1 contains Alice's signature signing the expected piece of data. A The expected portion of the data itself (the "message") must also be included in Tx0 in order to perform this authentication. In an embodiment, the signed data includes the entirety of Tx0 (so a separate element specifying the signed portion of the data in plaintext must be included, since it is inherently already present).

[0071] The details of authentication using public-private cryptography are well known to those skilled in the art. Essentially, if Alice signs a message by encrypting it with her private key, then given Alice's public key and the plaintext message, other entities such as node 104 can authenticate that the encrypted version of the message should have been signed by Alice. Signing typically involves hashing the message, signing the hash, and tagging this as the signature to the plaintext version of the message, allowing any holder of the public key to authenticate the signature. Thus, it should be noted that any reference herein to signing a particular piece of data or portion of a transaction, etc., may in embodiments mean signing a hash of that piece of data or portion of a transaction.

[0072] If the unlocking script in Tx1 satisfies one or more conditions specified in the locking script of Tx0 (so, in the example shown, Alice's signature is given in Tx1 and authenticated), the node 104 considers Tx1 valid. If it is a storage node 104S, this means that the storage node 104S adds Tx1 to the pool of transactions awaiting proof-of-work 154. If it is a forwarding node 104F, the forwarding node 104F forwards the transaction Tx1 to one or more nodes 104 in the network 106 so that it is propagated across the network. Once Tx1 is validated and included in the blockchain 150, this defines the UTXO0 from Tx0 as spent. Note that Tx1 can only be valid if it is used as a unspent transaction output 203. If it attempts to use an output that has already been used by another transaction 152, Tx1 becomes invalid even if all other conditions are satisfied. Therefore, node 104 also needs to check whether the referenced UTXO in the previous transaction Tx0 has already been spent (already formed a valid input to another valid transaction). This is one reason why it is important for the blockchain 150 to impose a predefined order on transactions 152. In particular, a given node 104 could keep a separate database that marks which UTXOs 203 in which transactions 152 have been spent, but ultimately, what defines whether a UTXO has been spent is whether it already forms a valid input to another valid transaction in the blockchain 150.

[0073] Note that in the UTXO-based transaction model, a given UTXO must be spent in its entirety; it is not possible to "leave" a portion of the amount defined in the UTXO as spent while another portion is spent. However, an amount from a UTXO can be divided among multiple outputs of a subsequent transaction. For example, the amount defined in UTXO0 in Tx0 can be divided among multiple UTXOs in Tx1. Thus, if Alice does not want to give Bob all of the amount defined in UTXO0, she can use the remainder to give herself change in the second output of Tx1 or to pay another party.

[0074] In fact, Alice would usually also need to include a fee for the winning miner, since today the payoff for the generation transaction is usually not enough to motivate mining. If Alice does not include a fee for the miner, Tx0 may be rejected by the miner nodes 104M, and thus, even if technically valid, it will still not be propagated and included in the blockchain 150 (the miner protocol does not force the miner 104M to accept the transaction 152 if it does not want to). In some protocols, the mining fee does not need its own separate output 203 (i.e., no separate UTXO is required). Instead, any difference between the total amount pointed to by the input 202 and the total amount specified in the output 203 of a given transaction 152 is automatically given to the winning miner 104M. For example, a pointer to UTXO0 is the only input to Tx1, which has only one output UTXO1. If the amount of the digital asset specified in UTXO0 is greater than the amount specified in UTXO1, the difference automatically goes to the winning miner 104M. Alternatively, or in addition, however, it is not necessarily excluded that the miner fee may be explicitly specified in one of the UTXOs 203 of transaction 152 itself.

[0075] If the total amount specified in all outputs 203 of a given transaction 152 is greater than the total amount pointed to by all its inputs 202, this is another criterion for invalidity in most transaction models. Thus, such a transaction is not propagated or mined into a block 151.

[0076] Alice and Bob's digital assets consist of unspent UTXOs that are locked to them in any transaction 152 anywhere in the blockchain 150. Thus, typically, a given party 103's assets are scattered across UTXOs in various transactions 152 across the blockchain 150. There is no single number that defines a given party's 103 total balance stored anywhere in the blockchain 150. The role of the wallet function in the client application 105 is to collate together the values ​​of all the various UTXOs that are locked to each party and that have not yet been used in other subsequent transactions. It can do this by querying a copy of the blockchain 150 stored at one of the storage nodes 104S, e.g., the storage node 104S that is closest or best connected to each party's computing device 102.

[0077] Note that script code is often expressed generally (i.e., not in a strict language). A ]=OP_DUP OP_HASH160 <H(P A )>OP_EQUALVERIFY OP_CHECKSIG [Checksig P A] may be written. "OP_···" refers to a specific opcode in the scripting language. OP_CHECKSIG (also called "Checksig") is a scripting opcode that takes two inputs (a signature and a public key) and verifies the validity of the signature using the Elliptic Curve Digital Signature Algorithm (ECDSA). At runtime, any occurrence of the signature ('sig') is removed from the script, but additional requirements such as hash puzzles remain in the transaction that was verified by the 'sig' input. As another example, OP_RETURN is a scripting language opcode to store metadata within the transaction, thereby generating an unusable output of the transaction that can immutably record the metadata in the blockchain 150. For example, the metadata may comprise a document that is desired to be stored in the blockchain.

[0078] signature P A is a digital signature. In an embodiment, it is based on ECDSA with the elliptic curve secp256k1. A digital signature signs a specific piece of data. In an embodiment, for a given transaction, the signature will sign a portion of the transaction inputs and all or a portion of the transaction outputs. The specific portion of the outputs it signs depends on the SIGHASH flag, which is a 4-byte code that is included at the end of the signature (and modified at the time of signing) to select which outputs are signed.

[0079] The locking script is sometimes called "scriptPubKey", referring to the fact that it contains the public key of the party to which each transaction is locked. The unlocking script is sometimes called "scriptSig", referring to the fact that it provides the corresponding signature. However, more generally, it is not required in all applications of blockchain 150 that a condition for a UTXO to be redeemed be to authenticate the signature. More generally, a scripting language may be used to define any one or more conditions. Thus, the more general terms "locking script" and "unlocking script" may be preferred.

[0080] FIG. 3 illustrates a system 100 implementing a blockchain 150. The system 100 is substantially the same as described with respect to FIG. 1, except that an additional communication functionality is included. The client applications on each of Alice's and Bob's computing devices 102a, 102b each have an additional communication functionality, namely, that allows Alice 103a to establish (at the instigation of either party or a third party) a separate side channel 301 with Bob 103b. The side channel 301 allows for the exchange of data apart from the P2P network. Such communication is sometimes referred to as "off-chain". For example, this can be used to exchange transactions 152 between Alice and Bob without the transactions (yet) being published to the P2P network 106 or reaching the chain 150 until one of the parties chooses to broadcast the transactions 152 to the network 106. Such side channels 301 are sometimes used, for example, as "payment channels".

[0081] The side channel 301 may be established over the same packet-switched network 101 as the P2P overlay network 106. Alternatively, or in addition, the side channel 301 may be established over a different network, such as a local area network, such as a mobile cellular network, or a local wireless network, or a direct wired or wireless link between Alice's and Bob's devices 102a, 102b. In general, the side channel 301 referred to anywhere herein may have any one or more links over one or more networking technologies or communication media that exchange data "off-chain," i.e., separate from the P2P overlay network 106. When more than one link is used, the bundle or collection of off-chain links may be referred to as a side channel 301 as a whole. Thus, it should be noted that when Alice and Bob are said to exchange certain information or pieces of data, etc., over the side channel 301, this does not necessarily mean that all of these pieces of data need to be sent over exactly the same links or the same type of network.

[0082] [Example definition] Below are some example definitions that may be employed in some implementations. Note that all of these are not limitations on all possible implementations, but are provided only to aid in understanding certain possible implementations, and may be used, for example, in some possible implementations of the example use cases described below.

[0083] Definition 1: Transaction. A transaction is a message that includes inputs and outputs. It may also have a protocol version number and / or a lock time. The protocol version indicates the version of the transaction protocol. The lock time is explained separately below.

[0084] Definition 2: Inputs. The inputs of a transaction form an ordered list. Each entry in the list has an outpoint (an identifier for an unspent transaction output) and a scriptSig (an unlocking script). It may also have a sequence number.

[0085] Definition 3: Outputs. The outputs of a transaction form an ordered list. Each entry in the list has a value (the amount of the digital asset in that base unit) and a scriptPubKey (the locking script).

[0086] Definition 4: Outpoint. An outpoint is uniquely defined by a transaction identifier TxID and an index number i. It refers to the i-th entry in the output of transaction TxID, giving the unique location of an unspent transaction output (UTXO). The term "unspent" here means that the outpoint has never appeared in any valid subsequent transaction.

[0087] Definition 5: scriptSig. This is the information required to unlock or spend the UTXO corresponding to a given outpoint. In a standard transaction, this information is usually an ECDSA signature. Hence, the script is called a "scriptSig". However, the information required to unlock an outpoint can be any data that satisfies the locking conditions of the UTXO.

[0088] Definition 6: scriptPubKey. This is the script that locks the funds associated with a particular UTXO. The funds may be unlocked and spent if and only if a scriptSig is appended to the scriptPubKey and execution of the combined script gives TRUE. If this is not the case, the transaction is invalid and will be rejected. It is called "scriptPubKey" because it typically contains the hash value of the ECDSA public key for a standard transaction.

[0089] In the following definitions, when reference is made to signing one or more inputs, this means signing the input or inputs excluding the scriptSig part (see definition 2).

[0090] Definition 7: SIGHASH flags. When giving an ECDSA signature, it is also necessary to add one of the following SIGHASH flags: [Table 1]

[0091] When talking about malleability as a feature, it is expected that information in the transaction is not signed by an ECDSA signature. Apart from inputs and outputs which may be excluded from the message to be signed, the contents of scriptSig are always excluded. This is because scriptSig is designed to be a placeholder for the signature.

[0092] Definition 8: Blockchain Timelocks. In general, there are two types of timelocks that can be used on transactions: absolute and relative. Absolute timelocks specify a specific point in time after which something can be considered "valid". Relative timelocks, on the other hand, specify a period of time that must pass before something can be considered valid. In either case, when using blockchain timelocks, one can use either block height (the number of blocks mined) or elapsed time (e.g., UNIX time) as a proxy for time.

[0093] Another characteristic of blockchain timelocks is where they appear and what aspect of a transaction they apply to. In this sense there are again two classifications of timelocks: transaction level, which lock the entire transaction, and script level, which lock specific outputs. Either of these timelock levels can be used to implement either absolute or relative timelocks. The table below summarizes four possible mechanisms for implementing timelocks that can be generated based on these characteristics. [Table 2]

[0094] Definition 9: nLocktime: Locktime is a non-negative integer that represents a block height or a specific time in Unix time. It is a transaction-level time lock, in the sense that a transaction can only be added in a specified block or after a specified time. If nLocktime is set to be less than 500,000,000, it is considered block high. If it is set to be 500,000,000 or greater, it is considered a representation of Unix time. It is the number of seconds after 00:00:00 on January 1, 1970.

[0095] For example, if the current highest block is 3,000,000 high and the lock time is set to be 4,000,000, then the transaction will not be considered by miners until the 4 millionth block is mined.

[0096] Definition 10: nSequence. The sequence number (nSequence) indicates the version of a transaction as a message. When a transaction is modified, the sequence number increases. The maximum value of nSequence is 2. 32 -1, and typically the sequence number is set to this maximum value by default to indicate that the transaction is finished. The nSequence value is defined for each input of a transaction and specifies the period after a UTXO referenced by the input is included in a block before it can be used as a valid input. When a miner sees two transactions with the same input, it chooses the transaction with the higher sequence number. However, this feature is typically disabled.

[0097] Definition 11: CheckLockTimeVerify (OP_CLTV). The opcode OP_CHECKLOCKTIMEVERIFY (OP_CLTV) is an absolute script-level time lock that can be used to lock a particular block of a transaction to a particular time or block height in the future. If the current Unix time or block height at which the UTXO is referenced in the transaction is exceeded by the Unix time or block height at which the UTXO was created plus the parameter specified before the OP_CLTV opcode, the script execution of the transaction in use will fail.

[0098] Definition 12: CheckSequenceVerify (OP_CSV). The opcode OP_CHECKSEQUENCEVERIFY (OP_CSV) is a relative script-level time lock used to lock a particular output of a transaction for a particular period or number of blocks in the future. It works similarly to OP_CLTV, except that the parameters given to OP_CSV represent a relative time. If the current Unix time or block height at which the UTXO is referenced in the transaction is exceeded by the parameters specified before the OP_CSV opcode, the script execution of the transaction in use will fail.

[0099] Definition 13: Malleability: In general, there are two broad types of malleability possible in blockchain transactions, both of which allow the contents of a transaction to be changed without invalidating the signatures given in the inputs.

[0100] To illustrate both cases, consider an initial transaction Tx that has one input, one signature on that input, and one output.

[0101] Type 1: Script-level malleability. This type of malleability exploits the fact that the signature to be checked with the script opcode OP_CHECKSIG does not sign the script fields of any of the inputs in the transaction. This fact allows us to generate a signature for transaction Tx, modify the input script such that transaction Tx' is non-identical to Tx, and still have both Tx and Tx' considered valid transaction messages signed by the same signature under the blockchain consensus rules.

[0102] Type 2: Input and output level malleability. This type of malleability relies on the use of SIGHASH flags other than SIGHASH ALL being used in the transaction. If a transaction Tx has an input signature that uses any of the five other SIGHASH flag combinations, then either an input or an output can be added to produce a non-identical transaction Tx', without the need to change the signature, such that both transactions are considered valid transaction messages according to consensus.

[0103] [Malleability as a feature] FIG. 4 depicts an example of a client application 105 implementing an embodiment of the presently disclosed scheme. The client application 105 comprises a transaction engine 401 and a user interface (UI) layer 402. The transaction engine 401 is configured to implement basic transaction-related functionality of a client 105 to formulate transactions 152, receive and / or send transactions and / or other data over a side channel 301, and / or send transactions for propagation through the P2P network 106, in accordance with the scheme described above and will be explained in further detail shortly. In some embodiments, the transaction engine 401 of at least Bob's client 105b may optionally comprise application functionality 403 in the form of a selection functionality. The selection functionality may be configured to select two or more different versions of a target transaction ("Tx p " and "Tx pThe P2P network 106 allows a choice as to which of the target transactions (''') should be transmitted from each of Bob's computing devices 102 to be propagated through the P2P network 106 for validation and recorded in the blockchain 150 (the propagation and recording being the mechanisms described above). Note also that this transmission may involve transmitting the target transaction directly from Bob's computing device 102b to a forwarding node 104F of the network 106, or transmitting the target transaction to Alice's device 102a or a third party device to be forwarded to one of nodes 1-4F of the network 106.

[0104] The UI layer 402 is configured to render a user interface via user input / output (I / O) means of each user's computing device 102, including outputting information to each user 103 via user output means of the device 102 and receiving input from each user 103 via user input means of the device 102. For example, the user output means may comprise one or more display screens (touch or non-touch screen) providing visual output, one or more speakers providing audio output, and / or one or more tactile output devices providing tactile output, etc. The user input means may comprise, for example, an input array of one or more touch screens (same or different as those used for the output means), one or more cursor-based devices such as a mouse, trackpad or trackball, one or more microphones and speech recognition algorithms for receiving speech or audio input, one or more gesture-based input devices for receiving input in the form of hand or body gestures, or one or more mechanical buttons, switches, or joysticks, etc.

[0105] Note: although various functionalities may be described herein as being included in the same client application 105, this is not necessarily a limitation, and instead they may be implemented in a suite of two or more different applications, for example one plugged into the other. For example, the functionality of the transaction engine 401 may be implemented in a separate application from the UI layer 402, or the functionality of a given module, such as the transaction engine 401, may be split between more than one application. It is also not excluded that some or all of the described functionality may be implemented, for example, in the operating system layer. When reference is made anywhere in this specification to a single or given application 105, etc., it will be understood that this is merely an example, and more generally, the described functionality may be implemented in any form of software.

[0106] FIG. 5 illustrates a user interface (UI) 500 that may be rendered by the UI layer 402 of client application 105b on Bob's device 102b. In an embodiment, the user interface 500 may optionally have at least two user-selectable options 501, 502 that may be rendered as two distinct UI elements via user output means, such as two on-screen buttons or two different options in a menu. The user input means are arranged to allow the user 103b (Bob in this case) to select one of the options, for example by clicking or touching a UI element on the screen or by speaking the name of the desired option (note that the term "manual" as used herein is meant only in contrast to automatic and is not limited to the use of one or more hands). It will be understood that the particular means of rendering and selecting the options is immaterial.

[0107] Whatever means are used, each of the options is a first and second target transaction Txp and Tx p The selection functionality 403 is configured to interface with the UI layer 402 to enable the following: if Bob 103b selects the first option 501, this will cause the transaction engine 403 to select the first version of the target transaction Tx p However, if Bob 103b selects the second option 502, this causes the transaction engine 403 to send a second version of the target transaction Tx p ' is transmitted to be propagated through the network 106 and registered in the blockchain 150. It will be understood that the UI 500 shown in FIG. 5 is only a stylized mock-up and may in fact have one or more additional UI elements, not shown for simplicity.

[0108] As an alternative or in addition to UI options 501, 502, a selection function 403 may be provided to select first and second versions Tx of the target transaction for recording on the blockchain 150. p and Tx p This may be triggered automatically in response to a predefined event or after a predefined timeout. For example, if event Y occurs before the timeout, function 403 may be configured to perform an automatic selection of the transmission of the second version Tx p ' to be propagated through the network 106. However, if the timeout expires before the event Y occurs, function 403 instead transmits the first version Tx p Alternatively, if event X occurs, function 402 automatically transmits the first version Tx p to be propagated through the network 106, but if an event Y occurs, the function 403 instead transmits a second version Tx pIn fact, the circumstances for automatically transmitting the first and second versions to the network 106 can be configured in virtually any way by the system designer.

[0109] 6 illustrates a set of transactions 152 for use in accordance with embodiments disclosed herein. The set includes a zeroth transaction Tx0 and a first transaction Tx i (there are multiple instances of it i = 1, 2, 3, ...), and the second transaction (one or more versions of it Tx p or Tx p ' exists). Note that "0th", "1st", and "2nd" are merely labels of convenience. They do not necessarily indicate that the transactions are placed immediately one after the other in block 151 or blockchain 150, or that the 0th transaction is the first transaction in block 151 or blockchain 150. Nor do the labels necessarily indicate anything about the order in which the transactions are sent to the network 106. They simply refer to a logical sequence, in that the output of one transaction is pointed to by the input of the next transaction. Note that in some systems it is possible for a parent to be sent to the network 106 after its children (in which case the "orphaned" child is buffered for a period of time at one or more nodes 104 while waiting for the parent to arrive).

[0110] The zeroth transaction Tx0 may be referred to for present purposes as a source transaction, in that it serves as the source of the amount of digital assets locked in Alice 103a. iFor present purposes, the second transaction may also be referred to as an intermediate or conditional transaction, in that it acts as an intermediary that conditionally transfers an amount of digital assets from the source transaction Tx0. The second transaction may also be referred to as a target or payment transaction (hence the subscript "p"), in that it is the transaction that unlocks one of the conditions and carries a payment for Bob (or, as the case may be, a beneficiary on behalf of Bob). In an embodiment, the target transaction is represented by at least two possible versions: a first version Tx p and second version Tx p Each of these transactions can exist at least at some point in time and can appear either on Alice's (first party) computer device 102a, or on Bob's (second party) computer device 102b, or on a third party device (not shown), or any combination thereof. Two versions Tx p and Tx p ' may exist together at the same time, or one after the other, or for periods of time that overlap in time.

[0111] As shown in FIG. 6, source transaction Tx0 has at least one output 2030 (e.g., output 0 of Tx0) that specifies an amount of digital assets, and the output further has a locking script that locks that output to Alice 103a. This means that the locking script of source transaction Tx0 requires that at least one condition be satisfied. The condition is that an input of any transaction that is attempting to unlock the output (and thus redeem that amount of digital assets) must include a cryptographic signature with Alice (i.e., using Alice's public key) on its unlocking script. In this sense, the amount defined in an output of Tx0 is sometimes said to be owned by Alice. It is not particularly important which outputs of which previous transactions the inputs of Tx0 point to (as long as they are enough to cover the total outputs of Tx0).

[0112] In this case, the transaction that unlocks the output of source transaction Tx0 is the first, or intermediate, transaction Tx i Therefore, Tx i has at least one input 2021 (e.g., Tx i The input further comprises an unlocking script configured to unlock the pointed-to output of Tx0 according to a condition defined in the locking script of that output, which requires at least a signature of Alice. The signature required from Alice by the locking script of Tx0 is i In some protocols, the Tx that needs to be signed is required to sign some part of the i The part is Tx i This can be a setting defined in the unlocking script. For example, this may be set by the SIGHASH flag, which is a byte that is added to the signature, so that, for data, the unlocking script <Sig P A > <sighashflag><P A Alternatively, the part that needs to be signed simply appears as Tx i In any case, the part that is signed is usually the same as the unlocking script itself, and can be a fixed part of Tx i Some or all of the inputs of Txi may be removed. This means that the inputs of Txi are malleable.

[0113] First or intermediate transaction Tx i has at least one output 2031 (e.g., Tx i The intermediate transaction Tx i The outputs of are not unconditionally locked to any party. Like Tx0, it must contain at least one output (e.g., Tx i The output further has a locking script that defines what is required to unlock the output and thus liquidate the amount. However, in an embodiment, the locking script may allow the output to be unlocked based on any one of a number of different possible conditions, including at least i) a first condition ("Condition 1") and ii) a second condition ("Condition 2").

[0114] Second, the target transaction Tx p / Tx p ', Tx i In the above output (in the example shown, Tx i 0) and also a pointer to Tx i The output of Tx i At least one input 202p (e.g., Tx p / Tx p For example, the first version of the target transaction, Tx p where the unlocking script is configured to satisfy a first condition, condition 1. At some point, a second version of the target transaction may then be generated from Txp, for example by malleation. In the second version, the unlocking script is configured to satisfy a second condition, condition 2.

[0115] Second, the target transaction Tx p / Tx p ' in either version will have at least one output 202 with the amount of digital asset to be transferred to Bob and a locking script to lock it to Bob. p (For example, Tx p / Tx p ' output 0) (i.e., it needs to execute a further transaction that includes Bob's signature in the unlocking script). In this sense, the target transaction Tx p / Tx p The ' output is said to be owned by Bob. This output can also be called a UTXO.

[0116] In an embodiment, the first condition is Tx i Which transaction (in the embodiment, the first version Tx of the target transaction) is trying to unlock? p ) also requires that the unlocking script of Tx i The requirement on the signature may be imposed, for example, by CheckSig, as described above. In an embodiment, the first condition is that Alice's signature must be equal to Tx p The unlocking script does not require that the Token be included in the Tx token. p The part is Tx p This may be a setting for the unlocking script (e.g., specified by the SIGHASH flag) or may be fixed. In any case, it excludes at least the unlocking script. Thus, Tx p The unlocking script is malleable.

[0117] In an embodiment, the second condition is Tx i Which transaction (in an embodiment, the second version Tx of the target transaction) is attempting to unlock? p ') also includes Bob's cryptographic signature and Alice's cryptographic signature in the unlocking script. Again, this may be imposed by, for example, CheckSig. In an embodiment, the second condition is that the data payload is p ' unlocking script. Tx p ' part is Tx i This may be a setting in the unlocking script (eg, specified by the SIGHASH flag) or may be fixed.

[0118] The zeroth (i.e., source) transaction Tx0 can be generated by Alice, Bob, or a third party. It typically requires the signature of a previous party from which Alice has obtained an amount defined in the input of Tx0. It can be sent to the network 106 by Alice, Bob, the previous party, or another third party.

[0119] The first (i.e. mediated, conditional) transaction Tx i The signed transaction can also be generated by Alice, Bob, or a third party. In an embodiment, it may be generated by Alice, since it requires Alice's signature. Alternatively, it may be generated by Bob or a third party as a template and sent to Alice to sign (e.g., sent over side channel 301). Alice can then send the signed transaction to network 106 herself, or send it to Bob or a third party for them to forward to network 106, or simply have Bob or a third party sign her signature as the signed Tx i , and can be sent for transmission to the network 106. i Any off-chain interaction prior to sending the Ethereum token to the network 106 may be performed over a side channel 301.

[0120] Which version of the second (i.e., target or payment) transaction Tx p / Tx p The first version ' may also be generated by Alice, Bob, or a third party. The first version may be generated by Bob, in that it requires Bob's signature and / or data. Alternatively, it may be generated by Alice or a third party as a template and then sent to Bob to sign and add data (e.g., sent to Bob on side channel 301). Bob can then send the signed transaction to network 106 himself, or send it to Alice or a third party for them to forward to network 106, or simply send his signature and data to Alice or a third party as a signed Tx p The second version may also be embedded in and sent for forwarding to the network. In an embodiment, the second version requires the signatures of both Bob and Alice. Thus, it may be generated by Alice or Bob as a template and sent to the other to add their signature, e.g., also over side channel 301. Alternatively, it may be generated by a third party as a template and then sent to Alice, who adds her signature, and forwards it to Bob to add his signature. Bob then forwards the signed transaction to the network 106 or back to Alice or the third party for them to forward to the network 106. Alternatively, Tx p The transaction template ' may be generated by a third party as a template and then sent to Bob, who adds his signature and forwards it to Alice to add her signature. Alice then forwards the signed transaction to the network 106, or sends it back to Bob or the third party for them to forward to the network 106. In a further variation, Alice and / or the boss may sign the transaction template they receive and simply forward their signature to one of the other parties, who then forwards Tx p ' and forwarded to the network 106. p and / or Tx p Any off-chain interaction prior to sending ' to the network 106 may be performed over a side channel 301.

[0121] It will be appreciated that there are a variety of locations where the different elements of a transaction may be generated and incorporated, and a variety of ways in which they may be transmitted, either directly or vicariously, to their ultimate destination in the P2P network 106. The scope of implementation of the disclosed technology is not limited in any of these respects.

[0122] It will also be understood that expressions herein such as "by Alice," "by Bob," and "by a third party" may be used as shorthand for "by Alice's 103a's computing device 102a," "by Bob's 103b's computing device 102b," and "by a third party's computing device," respectively. Also, the equipment of a given party may have one or more user devices used by that party, or server resources such as cloud resources used by that party, or any combination thereof. It does not necessarily limit an operation to being performed on a single user device.

[0123] Target transaction Tx p Since the unlocking script of is malleable, in an embodiment, the second version Tx of the target transaction p ' is malleating the first version, i.e., Tx p Take the existing data of and convert it into a second version Tx p ', in this case by rewriting the locking script. This is an example of script-level malleability. An equivalent variant, however, would be to p An "update" may be generated by creating a new version of the target transaction that has the same structure except that the unlocking script is different. "Update" is sometimes used herein as a general term to describe the possibility of either rewriting an existing structure or creating a new replacement version. While malleation is sometimes mentioned herein in connection with various embodiments by way of example, it will be understood that this may be replaced by the creation of a new version of the target transaction from scratch. In either case, the malleation or the creation of a new version may be performed by Alice and / or Bob and / or a third party provided with the signatures of Alice and / or Bob.

[0124] As stated, in an embodiment, Tx i In the first condition i), Bob’s signature and data payload are Tx p The second condition ii) requires the signatures of both Alice and Bob, but does not require the data payload to be included in the unlocking script of Tx p ' does not need to be included in

[0125] Target transaction Tx p can thus be unilaterally cleared by Bob (or on behalf of Bob) without needing Alice's signature, but only if Bob includes the data payload in the unlocking script. This makes it more expensive to mine. Miners 104M need a mining fee to access the transaction for mining; if the fee is insufficient, they will not accept the transaction for mining into block 151, even if the transaction is valid (validity and acceptability are separate concepts). The mining fee is usually proportional to the size of the transaction in relation to the amount of data (number of bytes or kilobytes). Furthermore, the data payload may be Bob's proprietary data that he does not want to make publicly available on the blockchain 150 itself. Thus, Bob leaves Alice happy and sends her a second, updated version of the target transaction, Tx, including her signature. p ' (or at least send her her signature, and Bob or a third party will construct the target transaction Txp'). This means that Bob p ' without needing to include a data payload i However, if Alice breaks her promise, Bob will be able to redeem the output of the target transaction Tx p Based on the less favorable first condition, which requires that the i still has a fallback to settle the output.

[0126] First transaction Tx i In reality, the source transactions also need to be broadcast to the network 106 for recording in the blockchain 150. This can be done by any party at any time, as long as they are all eventually validated at some stage.

[0127] Tx i The first condition in the locking script is that the data payload itself must be in Tx i It can also be included in the locking script of Tx i Note that even if Tx is formulated by Alice, it does not require that Tx be known by Alice. Rather, it requires that Tx provides data such that the hash of the data payload (when hashed at node 104) matches the hash value in the unlocking script. p Tx (with a script to adjust the unlocking script) i Therefore, even if Alice or a third party uses Tx i However, if we formulate it as follows, Bob only needs to give them the hash of his data, not the data itself. The data itself is given to the chain where he needs to publish the data, since he has to publish the target transaction Tx p This is only necessary if you need to release the first version of the

[0128] In some embodiments, the locking script of Txi may include a third unlocking condition as an alternative to both the first and second conditions. The third condition is that the lock time has elapsed and Alice's signature matches the third version of the target transaction Tx p This means that if Bob has not claimed payment under either the first or second condition (e.g., because he is unable to do so within the time limit or is not involved in the transaction at all), Alice may require that Tx i The lock time can be defined as an absolute point in time, or as a time that must pass (e.g., measured in seconds or in number of blocks mined).

[0129] For the purposes of this disclosure, it will be understood that the use of different alternative conditions in the first transaction and the target transaction of different versions are optional additional security measures that are advantageous but not required to implement the streaming and micropayment mechanisms, and these embodiments are now described in further detail.

[0130] [Streaming and Micropayments Channels] With reference to FIG. 7, for example, Alice wants to pay to stream some data from Bob. The data is transferred from Bob to Alice "chunk by chunk", i.e., in a sequence of portions D0, D1, D2, etc. These may be, for example, portions of an item of media content that Alice is streaming from Bob, e.g., having a video track, e.g., a movie, and / or an audio track, e.g., a song. The video may comprise any time-varying images or graphics, e.g., a movie, a television program, a slide show or other such sequence or still images, animated vector graphics, and / or gaming content. The audio may comprise sampled and / or synthesized audio, including speech, music, noises and / or effects, or the like. In another example, the following technique may be used to enable Alice to "pay as she goes" for services, e.g., the supply of utilities such as gas, electricity or water, or the rental of a vehicle, property, or other physical object. When paying for a service, then, instead of data that is part of the desired content itself, each data portion D0, D1, D2, etc. has a different respective key required to unlock a unit of the service. For example, Alice's gas, electricity or water supply is managed by a smart meter connected to her computing device 102a. With each key received, she feeds it from her computing device 102a to her meter, which in response to verifying the respective key, unlocks other units of the utility.

[0131] It is desirable to stream the portions of the data such that Bob's payment is proportional to the number of data portions received so far. To do this, Alice can return each signed transaction Tx1, Tx2, Tx3, etc. to Bob over side channel 301 in response to each data portion D0, D1, D2, etc. being received from Bob. That is, if Bob stops sending data, Alice can simply stop sending payments, and if Alice stops sending payments, Bob can simply stop sending data, giving no more portions of data D for which Alice has not paid.

[0132] However, it is also desirable to implement this such that for each distinct portion D0, D1, D2, etc. of data being streamed, an individual transaction does not need to be broadcast onto the network 106 and recorded in the blockchain 150, as this would increase network congestion and bloat the blockchain 150.

[0133] To address this, each transaction Tx1, Tx2, Tx3, etc. that Alice sends back to Bob in response to each data portion D0, D1, D2, etc. that she receives from Bob is a different instance of the first transaction pointing to the same output (e.g., the same UTXO) of the same source transaction Tx0. As the amount of the first transaction grows each time, Bob simply claims the last one's output at the end of some defined sequence, for example, at the end of an audio or video track (e.g., at the end of a movie), or at the end of a specified period of service (e.g., one per hour, day, week, or month). This is explained in more detail below with reference to FIG. 7.

[0134] It is also desirable to stream the parts, firstly so that Bob cannot cheat by taking a payment from Alice while not sending any data, and secondly so that Alice cannot cheat by receiving data but not paying Bob.

[0135] In an embodiment, each instance of the first transaction has multiple outputs that sum to a larger amount of the digital asset than is pointed to by its inputs. That is, the transaction is not valid until someone, actually Bob, adds his own other inputs to make up the difference (an example of input-level malleability). This stops Alice from publishing earlier transactions in the sequence and blocks Bob from publishing later transactions. This thus enables streaming without an initial funding transaction that acts as a deposit for an entire movie, etc. This is explained in more detail below with reference to FIG. 8.

[0136] To implement the streaming method, Alice and Bob form an off-chain side channel 301 between them. That is, transactions sent over this channel are not (yet) published to the P2P network for recording in the blockchain 150. This is used as a modified form of a payment channel, also referred to herein as a "micropayment channel." Additionally, Bob makes available to Alice a hash set for data portions D0, D1, D2, etc. in the sequence. For example, Bob may send the hash set to Alice via the payment channel 301, or may make it publicly available for access from a server on the Internet 101, etc. The hash set comprises a set of hashes that allows Alice to create a hash challenge for data without prior knowledge of the actual raw data itself. For example, the hash set may comprise a hash tree, also known as a Merkle tree (note that the term Merkle tree is used herein in its broadest sense to mean any hash tree, and is not necessarily limited to, for example, a binary branching). Alternatively, the hash set may comprise a hash chain or a hash list.

[0137] Bob begins by sending Alice a first data portion D0 over payment channel 301. This first portion may be sent for free or on credit. If Alice does not pay, Bob loses only the data equivalent of the first portion. If Alice wishes to continue, in response to receiving D0, she sends Bob a first instance of the first transaction Tx1 over payment channel 301. In response, Bob sends Alice the next data portion in the sequence D1, and in response, Alice then sends Bob a second instance of the first transaction Tx2, who then sends D2 to Alice, who sends Tx3 to Bob, and so on, all over payment channel 301. Each instance Tx1, Tx2, Tx3, etc. of the first transaction specifies an increasing payment to Bob (e.g., growing linearly with the number of data portions D received so far). However, each instance of the first transaction, Tx1, Tx2, Tx3, etc., points to the same UTXO of Alice, so Bob can only create a valid instance of the second target transaction, Tx p / Tx p ' (any attempt to redeem the same UTXO twice will be rejected by the network 106 as invalid). If all goes well, Bob will therefore create a version of the target transaction that claims payment on the last instance of the first transaction in the sequence.

[0138] In an embodiment, each instance Tx1, Tx2, Tx3, etc. of the first transaction or the last instance Tx n defines several alternative conditions for redeeming the payment from Alice with the output of that transaction, as described above (e.g., with reference to Figure 5). In this case, the last data portion in the sequence D n Alice's acknowledgement Tx n Together, she creates a second version of the target transaction, Tx p ' or at least, Bob is a Tx p ', which allows Bob to claim payment for the complete sequence (e.g., the entire movie) based on the preferred second condition, rather than the first condition, which disadvantages Bob. If Bob stops streaming part D and Alice becomes dissatisfied, she does not have to provide her signature necessary to satisfy the second condition, and so Bob can only claim payment based on the first, less favorable condition. On the other hand, if Alice stops requesting more parts midway but is not dissatisfied (e.g., she simply chooses to stop watching the movie), then given that each of the first transaction instances so far, Tx1, Tx2, Tx3, etc., contains multiple alternative conditions, Alice can rewrite Tx so that it allows Bob to claim payment for the sequence so far based on the preferred second condition. p ' or her signature may be provided.

[0139] First transaction instance Tx i (i=1,2,3,...) use a common UTXO but signatures on different messages, so in this context we refer to each "request" for data from Alice as an instance of a transaction (see below), since changing the value and requested data changes the signed message.

[0140] Version of the second transaction, Tx p / Tx p ' use a common UTXO but use signatures with the same messages. Thus, in this context, versions refer to the "unmodified" and "modified" forms of a transaction as each version of the transaction, since script-level rewrites do not change the signed messages.

[0141] Note: Which party is responsible for the first transaction Tx1 and the first and second versions of the target transaction Tx p / Tx p Any of the variations discussed above regarding generating and / or broadcasting Tx p / Tx p ' to the network himself, or he can send his signature to Alice, who then sends the target transaction Tx p / Tx p ', etc. For convenience, these various options will not be repeated in full here.

[0142] As an example, consider the movie industry. The script size limit is 10 kilobytes at the time of writing. Thus, for each movie, it can be divided into a number of 8 kilobyte parts. The size of the parts may be smaller if other constraints exist, or larger if the script size limit is increased. Once the parts are defined, a Merkle tree can then be constructed and the root hashes are publicly listed along with the movie titles.

[0143] For simplicity, the explanation assumes that a mining fee is applied implicitly, and that there are other implicit inputs in case the explicit inputs cannot cover the explicit outputs plus the implicit transaction fee.

[0144] Alice wants to buy a movie from Bob. The movie is delivered in n+1 data packets D0,...,D n and the root hash H root The method is defined by a set of transactions TX1, TX2, ..., TX n Each transaction TX i D i Demand for and D i-1 Ideally, if the payment channel 301 is properly selected, there will be only two transactions TX n ' and TX p Only ' is exposed to complete the payment from Alice to Bob. This scenario is depicted in Figure 7, which is a sequence diagram of a payment channel 301 between Alice and Bob. Note that there is one initial message from Bob to Alice, followed by n message pairs for each data packet, and two final messages to select the channel.

[0145] Round 1 - Alice's Turn: First, Bob sends Alice D0 and a complete Merkle tree containing the expected data packet. Alice verifies the Merkle path of D0 by checking that the root hash belongs to a movie title of her choice. Once Alice is satisfied with the data she received, she wants to construct TX1 to acknowledge that she received D0 and request D1. This transaction could take the following form: TX1 Lock Time: 0 Input 0: ● Alice's unused outpoint (TxID0, vout=0) ● Alice's signature and SIGHASH_ALL|ANYONECANPAY Output 0: Locking conditions (i) If Bob provides D1 and his signature, he can claim the output. (ii) Alternatively, if Alice and Bob provide their signatures, Bob can claim the output. (iii) Otherwise, 720 blocks later (after this transaction has been mined), Alice will be able to claim the output. Value: 500 units of digital assets Output 1: ●Alice's Change Output 2: ●Pay Bob the same amount as output 1

[0146] An example instantiation of this is shown in Figure 9. The single transaction design has three intended functions. By assigning extra semantics to some fields of the transaction, it is possible to replace multiple messages required in a data trade scenario with just one single transaction template. A , Tx1) is a signature acknowledging that the previous data pack was received and is satisfactory. PP_DUP OP_SHA256<H(D1)> OP_EQUAL is a request for the next pack of data. 500 units is the payment for the next pack of data.

[0147] The inputs of TX1 have at least input 0, which has a pointer to a UTXO of a previous transaction TX0 locked by Alice, whose amount is greater than TX1's output 0 (see below). Input 0 of TX1 also has Alice's signature on the input unlocking script, and a flag ("ANYONECANPAY") that allows other parties to add inputs.

[0148] The output of TX1 has at least an output 0, which specifies a smaller (initially) amount of digital assets (e.g., 500 units) than the input 0 of TX1. In an optional embodiment, the output of TX1 also satisfies the condition: i) Subsequent transaction TX p The unlocking script with input D1 and Bob’s signature; ii) Subsequent transaction TX p The unlocking script at input ' contains Alice's signature and Bob's signature; or iii) the timeout limit has elapsed and the unlocking script in the input of the subsequent transaction contains Alice’s signature; It has a locking script that allows it to be unlocked under either

[0149] Regarding condition i), Alice knows which data portion to expect because Bob has sent her a Merkle tree called a hash tree. This allows her to determine the hash of D1 that is sufficient for her to include this condition by a hash challenge. (The locking script for TX1 is p (The input contains a hash of D1 plus some code that checks that the value given in the unlocking script of the input, when hashed, matches the value in the locking script.) This condition means that if Bob wants to claim a payment now without Alice's signature, he will have to upload D1 to the blockchain 150. Bob may not want to do this because D1 is Bob's proprietary data, and the size of D1 would incur high mining fees. This technique can also be used for subsequent data portions D2, D3, etc.

[0150] Condition ii) would allow Bob to request a payment without uploading data, if he were to give his signature to Alice instead. But suppose he doesn't want to do that yet.

[0151] Condition iii) is optional. It allows Alice to get the amount in output 0 of TX1 back if Bob does not claim for any reason after a certain specified timeout period (e.g. Bob never gets involved in the process). It will be understood that the particular timeout value of 720 blocks is only an example. More generally, the timeout period can be defined in number of blocks or in human time such as seconds, and can be set to any value. It can be defined to expire at an absolute point in time or an elapsed time.

[0152] TX1 may also optionally have one or more further outputs. In an embodiment, these include Output 1 and Output 2. Output 1 has a script that defines an amount of digital assets equal to the input amount and locks this to Alice ("Alice's Change"). For example, this is 2000-500 units=1500 units.

[0153] Output 2 has a script that defines an amount of digital assets equal to Output 1 and locks this to Bob ("pay Bob an amount equal to Alice's change in Output 1"). The effect of this is that the total output (in the example, 500 + 1500 + 1500 units = 3500 units) will always be greater than the input, unless someone else (actually, just Bob) adds their own other Input 1 to TX1 to make up the difference.

[0154] Output 2 is a trick designed to prevent Alice from publishing a transaction without Bob's acknowledgment. As a payer, Alice is not initially motivated to broadcast TX1. However, after a few rounds, if there are other transactions in which Alice pays Bob more, Alice may use TX1 to invalidate the other transaction by broadcasting TX1 to the network 106 before Bob uses the later instance to claim his payment. By including output 2, TX1 is not valid until Bob adds his own input (input 1) to TX1 to cover the shortfall between the output and the input. Bob can add the extra input because Alice uses the SIGHASH flag "ALL|ANYONECANPAY". As a result, TX1 is more likely to be broadcast only by Bob. Alice can use TX1 to invalidate the other transaction by broadcasting it to the network 106 before Bob uses the later instance to claim his payment. By including output 2, TX1 is not valid until Bob adds his own input (input 1) to TX1 to cover the shortfall between the output and the input. Bob can add the extra input because Alice uses the SIGHASH flag "ALL|ANYONECANPAY". As a result, TX1 is more likely to be broadcast only by Bob. Alice can use TX i I don't want to add the extra input required to enable it, as this would cost her more than if she hadn't cheated the system.

[0155] Alice's change is defined to be the value of Alice's input (input 0) minus the value of Bob's payment (output 0). As the graph in Figure 8 shows, Bob's insurance (output 2) ensures that the total output (dashed line) is always greater than the input before the last data portion is sent.

[0156] More generally, other combinations of outputs may be used to create a situation where the total output value of TX1 is greater than the total input value, thus requiring Bob to add his own input to claim the output of TX1 and discouraging Alice from broadcasting TX1.

[0157] As an example of implementing the three conditions i), ii) and iii) on output 0 in a scripting language, hash puzzles and conditional opcodes can be used. For example:

number

[0158] Round 1 - Bob's Turn: When Bob receives transaction TX1, he simply sends D1 to Alice. Note that Bob does this safely, in that he can claim the payment in TX1 without any help from Alice, by doing the following: First, Bob modifies the outpoint (TxID B , vout=0) and adding his own input. Second, Bob creates another transaction, TX p Generate: TX p Lock Time: 0 Input 0: ●Out point from output 0 of TX1' ●Unlocking data ○D1 Bob's signature Output 0: Pay Bob Value: 500 units

[0159] Bob then broadcasts both transactions to the network 106. However, this is not an ideal situation for Bob, since he would have to expose D1 in the transaction. This is considered a premature closure of the channel. However, if Alice follows the proper procedures to close the payment channel (described below), Bob does not need to do this.

[0160] Round 2 - Alice's Turn: When Alice receives D1 and is satisfied with its contents, she composes a subsequent transaction for the next pack of data. This transaction is also considered an acknowledgment of receiving D1: TX2 Lock Time: 0 Input 0: ● Alice's unused out-point (assuming it is the same out-point as TX1) ● Alice's signature and SIGHASH_ALL|ANYONECANPAY Output 0: Locking conditions (i) If Bob provides D2 and his signature, he can claim the output. (ii) Alternatively, if Alice and Bob provide their signatures, Bob can claim the output. (iii) Otherwise, after 720 blocks, Alice can claim the output. Value: 1000 units Output 1: ●Alice's Change Output 2: ●Pay Bob the same amount as output 1

[0161] Comparing TX1 and TX2, we notice that D1 has been changed to D2 and that the value of output 0 has increased from 500 units of the digital asset to 1000 units. As a result of these two changes, the other outputs will have different values ​​(assuming Alice used the same unused outpoints). Furthermore, because these changes were not made to the malleable part of the transaction, Alice must generate a new signature for TX2.

[0162] Round 2 - Bob's turn: When Bob receives transaction TX2, he simply sends D2 to Alice. As before, Bob does this safely, since just like in the first round, he can claim the payment in TX1 without any help from Alice. Bob also adds (TxID B , vout=0) and generate TX2'. Bob also generates another transaction TX p Generate: TX p Lock Time: 0 Input 0: ●Out point from output 0 of TX2' ●Unlocking data ○D2 Bob's signature Output 0: Pay Bob Value: 1000 units

[0163] Bob then broadcasts both transactions to the network.

[0164] If Alice and Bob cooperate to close the channel, Bob can avoid doing this as described in the first round.

[0165] Final Round - Alice's Turn: After a few rounds, Alice receives the last pack of data, D n Request Tx n Configure: TX n Lock Time: 0 Input 0: ● Alice's unused out-point (assuming it is the same out-point as TX1) ● Alice's signature and SIGHASH_ALL|ANYONECANPAY Output 0: Locking conditions (i) Bob is D n And if he provides his signature, he can request the output. (ii) Alternatively, if Alice and Bob provide their signatures, Bob can claim the output. (iii) Otherwise, after 720 blocks, Alice can claim the output. ●Value: 500n units Output 1: ●Alice's Change Output 2: ●Pay Bob the same amount as output 1

[0166] Final Round - Bob's Turn: Bob receives the last Data Pack D n Respond with.

[0167] Closing a Channel: To close a payment channel, there are several interactions between Alice and Bob. Either Alice or Bob can signal to the other the intention to close the channel 301. Without loss of generality, the last pack of data sent from Bob to Alice is D n Suppose Bob has D n TX is a transaction that requests n Find the TX output by adding your own input and covering output 2. n ' Bob creates a TX like this: p Generate: TX p Lock Time: 0 Input 0: ●TX n 'Out Point from Output 0 ●Unlocking data ○D n Bob's signature Output 0: Pay Bob Value: 500n units

[0168] Bob owns both transactions, TX n ' and TX p directly to Alice via the payment channel 301. Alice n ' and Tx p Alice checks that the inputs from TX p Signed, D n with her signature, Tx p ' is generated. TX p ' Lock Time: 0 Input 0: ●TX n 'Out Point from Output 0 ●Unlocking data Alice's Signature Bob's signature Output 0: Pay Bob Value: 500n units

[0169] Alice, TX p ' to Bob. Bob sends TX n ' and TX p ' to the network 106. Alternatively, Alice may n ' and / or TX p ', or one or both of them may be sent to a third party to be broadcast on Alice and Bob's behalf. Note that Alice may choose to close the channel at any time.

[0170] FIG. 7 notes both (A) how a channel can be unilaterally closed by Bob by broadcasting a pair of transactions, and (B) how the two transactions that form a pair are both broadcast upon channel closure, indicating that the channel is effectively “open” off-chain with no communication with network 106.

[0171] In response to TX1, Bob sends D2 to Alice to recap the sequence. Alice sends TX2 to Bob to acknowledge, who then sends D3, and so on. TX2 is the same as TX1, but D1 has been replaced with D2, and the amount of power 0 has increased. In TX3, D2 has been replaced with D3, and the amount of power 0 has also increased. In an embodiment, the amount at power 0 grows linearly with i, i.e., for each chunk and TX sent in the acknowledgement. Alternatively, other growth relationships could be used, for example giving a higher weight towards the end of the sequence to further encourage completing the sequence, and so on, and so forth.

[0172] Bob selects Tx1, ...Tx based on criterion ii). i To do this, Bob can rewrite it to Tx i ' is generated. The rewrite is i To use i Tx p has an output unconditionally locked to Bob. Bob could add his input and use one of the previous transactions Tx1 or Tx2 etc, but it would not be worth it. He wants to keep sending the movie and get the whole amount at the end. Also, Bob does not want to rely only on criterion ii) because it would require him to publish one of his movie chunks on the blockchain.

[0173] Note that each of the inputs Tx1, Tx2, Tx3, ... specifies the same UTXO of Tx0. Thus, if any one of them is broadcast to the network and validated at any given node, the others of the instances will no longer be considered valid by that node (a condition for validity is that Tx is not attempting to use a UTXO that has already been validly used in another transaction). Because different nodes 104 receive different initial instances, they will have conflicting views of which instances are "valid" before one instance is mined, at which point all nodes 104 agree that the mined instance is the only valid instance. If a node 104 accepts one instance as valid and then discovers that a second instance has been recorded in the blockchain 150, it (should) accept it and discard (i.e., treat as invalid) the first unmined instance it accepted.

[0174] If Bob cashes in early and stops sending movies, Alice only loses 500 because she only paid for one more chunk than she is receiving. Alice could back out at any time, but if she doesn't, Bob would never have sent her more than one chunk (say, 500 units worth) of movies that Alice didn't pay for.

[0175] The mechanism works because the amount grows each time, starting small and growing by the end of the movie, and all transactions attempt to spend the same UTXO at Tx0. Thus, caching in any one invalidates the others. Also, in an embodiment, the sum of the outputs is inherently greater than the inputs, until Bob adds his own input. This is an example of input-level malleability.

[0176] If both Bob and Alice wait until the end of the movie, Bob will receive Tx n ' to Alice. This causes D n The hash of D is replaced with Alice’s signature. This allows Bob to claim the complete payment without revealing any chunk of data D. This is an example of script-level malleability.

[0177] To avoid data congestion on the blockchain, the process uses a locking script that can be unlocked using either any data packet or the signature of the data recipient. By using transaction malleability, the data recipient can replace the data in the unlocking script with his or her signature. This action not only acknowledges that the data has been received or confirms the closure of a payment channel, but also prunes data from the transaction to save space.

[0178] Bob has no incentive to reveal any transactions other than the last one he receives from Alice, given the gradual increase in value of the transactions. If Alice prematurely leaves the channel, Bob simply reveals the last transaction he receives from Alice, along with a transaction to claim the payment. If he does not receive Alice's rewritten transaction, he must expose the associated data pack in order to claim the payment. In an embodiment, if there are strong requirements regarding data confidentiality, Bob can encrypt the data sent to Alice and reveal the decryption key in the transaction (see below).

[0179] For Alice, however, there may be an incentive to publish the first transaction if she receives a sufficient data pack. It is uncertain that she will successfully invalidate the most recent communicated transaction if both the first and latest transactions are valid. To avoid this scenario entirely, embodiments include an extra output that invalidates the transaction itself unless someone covers the gap between the output and the input. For Alice to validate the transaction, she would need to supply an extra input, which would defeat her purpose of broadcasting the transaction.

[0180] If Bob goes offline, Alice cannot continue watching the movie, but she does not pay any more for what she has seen. She can wait for Bob to return, or move to another service provider and start where she left off.

[0181] Note that there are no funding transactions required for this form of payment channel. Moreover, it is flexible enough that Alice can reconnect to resume the streaming service at any time. That is, there is no overhead to form a payment channel.

[0182] The embodiments address all the risks in the payment channel. It is still possible that Alice double-spends her UTXO outside the payment channel. The embodiments can prevent this by blocking one or more of three options. One is to employ a technique that forces Alice to reveal the private key of the deposit account when she tries to double-spend her UTXO. In this case, Bob can claim all the deposits. The second option is to make Alice's acknowledgement legally binding. That is, Alice's signature on Bob's payment claim transaction can be considered binding proof of her identity. Any fraudulent activity from Alice is subject to law enforcement. The third option is for Bob to complete and resume the payment from time to time, for example, every 5 minutes. The frequency can be adjusted by Bob according to his own assessment of the risk. Note that there is no overhead from resuming a payment channel since no funding transaction is required.

[0183] Data Encryption: Data confidentiality is often a requirement when data is exchanged over a public network. In the previous section, we assumed that the data receiver knows exactly what it expects to receive. However, when data is encrypted, it is difficult to know in advance without any communication what the ciphertext is or what hash value to expect. This makes it necessary to construct a hash puzzle in the locking script. To mitigate this, in an embodiment, the seller of the data can communicate the hash value of the ciphertext to the receiver of the data before sending it. The receiver of the data uses the given hash value to construct a payment transaction. When receiving the encrypted data, the receiver of the data can decrypt the data and verify if the data is as expected. If so, everything is okay. If not, the worst case is that the receiver loses money. However, the amount the receiver can lose is limited by the price per data pack. In the case of a movie, it is probably around 500 units. For example, a movie would cost about $5 in total. Given the small scale of economic value and the much larger reputational impact, data sellers have no incentive to cheat.

[0184] Some embodiments may implement a mechanism to create a common secret key between the seller of the data and each buyer of the data using symmetric cryptography, so that all data in transmission can be encrypted.

[0185] [Conclusion] It will be understood that the above-described embodiments are described by way of example only.

[0186] More generally, according to one aspect disclosed herein, there is provided a method of recording a target transaction in a copy of a blockchain maintained by each of at least a portion of a network of nodes, the method comprising: By second party computer equipment, forming a side channel between a first party and the second party, the side channel being separate from the network; streaming a sequence of consecutive data portions over the side channel to the first party, up to a most recent data portion in the sequence; receiving on the side channel from the first party, in response to each of the data portions, a respective different instance of a first transaction, the first transaction having an output specifying an amount of a digital asset, the target transaction having an input including a pointer to the first output of the first transaction, the target transaction further having an output specifying an amount of the digital asset to be transferred from the first output of the first transaction to the second party, the amount specified in the first output of the first transaction increasing with each successive instance of the first transaction; causing a latest instance of the first transaction and a corresponding version of the target transaction to be propagated through the network and recorded in the blockchain, the pointer in the corresponding version of the target transaction pointing to the first output of the latest instance of the first transaction in the sequence; A method is provided having the steps:

[0187] Causing the latest instance of the first transaction and the corresponding version of the target transaction to be propagated through the network and recorded on the blockchain may include the second party itself (by a computing device of the second party) transmitting the latest instance of the first transaction and / or the corresponding target transaction to be propagated through the network and recorded on the blockchain (which may be directly or via a first or third party). Alternatively, causing the latest instance of the first transaction and the corresponding version of the target transaction to be propagated through the network and recorded on the blockchain may include the second party requesting or triggering the first or third party to transmit one or both of the latest instance of the first transaction and / or the corresponding target transaction to be propagated through the network and recorded on the blockchain. For example, the second party may transmit one or both of the first and / or second transactions in a partial form (e.g., including a signature of the second party but not including a signature of the first party) to the first party for completion and forwarding to the network (either directly or via a third party). As another example, causing a first party to transmit one of the transactions may include the second party transmitting a component of the transaction (e.g., the second party's signature) to the first party for the first party to form and transmit the transaction.

[0188] In an embodiment, the amount specified in the first output of the first transaction may increase linearly with each successive instance of the first transaction.

[0189] In an embodiment, each instance of the first transaction may serve as an acknowledgment of receipt of the respective data portion by the first party, in which case the streaming comprises transmitting the next data portion in the sequence in response to receipt of each instance of the first transaction.

[0190] In an embodiment, the method may include providing, on the second party's computing device, an application functionality that enables any one of the instances of the first transaction and a corresponding version of the target transaction that points to that instance to be propagated across the network and recorded in the blockchain at any point in the sequence, in which case, instead of using the functionality for this purpose, the method includes using the functionality to cause the propagation and recording of the latest instance of the first transaction in the sequence and the corresponding version of the target transaction that points to the latest instance in the sequence in place of any preceding instances of the instances.

[0191] In an embodiment, each of the data portions may comprise a respective portion of a piece of media content (eg, video and / or audio content).

[0192] Alternatively, each of the data portions may have a different respective key that enables the first party to unlock a unit of service from a service supplier, for example the service may comprise one of the following: the provision of a utility service, including electricity, gas, or water, or the rental of a property, a car, or other physical object.

[0193] In an embodiment, the sequence may be a finite sequence and the most recent data portion may be the last portion in the sequence.

[0194] In embodiments, the first output of at least a last instance of the first transaction may include a locking script that specifies multiple alternative conditions for unlocking the first output of the first transaction, including at least a first condition and a second condition, and the input of the target transaction may include an unlocking script, and in the corresponding version of the target transaction that is propagated through the network and sent to be recorded in the blockchain, the locking script may be configured to unlock the first output of the first transaction based on satisfying a second one of the alternative conditions but not the first one.

[0195] In embodiments, an output of each instance of the first transaction may have the locking script specifying the multiple alternative conditions. The functionality may enable a currently received instance of the first transaction prior to the last instance and a first version of the target transaction pointing to the current instance to be propagated through the network and recorded to the blockchain, where the locking script in the first version is configured to unlock the first output of the first transaction based on satisfying the first condition.

[0196] For example, the functionality may provide the second party at any point in the sequence with an option to manually select to have the currently received instance of the first transaction and the first version of the target transaction propagated through the network and recorded on the blockchain. Alternatively, or additionally, the functionality may be configured to automatically cause the current instance of the first transaction and the first version of the target transaction to be propagated through the network and recorded on the blockchain if the first party stops sending instances of the first transaction through the sequence.

[0197] In embodiments, the second condition may require that the unlocking script have a cryptographic signature of the first party signing portions of the target transaction excluding the unlocking script, and the second version that is propagated and sent to be recorded on the blockchain may include the signature of the first party on the unlocking script.

[0198] In embodiments, the first condition may not require a cryptographic signature of the first party.

[0199] In an embodiment, at least the first condition requires that the unlocking script include a cryptographic signature of the second party that signs portions of the target transaction excluding the unlocking script.

[0200] In embodiments, the second condition may require that the unlocking script include a cryptographic signature of the second party that signs portions of the target transaction excluding the unlocking script, in which case the second version that is propagated and sent for recording on the blockchain will include the signature of the second party on the unlocking script.

[0201] In an embodiment, the method may include sending, by the computing device of the second party, the first version to the first party for integration by the first party into the target transaction by adding the signature of the first party.

[0202] In an embodiment, the first condition requires each of the data portions to be included in the unlocking script, but the second condition does not require any of the data portions to be included in the target transaction, in which case the second version of the target transaction that is propagated through the network and sent to be recorded on the blockchain need not include any of the data portions in the target transaction.

[0203] In an embodiment, the first condition requires that the unlocking script have a cryptographic signature of the second party that signs each of the data portions and portions of the target transaction excluding the unlocking script, but does not require the cryptographic signature of the first party to be included in the target transaction, and the second condition requires that the unlocking script have a cryptographic signature of both the first and second parties, but does not require any of the data portions to be included in the target transaction. In this case, the second version of the target transaction that is propagated and sent to be recorded on the blockchain does not need to include any of the data portions in the second version, but does include the signatures of the first and second parties in the unlocking script.

[0204] In an embodiment, the requirement to include each of the data portions may be generated by a hash challenge included in the locking script, the hash challenge comprising a hash of each portion of data and a hash function that checks that the hash of each data portion in the unlocking script matches the hash included in the locking script, in which case the method comprises making available to the first party, separate from the network and prior to receipt of the first transaction instance, a hash set, the hash set comprising a hash value for each portion of data to enable the first party to generate the hash challenge for each data portion.

[0205] In an embodiment, the method may include the second party receiving the first transaction from the first party on the side channel. The first transaction may have one or more first inputs specifying an input amount, the first output of the first transaction specifying a first payment, the first transaction further having one or more further outputs specifying one or more further payments such that a total of the payments is greater than the input amount, and the first transaction received by the second party from the first party has no other inputs to make up the difference. The nodes of the network are configured to reject the first transaction as invalid if the first transaction specifies a total payment that is greater than the total input amount. In a possible embodiment, the method includes the second party adding a second input to a latest or last instance of the first transaction to make up the difference, and transmitting the first transaction with the added second input to be propagated through the network and recorded in the blockchain.

[0206] As an example of the above, the further outputs may include a second output specifying a second payment to the first party equal to the input amount minus the first payment, and a third output may specify a third payment to the second party equal to the second payment.

[0207] In an embodiment, the locking script may include a third one of the alternative conditions, the third condition requiring a timeout period to have elapsed and a cryptographic signature of the first party to be included in the unlocking script to enable the first party to redeem the payment in the first output of the first transaction if not redeemed by the second party within the timeout period.

[0208] According to another aspect disclosed herein, there is provided a computer program embodied in a computer readable storage and configured to perform a second party method when executed on a second party computing device.

[0209] According to another aspect disclosed herein, there is provided a computing device having a memory having one or more memory units and a processing device having one or more processing units, the memory storing code arranged to be executed on the processing device, the code being configured, when executed on the processing device, to perform a second party method.

[0210] In embodiments, the program or code may be further configured to perform any of the second party steps disclosed herein.

[0211] According to another aspect disclosed herein, there is provided a method for enabling a second party to record a target transaction in a copy of a blockchain maintained at each of at least a portion of a network of nodes, the method comprising: By first party computer equipment, receiving a sequence of consecutive data portions from the second party via a side channel separate from the network; transmitting back on the side channel from the first party a respective different instance of a first transaction in response to each of the data portions, the first transaction having a first output specifying an amount of a digital asset, the target transaction having an input including a pointer to the first output of the first transaction, the target transaction further having an output specifying an amount of the digital asset to be transferred from the first output of the first transaction to the second party, the amount specified in the first output of the first transaction increasing with each successive instance of the first transaction; having thereby enabling the second party to transmit any one of the instances of the target transaction to be propagated across the network and recorded on the blockchain; A method is provided.

[0212] In embodiments, the method may further comprise first party steps that correspond complementary to any of the second party steps disclosed herein.

[0213] According to another aspect disclosed herein, there is provided a computer program embodied in a computer readable storage and configured to perform a first party method when executed on a first party computing device.

[0214] According to another aspect disclosed herein, there is provided a computing device having a memory having one or more memory units and a processing device having one or more processing units, the memory storing code arranged to be executed on the processing device, the code being configured, when executed on the processing device, to perform a first party method.

[0215] In embodiments, the program or code may be further configured to perform any of the first party steps disclosed herein.

[0216] According to another aspect disclosed herein, a set of transactions for recording in a blockchain, the set embodied in one or more computer readable data media, comprising: a sequence of instances of a first transaction up to a most recent instance, each instance having an input pointing to a same output of a same source transaction, the output of the source transaction specifying an amount of a first party digital asset, each instance of the first transaction further having a first output specifying the amount of the digital asset; a target transaction having an input including a pointer to the first output of one of the instances of the first transaction, the target transaction further having an output specifying an amount of the digital asset to be transferred from the first output of the first transaction to a second party; the amount specified in the first output of the first transaction increases with each successive instance of the first transaction, and a pointer in the corresponding version of the target transaction points to the first output of the latest instance of the first transaction in the sequence. The set of transactions is provided.

[0217] Other variations or uses of the disclosed teachings will be apparent to those skilled in the art in view of the disclosure herein. The scope of the present disclosure is not limited by the described embodiments, but only by the appended claims.< / sighashflag>

Claims

1. 1. A system for recording a target transaction in a copy of a blockchain maintained by each of at least a portion of a network of nodes, the system comprising: a first computing device that is a first party computing device; a second computing device, the second computing device being a second party computing device; The second computing device, forming a side channel between the first computing device and the second computing device, separate from the network; streaming a sequence of successive data portions over said side channel to said first computing device, up to a most recent data portion in said sequence; configured to execute The first computing device comprises: receiving said sequence of consecutive data portions from said second computing device over said side channel; and transmitting, in response to each of the data portions, a respective different instance of a first transaction over the side channel to the second computing device, the first transaction having a first output specifying an amount of a digital asset, the target transaction having an input including a pointer to the first output of the first transaction, the target transaction further having an output specifying an amount of the digital asset to be transferred from the first output of the first transaction to the second computing device, the amount specified in the first output of the first transaction increasing with each successive instance of the first transaction. configured to execute The second computing device, receiving, from the first computing device, each of the distinct instances of the first transaction over the side channel; causing a latest instance of the first transaction and a corresponding version of the target transaction to be propagated through the network and recorded in the blockchain, wherein the pointer in the corresponding version of the target transaction points to the first output of the latest instance of the first transaction in the sequence; and The system is further configured to execute.

2. the amount specified in the first output of the first transaction increases linearly with each successive instance of the first transaction. The system of claim 1 .

3. each instance of the first transaction serves as an acknowledgment of receipt of a respective one of the data portions by the first computing device; the streaming includes transmitting a next data portion in the sequence in response to receiving each instance of the first transaction.

3. A system according to claim 1 or 2.

4. The second computing device, and performing operations to provide application functionality that enables any one of the instances of the first transaction, and a corresponding version of the target transaction that points to that instance, to be propagated across the network and recorded in the blockchain at any point in the sequence; the application function causes propagation and recording of the latest instance of the first transaction in the sequence and a corresponding version of the target transaction that points to the latest instance in the sequence, instead of any preceding instances of the instances. A system according to any one of claims 1 to 3.

5. each of the data portions comprising a respective portion of a piece of media content; A system according to any one of claims 1 to 4.

6. each of said data portions having a different respective key enabling said first computing device to unlock a unit of service from a service supplier; A system according to any one of claims 1 to 4.

7. The service is the provision of public utilities, including electricity, gas, or water; or Renting property, cars, or other physical objects having one of: The system of claim 6.

8. the sequence is a finite sequence, the most recent data portion is the last portion in the sequence; A system according to any one of claims 1 to 7.

9. the first output of at least a last instance of the first transaction has a locking script that specifies a number of alternative conditions for unlocking the first output of the first transaction, the alternative conditions including at least a first condition and a second condition, and the input of the target transaction has an unlocking script; in the corresponding version of the target transaction that is propagated through the network and sent to be recorded in the blockchain, the locking script is configured to unlock the first output of the first transaction based on satisfying a second one of the alternative conditions but not the first one; The system of claim 8.

10. an output of each instance of the first transaction having the locking script specifying the plurality of alternative conditions; the application function enables a currently received instance of the first transaction prior to the last instance and a first version of the target transaction pointing to the current instance to be propagated through the network and recorded on the blockchain, the locking script in the first version is configured to unlock the first output of the first transaction based on satisfying the first condition, and the version of the target transaction including the locking script that satisfies the second condition is a second version. A system according to claim 9 when dependent on claim 4.

11. the application functionality provides the second computing device with an option at any point in the sequence to manually select to have the currently received instance of the first transaction and the first version of the target transaction propagate through the network and recorded on the blockchain; and / or the application functionality is configured to automatically cause the current instance of the first transaction and the first version of the target transaction to be propagated through the network and recorded on the blockchain when the first computing device stops sending instances of the first transaction through the sequence. The system of claim 10.

12. the second condition requires that the unlocking script bear a cryptographic signature of the first party that signs portions of the target transaction excluding the unlocking script; the second version that is propagated and sent to be recorded on the blockchain includes the signature of the first party on the unlocking script; 12. A system according to claim 10 or 11.

13. the first condition does not require a cryptographic signature of the first party; A system according to any one of claims 10 to 12.

14. At least the first condition requires that the unlocking script include a cryptographic signature of the second party that signs portions of the target transaction excluding the unlocking script. A system according to any one of claims 10 to 13.

15. the second condition requires that the unlocking script include a cryptographic signature of the second party that signs portions of the target transaction excluding the unlocking script; the second version that is propagated and sent to be recorded on the blockchain includes the signature of the second party on the unlocking script; A system according to any one of claims 10 to 14.

16. The second computing device, sending the first version to the first computing device so that the first computing device merges it into the second version of the target transaction by adding the signature of the first party.

15. A system according to claim 13 or 14.

17. the first condition requires that each of the data portions be included in the unlocking script, but the second condition does not require that any of the data portions be included in the target transaction; the second version of the target transaction that is propagated through the network and sent to be recorded on the blockchain does not include any of the data portions in the target transaction; A system according to any one of claims 10 to 16.

18. the first condition requires that the unlocking script have a cryptographic signature of the second party that signs each of the data portions and portions of the target transaction excluding the unlocking script, but does not require that a cryptographic signature of the first party be included in the target transaction; the second condition requires that the unlocking script bear a cryptographic signature of both the first party and the second party, but does not require any of the data portions to be included in the target transaction; the second version of the target transaction that is propagated and sent to be recorded on the blockchain does not include any of the data portions in the second version, but includes the signatures of the first party and the second party in the unlocking script; 20. The system of claim 17.

19. the requirement to include each of the data portions is generated by a hash challenge included in the locking script, the hash challenge comprising a hash of each piece of data and a hash function that checks that the hash of each data portion in the unlocking script matches the hash included in the locking script; The second computing device, and further configured to perform an operation of making a hash set available to the first computing device prior to receipt of the first instance of the transaction, separate from the network; the hash set having a hash value for each portion of data to enable the first computing device to generate the hash challenge for each portion of data.

19. A system according to claim 17 or 18.

20. the second computing device is configured to receive the first transaction from the first computing device over the side channel; the first transaction has one or more first inputs specifying an input amount, the first output of the first transaction specifying a first payment, the first transaction further having one or more further outputs specifying one or more further payments such that a total of payments is more than the input amount, the first transaction received by the second computing device from the first computing device has no other inputs to make up the difference, and the nodes of the network are configured to reject the first transaction as invalid if the first transaction specifies a total payment that is more than a total input amount, the second computing device is further configured to add a second input to a latest or latest instance of the first transaction to make up the difference, and transmit the first transaction with the added second input to be propagated through the network and recorded in the blockchain.

20. A system according to any one of claims 9 to 19.

21. the further outputs having a second output specifying a second payment to the first party equal to the input amount minus the first payment, and a third output specifying a third payment to the second party equal to the second payment.

21. The system of claim 20.

22. the locking script includes a third one of the alternative conditions, the third condition requiring a timeout period to have elapsed and a cryptographic signature of the first party to be included in the unlocking script to enable the first computing device to redeem the payment in the first output of the first transaction if not redeemed by the second computing device within the timeout period. A system according to any one of claims 9 to 21.

23. 1. A method of recording a target transaction in a copy of a blockchain maintained by each of at least a portion of a network of nodes, the method comprising: forming a side channel, separate from the network, between a first computing device and a second computing device, the first computing device being a first party computing device and the second computing device being a second party computing device; said second computing device streaming a sequence of consecutive data portions over said side channel to said first computing device, up to a most recent data portion in said sequence; receiving, by the first computing device, the sequence of contiguous data portions over the side channel from the second computing device; in response to each of the data portions, the first computing device transmits back on the side channel to the second computing device a respective different instance of a first transaction, the first transaction having a first output specifying an amount of a digital asset, the target transaction having an input including a pointer to the first output of the first transaction, the target transaction further having an output specifying an amount of the digital asset to be transferred from the first output of the first transaction to the second computing device, the amount specified in the first output of the first transaction increasing with each successive instance of the first transaction; receiving, by the second computing device, each of the different instances of the first transaction over the side channel from the first computing device; the second computing device causes a latest instance of the first transaction and a corresponding version of the target transaction to be propagated through the network and recorded in the blockchain, the pointer in the corresponding version of the target transaction pointing to the first output of the latest instance of the first transaction in the sequence; The method according to claim 1,

24. 24. A computer program embodied in a computer readable storage and configured to perform the method of claim 23 when executed by one or more processors.

25. A set of transactions for recording on a blockchain, The set is embodied in one or more computer readable data media, a sequence of instances of a first transaction up to a most recent instance, each instance having an input pointing to a same output of a same source transaction, the output of the source transaction specifying an amount of a first party digital asset, each instance of the first transaction further having a first output specifying the amount of the digital asset; a target transaction having an input including a pointer to the first output of one of the instances of the first transaction, the target transaction further having an output specifying an amount of the digital asset to be transferred from the first output of the first transaction to a second party; the amount specified in the first output of the first transaction increases with each successive instance of the first transaction, and a pointer in the corresponding version of the target transaction points to the first output in the latest instance of the first transaction in the order. The set of transactions.

Citation Information

Patent Citations

  • Blockchain-Implemented Method for Controlling and Distributing Digital Content

    JP2019511147A

  • ICO management method, communication device, ICO management system and program

    JP6487091B1

  • Systems and methods for managing digital rights

    US20190028278A1

  • Decentralized content distribution

    US20190058910A1

  • Blockchain implemented method and system

    WO2018020389A2