Data exchange verification method

By using Merkle trees and confirmed transactions in the blockchain network, the problem of immutability of off-chain data exchange is solved, the authenticity and integrity of the data are ensured, and the immutability verification of the data exchange sequence is achieved.

CN118786644AInactive Publication Date: 2024-10-15NCHAIN LICENSING AG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380023238.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-02-22
Filing Date
2023-01-23
Publication Date
2024-10-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In a blockchain network, the immutability of off-chain data exchange cannot be guaranteed, making it impossible to determine the data that has been sent and its order.

Method used

By using Merkle trees and confirmation transactions, the receiver generates and sends confirmation transactions, ensuring that both the sender and receiver agree on the same data items and order, and then records the confirmation transaction on the blockchain to ensure the immutability of data exchange.

Benefits of technology

It realizes the immutability verification of off-chain data exchange, ensures the authenticity and integrity of data, and prevents data tampering and sequence confusion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118786644A_ABST
    Figure CN118786644A_ABST
Patent Text Reader

Abstract

A computer-implemented method for validating a sequence of data exchanges between groups, where the groups comprise a recipient and one or more senders, and where the method is performed by the recipient and comprises: receiving a sequence of two or more respective sets of data items, each respective set being sent by a respective sender; and, for each respective set of data items in the sequence: generating a respective validation transaction, where the respective validation transaction comprises a respective output locked to a respective Merkel root of a respective Merkel tree, where the respective Merkel tree is based on the respective set of data items and each previous respective set of data items in the sequence; and sending the respective validation transactions at least to the respective senders sending the respective sets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a method of attesting a data exchange sequence, and a method of verifying data items exchanged between groups. Background Art

[0002] Blockchain refers to a distributed data structure in which a copy of the blockchain is maintained at each of a plurality of nodes in a distributed peer-to-peer (P2P) network (hereinafter referred to as a "blockchain network") and is widely disclosed. The blockchain includes a series of data blocks, each of which includes one or more transactions. Except for the so-called "coinbase transaction", each transaction points to a previous transaction in a sequence, which can span one or more blocks back to one or more coinbase transactions. The coinbase transaction will be discussed further below. Transactions submitted to the blockchain network are included in new blocks. The process of creating a new block is generally referred to as "mining", which involves each of a plurality of nodes competing to perform "proof of work", i.e., solving a cryptographic puzzle based on a representation of a defined set of ordered and verified valid pending transactions waiting to be included in a new block of the blockchain. It should be noted that the blockchain can be pruned at some nodes, and the publication of blocks can be achieved by publishing only the block header.

[0003] Transactions in a blockchain can be used for one or more of the following purposes: transferring digital assets (i.e., a certain number of digital tokens); sorting a set of entries in a virtualized ledger or registry; receiving and processing time-stamped entries; and / or sorting index pointers by time. Blockchains can also be used to implement hierarchical additional functions on blockchains. For example, a blockchain protocol may allow additional user data or data indexes to be stored in a transaction. There is no pre-specified limit on the maximum data capacity that can be stored in a single transaction, so increasingly complex data can be incorporated. For example, this can be used to store electronic documents, audio, or video data in a blockchain.

[0004] The nodes of the blockchain network (commonly referred to as "miners") perform a distributed transaction registration and verification process, which will be described in more detail later. In summary, in this process, nodes verify transactions and insert them into block templates, which attempt to identify a valid proof-of-work solution for the block template. Once a valid solution is found, the new block is propagated to other nodes of the network, so that each node can record the new block on the blockchain. In order to record a transaction in the blockchain, a user (e.g., a blockchain client application) sends the transaction to one of the nodes in the network for propagation. The nodes receiving the transaction can compete to find a proof-of-work solution that incorporates the verified valid transaction into the new block. Each node is configured to execute the same node protocol, which will include one or more conditions for confirming that the transaction is valid. Invalid transactions will not be propagated or incorporated into the block. Assuming that the transaction has been verified to be valid and thus accepted on the blockchain, the transaction (including any user data) will therefore be registered and indexed as an immutable public record on each node in the blockchain network.

[0005] The node that successfully solves the proof-of-work puzzle to create the latest block is usually rewarded with a new transaction called a "coinbase transaction" that distributes the amount of digital assets, i.e. the number of tokens. The detection and rejection of invalid transactions is performed by the actions of competing nodes, which act as agents of the network and are incentivized to report and prevent improper behavior. The widespread publication of information allows users to continuously audit the performance of nodes. Publishing only block headers allows participants to ensure the continued integrity of the blockchain.

[0006] In the "output-based" model (sometimes referred to as the UTXO-based model), the data structure of a given transaction includes one or more inputs and one or more outputs. Any spendable output includes an element that specifies the amount of a digital asset, which can be derived from the ongoing sequence of transactions. Spendable outputs are sometimes called UTXOs ("unspent transaction outputs"). Outputs may also include a locking script that specifies future redemption conditions for the output. A locking script is a predicate that defines the conditions necessary to verify and transfer a digital token or asset. Each input of a transaction (except for a coinbase transaction) includes a pointer (i.e., a reference) to such an output in a previous transaction, and may also include an unlocking script for unlocking the locking script pointing to the output. Thus, consider a pair of transactions, referred to as a first transaction and a second transaction (or "target" transaction). The first transaction includes at least one output that specifies the amount of a digital asset, and includes a locking script that defines one or more conditions for unlocking the output. The second (target) transaction includes at least one input and an unlocking script, the at least one input including a pointer to the output of the first transaction; the unlocking script is used to unlock the output of the first transaction.

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

[0008] Another transaction model is the account-based model. In this case, each transaction is defined not by reference to the UTXO of the previous transaction in the past transaction sequence, but by reference to the absolute account balance. The current state of all accounts is stored individually by the node in the blockchain and is constantly updated. Summary of the invention

[0009] Data transfer and storage using blockchains allow for immutable references. However, only data stored onchain can be guaranteed to be immutable. The integrity of data that is transmitted off-chain and used to derive on-chain data cannot be determined. "Payment channels" allow users to commit a certain amount of funds to a channel, and then redistribute the committed funds to the relevant parties off-chain at a higher frequency and lower cost than on-chain transactions. Payment channels can also be used to transfer data in the same way and with the same benefits. However, since these exchanges are performed off-chain, their immutability can no longer be guaranteed. Therefore, it is necessary to be able to verify off-chain data exchanges. That is, it is necessary to be able to verify that data has been sent and the order in which the data was sent.

[0010] According to one aspect disclosed herein, there is provided a computer-implemented method for attesting a sequence of data exchanges between groups, wherein the group comprises a receiver and one or more senders, and wherein the method is performed by the receiver and comprises: receiving a sequence of two or more corresponding sets of data items, each corresponding set being sent by a corresponding sender; and, for each corresponding set of data items in the sequence: generating a corresponding attestation transaction, wherein the corresponding attestation transaction comprises a corresponding output locked to a corresponding Merkle root of a corresponding Merkle tree, wherein the corresponding Merkle tree is based on the corresponding set of data items and each previous corresponding set of data items in the sequence; and, sending the corresponding attestation transaction to at least the corresponding sender that sent the corresponding set.

[0011] According to one aspect disclosed herein, a computer-implemented method for confirming a sequence of data exchanges between a group is provided, wherein the group includes a receiver and one or more senders, and wherein the method is performed by a first sender among the senders and includes: sending a corresponding set of data items to the receiver, wherein the corresponding set of data items is a final corresponding set of a sequence of two or more corresponding sets of data items; receiving a corresponding confirmation transaction, wherein the corresponding confirmation transaction includes a corresponding output locked to a corresponding Merkle root of a corresponding Merkle tree, wherein the corresponding Merkle tree is based on the corresponding set of data items and each previous corresponding set of data items in the sequence; sending the corresponding confirmation transaction to one or more nodes of a blockchain network, the receiver, and at least one of the one or more senders, so that the corresponding confirmation transaction is recorded on the blockchain; generating a final transaction, wherein the final transaction includes an input referencing the corresponding output of the corresponding confirmation transaction and includes the corresponding Merkle root; and sending the final transaction to at least one of the following: one or more nodes of the blockchain network, the receiver, and at least one of the one or more senders.

[0012] The sender is a party that sends data to the receiver. The receiver receives a sequence of data sets. Each data set may contain a single data item or multiple data items. The data is sent from the sender to the receiver off-chain (i.e., without using a blockchain). The receiver uses a first data set to create a first Merkle tree. That is, each data item in the first data set forms a corresponding leaf of the first Merkle tree. That is, the data items are hashed to form leaf nodes of the Merkle tree. Depending on the number of data items, the first Merkle tree may contain leaf nodes that are not based on data items. Then, the receiver creates a first confirmation transaction, which includes an output locked to the Merkle root of the first Merkle tree. The Merkle root encodes one or more data items in the first data set and the order of the one or more data items, and thus confirms the one or more data items and the order of the one or more data items. In order to unlock the output, the sender needs to provide the Merkle root in the input of the final transaction. Therefore, the sender needs to generate the same first Merkle tree as the receiver. Therefore, both parties must agree and therefore confirm the same data items and the same order of data items. That is, the protocol forces both the receiver and the sender to verify the same data exchange.

[0013] When the receiver receives a second data set (from the same sender or a different party), the receiver updates the first Merkle tree by using each data item of the second data set. That is, each data item of the second set is hashed to form a corresponding leaf of the second Merkle tree. The receiver generates a second confirmation transaction, which includes an output locked to the Merkle root of the second Merkle tree. The Merkle root encodes one or more data items in the first data set and the second data set and the order of the one or more data items, and thus confirms the one or more data items and the order of the one or more data items. That is, the Merkle root confirms the data exchange sequence.

[0014] The receiver can receive any number of data sets. Each time the receiver receives a new data set, the receiver updates the previous Merkle tree and generates a new confirmation transaction with an output locked to the Merkle root of the latest Merkle tree.

[0015] The sender confirms the data exchange sequence by submitting a transaction to the blockchain, the transaction including a Merkle root of a Merkle tree based on the data items in the data exchange sequence. In this way, both the sender and the receiver confirm that they know all the data sent as part of the exchange.

[0016] As more data sets are received, the Merkle tree continues to evolve. This evolving Merkle tree can be used to order, lock, and unlock transactions within a payment channel. This mechanism enforces dependencies between data exchanges, ensuring that the sender must solve the relevant Merkle root to unlock any confirmed transaction. In this way, once the payment channel is closed on-chain and the Merkle root is revealed, the authenticity of the data can be guaranteed.

[0017] According to one aspect disclosed herein, there is provided a computer-implemented method for verifying data items exchanged between groups, wherein the method is performed by a verifier and includes: obtaining a final transaction from a blockchain, wherein the final transaction references an output of a confirmed transaction and includes a Merkle root of a Merkle tree, wherein the confirmed transaction includes locking the output to the Merkle, wherein the Merkle tree is based on each data item set belonging to a sequence of two or more corresponding data item sets; obtaining an internal hash set of the Merkle tree; and performing a Merkle proof on a candidate data item using the internal hash set and the Merkle root to verify that the candidate data item belongs to one of the corresponding data item sets.

[0018] The verifier can prove that a certain data item was exchanged between the sender and the receiver. To this end, the verifier obtains the Merkle root on the chain and uses the data item to perform a Merkle proof. The verifier can be the sender, the receiver, or a third party. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] To facilitate an understanding of the embodiments of the present disclosure and to show how such embodiments may be implemented, reference will now be made, by way of example only, to the accompanying drawings, in which:

[0020] Figure 1 is a schematic block diagram of a system for implementing a blockchain;

[0021] Figure 2 Some examples of transactions that may be recorded in a blockchain are schematically shown;

[0022] Figure 3 An exemplary payment channel protocol is schematically illustrated;

[0023] Figure 4A An exemplary Merkle tree is schematically shown;

[0024] Figure 4B An exemplary Merkle proof is schematically shown;

[0025] Figure 5 is a schematic block diagram of an exemplary system for implementing a data exchange protocol;

[0026] Figure 6 Schematic showing how the evolving Merkle tree evolves through multiple data exchange iterations;

[0027] Figure 7 Another exemplary Merkle proof is schematically shown;

[0028] Figure 8 schematically illustrates an exemplary data exchange protocol;

[0029] Fig. 9 Another exemplary Merkle proof is schematically shown;

[0030] Fig.10 Another exemplary Merkle proof is schematically shown;

[0031] Fig.11 An exemplary data exchange protocol for each stage of a multi-party establishment is schematically illustrated;

[0032] Fig.12 schematically illustrates the development of the Merkle tree for two independent computing parties; and

[0033] Fig.13An exemplary data exchange protocol orchestrated by an oracle for two independent computing parties is schematically shown. DETAILED DESCRIPTION

[0034] 1. Exemplary System Overview

[0035] Figure 1 An exemplary system 100 for implementing a blockchain 150 is shown. The system 100 may include a packet-switched network 101, typically a wide area internet such as the Internet. The packet-switched network 101 includes a plurality of blockchain nodes 104, which may be arranged to form a peer-to-peer (P2P) network 106 within the packet-switched network 101. Although not shown, the blockchain nodes 104 may be arranged as a nearly complete graph. Thus, each blockchain node 104 is highly connected to other blockchain nodes 104.

[0036] Each blockchain node 104 includes a computer device of a peer, and different nodes 104 belong to different peers. Each blockchain node 104 includes a processing device, which includes one or more processors, such as one or more central processing units (CPUs), accelerator processors, special processors and / or field programmable gate arrays (FPGAs), and other devices, such as application-specific integrated circuits (ASICs). Each node also includes a memory, that is, a computer-readable memory in the form of a non-transitory computer-readable medium. The memory may include one or more memory units, which use one or more memory media, such as magnetic media such as hard disks, electronic media such as solid-state drives (SSDs), flash memory, or electrically erasable programmable read-only memories (EEPROMs), and / or optical media such as optical disk drives.

[0037] The blockchain 150 includes a series of data blocks 151, wherein a respective copy of the blockchain 150 is maintained at each of the plurality of blockchain nodes 104 in the distributed or blockchain network 106. As described above, maintaining a copy of the blockchain 150 does not necessarily mean storing the blockchain 150 in its entirety. Instead, the blockchain 150 can be pruned as long as each blockchain node 150 stores a block header (discussed below) for each block 151. Each block 151 in the blockchain includes one or more transactions 152, wherein a transaction in this context refers to a data structure. The nature of the data structure will depend on the type of transaction protocol used as part of the transaction model or plan. A given blockchain uses a particular transaction protocol throughout. In a common transaction protocol, the data structure of each transaction 152 includes at least one input and at least one output. Each output specifies an amount of a digital asset represented as a property, an example of which is an output that is cryptographically locked to a user 103 (requiring the user's signature or other solution to unlock, thereby redeeming or spending). Each input points to the output of a previous transaction 152, thereby linking these transactions.

[0038] Each block 151 also includes a block pointer 155, which points to a previously created block 151 in the blockchain to define the order of blocks 151. Each transaction 152 (except for the coinbase transaction) includes a pointer to a previous transaction to define the order of the transaction sequence (Note: the sequence of transactions 152 can branch). The blockchain of blocks 151 is traced back to the genesis block (Gb) 153, which is the first block in the blockchain. One or more original transactions 152 earlier in the blockchain 150 point to the genesis block 153, not to the previous transaction.

[0039] Each blockchain node 104 is configured to forward transactions 152 to other blockchain nodes 104, so that transactions 152 are propagated throughout the network 106. Each blockchain node 104 is configured to create blocks 151 and store corresponding copies of the same blockchain 150 in its corresponding memory. Each blockchain node 104 also maintains an ordered set (or "pool") 154 of transactions 152 waiting to be incorporated into block 151. Ordered pools 154 are often referred to as "memory pools". In this article, the term is not intended to be limited to any particular blockchain, protocol, or model. The term refers to a set of ordered transactions that a node 104 has accepted as valid, and for which the node 104 is forced to not accept any other transaction that attempts to spend the same output.

[0040] In a given current transaction 152j, an input (or each input) includes a pointer that references an output of a previous transaction 152i in the transaction sequence, specifying that the output is to be redeemed or "spent" in the current transaction 152j. Spending or redeeming does not necessarily mean transferring a financial asset, although this is certainly a common application. More generally, spending can be described as consuming an output, or allocating it to one or more outputs in another subsequent transaction. In general, a previous transaction can be any transaction in an ordered set 154 or any block 151. Although a previous transaction 152i will need to exist and be verified to be valid in order to ensure that the current transaction is valid, it is not necessary for a previous transaction 152i to exist when the current transaction 152j is created or even sent to the network 106. Therefore, in this article, "previous" refers to the predecessor in a logical sequence linked by a pointer, and not necessarily the creation time or sending time in a time sequence, and therefore, does not necessarily exclude the situation where transactions 152i, 152j are created or sent out of order (see the discussion of isolated transactions below). A previous transaction 152i can also be called a predecessor transaction or a predecessor transaction.

[0041] The inputs of the current transaction 152j also include input authorizations, such as the signature of the user 103a to whom the outputs of the previous transaction 152i are locked. In turn, the outputs of the current transaction 152j may be cryptographically locked to the new user or entity 103b. Thus, the current transaction 152j may transfer the amounts defined in the inputs of the previous transaction 152i to the new user or entity 103b defined in the outputs of the current transaction 152j. In some cases, a transaction 152 may have multiple outputs to split the input amounts among multiple users or entities (one of which may be the original user or entity 103a for changes). In some cases, a transaction may also have multiple inputs to aggregate the amounts from multiple outputs of one or more previous transactions and reallocate them to one or more outputs of the current transaction.

[0042] According to an output-based transaction protocol, such as Bitcoin, when a party 103, such as an individual user or an organization, wishes to issue a new transaction 152j (either by an automated program employed by the party or manually), the issuing party sends the new transaction from its computer terminal 102 to a recipient. The issuing party or recipient will ultimately send the transaction to one or more blockchain nodes 104 of the network 106 (now typically a server or data center, but in principle it can also be other user terminals). It is also not excluded that the party 103 issuing the new transaction 152j can send the transaction directly to one or more blockchain nodes 104, and in some examples, the transaction may not be sent to the recipient. The blockchain node 104 receiving the transaction checks whether the transaction is valid according to the blockchain node protocol applied at each blockchain node 104. The blockchain node protocol typically requires the blockchain node 104 to check whether the cryptographic signature in the new transaction 152j matches the expected signature, which depends on the previous transaction 152i in the ordered sequence of transactions 152. In such an output-based transaction protocol, this may include checking whether the cryptographic signature or other authorization of the party 103 included in the input of the new transaction 152j matches the condition defined in the output of the previous transaction 152i that the new transaction spends (or "allocates"), where the condition typically includes at least checking whether the cryptographic signature or other authorization in the input of the new transaction 152j unlocks the output of the previous transaction 152i to which the input of the new transaction is linked. The condition may be defined at least in part by a script included in the output of the previous transaction 152i. Alternatively, this may be determined solely by the blockchain node protocol, or may be determined by a combination thereof. In either case, if the new transaction 152j is valid, the blockchain node 104 forwards it to one or more other blockchain nodes 104 in the blockchain network 106. These other blockchain nodes 104 apply the same test according to the same blockchain node protocol, and therefore forward the new transaction 152j to one or more other nodes 104, and so on. In this way, the new transaction is propagated throughout the network of blockchain nodes 104.

[0043] In the output-based model, the definition of whether a given output (e.g., UTXO) is allocated (or "spent") is whether it is validly redeemed by the input of another subsequent transaction 152j according to the blockchain node protocol. Another condition for a transaction to be valid is that the output of the previous transaction 152i that it attempts to redeem has not been redeemed by another transaction. Similarly, if invalid, transaction 152j will not be propagated (unless marked as invalid and propagated for reminder) or recorded in the blockchain 150. This prevents double spending, that is, the transaction processor allocates the output of the same transaction more than once. On the other hand, the account-based model prevents double spending by maintaining account balances. Because there is also a defined transaction order, the account balance has a single defined state at all times.

[0044] In addition to verifying that transactions are valid, blockchain nodes 104 compete to be the first node to create a block of transactions in a process generally referred to as mining, which is supported by "proof of work". At a blockchain node 104, a new transaction is added to an ordered pool 154 of valid transactions that have not yet appeared in a block 151 recorded on the blockchain 150. The blockchain nodes then compete to assemble a new valid transaction block 151 of transactions 152 in the ordered transaction set 154 by attempting to solve a cryptographic puzzle. Typically, this involves searching for a "nonce" value such that when the nonce is juxtaposed with a representation of the ordered pool 154 of pending transactions and hashed, the output of the hash value satisfies a predetermined condition. For example, the predetermined condition may be that the output of the hash value has a certain predefined number of leading zeros. Note that this is only one specific type of proof of work puzzle, and other types are not excluded. A property of a hash function is that it has an unpredictable output relative to its input. Therefore, this search can only be performed by brute force, consuming a large amount of processing resources at each blockchain node 104 that attempts to solve the puzzle.

[0045] The first blockchain node 104 that solves the puzzle announces the puzzle solution on the network 106, providing the solution as proof, which can then be easily checked by other blockchain nodes 104 in the network (once a solution to the hash value is given, it is directly possible to check whether the solution satisfies the output of the hash value). The first blockchain node 104 propagates a block to other nodes that accept the block to reach a threshold consensus, thereby enforcing the protocol rules. The ordered set of transactions 154 is then recorded by each blockchain node 104 as a new block 151 in the blockchain 150. A block pointer 155 is also assigned to the new block 151n pointing to the previously created block 151n-1 in the blockchain. The large amount of work required to create a proof-of-work solution (e.g., in the form of a hash) signals the intention of the first node 104 to follow the blockchain protocol. These rules include not accepting a transaction as valid if it spends or allocates the same output as a previously verified valid transaction, otherwise it is called a double spend. Once created, the block 151 cannot be modified because it is identified and maintained at each blockchain node 104 in the blockchain network 106. The block pointers 155 also impose an order on the blocks 151. Because transactions 152 are recorded in ordered blocks at each blockchain node 104 in the network 106, an immutable public ledger of transactions is provided.

[0046] It should be noted that the different blockchain nodes 104 competing to solve a puzzle at any given time may do so based on different snapshots of the pool 154 of transactions that have not yet been published at any given time, depending on when they began searching for a solution or the order in which they received the transactions. The person solving the corresponding puzzle first defines the transactions 152 included in the new block 151n and their order, and updates the current pool of unpublished transactions 154. The blockchain nodes 104 then continue to compete to create blocks from the newly defined ordered pool of unpublished transactions 154, and so on. In addition, there is a protocol to resolve any "forks" that may occur, where two blockchain nodes 104 solve puzzles within a short time of each other, thereby propagating conflicting views of the blockchain between the nodes 104. In short, the fork direction that is the longest becomes the final blockchain 150. It should be noted that this does not affect users or agents of the network, as the same transaction will appear in both forks.

[0047] According to the Bitcoin blockchain (and most other blockchains), a node that successfully constructs a new block 104 is granted the ability to newly allocate an additional, accepted amount of digital assets in a new special type of transaction that allocates an additional limited amount of digital assets (as opposed to an inter-agent or inter-user transaction, which transfers a certain amount of digital assets from one agent or user to another). This special type of transaction is often called a "coinbase transaction", but may also be called a "starting transaction" or "generating transaction". It usually forms the first transaction of a new block 151n. The proof of work signals the intention of the node that constructs the new block to follow the protocol rules, thereby allowing the particular transaction to be redeemed later. The blockchain protocol rules may require a maturation period, such as 100 blocks, before the special transaction can be redeemed. Typically, a regular (non-generating) transaction 152 will also specify an additional transaction fee in one of its outputs to further reward the blockchain node 104 that created the block 151n in which the transaction was published. This fee is often called a "transaction fee" and is discussed below.

[0048] Due to the resources involved in transaction verification and publication, typically at least each blockchain node 104 takes the form of a server comprising one or more physical server units, or even an entire data center. However, in principle, any given blockchain node 104 may take the form of a user terminal or a group of user terminals networked together.

[0049] The memory of each blockchain node 104 stores software configured to run on the processing device of the blockchain node 104 to perform its corresponding role according to the blockchain node protocol and process transactions 152. It should be understood that any action attributed to the blockchain node 104 herein can be performed by software running on the processing device of the corresponding computer device. The node software can be implemented in one or more applications at the application layer or a lower layer such as an operating system layer or a protocol layer, or any combination of these layers.

[0050] Computer devices 102 of each of the parties 103 acting as consuming users are also connected to the network 101. These users can interact with the blockchain network 106 but do not participate in verifying transactions or constructing blocks. Some of these users or agents 103 can act as senders and receivers in transactions. Other users can interact with the blockchain 150 without acting as senders or receivers. For example, some parties can act as storage entities that store a copy of the blockchain 150 (e.g., having obtained a copy of the blockchain from the blockchain node 104).

[0051] Some or all of the parties 103 may be connected as part of a different network, such as a network overlaid on the blockchain network 106. Users of the blockchain network (often referred to as "clients") may be referred to as being part of a system that includes the blockchain network 106; however, these users are not blockchain nodes 104 because they do not perform the roles required of blockchain nodes. Instead, each party 103 may interact with the blockchain network 106, thereby utilizing the blockchain 150 by connecting to (i.e., communicating with) the blockchain node 106. For illustrative purposes, two parties 103 and their corresponding devices 102 are shown: a first party 103a and its corresponding computer device 102a, and a second party 103b and its corresponding computer device 102b. It should be understood that more such parties 103 and their corresponding computer devices 102 may exist and participate in the system 100, but for convenience, they are not illustrated. Each party 103 may be an individual or an organization. For illustrative purposes only, in this document, the first party 103a is referred to as Alice and the second party 103b is referred to as Bob, but it should be understood that this is not limited to Alice or Bob, and any reference to Alice or Bob in this document can be replaced with "first party" and "second party" respectively.

[0052] The computer device 102 of each party 103 includes a corresponding processing device, which includes one or more processors, such as one or more CPUs, graphics processing units (GPUs), other accelerator processors, specific application processors and / or FPGAs. The computer device 102 of each party 103 also includes a memory, that is, a computer-readable memory in the form of a non-temporary computer-readable medium. The memory may include one or more memory units, which use one or more memory media, such as magnetic media such as hard disks, electronic media such as SSDs, flash memory or EEPROMs, and / or optical media such as optical disk drives. The memory on the computer device 102 of each party 103 stores software, which includes a corresponding instance of at least one client application 105 that is set to run on the processing device. It should be understood that any action attributed to a given party 103 in this article can be executed by software running on the processing device of the corresponding computer device 102. The computer device 102 of each party 103 includes at least one user terminal, such as a desktop or laptop computer, a tablet computer, a smart phone, or a wearable device such as a smart watch. The computer device 102 of a given party 103 may also include one or more other network resources, such as cloud computing resources accessed through a user terminal.

[0053] The client application 105 may initially be provided to the computer device 102 of any given party 103 via a suitable computer-readable storage medium downloaded from a server, for example, or via a removable storage device such as a removable SSD, flash memory key, removable EEPROM, removable disk drive, floppy disk or tape, an optical disk such as a CD or DVD ROM, or a removable optical drive, etc.

[0054] The client application 105 includes at least a "wallet" function. This has two main functions. One of the functions is to enable the corresponding party 103 to create, authorize (e.g., sign) and send transactions 152 to one or more Bitcoin nodes 104, which are then propagated in the network of blockchain nodes 104 and included in the blockchain 150. Another function is to report to the corresponding party the amount of digital assets it currently owns. In an output-based system, this second function includes collating the amounts defined in the outputs of various transactions 152 belonging to the relevant parties scattered in the blockchain 150.

[0055] Note: While various client functions may be described as being integrated into a given client application 105, this is not necessarily limiting, and rather, any client function described herein may be implemented in a suite consisting of two or more different applications, such as interfacing via an API or one application as a plug-in to another application. More generally, the client functions may be implemented at the application layer or at a lower layer such as an operating system, or any combination of these layers. The following description will be based on the client application 105, but it should be understood that this is not limiting.

[0056] An instance of a client application or software 105 on each computer device 102 is operably coupled to at least one of the blockchain nodes 104 of the network 106. This can enable a wallet function of the client 105 to send transactions 152 to the network 106. The client 105 can also contact the blockchain node 104 to query the blockchain 150 for any transactions to which the corresponding party 103 is a recipient (or indeed to check other parties' transactions in the blockchain 150, because in an embodiment, the blockchain 150 is a public facility that provides transaction trust to some extent through its public visibility). The wallet function on each computer device 102 is configured to formulate and send transactions 152 according to a transaction protocol. As described above, each blockchain node 104 runs software that is configured to verify transactions 152 according to the blockchain node protocol and forward transactions 152 for propagation in the blockchain network 106. The transaction protocol and the node protocol correspond to each other, and a given transaction protocol and a given node protocol together implement a given transaction model. The same transaction protocol is used for all transactions 152 in the blockchain 150. All nodes 104 in the network 106 use the same node protocol.

[0057] When a given party 103 (say Alice) wishes to send a new transaction 152j to be included in the blockchain 150, she will formulate the new transaction according to the relevant transaction protocol (using the wallet function in her client application 105). She will then send the transaction 152 from the client application 105 to one or more blockchain nodes 104 to which she is connected. For example, this may be the blockchain node 104 that Alice's computer 102 is best connected to. When any given blockchain node 104 receives the new transaction 152j, it will process it according to the blockchain node protocol and its corresponding role. This includes first checking whether the newly received transaction 152j meets certain conditions for becoming "valid", specific examples of which will be discussed in detail later. In some transaction protocols, the validity conditions may be configurable on a per-transaction basis through a script included in the transaction 152. Alternatively, the conditions may simply be a built-in function of the node protocol, or defined by a combination of script and node protocol.

[0058] If the newly received transaction 152j passes the validity test (i.e., under the “valid” condition), any blockchain node 104 that receives the transaction 152j will add the new verified valid transaction 152 to the ordered transaction set 154 maintained at the blockchain node 104. Further, any blockchain node 104 that receives the transaction 152j will then propagate the verified valid transaction 152 to one or more other blockchain nodes 104 in the network 106. Since each blockchain node 104 applies the same protocol, it is assumed that the transaction 152j is valid, which means that the transaction will soon be propagated throughout the network 106.

[0059] Once in the ordered pool 154 of pending transactions maintained at a given blockchain node 104, that blockchain node 104 will begin racing to solve the proof-of-work puzzle on the latest version of its respective pool 154 containing the new transaction 152 (keep in mind that other blockchain nodes 104 can attempt to solve the puzzle based on different transaction pools 154. However, whoever solves the puzzle first will define the set of transactions included in the latest block 151. Ultimately, the blockchain node 104 will solve the puzzle for a portion of the ordered pool 154, which includes Alice's transaction 152j). Once the pool 154 including the new transaction 152j completes the proof-of-work, it will immutably become part of one of the blocks 151 in the blockchain 150. Each transaction 152 includes a pointer to an earlier transaction, so the order of transactions is also immutably recorded.

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

[0061] Another type of transaction protocol operated by some blockchain networks as part of the account-based transaction model can be called an "account-based" protocol. In the account-based case, each transaction is defined not by reference to the UTXO of a previous transaction in the past sequence of transactions, but by reference to an absolute account balance. The current state of all accounts is stored individually in the blockchain by the nodes of the network and is continuously updated. In such systems, transactions are ordered using an account's running transaction record (also called a "position"). This value is signed by the sender as part of their cryptographic signature and hashed as part of the transaction reference calculation. In addition, optional data fields can also be signed in the transaction. For example, a data field can point to a previous transaction if it contains the ID of the previous transaction.

[0062] 2. UTXO-based model

[0063] Figure 2 An exemplary transaction protocol is shown. This is an example of a UTXO-based protocol. A transaction 152 ("Tx" for short) is the basic data structure of the blockchain 150 (each block 151 includes one or more transactions 152). The following will be described with reference to an output-based or "UTXO"-based protocol. However, this is not limited to all possible embodiments. It should be noted that although the exemplary UTXO-based protocol is described with reference to Bitcoin, it can also be implemented on other exemplary blockchain networks.

[0064] In the UTXO-based model, each transaction ("Tx") 152 includes a data structure that includes one or more inputs 202 and one or more outputs 203. Each output 203 may include an unspent transaction output (UTXO), which can be used as a source of input 202 for another new transaction (if the UTXO has not been redeemed). The UTXO includes a value that specifies the amount of a digital asset. This represents a set of tokens on a distributed ledger. The UTXO may also include a transaction ID of its source transaction and other information. The transaction data structure may also include a header 201, which may include an indicator of the size of the input field 202 and the output field 203. The header 201 may also include an ID for the transaction. In an embodiment, the transaction ID is a hash value of the transaction data (excluding the transaction ID itself) and is stored in the header 201 of the original transaction 152 submitted to the node 104.

[0065] Let's say Alice 103a wishes to create a transaction 152j that transfers the relevant amount of digital assets to Bob 103b. Figure 2 In , Alice's new transaction 152j is labeled "Tx1". This new transaction takes the amount of digital assets locked to Alice in output 203 of the previous transaction 152i in the sequence and transfers at least a portion of such amount to Bob. Figure 2, the previous transaction 152i is labeled "Tx0". Tx0 and Tx1 are just arbitrary labels that do not necessarily mean that Tx0 refers to the first transaction in blockchain 151 and Tx1 refers to a subsequent transaction in pool 154. Tx1 can point to any previous (i.e., preceding) transaction that still has unspent output 203 locked to Alice.

[0066] When Alice creates her new transaction Tx1, or at least when she sends it to the network 106, the previous transaction Tx0 may already be valid and included in block 151 of the blockchain 150. The transaction may have been included in one of the blocks 151 at this time, or it may still be waiting in the ordered set 154, in which case it will be included in the new block 151 soon. Alternatively, Tx0 and Tx1 may be created and sent to the network 106 together; or, if the node protocol allows buffering of "orphan" transactions, Tx0 may even be sent after Tx1. The terms "previous" and "successor" as used herein in the context of transaction sequences refer to the order of transactions in the sequence defined by the transaction pointers specified in the transactions (which transaction points to which other transaction, etc.). They may equally be replaced by "predecessors" and "successors", "predecessors" and "descendants", or "parents" and "children", etc. This does not necessarily refer to the order in which they are created, sent to the network 106, or arrive at any given blockchain node 104. However, subsequent transactions (descendant transactions or "child transactions") pointing to a previous transaction (predecessor transaction or "parent transaction") will not be valid unless the parent transaction is valid. A child transaction that arrives at the blockchain node 104 before the parent transaction is considered an orphan transaction. Depending on the node protocol and / or node behavior, it may be discarded or buffered for a period of time to wait for the parent transaction.

[0067] One of the one or more outputs 203 of the previous transaction Tx0 includes a specific UTXO, labeled UTXO0. Each UTXO includes a value specifying the amount of digital assets represented by the UTXO and a locking script that defines the conditions that the unlocking script in the input 202 of the subsequent transaction must satisfy in order for the subsequent transaction to be valid and thus successfully redeem the UTXO. Typically, the locking script locks the amount to a specific party (the beneficiary of the transaction for that amount). That is, the locking script defines the unlocking condition, which typically includes the following conditions: the unlocking script in the input of the subsequent transaction includes the cryptographic signature of the party to which the previous transaction was locked.

[0068] The locking script (also known as 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 a "Script" (with a capital S), which can be used by the blockchain network. The locking script specifies the information required to spend the transaction output 203, such as the requirement for Alice's signature. The unlocking script appears in the output of the transaction. The unlocking script (also known as scriptSig) is a piece of code written in a domain-specific language that provides the information required to meet the locking script criteria. For example, it can contain Bob's signature. The unlocking script appears in the input 202 of the transaction.

[0069] Thus in the example shown, UTXO0 in output 203 of Tx0 includes a locking script [Checksig P A ], the locking script requires Alice’s signature Sig P A , in order to redeem UTXO0 (strictly speaking, to make subsequent transactions that attempt to redeem UTXO0 valid). A ] contains Alice's public key P from her public-private key pair A The input 202 of Tx1 includes a pointer to Tx1 (e.g., by its transaction ID (TxID0), which in the embodiment is the hash value of the entire transaction Tx0). The input 202 of Tx1 includes an index identifying UTXO0 in Tx0 to identify it among any other possible outputs of Tx0. The input 202 of Tx1 further includes an unlocking script <Sig P A >, the unlocking script includes Alice's cryptographic signature, which is created by Alice by applying the private key of her key pair to a predetermined portion of data (sometimes called a "message" in cryptography). The data (or "message") that Alice needs to sign to provide a valid signature can be defined by the locking script, the node protocol, or a combination thereof.

[0070] When a new transaction Tx1 arrives at a blockchain node 104, the node applies the node protocol. This includes running the locking script and the unlocking script together to check whether the unlocking script satisfies the conditions defined in the locking script (where the conditions may include one or more criteria). In an embodiment, this involves juxtaposing two scripts:

[0071] <Sig PA> <pa>||[Checksig PA]

[0072] Where "||" means concatenation, "<…>" means putting data on the stack, and "[…]" means a function consisting of locked scripts (in this case, a stack-based language). Similarly, scripts can be run one after another using a common stack instead of concatenating scripts. In either case, when run together, the scripts use Alice's public key P A (included in the locking script of the output of Tx0) to verify that the unlocking script in the input of Tx1 contains Alice's signature when signing the expected portion of the data. The expected partial data itself (the "message") also needs to be included in order to perform this verification. In an embodiment, the signed data includes the entire Tx1 (so there is no need to include a separate element to plaintext specify the signed partial data, as it is already present).

[0073] Those skilled in the art will be familiar with the details of authentication via public-private cryptography. Basically, if Alice has signed a message using her private key cryptographically, then given Alice's public key and the message in plain text, other entities such as node 104 can authenticate that the message must have been signed by Alice. Signing typically involves hashing the message, signing the hash value, and marking this to the message as a signature, thereby enabling any holder of the public key to authenticate the signature. Therefore, it should be noted that in embodiments, any reference herein to signing a particular data fragment or transaction portion, etc., may mean signing the hash value of that data fragment or transaction portion.

[0074] If the unlocking script in Tx1 satisfies one or more conditions specified in the locking script of Tx0 (so, in the example shown, if Alice's signature is provided and authenticated in Tx1), then the blockchain node 104 considers Tx1 to be valid. This means that the blockchain node 104 will add Tx1 to the pending transaction ordered pool 154. The blockchain node 104 will also forward the transaction Tx1 to one or more other blockchain nodes 104 in the network 106 so that it will propagate throughout the network 106. Once Tx1 is valid and included in the blockchain 150, this will define UTXO0 from Tx0 as spent. It should be noted that Tx1 is only valid if it spends unspent transaction output 203. If it attempts to spend an output that has already been spent by another transaction 152, then Tx1 will be invalid even if all other conditions are met. Therefore, the blockchain node 104 also needs to check whether the UTXO referenced in the previous transaction Tx0 has been spent (that is, whether it has formed a valid input for another valid transaction). This is one of the reasons why it is important for the blockchain 150 to impose a defined order on transactions 152. In practice, a given blockchain node 104 may maintain a separate database marking the UTXO 203 of a transaction 152 as having been spent, but ultimately defining whether a UTXO has been spent depends on whether it has formed a valid input to another valid transaction in the blockchain 150.

[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 basis for failure in most transaction models. Therefore, such a transaction will not be propagated or included in block 151.

[0076] Note that in the UTXO-based transaction model, a given UTXO needs to be spent as a whole. You cannot "leave behind" a portion of the amount defined in a UTXO as spent while spending another portion. However, the amount of a UTXO can be split between multiple outputs of subsequent transactions. For example, the amount defined in UTXO0 of Tx0 can be split between multiple UTXOs in Tx1. Therefore, if Alice does not want to give all of the amount defined in UTXO0 to Bob, she can use the remaining portion to make change for herself in the second output of Tx1, or to pay another party.

[0077] In practice, Alice will also typically need to include a fee for the Bitcoin node 104 that successfully includes Alice's transaction 104 in block 151. If Alice does not include such a fee, Tx0 may be rejected by the blockchain node 104, and therefore, although technically valid, may not be propagated and included in the blockchain 150 (if the blockchain node 104 does not want to accept transaction 152, the node protocol does not force the blockchain node 104 to accept it). In some protocols, the transaction fee does not require its own separate output 203 (i.e., no separate UTXO is required). Instead, any difference between the total amount pointed to by input 202 and the total amount specified by output 203 of a given transaction 152 will be automatically provided to the blockchain node 104 that issued the transaction. For example, assume that a pointer to UTXO0 is the only input to Tx1, and Tx1 has only one output UTXO1. If the amount of digital assets specified in UTXO0 is greater than the amount specified in UTXO1, the difference may be allocated (or spent) by the node 104 that wins the proof-of-work race to create the block containing UTXO1. Alternatively or additionally, this does not necessarily preclude the possibility of explicitly specifying a transaction fee in one of the UTXOs 203 in its own transaction 152.

[0078] Alice and Bob's digital assets consist of the UTXO locked to them in any transaction 152 anywhere in the blockchain 150. Therefore, in general, the assets of a given party 103 are scattered among the UTXOs of various transactions 152 throughout the blockchain 150. No single number defining the total balance of a given party 103 is stored anywhere in the blockchain 150. The role of the wallet function of the client application 105 is to collate the various UTXO values ​​locked to the respective parties and not yet spent in other subsequent transactions. To achieve this, it can query a copy of the blockchain 150 stored at any one Bitcoin node 104.

[0079] It should be noted that script code is often represented schematically (i.e., using an imprecise language). For example, an opcode (opcode) may be used to represent a particular function. "OP_..." refers to a particular opcode of the scripting language. For example, OP_RETURN is a scripting language opcode that, when preceded by OP_FALSE at the beginning of a locking script, creates an unspendable output of a transaction that can store data within the transaction, thereby immutably recording the data in the blockchain 150. For example, the data may include a file to be stored in the blockchain.

[0080] Typically, the inputs to a transaction contain a digital signature corresponding to the public key PA. In an embodiment, this is based on ECDSA using the elliptic curve secp256k1. The digital signature signs a specific piece of data. In an embodiment, for a given transaction, the signature will sign part of the transaction input and part or all of the transaction output. Signing a specific part of the output depends on the SIGHASH flag. The SIGHASH flag is typically a 4-byte code included at the end of the signature that selects the output to be signed (and is therefore fixed at the time of signing).

[0081] The locking script is sometimes referred to as "scriptPubKey", which means that it usually includes the public key of the party to which the corresponding transaction is locked. The unlocking script is sometimes referred to as "scriptSig", which means that it usually provides the corresponding signature. However, more generally speaking, in all applications of blockchain 150, the conditions for UTXO redemption do not necessarily include verification of the signature. More generally speaking, the scripting language can be used to define any one or more conditions. Therefore, the more general terms "locking script" and "unlocking script" may be preferred.

[0082] 3. Side Channels

[0083] like Figure 1 As shown, the client application on each of Alice and Bob's computer devices 102a, 120b can include additional communication functionality. This additional functionality enables Alice 103a to establish a separate side channel 107 with Bob 103b (at the instigation of any party or third party). The side channel 107 enables data to be exchanged away from the blockchain network. Such communications are sometimes referred to as "off-chain" communications. For example, this can be used to exchange transactions 152 between Alice and Bob without registering the transaction (yet) on the blockchain network 106 or publishing it on the chain 150 until one of the parties chooses to broadcast it to the network 106. Sharing transactions in this way is sometimes referred to as sharing "transaction templates". The transaction template may lack one or more inputs and / or outputs required to form a complete transaction. Alternatively or additionally, the side channel 107 can be used to exchange any other transaction-related data, such as keys, negotiation amounts or terms, data content, etc.

[0084] The side channel 107 may be established via the same packet switching network 101 as the blockchain network 106. Alternatively or additionally, the side channel 301 may be established via a different network such as a mobile cellular network or a local area network such as a wireless local area network, or even via a direct wired or wireless link between Alice's and Bob's devices 102a, 102b. In general, a side channel 107 referred to anywhere in this document may include any one or more links via one or more networking technologies or communication media that are used to exchange data "off-chain", i.e., off-chain. The bundle or collection of off-chain links may be referred to as a side channel 107 as a whole. Therefore, it should be noted that if Alice and Bob are said to exchange certain information or data, etc., via a side channel 107, this does not necessarily mean that all of this data must be sent over exactly the same link or even the same type of network.

[0085] 4. Payment Channel

[0086] In the context of blockchain, the term "payment channel" (PC) is sometimes used to refer to a transaction channel established between multiple parties (in a peer-to-peer (P2P) manner). A PC consists of a series of offline transaction promises or commitments between the parties that do not need to be broadcast directly to the blockchain every time they are updated. A PC typically consists of two blockchain broadcasts:

[0087] 1. The initial funding transaction is set as a multi-signature transaction that commits funds to the PC;

[0088] 2. Final settlement of transactions, finalizing the allocation of the initial total amount of funds in the funding transaction among the parties involved in the PC.

[0089] Between the submission of the funding transaction and the settlement transaction, a series of "off-chain" transactions can be created, effectively redistributing the initially committed funds (from the funding transaction) between the parties involved in the PC. These off-chain transactions are equivalent to transaction commitments, and if confirmed by both parties, each transaction can theoretically be presented "on-chain". Refund transactions can also be created, the purpose of which is to return the escrowed funds to the original owner based on the initial state without creating and signing further commitment transactions. Figure 3 An exemplary payment channel is shown.

[0090] Implementing commitment transactions "off-chain" in this way allows for more cost-effective repetitive transactions. Performing n transactions "on-chain" will incur n transaction fees. Whereas PC transaction fees are typically limited to two instances of the fee paid for funding transactions and settlement transactions (2×fee), regardless of the amount that needs to be paid to the recipient. This allows for greater scalability and makes transactions involving small payments feasible.

[0091] Additionally, PC transactions are more time efficient. An off-chain commitment transaction can be sent to someone in milliseconds, whereas it takes about 10 minutes for a transaction to be confirmed on the blockchain. If you wait for the recommended 6 blocks of security confirmation, it could take an hour, or even longer if the correct transaction fee is not paid.

[0092] One disadvantage of operating within a PC is that the responsibility of tracking the current state of a commitment lies with the parties involved. Since multiple transaction states are constantly being updated, it may be in a party's interest to use a previous transaction commitment that reflects their preferred state. There are various mechanisms to ensure that these "bad actors" cannot successfully broadcast a previous and therefore invalid commitment state, such as revocation contracts, timelocks, and nSequence combinations.

[0093] 5. Merkle Tree

[0094] Merkle trees are hash-based data structures that can efficiently verify large amounts of data. Figure 4A An example of a binary Merkle tree is shown. Figure 4A As shown:

[0095] For the top level, for example, Root = X1 = Hash(Y1||Y2)

[0096] For layer 1: Y1 = Hash(Z1||Z2), Y2 = Hash(Z3||Z4)

[0097] For layer 2: Z1 = Hash(V1||V2), Z2 = Hash(V3||V4), Z3 = Hash(V5||V6), Z4 = Hash(V7||V8)

[0098] Where Y1||Y2 represents the concatenation of two independent strings Y1 and Y2.

[0099] Collision resistance in hash functions (particularly SHA-256) ensures that the Merkle root of the structure is V defined for that Merkle tree i This also means that only knowing V i A set of values ​​(or possibly a higher-level value Y i , Z i The anti-image property of such hash functions also ensures that leaves cannot be derived from the Merkle root.

[0100] It should be noted that when a layer has an odd number of nodes, a dummy node (e.g., a dummy node with a value of 1) can be added to make the layer have an even number of nodes. i Now linked to the Merkle root X1 as an access chain. Any changes to the sequence or the values ​​completely change the root values ​​derived from them.

[0101] Merkle tree proofs (or Merkle proofs for short) are a way to efficiently prove that data entries were used to derive a Merkle root. To do so, it only requires a logarithmic amount of data, log2(N), where N represents the total number of data inputs. This provides an extremely compact and scalable verification tool where any proof can be executed to verify that some data was used before the Merkle root was formulated. This is particularly interesting in the case of multi-signature transactions that utilize signature trees. In this case, the locking script will include the root of the Merkle tree and the opcodes used to verify the Merkle proof. The unlocking script will include the Merkle proof and one of the spending conditions.

[0102] For example, consider a 1 / 8 multi-signature transaction. Each of the eight parties’ public keys (PK) will represent a leaf node. Each of these PKs will most likely be stored as a hash in a Merkle tree to ensure privacy, so V i =Hash(PK useri ).

[0103] like Figure 4B As shown, if user 5 wishes to provide a Merkle proof, they only need to know their public key PK5, V6(Hash(PK6), Z4, and Y1. This provides a more efficient scheme for proving data entries than, for example, a chained hash of all eight parties' public keys, as only a small fraction of the stages are used in the proof.

[0104] In a 1 / N (1-of-N) multi-signature equivalent Merkle tree, the steps for generating a locking script are as follows:

[0105] 1. Calculate the hashes of the public keys involved and use these hashes as leaves of the tree. For example, user 1 has public key P1, assuming V1 = Hash(P1)

[0106] 2. Calculate the Merkle Root

[0107] 3. Form the following locking script from the Merkle Root and n

[0108] Locking script:

[0109] OP_6OP_PICK OP_SHA256(OP_SWAP OP_IF OP_SWAP OP_ENDIF OP_CAT OP_SHA256)*n

[0110] <Merkle Root> OP_EQUALVERIFY OP_CHECKSIG

[0111] The string (OP_SWAP OP_IF OP_SWAP OP_ENDIF OP_CAT OP_SHA256)*n represents a Merkle root derivation that is performed n times. n depends on the number of levels in the Merkle tree. So for Figure 4B In the export shown, there are 3 levels in the tree, so the above Merkle root export script is executed 3 times, that is, n=3.

[0112] The unlocking script will include: signature, PK and Merkle proof, where the Merkle proof will include (<sibling_node> <direction>)*n. A "sibling" defines the hash value of another paired node that shares the same direct parent node. When moving along the Merkle proof path, the direction defines whether the sibling is to the left (0) or to the right (1). For example, user 5 with public key P5 would provide the following unlocking script:

[0113] Unlock script:

[0114] <sig> <pk5> <y1> <0> <z4> <1> <v6><1>

[0115] The unlocking and locking scripts behave as follows on the stack:

[0116]

[0117] 6. Data Exchange Protocol

[0118] Figure 5 An exemplary system for implementing the embodiments described herein is shown. System 500 includes a receiver 501 and one or more senders 502 . Figure 5 Two senders 502a, 502b are shown, but the system 500 may generally include any number of receivers. The system 500 also includes one or more nodes 104 or blockchain networks 106. For simplicity, the receiver is sometimes referred to as Alice 501. Similarly, the first of these senders is sometimes referred to as Bob 502a, and the second of these senders is sometimes referred to as Charlie 502b. The senders 502 may be configured to perform any of the actions performed by Alice 103a and / or Bob 103b described above and operate their respective computing devices. Similarly, any sender 502 may be configured to perform any of the actions performed by Alice 103a and / or Bob 103b described above and operate their respective computing devices.

[0119] Each sender 502 is configured to send one or more data items to a receiver 501. These data items can be data in any form, such as text, strings, documents, images, audio files, video files, software, etc. The receiver 501 is configured to receive data items from a sender. The receiver 501 receives a sequence of data sets, i.e., a sequence of sets of data items. Each set includes one or more data items. In other words, a set can consist of a single data item or multiple data items. Each data set can contain the same number of data items, or some data sets can contain different numbers of data items. In some examples, each data set is sent by the same sender 502. In other examples, multiple senders can send data sets to the receiver 501.

[0120] Each time the receiver 501 receives a data set, the receiver 501 uses all the data items in the received data items to create a Merkle tree. That is, when the receiver 501 receives the first data set, the data items in the first data set are used to create the first Merkle tree. Then, when the receiver 501 receives the second data set, the data items in the first data set are used to create the second Merkle tree. Similarly, when the receiver 501 receives the third data set, the data items in the first data set, the data items in the second data set, and the data items in the third data set are used to create the third Merkle tree. When each new data set is received, the process continues in a similar manner. The receiver receives a sequence of data sets and creates a sequence of Merkle trees. In this way, as more and more data sets are received, the original (i.e., first) Merkle tree continues to evolve.

[0121] When creating a Merkle tree, the receiver 501 hashes each data item separately and uses the resulting hash as a separate leaf node of the Merkle tree. That is, each data item in the first data set is hashed to form the corresponding leaf node of the first Merkle tree. Each data item in the first data set and each data item in the second data set are hashed to form the corresponding leaf node of the second Merkle tree, and so on. The receiver 501 can reuse one or more hash results instead of hashing each previously received data item each time a new Merkle tree is created. In other words, when creating a Merkle tree based on a second data item set, the receiver 501 can use the same leaves used in the Merkle tree generated based on the first data item set, instead of hashing each data item of the first data item set to generate the corresponding leaves of the Merkle tree. Assuming that the first Merkle tree is based on four data items and the second Merkle tree is based on another four data items (eight in total), the receiver 501 can reuse the four leaf hashes of the first Merkle tree as the first four leaf hashes of the second Merkle tree. The same applies to any of these Merkle trees, not just the first and second Merkle trees. In some examples, one or more leaf nodes may include a fill value, such as 0 or 1. This allows the Merkle tree to have an even number of leaf nodes.

[0122] Each Merkle tree has a corresponding Merkle root. The first Merkle tree has a first Merkle root, the second Merkle tree has a second Merkle root, and so on. Each time the recipient 501 creates a Merkle tree, the recipient 501 generates a confirmation transaction (i.e., a blockchain transaction) that contains an output locked to the Merkle root of the Merkle tree. That is, the recipient 501 receives a first data set, encodes the first data set into a first Merkle root, and locks the output of the first confirmation transaction to the first Merkle root. Then, the recipient 501 receives a second data set, encodes the second data set into a second Merkle root, and locks the output of the second confirmation transaction to the second Merkle root. This process continues for each data set, thereby creating a sequence of confirmation transactions. In some examples, the previous confirmation is updated to generate the next confirmation transaction, rather than recreating the next confirmation transaction.

[0123] The output of a given attestation transaction may be locked to a Merkle root using any suitable technique. Locking to a Merkle root means that the locking script requires the unlocking script of the spending transaction to include the Merkle root, or to include information used to derive the Merkle root when the locking script and unlocking script are executed together. For example, the locking script may include a hash puzzle based on the Merkle root. The hash puzzle includes a hash of the Merkle root. The unlocking script then needs to include the Merkle root, which, when hashed during script execution, produces a hash of the Merkle root. The resulting hash is compared to the hash included in the locking script.

[0124] In some examples, recipient 501 may include one or more respective hashes of the one or more respective data items in one or more of the validation transactions.

[0125] Each time a receiver 501 generates a confirmation transaction (i.e., a transaction locked to a new Merkle root), the receiver 501 sends the confirmation transaction to one or more senders 502. In some examples, each confirmation transaction is sent to each sender 502. In other examples, the confirmation transaction is sent only to the sender 501 that sent the latest data set in the sequence on which the corresponding Merkle root is based. That is, the nth data set is used to create the nth Merkle root of the nth Merkle tree, and the nth transaction has an output locked to the nth Merkle root. In this case, the nth confirmation transaction can be sent only to the sender 502 that sent the nth data set.

[0126] The receiver 501 may send each confirmation to one or more senders 502 before receiving the subsequent data set. That is, the nth transaction of the nth data set may be sent before the n+1th data set is received.

[0127] In some embodiments, the recipient 501 may also receive a Merkle root of the Merkle tree from the sender 502. The recipient 501 may then use the received Merkle root to lock the output of the confirmed transaction. The Merkle root may be generated by one or more of the senders 502. For example, a single sender 502 may have access to each data set and may therefore be able to generate each Merkle tree. In other examples, different senders 502 may have access to different data sets, and these senders 502 may collaborate to generate one or more of these Merkle trees. The nth Merkle root may be sent to the recipient 501 by the same sender 502 that sent the nth data set to the recipient 501.

[0128] Even though the receiver 501 can receive one or more Merkle roots, the receiver 501 can still compute those Merkle roots. Doing so can enable the receiver to "spot check" the sender's work, such as their calculations or verifications. For example, the sender 502 can send one or more data items and the Merkle root of the Merkle tree formed using these data items to the receiver 501. The receiver 501 can then perform a Merkle proof on one or more of these data items to confirm that they do belong to the Merkle tree (i.e., encoded by the Merkle tree). One or more data items on which the Merkle proof is performed can be randomly selected. This reduces the number of "spot checks" that the receiver 501 must perform (e.g., once per set of data items). In addition, since the sender 502 does not know which data item will be checked, the sender 502 is motivated to maintain a quality standard for each data item (e.g., each calculation, verification, etc.).

[0129] In an embodiment where the system 500 includes multiple senders 502, when the receiver 501 receives a data set from one of the senders 502, the receiver 501 can send the hash of each data item in the data set to each other sender 502, i.e., the sender that did not send the data set. This is to ensure that all parties can use the public Merkle tree, but only the sender 502 that calculated the value knows the original image of the leaf hash (e.g., the data). In some examples, the receiver 501 also sends the hash to the sender 501 that did send the data set. The receiver 501 sends a separate hash for each data item, rather than a hash of the combined data items. For example, if the data set includes three data items, the receiver 501 sends three hashes. This allows a sender 502 that does not have access to the data items sent by another sender 502 to still generate one or more Merkle roots of one or more Merkle trees.

[0130] The receiver 501 may choose to send only the hash to the sender 502 in response to the sender signing a confirmation transaction whose output is locked to the Merkle root of the Merkle tree generated based on the data items corresponding to the hash. That is, the nth confirmation transaction is locked to the nth Merkle root of the nth Merkle tree generated based on the nth data set (and previous data sets). The receiver 501 may send the nth confirmation transaction to one or more senders 502 and require the one or more senders 502 to sign the nth confirmation transaction before sending the hash of the data items in the nth data set to these one or more senders 502.

[0131] In some embodiments, the confirmation transaction can be sent as part of a payment channel. In this case, the receiver 501 first generates an initial transaction. The initial transaction has an output locked to the public key of the receiver 501. The output can also be locked to the corresponding public key of each sender 502. Each confirmation transaction includes an input that references the output of the initial transaction. The receiver 501 includes a signature generated using a private key corresponding to the receiver's public key in the input of each confirmation transaction. The initial transaction is sent to one or more senders in the blockchain network 106 and / or the sender 502. The sender may need to sign the initial transaction before the receiver 501 or the sender 502 sends it to the blockchain.

[0132] The data exchange protocol will now be described from the perspective of the sender 502. In the presence of a single sender 501, the sender sends a set of data items to a receiver, and a Merkle tree is generated based on the data items. In response to receiving a confirmation transaction, the sender 501 may generate a final transaction. The final transaction includes inputs that reference the outputs of the confirmation transaction and includes a Merkle root for unlocking the outputs. The final transaction is sent to the blockchain network 106 directly by the sender 501 or through the receiver 501. As described above, in some examples, the sender 502 may generate a Merkle root and send the Merkle root to the receiver 501, for example, so that the receiver 501 can spot check one or more of the data items.

[0133] It should be noted that a "final transaction" refers to a transaction that spends the output of a confirming transaction and thereby reveals the Merkle root. A final transaction should not be confused with the last of these confirming transactions, which may be a confirming transaction referenced by the final transaction.

[0134] The confirmation transaction referenced by the final transaction can be the first confirmation transaction generated by the receiver 501, or it can be a later confirmation transaction among these confirmation transactions. That is, the sender 502 can send a sequence of corresponding data sets to the receiver 501, and generate a corresponding Merkle tree for each corresponding data set, wherein the Merkle tree is based on the corresponding data set and each previous data set in the sequence. The sender 502 receives the corresponding confirmation transaction for each data set. The sender 502 selects which confirmation transaction to unlock using the final transaction. That is, the sender 502 selects the output of a specific confirmation transaction to reference the input of the final transaction, and includes the Merkle root of the Merkle tree that will unlock the output. The sender 502 will typically choose to unlock the output of the latest confirmation transaction.

[0135] Now consider the situation where there are multiple senders 502 (e.g., a first sender 502a and a second sender 502b). Each sender 502 sends a corresponding data set to the receiver 501. The corresponding data sets form a sequence of data sets. When the sender 502 sends the latest data set in the sequence, the sender 502 can receive a confirmation transaction from the receiver 501. When the sender 502 does not send the latest data set in the sequence (i.e., the latest data set is sent by a different sender 502), the sender 502 can also receive a hash of the data items in the set. This may depend on the sender 502 signing the confirmation transaction. The sender 502 can use the received hash to generate a Merkle tree based on subsequent data sets. This allows the sender 502 to use the same public Merkle tree and add future data entries (leaf nodes) to generate the next version of the Merkle tree.

[0136] The system 500 may also include a verifier (not shown). The verifier may be a different party or may be the receiver 501 or one of the senders 502. The verifier has access to a data item and wants to verify that the data item was exchanged between the sender 502 and the receiver 501. The verifier obtains the final transaction from the blockchain 150 and extracts the Merkle root. The verifier then verifies that the data item was used to generate the Merkle root by executing a Merkle proof. The verifier may have access to the internal hash of the Merkle tree, or the verifier may receive the internal hash from the receiver 501 and / or one of the senders 502.

[0137] 7. Merkle Index Root

[0138] This section provides further examples of the described embodiments.

[0139] Blockchain allows information to be stored on-chain in an immutable manner, but transaction fees and low latency make incremental data transfer and storage impractical. To this end, the use of payment channels (PCs) can eliminate such problems, allowing high-frequency data exchanges and requiring fees to be paid only when the PC is opened and closed on the chain. However, PCs are P2P and exchanges occur off-chain, eliminating any method of verifying that certain data is stored correctly.

[0140] The embodiment uses the Merkle tree as a mechanism within the PC to provide a method of data exchange and storage. Locking the output to the Merkle root formed by the data exchanged off-chain will provide guarantees for the data calculated and transmitted by the PC during on-chain settlement. This will also provide enhanced functionality and an additional layer of security between the sender and the receiver.

[0141] Funding party 501 provides a certain amount of funds to computing party 502 through an off-chain commitment transaction to perform certain computations and transmit the computations to funding party 501. Computation involves performing some work to create data output. For example, this can be calculation, verification, or data collection.

[0142] The data calculated and exchanged in the PC forms the preimage data entries (leaf nodes) in the Merkle tree, which is common to the funding party and the computing party. The Merkle root defined from these data entries is then used in the locking script. If any party wishes to settle the PC, they must reveal the Merkle root on-chain. This ensures that any party who knows the preimage data can verify that certain data is correctly calculated and stored within the off-chain PC that forms the Merkle tree.

[0143] Locking commitment transactions to a Merkle root formed by multiple data calculations ensures that the computing party and the funding party have common data throughout the development of the PC and that communication errors will not occur. They also provide an efficient way to authenticate the sequence of computations and commitment transactions associated with these computations. Once the Merkle root is published on the chain, Merkle proofs can be executed to allow efficient verification that certain data is included in the calculated Merkle tree without revealing other data.

[0144] 7.1 Evolving Merkle Trees — Single Pass

[0145] As computations are exchanged within the PC, the parties 501, 502 iteratively increase the capacity of the Merkle tree to include new values. This is referred to herein as an "evolving Merkle tree". Each time the computational party 502 sends computed data to the funding party 501, the data entry is added to the evolving Merkle tree, which increases the number of leaves and, ultimately, the number of layers. The Merkle root also changes with each additional data entry. This property can be used to continuously update the locking script for new committed transactions within the PC. As previously described, if either party wishes to settle the PC, they must reveal the preimage Merkle root on-chain to unlock the funds, which then allows either party to verify that the data was correctly recorded in the Merkle root given the preimage data.

[0146] Consider a one-way PC, where funding is provided for a certain amount of work, such as computation, data verification, or data collection and storage. Data computed from the computation party 502 and sent to the funding party 501 is entered as a preimage leaf node entry in the Merkle tree. The associated commitment transaction (i.e., the confirmation transaction) granted to the computation party for this is locked from this entry to the hashed Merkle root.

[0147] In these examples, the first phase involves establishing an (initial) funding transaction between Alice 103a (receiver 501) and Bob 103b (sender 502). The funding transaction has inputs from both parties and a 2 / 2 multi-signature output, as shown in the following exemplary transaction:

[0148]

[0149] This transaction is published on-chain to commit funds to the PC. The computing party (Bob 103b) does not have to contribute funds to the PC, but Alice 103a may require him to contribute funds to secure his commitment.

[0150] A refund transaction may also be created, the purpose of which is to return the escrowed funds to the original owner based on the initial state. A refund transaction is published to the blockchain 150 only if no further commitment transactions are created and signed. An exemplary refund transaction is shown below.

[0151]

[0152] Thus, a series of "off-chain" transactions are created. These off-chain commitment transactions are sent from Alice 103a, the funding party, to Bob 103b, the computing party, to obtain the calculated data. Linking the exchanged and calculated data to the Merkle tree can efficiently verify that certain data entries were calculated and stored during off-chain activities in the PC (after on-chain settlement). This can be done without explicitly revealing other data entries, because other data entries in hashed form can be used as proof.

[0153] Additionally, for such arrangements, locking the commitment transaction output to the Merkle tree root ensures that the unlocking party has received and / or stored all previously computed dependencies, adding a layer of security and work requirement for anyone trying to access the funds. A commitment transaction might look like the following.

[0154]

[0155] Refer to the above transaction:

[0156] i is the committed transaction index;

[0157] N is a fixed amount of reward calculated each time;

[0158] MerkleRooti is the Merkle root derived from the i-th computation;

[0159] V0-V i Represents any hashed leaf node data that the funding party may wish to make public after settlement.

[0160] Figure 6 This outlines how the evolving Merkle tree evolves over a cycle of multiple committed transactions within a PC. It can be summarized as follows:

[0161] Bob calculates m i and sends it to Alice;

[0162] Alice Verification m i And add the value to the Merkle tree;

[0163] Alice creates an updated commitment transaction Tx i , the commitment transaction locks to the hash of the new Merkle root and Bob’s address;

[0164] Alice will Tx i Sent to Bob, who can unlock and broadcast the transaction on-chain at any time;

[0165] This is repeated over multiple computations so that the Merkle tree continues to grow as shown.

[0166] Locking the commitment transaction to a hashed Merkle root in this way ensures that the data computed and exchanged during the off-chain phase of the PC is always structured as a Merkle tree. If at any time the PC is settled, the Merkle root of the tree is revealed on-chain, allowing any party that knows the tree to verify that certain data was computed and exchanged during the off-chain phase of the PC. "Known to some extent" means some other data within the tree in hashed form, which can be stored in the output of the commitment transaction using OP_RETURN.

[0167] For example, let’s say a company wants to collect some records from several different departments within that company. They outsource this data collection to auditors who want to perform the work incrementally within the PC to save money and time while minimizing the risk that they won’t get paid for some of the work. The PC happens between the company’s executive team and the outsourced auditors, not between the departments themselves. As the data is collected and exchanged, the executive team sends commitment transactions to the audit team. Each updated commitment transaction output is locked using a hashed Merkle root that references all of the data exchanged up to that point.

[0168] Since these commitment transactions are sent off-chain within the PC, it is not possible to rely on the immutable properties of the blockchain to verify that this data is stored correctly. The above protocol ensures that when the PC is settled on-chain, the parties have an efficient way to verify that the data is stored correctly in the Merkle tree. If one of these departments wants to verify that certain data entries were submitted correctly during data collection, they can perform a Merkle proof using the preimage of these records of the on-chain Merkle root and some hashed information from the rest of the tree. If department 2 wants to verify that the set of data records is stored correctly, they can perform a Merkle proof such as Figure 7 As shown. Knowing only the preimage of the second record set, they need the hashed values ​​V1, Z2, and Y2 and the on-chain root to ensure that the data was correctly entered and stored in the correct sequence. This is an efficient way to prove that a dataset was used for a large dataset without revealing any other preimage data.

[0169] One benefit of this protocol is that it provides a mechanism to verify data transmitted between parties during the off-chain phase of the PC. The protocol also provides the following additional benefits:

[0170] Additional security - The protocol ensures that only individuals with a Merkle root (formed by knowing all data entries (e.g., calculations)) can access the funds locked in each transaction commitment. This ensures that only the party that has completed the relevant necessary work can access the funds. For the above example, this means that only the computing party that has calculated and stored all the calculations can claim the funds locked by the funding party. This may be particularly important when there are multiple parties trying to claim the funds.

[0171] Transfer Verification - The protocol also ensures that the funding party and the computing party have correctly submitted and stored the same message m i If the computation side sends messages m1, m2, and m3 to the funding side, the funding side commits m1, m2, and m3 to the Merkle tree and derives a Merkle root from these values. The transaction commitment sent by the funding side to the computation side will be locked using this Merkle root. Funds can only be unlocked if the Merkle roots of the funding side and the computation side are the same, which can only happen if the values ​​and sequence of m1, m2, and m3 are the same, as described above.

[0172] Spot Checks - Merkle proofs also allow the funding party to perform occasional spot checks on multiple computations being performed by the computing party. For example, rather than verifying each data entry as it is sent, the funding party might periodically perform a Merkle proof on previous entries to verify the data.

[0173] 7.1.1 Evolving Merkle Index Root Use Case 1 — PC Verifiable Data Storage

[0174] Alice 103a is an online game manager and Bob 103b runs one of the online games. Alice 103a wants to store all data related to the game on the blockchain 150 on a regular basis, but knows that the associated fees and latency will make this impractical for every round or every poker game. Alice wants to use a PC with Bob to exchange data about each round of the game. Bob works on commission, so he receives a certain amount of funds every round and records these funds inside the PC. Funding transactions and settlement transactions are the only stages in the PC that are publicly displayed on the chain. However, the information Bob passes to Alice represents the status of the round involving players (not Alice and Bob). These parties may want to verify that the status is recorded correctly, and since these parties are not involved in the PC, they need a mechanism to do so. In addition, some private information of other parties should not be revealed during the verification process, for example, players may not want their cards to be revealed to other players. In this example, there is 1 round of game and 6 players in the online game. In a real world example, there may be multiple rounds. The formulation, development and settlement of the PCs representing this poker game might be as follows:

[0175] V0-V6 indicates the status of the player in this round, which may include:

[0176] The value of the chips at the start of the round;

[0177] · Deal 2 cards to the player;

[0178] The amount of bets for this round.

[0179] V7 represents the results of the game itself, which may include:

[0180] ·5 cards are dealt to the table (if dealt before);

[0181] The winner of the round.

[0182] Using Merkle Root in this way i The hash of the committed transaction is used to lock the output of the commitment transaction, which ensures that the data input sequence V0-V7 has been recognized and maintained by the supporting parties Alice and Bob. Once the game is over and the settlement transaction is broadcast on the chain, the players can verify that Alice and Bob correctly recorded their states off-chain in their PCs. In this example, they can also verify that the game result V7 is recorded correctly. This is done using a Merkle proof of the pre-image data in the correct sequence and some hashed values ​​of the rest of the Merkle tree, which can be made public off-chain on some shared platform or through a transaction output that utilizes OP_RETURN. Furthermore, this can be done without revealing any pre-image information about the states of other players. Figure 8 An example of this protocol for implementing this use case is shown.

[0183] 7.1.2 Evolving Merkle Index Root Use Case 2—PC Computing Partially Trusted

[0184] This use case considers a computation outsourcing arrangement. Alice 103a wants to outsource a series of computations to Bob 103b. As a precaution, Bob wants to be paid a certain amount of money for each computation in case Alice refuses to pay for some work. Bob can send in each computation, which is then verified by Alice within the PC before sending the updated commitment transaction. However, suppose that Alice and Bob partially trust each other because they have worked together before and Bob has been proven to be reliable. Both parties want to speed up the process of sending all of these computations. Bob does not trust Alice enough to send all of the computations in a single batch; Alice also does not trust Bob enough to have some kind of incremental verification protocol.

[0185] This interaction might assume that the computation is difficult to solve, but easy to verify. An example is to consider hashing a dataset to be below some difficulty threshold, as is done in proof-of-work activities (Bitcoin mining). Suppose Alice wants Bob to compute the hashes of a series of datasets using variable random numbers and ensure that all hashes are below some difficulty threshold. This use case is summarized below:

[0186] Alice wants Bob to use the random number to calculate 1000 hash values ​​m below a certain difficulty threshold i Alice will set up a PC in which she can pay Bob incrementally. Alice will allow Bob to compute values ​​in groups of 8 and form a Merkle tree from these groups. Thus, the first group will contain elements m1-m8 and the second group will contain elements m9-m 16 It should be noted that the tree will continue to expand so that the first Merkle tree of the first group is compounded with the second group to create a Merkle tree consisting of 16 elements.

[0187] The process can be as follows:

[0188] Alice can create a funding transaction with Bob to contribute a certain amount of funds to the PC. She can specify the computations required and the reward for each set of computations. They agree on the number of computations exchanged for each commitment transaction reward. Bob and Alice agree on 8 elements per group.

[0189] Bob computes the first group elements m1-m8 and the Merkle Root1 and sends it to Alice.

[0190] Alice receives these elements and performs a Merkle proof on the random preimage data entry to verify. Fig. 9 As shown, Alice randomly chooses to verify m4 and ensures that the Merkle Root1 that Bob has sent to her corresponds to the value and sequence sent. This random verification means that Bob will be sure that all calculations were completed correctly because Bob has no way of knowing which value will be checked.

[0191] After verification, Alice sends Bob a commitment transaction with a locking script associated with Bob’s public key and the hash of MerkleRoot1. She can also include the hashed data values ​​V1-V8 of the Merkle tree in the output containing the OP_RETURN code.

[0192] Bob then proceeds to calculate the second group of 8 values. He combines these values ​​with the original group to ensure that the groups are linked in the Merkle tree. Since Alice and Bob both already have values ​​m1-m8, Bob only needs to transmit values ​​m9-m 16 and the new Merkle Root2.

[0193] Alice receives these values ​​and performs a Merkle proof on the random preimage data entry to verify as before. Fig.10 As shown, Alice has chosen to verify m in the new group 13 They perform a Merkle proof on this to ensure that the Merkle root that Bob has sent her corresponds to the value and sequence that was sent.

[0194] ·In m 13 After the calculation and Merkle Root2 verification is complete, Alice sends an updated commitment transaction with a locking script associated with Bob's public key and the hash of the Merkle Root2. She can also include the hashed data value of the Merkle tree in the output containing the OP_RETURN code.

[0195] This process will continue until m has been calculated. 1000 entries and transfers them from Bob to Alice. At this point the Merkle tree and the Merkle root are final. Alice can then use the locking script to create a final settlement transaction:

[0196] OP_SHA256 <H(Merkle Root 125 )>OP_EQUALVERIFY <PK B >

[0197] OP_CHECKSIGVERIFY

[0198] Since Bob has the entire Merkle tree, he can compute the final (125th) Merkle root and push it into the unlocking script along with his signature and public key, like this:

[0199] <Sig B > <PK B > <Merkle Root 125 >

[0200] This allows Bob and Alice to significantly reduce the number of commitment transactions exchanged with Alice, making the process more efficient. Additionally, Alice can perform a Merkle proof on each random group to ensure that Bob performed the calculation correctly. This ensures a level of security, as Bob does not know which value Alice will verify, and therefore ensures that all calculations are performed correctly to secure the funds.

[0201] Using Merkle Root in this way i The hash of the transaction is used to lock the commitment transaction, which ensures that the data is entered in the sequence V0-V i It has been recognized and maintained by the computation party and the funding party. Then, any stakeholder with data related to the computation and the Merkle tree can ensure that their data is computed / stored according to the Merkle root revealed in the unlocking script. The hashed data can be publicly stored by creating an output storing the hashed leaf value in the commitment transaction / settlement transaction; and sequencing with the OP_RETURN operation code.

[0202] 7.2 Evolving Merkle Index Roots — Multi-Channel

[0203] The above exemplary use case considers a single 1-to-1 PC relationship, where one party is a funding party 501 and the other party is a computation party 502. The relationship is unidirectional, where the computation party 502 transfers data in exchange for funds distributed within the PC. In other scenarios, there are multiple computation parties 502 performing operations against one or more payments from one funding party 501. This may be the case for subcontractors of a single entity, which will be discussed in the use case. In this case, the evolving Merkle tree ensures that when performing and exchanging computations, all parties use a common Merkle tree solution, allowing them to easily verify data entries.

[0204] As previously described, funding party 501 can establish a funding transaction with a multi-signature output that includes all computing parties. Computations may be competitive, in which case there is a "competition" for the computed value, which may only require a 2 / 3 multi-signature arrangement. However, computations can also be considered collaborative. In this case, a 3 / 3 multi-signature protocol can be utilized to ensure that both parties agree on the latest state update and therefore have the latest Merkle tree and Merkle root to update the script.

[0205] Consider two computing parties, Bob 502a and Claire 502b, collaborating with funding party Alice 501. Fig.11 As shown, Bob 502a calculates the value m i 502a computes the value and sends it to Alice 501a, who verifies it. After verification, Alice 501a adds the value to her Merkle tree and updates the Merkle root accordingly. She then generates a commitment transaction, rewarding Bob 502a with the additional funds to compute the value. To use the transaction, Bob 502a still needs Claire’s signature, which can be done by only revealing Bob’s computation m when Claire 502b signs the commitment transaction. i Bob 502a, Alice 501, or an automated oracle function can perform this function.

[0206] For example, Alice 501 can generate a transaction, sign it, and then send it to Claire 502b to sign. It is in Claire 502b's interest to sign the commitment transaction and send it back to Alice 501 and / or Bob 502b, because in return, these parties can reveal a hashed version of the previous computation performed by Bob (m i ). Claire 502b needs this value to continue using the public Merkle tree that defines this PC. She could try to compute this value on her own, but it may be less work to just sign the commitment transaction and receive this value off-chain. She can then start working on the next computation to try to get funds from Alice 501.

[0207] Select to reveal only m i There are two reasons for including a hashed version of the original image. First, the original image data may be sensitive and therefore may not be suitable for explicit disclosure to Claire 502b, for example. Furthermore, if Bob 502b is the only one who has successfully computed the data, this ensures that only Bob can provide a Merkle proof for that data entry.

[0208] For Bob 502a and Claire 502b, this computation, verification, and signing process can work in either direction, so that the evolving Merkle tree is public to all parties as it progresses. Fig.12 , the inputs in the dashed squares represent the inputs calculated by Bob 502a, and the inputs in the solid squares represent the inputs calculated by Claire 502b.

[0209] The protocol allows multiple parties to order, lock, and unlock transactions within a PC. The protocol allows any party with pre-image data to verify that the data is stored and utilized in the Merkle tree formed within the PC off-chain. This can also allow parties not participating in the PC to verify that the data is stored correctly after the PC is settled on-chain.

[0210] Furthermore, only the party that generated the preimage computation can verify that data entry using the Merkle proof. This can be used to efficiently resolve disputes between parties regarding who computed one of the values ​​in the Merkle tree. Furthermore, this is achieved without requiring the funding party to store all the values ​​of the data entry. In this way, this also allows any user who knows the preimage data to verify that their data is correctly stored in the Merkle tree.

[0211] 7.2.1 Evolving Merkle Index Proof of Stake Use Case 3 — PCL Oracle Vaccine Data Storage

[0212] Alice runs a vaccine distribution company and wants to outsource data collection and vaccine data upload to multiple parties (Bob and Claire). Unlike the previous example, this will form a 3 / 3 multi-signature transaction, where Alice, Bob, and Claire must provide their signatures to the transaction in order for any party to redeem it.

[0213] Bob and Claire want to be paid a certain amount of money for each computation. In this example, Bob and Claire's "computation" will be a message containing the vaccine unique identifier, the patient PK, the data, time, location, the patient's signature associated with the message, and the signature of the message from Bob / Claire as the vaccine authenticator. Alice has a list of vaccine unique identifiers and a list of PKs of vaccine recipients. Using this information, she can verify that the data sent is valid.

[0214] Since the process is predictable, Alice wants to build an oracle to automate the PC for the committed transaction. Until now, this has relied on Alice performing off-chain execution of repetitive code, namely verifying the transaction in the PC.

[0215] Initial setup, PC and settlement may be as follows Fig.13 Now, outlining this off-chain process and delegating it to the role of the oracle, the oracle simply reads each successive transaction in conjunction with the initial funding transaction and performs some function to produce the next transaction. Since the PC is off-chain, it can be assumed that the variables can be sent to the oracle in a variety of formats.

[0216] In this example, the oracle can receive the computation m from either Bob or Claire. i Once verified, the oracle can update the internally stored Merkle tree to include this computation and generate a commitment transaction linked to the hash of the formed Merkle root, which may need to be signed by the other computation parties to be valid.

[0217] In this example, the first computation m1 is performed by Bob and sent to the oracle. The oracle will verify this data. If valid, the oracle will update its Merkle tree and Merkle root to include the value m1. The oracle will then generate a transaction that:

[0218] a. Increase the amount of funds sent to Bob by 1 increment (reducing the amount of funds returned to the oracle);

[0219] b. Lock the commitment transaction associated with Alice, Bob, and Claire’s signatures and the hash of the new Merkle root;

[0220] c. Has an output that contains the data hashed by the Merkle tree (via OP_RETURN).

[0221] Since this is now a multi-party arrangement, the updated commitment transaction can be sent to the other computational party, Claire, who can generate a signature for it and send it back to the oracle. In return for Claire's signature, the oracle may release the hashed value H(m1). Claire may need this value to continue operating within the PC, and all future Merkle roots will be based on this value.

[0222] Once the oracle gets Claire's signature, it can send a commitment transaction to Bob, which includes Alice and Claire's signatures. Bob can sign the commitment transaction and broadcast it to the blockchain with his signature at any time, or continue to operate within the PC with Claire and profit.

[0223] As the process of Bob and Claire computing data and transmitting it to the oracle continues, the Merkle tree continues to grow. This will provide an efficient way for vaccine administrators to efficiently verify that they have the preimage vaccine data used in the Merkle tree. Since the preimage data is associated with its PK and signature, this may be relevant to vaccine certification programs.

[0224] Another benefit of locking commitment transactions in this way for multiple computing parties is that the data being computed is structured in a public Merkle tree. As mentioned earlier, other computing parties only need a hashed version of the data entry to continue working on the public Merkle tree for future commitment transactions. This means that at any time a party can verify that they have already computed the data entry using the Merkle index proof of the preimage data within the public Merkle tree. This can be used to efficiently resolve disputes between parties about who computed one of the values ​​in the Merkle tree. For this example, this can be used to prove when and where a patient was last vaccinated. The latest version of the data entry in the sequence is accepted as the most recent. Furthermore, this is achieved without the need for the funding party to store all the values ​​of the data entry. In this way, this also allows any user who knows the preimage data to verify that their data is correctly stored in the Merkle tree.

[0225] 8. Further comments

[0226] Other variations or uses of the disclosed technology may become apparent to those skilled in the art once given the disclosure herein.The scope of the present disclosure is not limited by the described embodiments but only by the appended claims.

[0227] For example, some of the embodiments above have been described in terms of the Bitcoin network 106, the Bitcoin blockchain 150, and the Bitcoin node 104. However, it should be understood that the Bitcoin blockchain is a specific example of a blockchain 150, and the above description can generally be applied to any blockchain. That is, the present invention is in no way limited to the Bitcoin blockchain. More generally, any references to the Bitcoin network 106, the Bitcoin blockchain 150, and the Bitcoin node 104 above can be replaced with reference to the blockchain network 106, the blockchain 150, and the blockchain node 104, respectively. Blockchains, blockchain networks, and / or blockchain nodes can share some or all of the characteristics of the Bitcoin blockchain 150, the Bitcoin network 106, and the Bitcoin node 104 described above.

[0228] In a preferred embodiment of the present invention, the blockchain network 106 is a Bitcoin network, and the Bitcoin node 104 performs at least all of the functions described in creating, publishing, propagating and storing blocks 151 of the blockchain 150. It is not excluded that there may be other network entities (or network elements) that perform only one or some of these functions but not all of them. That is, a network entity may perform the functions of propagating and / or storing blocks without creating and publishing blocks (remember that these entities are not considered to be nodes of the preferred Bitcoin network 106).

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

[0230] Even more generally, any reference above to the term "Bitcoin node" 104 may be replaced with the term "network entity" or "network element," where such entity / element is configured to perform some or all of the roles in creating, publishing, propagating, and storing blocks. The functionality of such a network entity / element may be implemented in hardware in the same manner as described above with reference to blockchain node 104.

[0231] It should be understood that the above embodiments are described by way of example only. In more general terms, a method, apparatus or program may be provided according to any one or more of the following statements.

[0232] Statement 1. A computer-implemented method for verifying a sequence of data exchanges between a group, wherein the group includes a receiver and one or more senders, and wherein the method is performed by the receiver and comprises:

[0233] receiving a sequence of two or more respective sets of data items, each respective set being sent by a respective sender; and,

[0234] For each corresponding set of data items in the sequence:

[0235] generating a respective confirmation transaction, wherein the respective confirmation transaction comprises a respective output, the respective output being locked to a respective Merkle root of a respective Merkle tree, wherein the respective Merkle tree is based on the respective set of data items and each previous set of respective data items in the sequence; and,

[0236] The respective confirmation transaction is sent to at least the respective sender that sent the respective set.

[0237] In addition, the corresponding confirmation transaction may also be sent to the corresponding one or more senders (ie, all senders) that did not send the corresponding set.

[0238] Statement 2. The method of statement 1, wherein one, some, or all of the sets of corresponding data items comprise a single data item.

[0239] Statement 3. The method of statement 1 or 2, wherein one, some or all of the corresponding sets of data items include multiple data items.

[0240] Statement 4. A method according to any of the preceding statements, comprising:

[0241] For each corresponding set of data items in the sequence, a corresponding hash of each data item in the corresponding set is sent at least to the corresponding one or more senders that did not send the corresponding set.

[0242] In addition, the corresponding hash may also be sent to the corresponding sender (ie, all senders) that actually sent the corresponding set.

[0243] Statement 5. The method of statement 4, wherein sending the corresponding hash of each data item is contingent upon the corresponding one or more senders who did not send the corresponding set signing the corresponding confirmation transaction.

[0244] Statement 6. A method according to any of the preceding statements, wherein sending the corresponding confirmation transaction includes: before receiving the next corresponding set of data items in the sequence, sending the corresponding confirmation transaction to at least the corresponding sender that sent the corresponding set.

[0245] Statement 7. A method according to any of the preceding statements, comprising:

[0246] For one or more respective sets of data items, the respective Merkle roots of the respective Merkle trees are generated.

[0247] Statement 8. The method of any one of statements 1 to 6, comprising:

[0248] For one or more respective sets of data items, the respective Merkle root of the respective Merkle tree is received from the respective sender that sent the respective set.

[0249] Statement 9. The method of statement 8, comprising:

[0250] For at least one corresponding set of data items in the one or more corresponding sets of data items, a Merkle proof is performed on at least one of the data items in the corresponding set using the corresponding Merkle root.

[0251] Statement 10. A method according to any of the preceding statements, the method comprising:

[0252] generating an initial transaction, wherein the initial transaction comprises an output locked to a public key of the recipient and one or more additional public keys, each of the additional public keys being associated with a respective sender, and wherein each respective confirming transaction comprises a respective input referencing the output of the initial transaction and comprising a signature corresponding to the public key of the recipient; and,

[0253] The initial transaction is sent to one or more nodes of the blockchain network and / or at least one sender of the one or more senders.

[0254] Statement 11. A method as described in any of the preceding statements, wherein the group consists of a single sender.

[0255] Statement 12. The method of any one of statements 1 to 10, wherein the group comprises a plurality of senders.

[0256] Statement 13. A method as described in any of the preceding statements, wherein the respective output of each respective attestation transaction is locked to the respective Merkle root of the respective Merkle tree via a hash puzzle.

[0257] Statement 14. A method as described in any of the preceding statements, wherein the respective confirmation transactions include one or more respective hashes of the respective data items on which the respective Merkle trees are based.

[0258] Statement 15. A computer-implemented method for verifying a sequence of data exchanges between a group, wherein the group includes a receiver and one or more senders, and wherein the method is performed by a first one of the senders and comprises:

[0259] sending a corresponding data item set to the recipient, wherein the corresponding data item set is a final corresponding set of a sequence of two or more corresponding data item sets;

[0260] receiving a respective confirmation transaction, wherein the respective confirmation transaction comprises a respective output, the respective output being locked to a respective Merkle root of a respective Merkle tree, wherein the respective Merkle tree is based on the respective set of data items and each previous set of respective data items in the sequence;

[0261] Sending the corresponding confirmation transaction to one or more nodes of the blockchain network, the recipient, and at least one of the one or more senders, so that the corresponding confirmation transaction is recorded on the blockchain;

[0262] generating a finalized transaction, wherein the finalized transaction includes inputs that reference the corresponding outputs of the corresponding attestation transaction and include the corresponding Merkle root; and,

[0263] The final transaction is sent to at least one of: one or more nodes of the blockchain network, the recipient, and at least one sender of the one or more senders.

[0264] Statement 16. The method of statement 15, comprising:

[0265] One or more additional corresponding data item sets are sent to the recipient.

[0266] Statement 17. The method of statement 15 or 16, wherein said generating said final transaction comprises: generating said corresponding Merkle root of said corresponding Merkle tree based on said corresponding set of data items and each previous corresponding set of data items in said sequence.

[0267] Statement 18. The method of statement 17, comprising: sending the corresponding Merkle root to the recipient.

[0268] Statement 19. The method of statement 15 or 16, comprising:

[0269] For one or more corresponding sets of data items in the sequence, a corresponding hash of each data item in the corresponding set is received, and wherein generating the final transaction comprises: generating the corresponding Merkle root of the corresponding Merkle tree based on the corresponding set of data items and the received corresponding hash.

[0270] Statement 20. The method of statement 15 or any statement dependent thereon, wherein one, some or all of the sets of corresponding data items comprise a single data item.

[0271] Statement 21. The method of statement 15 or any statement dependent thereon, wherein one, some or all of the corresponding sets of data items include a plurality of data items.

[0272] Statement 22. The method according to statement 15 or any statement dependent thereon, the method comprising:

[0273] obtaining an initial transaction, wherein the initial transaction includes an output locked to a public key of the recipient and a public key of the first sender, and wherein the corresponding confirming transaction includes a corresponding input referencing the output of the initial transaction and including a signature corresponding to the public key of the recipient and a signature corresponding to the public key of the first sender; and,

[0274] The initial transaction is sent to at least one of: one or more nodes of the blockchain network, the recipient, or at least one recipient of the one or more recipients.

[0275] Statement 23. A computer-implemented method for verifying a data item exchanged between a group, wherein the method is performed by a verifier and comprises:

[0276] Retrieve a finalized transaction from a blockchain, wherein the finalized transaction references an output of a confirming transaction and comprises a Merkle root of a Merkle tree, wherein the confirming transaction comprises an output locked to the Merkle, wherein the Merkle tree is based on each set of data items belonging to a sequence of two or more corresponding sets of data items;

[0277] Obtaining an internal hash set of the Merkle tree; and,

[0278] A Merkle proof is performed on a candidate data item using the internal set of hashes and the Merkle root to verify that the candidate data item belongs to one of the sets of corresponding data items.

[0279] Statement 24. A computer device, the computer device comprising:

[0280] a memory, the memory comprising one or more memory cells; and,

[0281] A processing device comprising one or more processing units, wherein the memory stores code configured to be executed on the processing device, the code being configured to execute a method according to any one of statements 1 to 23 when executed on the processing device.

[0282] Statement 25. A computer program embodied on a computer readable memory and configured to, when executed on one or more processors, perform the method of any one of statements 1 to 23.

[0283] According to another aspect disclosed herein, a method may be provided, the method comprising actions of the receiver and at least the first sender.

[0284] According to another aspect disclosed herein, a system may be provided, the system comprising the receiver and at least the first sender's computer device. < / z4> < / y1> < / pk5> < / sig> < / direction> < / pa>

Claims

1. A computer-implemented method for verifying a sequence of data exchanges between a group, wherein the group comprises a receiver and one or more senders, and wherein the method is performed by the receiver and comprises: receiving a sequence of two or more corresponding sets of data items, each corresponding set being sent by a corresponding sender; as well as For each corresponding set of data items in the sequence: generating a respective confirmation transaction, wherein the respective confirmation transaction comprises a respective output locked to a respective Merkle root of a respective Merkle tree, wherein the respective Merkle tree is based on the respective set of data items and each previous set of respective data items in the sequence; and The respective confirmation transaction is sent to at least the respective sender that sent the respective set. 2 . The method of claim 1 , wherein one, some or all of the sets of corresponding data items comprise a single data item.

3. A method according to claim 1 or 2, wherein one, some or all of the sets of corresponding data items comprise a plurality of data items.

4. A method according to any preceding claim, comprising: For each corresponding set of data items in the sequence, a corresponding hash of each data item in the corresponding set is sent at least to the corresponding one or more senders that did not send the corresponding set.

5. The method of claim 4, wherein sending the corresponding hash of each data item is contingent upon the corresponding one or more senders who did not send the corresponding set signing the corresponding confirmation transaction.

6. The method according to any preceding claim, wherein sending the corresponding confirmation transaction comprises: Prior to receiving a subsequent corresponding set of data items in the sequence, the corresponding confirmation transaction is sent at least to the corresponding sender that sent the corresponding set.

7. A method according to any preceding claim, comprising: For one or more respective sets of data items, the respective Merkle roots of the respective Merkle trees are generated.

8. The method according to any one of claims 1 to 6, comprising: For one or more respective sets of data items, the respective Merkle roots of the respective Merkle trees are received from the respective senders that sent the respective sets.

9. The method according to claim 8, comprising: For at least one corresponding set of data items in the one or more corresponding sets of data items, a Merkle proof is performed on at least one of the data items in the corresponding set using the corresponding Merkle root.

10. A method according to any preceding claim, comprising: generating an initial transaction, wherein the initial transaction comprises an output locked to a public key of the recipient and one or more additional public keys, each of the additional public keys being associated with a respective sender, and wherein each respective attestation transaction comprises a respective input referencing the output of the initial transaction and comprising a signature corresponding to the public key of the recipient; as well as The initial transaction is sent to one or more nodes of the blockchain network and / or at least one sender of the one or more senders.

11. A method according to any preceding claim, wherein the group consists of a single sender.

12. The method according to any one of claims 1 to 10, wherein the group comprises a plurality of senders.

13. A method according to any preceding claim, wherein the respective output of each respective attestation transaction is locked to the respective Merkle root of the respective Merkle tree by a hash puzzle.

14. A method according to any preceding claim, wherein the respective confirmation transaction comprises one or more respective hashes of the respective data items on which the respective Merkle tree is based.

15. A computer-implemented method for verifying a sequence of data exchanges between a group, wherein the group comprises a receiver and one or more senders, and wherein the method is performed by a first sender among the senders and comprises: sending a corresponding data item set to the recipient, wherein the corresponding data item set is a final corresponding set of a sequence of two or more corresponding data item sets; receiving a respective confirmation transaction, wherein the respective confirmation transaction comprises a respective output locked to a respective Merkle root of a respective Merkle tree, wherein the respective Merkle tree is based on the respective set of data items and each previous set of respective data items in the sequence; Sending the corresponding confirmation transaction to one or more nodes of the blockchain network, the recipient, and at least one of the one or more senders, so that the corresponding confirmation transaction is recorded on the blockchain; generating a final transaction, wherein the final transaction includes an input referencing the corresponding output of the corresponding attestation transaction and includes the corresponding Merkle root; as well as The final transaction is sent to at least one of: one or more nodes of the blockchain network, the recipient, and at least one sender of the one or more senders.

16. The method according to claim 15, comprising: One or more additional corresponding data item sets are sent to the recipient.

17. The method according to claim 15 or 16, wherein said generating said final transaction comprises: The respective Merkle root of the respective Merkle tree is generated based on the respective set of data items and each previous respective set of data items in the sequence.

18. The method according to claim 17, comprising: The corresponding Merkle root is sent to the recipient.

19. The method according to claim 15 or 16, comprising: For one or more corresponding sets of data items in the sequence, a corresponding hash of each data item in the corresponding set is received, and wherein generating the final transaction comprises: generating the corresponding Merkle root of the corresponding Merkle tree based on the corresponding set of data items and the received corresponding hash.

20. A method according to claim 15 or any claim dependent therefrom, wherein one, some or all of the sets of corresponding data items comprise a single data item.

21. A method according to claim 15 or any claim dependent therefrom, wherein one, some or all of the sets of corresponding data items comprise a plurality of data items.

22. The method according to claim 15 or any claim dependent therefrom, comprising: obtaining an initial transaction, wherein the initial transaction comprises an output locked to a public key of the recipient and a public key of the first sender, and wherein the corresponding confirming transaction comprises a corresponding input referencing the output of the initial transaction and comprising a signature corresponding to the public key of the recipient and a signature corresponding to the public key of the first sender; as well as The initial transaction is sent to at least one of: one or more nodes of the blockchain network, the recipient, or at least one recipient of the one or more recipients.

23. A computer-implemented method for verifying data items exchanged between a group, wherein the method is performed by a verifier and comprises: Retrieve a finalized transaction from a blockchain, wherein the finalized transaction references an output of a confirming transaction and comprises a Merkle root of a Merkle tree, wherein the confirming transaction comprises an output locked to the Merkle, wherein the Merkle tree is based on each set of data items belonging to a sequence of two or more corresponding sets of data items; Obtaining an internal hash set of the Merkle tree; and A Merkle proof is performed on a candidate data item using the internal set of hashes and the Merkle root to verify that the candidate data item belongs to one of the sets of corresponding data items.

24. A computer device, comprising: a memory, the memory comprising one or more memory units; as well as A processing device comprising one or more processing units, wherein the memory stores a code arranged to be executed on the processing device, the code being configured to execute the method according to any one of claims 1 to 23 when executed on the processing device.

25. A computer program embodied on a computer readable memory and configured to, when run on one or more processors, perform the method according to any one of claims 1 to 23.