Proving and verifying ordered event sequences

Through zero-knowledge proof and recursive zkSNARK technology, a concise method is provided to verify the orderliness of the transaction chain, solving the problems of verification complexity and high storage costs in the existing technology, and achieving an efficient and privacy protection verification process.

CN118901220APending Publication Date: 2024-11-05NCHAIN LICENSING AG
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202380017248.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-01-13
Filing Date
2023-01-12
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

In the prior art, there is a lack of a concise method in the process of proving that two transactions are linked through a transaction chain, especially when no trusted third parties are used, resulting in a linear increase in storage costs with the chain length, and the verification process is complex and inefficient.

Method used

Zero-knowledge proof (ZKP) technology is used to generate proof data, transmit only proof data rather than the entire transaction chain, provide orderly proof of transaction chain through recursive zkSNARK, and verify linkability of transaction chains using verification keys.

Benefits of technology

It realizes efficient verification of the orderliness of the transaction chain without leaking sensitive information, reduces communication and computing costs, improves privacy control, and simplifies the verification process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118901220A_ABST
    Figure CN118901220A_ABST
Patent Text Reader

Abstract

A computer-implemented method for providing attestation of an ordered sequence of events, the method executing on a computing device and comprising: receiving a transaction; creating another transaction to be sent to another computing device; obtaining attestation data associated with the other transaction, the attestation data providing to the other computing device an attestation that the other transaction is linked to an initial transaction in a transaction chain comprising the transaction, where the initial transaction is related to an initial event in the ordered sequence of events, and the attestation data comprising: (i) an attestation, (ii) an identifier of the transaction, and (iii) a unique identifier of the initial transaction; and, sending the other transaction and the attestation data to the other computing device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to providing proof of an ordered sequence of events, and verifying an ordered sequence of events. 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.

[0009] Bitcoin allows data to be inserted into transactions and stored immutably on the blockchain. Concise proof of transaction integrity is provided through a process called simplified payment verification. However, additional information can also be conveyed through the relationships between transactions. For example, if transaction B spends one of the outputs of transaction A, then according to the rules of the protocol, it can be known that transaction B was created after transaction A.

[0010] The concept of transaction ordering can be extended to a linear chain of transactions. If each transaction spends the output of the previous transaction in the chain, an immutable ordering can be established. This ordering is inherited by the data payload in the transaction and is supported by proof of work.

[0011] Currently, there is no concise way to prove that two transactions are linked by a transaction chain without using a trusted third party. Instead, all transactions in the chain must be identified and each transaction explicitly checked to spend the output of the previous transaction. While this may be an efficient approach for many use cases, the storage cost grows linearly with the length of the chain. For a chain consisting of a million transactions, the size of the proof would be hundreds of megabytes. Even in a high-fee ledger such as Bitcoin, a transaction chain of this size is likely to grow over time. Summary of the invention

[0012] According to one aspect disclosed herein, there is provided a computer-implemented method for providing proof of an ordered sequence of events, the method being executed on a computing device and comprising: receiving a transaction; creating another transaction to be sent to another computing device; obtaining proof data associated with the other transaction, which provides the following proof to the other computing device: the other transaction is linked to an initial transaction in a transaction chain, the transaction chain including the transaction, wherein the initial transaction is related to an initial event in the ordered sequence of events, and the proof data comprises: (i) proof, (ii) an identifier of the transaction, and (iii) a unique identifier of the initial transaction; and, sending the other transaction and the proof data to the other computing device.

[0013] According to another aspect disclosed herein, there is provided a computer-implemented method for verifying an ordered sequence of events, the method being executed on a computing device and comprising: receiving a transaction from another computing device; receiving proof data associated with the transaction from the other computing device, the proof data comprising: (i) a proof, (ii) an identifier of a previous transaction in a chain of transactions, and (iii) a unique identifier of an initial transaction in the chain of transactions, wherein the initial transaction is associated with an initial event in the ordered sequence of events; and, using the proof, the identifier of the previous transaction in the chain of transactions, the unique identifier of the initial transaction, and a verification key to verify that: the transaction is linked to the initial transaction in the chain of transactions.

[0014] A zero-knowledge proof (ZKP) is a method by which one party, called a prover, can prove to another party, called a verifier, that a certain statement is true, without revealing any information other than that the statement is true. In an embodiment of the present disclosure, a ZKP is generated to provide proof that two transactions are linked by an unbroken chain of transactions.

[0015] Embodiments of the present disclosure have several applications. For example, embodiments of the present disclosure can be used to determine the current state of the Bitcoin network using only a few kilobytes. If a new blockchain node wants to join the Bitcoin network, they will be faced with downloading hundreds of GB of data and verifying that all transactions from the genesis block are indeed correct. Embodiments of the present disclosure can be used to construct proofs to verify the integrity of the Bitcoin blockchain using a single function. This can be done at the level of the block header or the transaction DAG itself. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] 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:

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

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

[0019] Figure 3A A schematic block diagram of a client application is shown;

[0020] Figure 3B It shows that Figure 3A a schematic model of an exemplary user interface represented by a client application of

[0021] Figure 4 The main transaction chain is shown;

[0022] Figure 5 is a schematic diagram of a typical Bitcoin transaction;

[0023] Figure 6 illustrating transactions in a transaction chain transmitted between user computer devices;

[0024] Figure 7a and Figure 7b A method of providing proof of an ordered sequence of events in response to receiving an initial transaction is shown;

[0025] Figure 8 A method of verifying an ordered sequence of events is shown;

[0026] Figure 9a and Figure 9b A method of providing proof of an ordered sequence of events in response to receiving a transaction (other than the initial transaction in a chain of transactions) is shown. DETAILED DESCRIPTION

[0027] Exemplary System Overview

[0028] 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.

[0029] 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.

[0030] 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.

[0031] 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.

[0032] 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.

[0033] 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. In general, the previous transaction can be any transaction in the ordered set 154 or any block 151. Although the previous transaction 152i will need to exist and be verified to be valid in order to ensure that the current transaction is valid, the previous transaction 152i does not have 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 the logical sequence linked by the pointer, and not necessarily the creation time or sending time in the 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 orphan transactions below). The previous transaction 152i can also be called a predecessor transaction or a predecessor transaction.

[0034] 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.

[0035] 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 assigned by the new transaction, wherein 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.

[0036] In the output-based model, the definition of whether a given output (e.g., UTXO) is allocated (e.g., spent) is whether it is validly redeemed by the input of another subsequent transaction 152j according to the blockchain node protocol. Another condition for the 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, the 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 any time.

[0037] 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.

[0038] 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 first node 104's intention to follow the blockchain protocol. These rules include not accepting a transaction as valid if it 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.

[0039] 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.

[0040] 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.

[0041] 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.

[0042] 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.

[0043] 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).

[0044] 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.

[0045] 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.

[0046] 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.

[0047] 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.

[0048] 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.

[0049] 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.

[0050] 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.

[0051] 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.

[0052] 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.

[0053] 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).

[0054] 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.

[0055] UTXO-based model

[0056] 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.

[0057] 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.

[0058] 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.

[0059] 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.

[0060] 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.

[0061] 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.

[0062] 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.

[0063] 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:

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

[0065] 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 the 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).

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

[0067] 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 verified 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.

[0068] 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.

[0069] 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.

[0070] 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). 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 of Tx1, and Tx1 has only one output UTXO1. If the amount of the digital asset specified in UTXO0 is greater than the amount specified in UTXO1, the difference can be distributed by the node 104 that wins the proof-of-work competition to create a block containing UTXO1. Alternatively or additionally, this does not necessarily preclude that a transaction fee may be explicitly specified in one of the UTXOs 203 in the transaction 152 itself.

[0071] 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.

[0072] 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.

[0073] 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).

[0074] 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.

[0075] Client Software

[0076] Figure 3A An exemplary implementation of a client application 105 for implementing an embodiment of the disclosed solution is shown. The client application 105 includes a transaction engine 401 and a user interface (UI) layer 402. According to the solution discussed above and the content to be discussed in further detail later, the transaction engine 401 is configured to implement the basic transaction-related functions of the client 105, such as formulating a transaction 152, sending a transaction to one or more nodes 104 to be propagated through the blockchain network 106.

[0077] The UI layer 402 is configured to present a user interface through a user input / output (I / O) mode of the corresponding user's computer device 102, including outputting information to the corresponding user 103 through the user output mode of the device 102, and receiving input from the corresponding user 103 through the user input mode of the device 102. For example, the user output mode may include one or more screens (touch or non-touch screen) that provide visual output, one or more speakers that provide audio output, and / or one or more tactile output devices that provide tactile output, etc. The user input mode may include, for example, an input array of one or more touch screens (which may be the same or different from that / those used for the output mode); one or more cursor-based devices such as a mouse, trackpad, or trackball; one or more microphones and voice or sound recognition algorithms for receiving voice or sound input; one or more gesture-based input devices for receiving input in the form of manual or physical gestures; or one or more mechanical buttons, switches, or joysticks, etc.

[0078] Note: Although various functions in this document may be described as being integrated into the same client application 105, this does not necessarily constitute a limitation. Instead, they can be implemented in a suite of two or more different applications, such as one application as a plug-in to another application or interfacing via an API (application programming interface). For example, the functionality of the transaction engine 401 can be implemented in a separate application rather than in the UI layer 402, or the functionality of a given module such as the transaction engine 401 can be split between multiple applications. At the same time, it is not excluded that some or all of the described functions can be implemented, for example, at the operating system level. Where a single or given application 105 or the like is referenced anywhere in this document, it should be understood that this is only by way of example, and more generally, the described functions can be implemented in any form of software.

[0079] Figure 3B A model is given of an example of a user interface (UI) 500 that may be presented by the UI layer 402 of the client application 105a on Alice's device 102a. It should be understood that a similar UI may be presented by the client 105b on Bob's device 102b or any other party's device.

[0080] By means of diagrams, Figure 3B The UI 500 is shown from Alice's perspective. The UI 500 may include one or more UI elements 501, 502, 503, which are presented as different UI elements through user output.

[0081] For example, the UI element may include one or more user-selectable elements 501, which may be different buttons on a screen, different options in a menu, or the like. The user input method is configured to enable the user 103 (in this case, Alice 103a) to select or otherwise operate one of these options, such as by clicking or touching the UI element on the screen, or speaking the name of the desired option (Note: the term "manual" as used herein is only used to contrast with automatic, and is not necessarily limited to performing operations by hand). These options enable the user (Alice) to formulate a transaction 152 and send the transaction to one or more nodes 104 for propagation through the blockchain network 106.

[0082] Additionally or alternatively, the UI element may include one or more data input fields 502 through which a user can formulate a transaction 152 and send the transaction to one or more nodes 104 to be propagated through the blockchain network 106. These data input fields are presented via user output means, such as on a screen, and data may be entered into the fields via user input means, such as a keyboard or touch screen. Alternatively, the data may be received verbally, such as based on speech recognition.

[0083] Additionally or alternatively, the UI element may include one or more information elements 503 that output information to the user. For example, this / these may be presented on a screen or audibly.

[0084] It should be understood that the specific manner in which the various UI elements are presented, the selection options are made, and the data is entered is not important. The functions of these UI elements will be discussed in more detail later. It should also be understood that Figure 3B The UI 500 shown in FIG. 5 is only an illustrative model, and in practice, it may include one or more further UI elements, which are not illustrated for the sake of brevity.

[0085] Main transaction chain

[0086] Consider a sequence of transactions where the first input of each transaction spends the first output of the previous transaction, which is called the main transaction chain, such as Figure 4 shown.

[0087] Consider a scenario with Alice the prover and Bob the verifier. The first transaction Tx0 is public data known to both Alice and Bob. Alice constructs a transaction Tx n and sends it to Bob. Both parties now have two transactions (Tx0, Tx n ).

[0088] Alice wants to prove the following statements to Bob: Statement 1: Tx0 is linked to Tx through the main transaction chain n If Bob accepts Alice's proof, he will get the combination ((Tx0,Tx n ),proff n ).

[0089] Now consider a third actor Charlie. Bob creates a new transaction Tx n+1 , where the first input is Tx n He modifies Alice’s proof to create a statement about Tx n+1 A new proof linked to Tx0 through the main transaction chain. He sends Charlie ((Tx0,Tx n+1 ),proof n+1 ).

[0090] Given that Tx0 in this example corresponds to public data known to Alice, Bob, and Charlie, the information flow can be viewed as Alice sending Tx n ,proof n , then Bob sends Tx to Charlie n+1 ,proof n+1 .

[0091] Alice can easily prove statement 1 by sending Bob every transaction in the chain. Bob can explicitly check that the first input of each transaction spends the first output of the previous transaction.

[0092] This solution has the following advantages:

[0093] In terms of design and implementation: It is simple in concept and easy to implement. The scheme does not involve complex encryption algorithms.

[0094] In terms of Alice’s computational cost: Alice does not need to bear any computational overhead.

[0095] However, this solution has the following disadvantages:

[0096] In terms of communication costs: Proportional to the size of the transaction chain. Alice has to send the entire transaction chain to Bob. This may require the transfer of a large amount of data. A typical transaction contains about 200 bytes, and the main transaction chain has no upper limit on length. A chain consisting of one million transactions will reach about 200MB.

[0097] In terms of Bob’s computational cost: Given a transaction, Bob checks if the transaction is part of the transaction chain. If he has the Merkle root of the latest transaction, he will also be sure that the miners have verified it correctly.

[0098] In terms of privacy costs: Since all data in all transactions is provided to Bob, there is no privacy. This is especially important if some of these transactions have not yet been sent to the Bitcoin network. Even if all transactions appear on-chain, providing transactions directly to Bob would make it easier for him to identify sensitive information.

[0099] In terms of duplication costs: When Bob sends his new proof to Charlie, Charlie has to repeat the same computation as Bob.

[0100] According to an embodiment of the present disclosure, Alice can use recursive zkSNARK to prove the correctness of statement 1. She does not need to send the entire transaction chain to Bob. Instead, she only sends the proof of the correctness of statement 1.

[0101] This solution has the following advantages:

[0102] In terms of communication cost: Due to the compact proof size of zkSNARK, only a small amount of data is sent to Bob. The size of the proof is very small and is independent of the number of transactions in the chain. For example, in a recursive zkSNARK, even if there are a million transactions in the chain, the size reaches about 3.5kb for 128-bit security. The size is so small that proofs can be inserted into transactions. For example, Alice can recursively insert her proof into transactions in the chain until the last transaction Tx n .

[0103] In terms of computational cost for Bob: Bob’s verification time is faster. He only needs to verify the proof.

[0104] In terms of privacy cost: Alice has greater privacy control because she does not need to send all transactions in the chain to Bob. This can be combined with other privacy controls, such as obfuscating Tx n Some data in .

[0105] In terms of duplication costs: Proofs can be built recursively. Bob can add a new transaction Tx to the chain n+1 , and creates a new proof (which also includes verification of the previous proof). Bob does not need to recompute the proof until Tx n Charlie only needs to verify this new proof. He does not need to repeat any of the computations Bob performed.

[0106] Transactions and transaction chains

[0107] In some embodiments of the present disclosure, the transaction is a blockchain transaction (i.e., a transaction submitted to the blockchain 150 through interaction with the blockchain network 106).

[0108] A typical Bitcoin transaction 152 is shown below: Figure 5 shown.

[0109] A Bitcoin transaction 152 has a unique identifier called a transaction ID (TxID) 201, which is obtained by appending a unique identifier to the transaction data ( Figure 5 It should be noted that the TxID is not considered part of the transaction itself.

[0110] Transaction input 202 contains a reference to a previous transaction ID (PrevTxID) and an output index. The combination of the previous transaction ID and the output index is called an output point 502 and is labeled PrevTxID||Index (see Figure 5 ).

[0111] The set of all Bitcoin transactions forms a directed acyclic graph (DAG), where edges connect the output points of one transaction to the input of another transaction. This DAG is often referred to as the Bitcoin ledger.

[0112] Data can be inserted into a transaction at multiple locations. Figure 5 In the , a data payload is present in each output locking script 504, which is a convenient place to insert data. These data payloads play no role in the script execution because they are all located after the OP_RETURN statement. The locking script 504 contains the pay-to-public-key-hash (P2PKH) script pattern and the data payload.

[0113] At a very high level, Bitcoin defines the transaction generation routine as follows:

[0114] In the first step, a public and private key pair is generated, and the destination address is derived from the public key.

[0115] In the second step, a new transaction is created. For the output of the transaction (limited to 2 64 This involves obtaining the destination addresses, creating locking scripts for each address, and specifying the number of satoshis to be allocated to each address. 64 ), which involves (i) identifying the input UTXOs and inserting their transaction IDs (and output indexes). These transaction IDs are called PrevTxIDs; and (ii) generating an unlocking script for each input UTXO. This typically involves creating a digital signature (as in PKPKH) on the output and input data (minus the unlocking script). In addition, metadata such as version number 506, input and output counts, and lock time 508 are also generated. Finally, the transaction ID 201 is calculated, where: TxID=SHA256d(Tx), where Tx=(inputs,outputs,metadata). It should be noted that TxID is a double hash of the transaction data including PrevTxID. The transaction ID is used as an identifier for the transaction, but is not part of the transaction itself.

[0116] In a third step, the transaction is broadcast to the Bitcoin network 106. This involves the computer device 102 taking the transaction and sending it to one or more blockchain nodes 104 on the Bitcoin network 106. When the blockchain node 104 receives the transaction, it checks that the transaction is valid and that no inputs have been previously allocated (i.e., not double-spent). The blockchain node 104 also checks that sufficient transaction fees are included. If the transaction passes these checks, it is accepted by the node and will be placed in an ordered pool 154 of transactions 152 waiting to be incorporated into a block 151. The blockchain node 104 also broadcasts the transaction to other blockchain nodes. Once the transaction has been accepted by a sufficient number of blockchain nodes on the Bitcoin network 106, it may be considered safe because it is infeasible to accept a double spend.

[0117] In the fourth step, after a period of time (on average 10 minutes), the blockchain node 104 will publish a block containing the transaction. This further ensures that the transaction will not be double-spent.

[0118] A transaction is valid if it satisfies the (Bitcoin) rule set within itself and within itself. This means that the transaction has the correct structure and the unlocking script successfully unlocks the output, for example by providing a valid signature. There are additional consistency checks, such as the value of the output does not exceed the input.

[0119] A valid transaction is a candidate transaction that is accepted by the Bitcoin network and published in a block. A valid transaction references previous transactions in its input list. These previous transactions may or may not be valid. However, if a transaction is accepted by a node on the Bitcoin network, all previous transactions must be valid.

[0120] A "transaction chain" is an ordered set of transactions where each transaction spends the output of the previous transaction in the set. Due to the rules of the blockchain protocol, each transaction in the set must be created later than the previous transaction in the set. This means that the order of transactions in the chain can be understood as the chronological order in which the transactions were created.

[0121] The following provides the mathematical definition of "transaction chain" and "main transaction chain", where Tx i .Outpoints are defined as transactions Tx i The ordered output point set.

[0122] First, we provide a mathematical definition of the transaction chain. Assume that TxSet = (Tx1, ...Tx n ) is an ordered set of valid transactions, where TxID i =SHA256d(Tx i ). Then, if for each j i ∈{2,…,n}, and Make where i∈{1,…,n} and 1≤k≤2 64 , then the derived sequence (in ) is the transaction chain.

[0123] It should be noted that since the transaction ID is known, the transaction chain is unique according to the order of the transaction ID. However, if an ID conflict occurs, is the first transaction with the collusion ID. Therefore, the transaction chain may not necessarily be unique because there may be hash collisions.

[0124] Next, we provide a mathematical definition of the main transaction chain. Given a transaction chain TxChain, if the first input of each transaction refers to the first output of the previous transaction, it is called the main transaction chain. For the main transaction chain, for each i∈{2,…,n}, there exists Tx i .Outpoints = (TxID i-1 ||0,…).

[0125] Now refer to the first lemma, Lemma 1.

[0126] Lemma 1: Assuming SHA256 is collision-resistant (especially when the compression function of SHA256 is collision-resistant, this property holds). It is computationally impossible to find a transaction chain TxChain = (Tx1, Tx2, ..., Tx n ), where any Tx is repeated i ∈TxChain.

[0127] Proof: Since TxChain is a transaction chain, it should be understood that for each i∈{2,…,n}, TxID i =SHA256d(…,TxID i-1 ,…). A TxID can be converted into i-1 To TxID i The mapping of is modeled as a random mapping. This is expected to have approximately 2 127 The cycle length.

[0128] One of the consequences of Lemma 1 is that a transaction chain imposes a temporal ordering on its elements. Subsequent transactions in the chain must have been created after previous transactions in the chain.

[0129] An important theorem (Theorem 1) will now be presented. This theorem is useful because one can take advantage of transactions that have already been completed by Bitcoin node 104. This means that in embodiments of the present disclosure, there is no need to check the validity of each transaction in the recursive zkSNARK. As long as the final transactions have been accepted by the Bitcoin network 106 and each transaction has the correct structure, they can be considered to be valid.

[0130] Theorem 1: Assume that TxSet = (Tx1, Tx2, ..., Tx n ) is an ordered set, and TxID i =SHA256d(Tx i ). Assume that according to the Bitcoin rule set, each element Tx i All have an ordered set of output points Tx in the correct position i .Outpoints, for each i∈{2,…,n} and for some index k, assume that Tx i .Outpoints=(…,TxID i-1 ||k,…). If the final transaction Tx n Accepted by nodes on the Bitcoin network, each element Tx i All are valid transactions, and TxSet is a transaction chain. In addition, if TxSex is the main transaction chain, it is unique.

[0131] Proof: If Tx n is accepted by node A on the Bitcoin network, then all previous transactions are valid and have also been accepted by node A. Specifically, Tx n-1 is a valid transaction and has been accepted by node A. The argument is repeated back to Tx1. This proves that each element Tx i They are all valid transactions, and TxSet is a transaction chain.

[0132] Now, it can be proven that if a TxSet is the main transaction chain, then it is unique. We will prove this by induction on the main transaction chain of length N>1.

[0133] N=2:

[0134] Consider a primary transaction chain with two elements (Tx1, Tx2). Assume there is a second primary transaction chain (Tx1, Tx′2, …, Tx′ m-1 ,Tx′ m ), so that Tx′ m =Tx2.

[0135] Due to Tx′ m =Tx2, so

[0136] TxID′ m .Outpoints = TxTD2.Outpoints

[0137] And therefore

[0138] TxID′ m .Outpoints=(TxID1||0,…).

[0139] According to the one-way and collision-resistant properties of the hash function, Tx1 must be Tx′ m The previous transaction in the first output point of . Therefore, either m=2 and the two main chains are the same, or the second main transaction chain must be in the form of (Tx1, Tx′2, …, Tx1, Tx2). Since Tx1 is repeated, there is a contradiction with Lemma 1.

[0140] It can be concluded that (Tx1, Tx2) is the only main transaction chain.

[0141] N=n-1:

[0142] By inductive hypothesis, assuming (Tx1, Tx2, ...., Tx n-1 ) is the only main transaction chain.

[0143] Element (Tx n-1 ,Tx n ) forms a main transaction chain consisting of two elements. Through the demonstration of the case N=2, the chain is unique.

[0144] There are two unique main transaction chains (Tx1, Tx2, ...., Tx n-1 ) and (Tx n-1 ,Tx n ). Therefore, the combination (Tx1, Tx2, ...., Tx n ) forms a unique main transaction chain.

[0145] Zero-knowledge proof

[0146] As mentioned above, zero-knowledge proofs (ZKP) can be used to prove knowledge of a secret without revealing any secret data.

[0147] Zero-knowledge proofs show that a satisfactory witness knows some non-deterministic polynomial (NP) statement, without revealing any information about the witness. zkSNARKs use non-interactive arguments of knowledge that enable the verifier to confirm that the prover does know the witness.

[0148] Zero-Knowledge Succinct Non-Interactive Argument of Knowledge (zkSNARK) is a succinct non-interactive zero-knowledge (NIZK) proof of knowledge that is very short and easy to verify. The statement is represented by a logic circuit used to generate a proof of the statement. In the most efficient construction, the verifier only needs to perform a constant number of group operations. zkSNARK can be used to prove the secret input of an arbitrary function F for a given output. It uses linear probability proofs combined with zero-knowledge techniques based on bilinear pairings and the discrete logarithm problem (DLP).

[0149] The concept of recursive zkSNARKs originally started with Incremental Verifiable Computation (IVC), where a proof not only proves the correct execution of a computation, but also the validity of the previous proof. As a result, a large and almost unlimited amount of computation can be easily verified with just a single proof.

[0150] In a general zkSNARK construction, the prover creates a proof π that proves that it knows some satisfying public input x and private input w for some relation R specified for an arithmetic circuit C. It should be noted that most use cases for zkSNARK construction in the blockchain world are related to scalability rather than privacy. In this case, the zkSNARK construction is flexible with respect to the input, where the private input can also be empty, i.e. w = ⊥.

[0151] An arithmetic circuit C is used to represent the function F of a ZKP for which a secret input is provided given a public input and an output. The circuit is built from multiplication gates and addition gates. If the output of a multiplication gate is not the output of the entire circuit, the output of the multiplication gate is marked as an auxiliary variable.

[0152] In zkSNARK, proof π proves the fact that R(x,w)=1 means that the statement is indeed correct. The verifier will then take the proof π and the public input x, and output 1 if the proof is valid. However, the verification itself can also be expressed as a relation R'. That is, for all valid inputs to the verifier, it can be expressed as R'(x,π):=V(x,π). Therefore, proofs can be created that prove the validity of other proofs. The goal of recursive proof combination is to construct a ZKP that verifies other ZKPs, thereby achieving aggregation of proofs. This is exploited in the embodiments of the present disclosure, as described in more detail below.

[0153] The theorem (Theorem 2) expressed below ensures that given a zkSNARK construction, there exists a recursive zkSNARK.

[0154] Theorem 2: If there exists a zkSNARK with succinct verification and it is adaptively secure, it can be recursively destructurized to the point where a proof-carrying data primitive can be derived from it.

[0155] Consider a set S of system states with an initial state s0∈S if and only if there exists a i to i+1 , it is possible to construct a valid transformation in the input state s i (or a commitment to it) that evaluates to 1 S In the context of this disclosure, a transaction will be considered as a state, and for i-1 To Tx i The effective transformation of i The result is true.

[0156] The proof carrying data (PCD) system includes the following three algorithms:

[0157] Settings: Generate (Π S ,1 k ) key generation will assert Π S and a security parameter k (i.e., the system has k bits of security) as input, thereby outputting proof and verification keys (pk, vk).

[0158] Prover: Prove(pk,s i+1 ,TxSet,s i ,π i ,w i )→π i+1 The prover will prove the key pk, the current state and the next state s i 、s i+1 Witness i About i is a proof of a valid state π i (which proves that the old proof is already valid) and a set of valid transactions t∈TxSet as input, thus outputting i →s i+1 is a proof of a valid state transition π i+1 .

[0159] Verifier: Verify(vk,B i ,π i ) → Yes / No. Given a verification key vk, prove π i and for the state s i Commitment B i In the case of i It is about status i If the proof is valid, the verifier will output "yes", otherwise it is very likely to output "no".

[0160] The proof and verification keys (pk, vk) can be created by an independent trusted party. This party needs to be trusted because, given the knowledge of the private key of the proof key pk, a forged proof can be generated. A ZKP circuit only needs to generate one set of proof and verification keys (pk, vk). Therefore, if the ZKP circuit is constant for a specific use case, the key generation process only needs to be performed once. In some implementations, the proof and verification keys (pk, vk) may involve multiple different parties as part of the key generation ceremony.

[0161] It should be noted that in each iteration of proof generation, the prover and verifier may be different. In recursive proof construction, the second prover does not need to trust the prover because it first verifies the previous proof before generating a new proof of the current state. This means that many different token processors (i.e., blockchain service providers, such as NFT providers) can use the same token protocol without having to trust each other.

[0162] Without loss of generality, embodiments of the present disclosure are described with reference to the Halo framework, from which different ZKP implementations (e.g., Halo, Halo 2, Halo infinite) may be used. The Halo build is characterized by the use of Sonic ZKP, which is a trustless recursive version of zkSNARK that does not require a "trusted setup" when creating proofs and verifying keys. The Halo 2 build uses Plonk ZKP. Halo has a structured reference string (SRS) that can be used to build proofs using any transaction chain. That is, in embodiments of the present disclosure, there is no need to generate trusted setup parameters (specific keys) for each circuit.

[0163] However, embodiments of the present disclosure are not limited to ZKPs of the Halo framework, and other types of recursive zkSNARKs may be employed. It should be noted that a Groth16-like construction of the zkSNARK protocol is not homomorphic, as it does not use polynomial commitments. Therefore, a Groth16-like construction cannot be opened at an appropriate random point, nor can it be converted to a recursive zkSNARK via the accumulation method. However, this can be achieved by other means, for example, by cyclic pairing-friendly curves.

[0164] When building using Halo, a structured reference string (SRS) is generated during setup, and the SRS contains a proof / verification key pair (pk, vk). This setup is not limited to a single circuit, and the SRS is general and can be used for any circuit according to the maximum given size. Thus, the SRS can be used to build proofs using any transaction chain. That is, there is no need to generate trusted setup parameters (specific keys) for each circuit. The SRS can be computed through a multi-party ceremony (which makes the system a trustless system) and is linear with respect to the size of the circuit. Thus, it depends on the size of the circuit and is independent of the number of iterations. That is, in the embodiments of the present disclosure, the proof size and verification time do not increase with the increase in the recursion depth.

[0165] A general method for implementing recursive proof composition is to first obtain a non-interactive knowledge argument for arithmetic circuit satisfiability. A given circuit is satisfiable if there is a way to assign truth values (0 or 1) to the input variables such that its result is 1. In other words, if the computation result of each variable assignment is 0, the given circuit is unsatisfiable. For a public x and a witness w, assume C(x, w) = 1. The verification algorithm for this argument is encoded into such arithmetic circuits. Assuming that the verification circuit of the proof is sub-linear with respect to the size of the circuit, according to Theorem 2 above, the proof can be recursively verified such that C(x, w) = 1 without disclosing any information about w. The circuit C in this construction is fixed, and the prover will repeatedly interact with the verifier to conduct multiple arguments in sequence.

[0166] Assume M, Q, k are integers such that d = 4, M = 2 k , and 3Q < d. For a witness known only to the prover and certain instances encoding the public input satisfy the arithmetic constraint system encoding C. The constraint system consists of M multiplication constraints and Q linear constraints, where the i-th such constraint takes the form a i ·b i = c i , and the q-th such constraint takes the following form:

[0167]

[0168] For some fixed that encodes C, where i ∈ {1, …, M}, q ∈ {1, …, Q}.

[0169] In Halo, the relationships dealing with a specific circuit in the description never change with each recursion. The Halo construction is an incrementally verifiable computation rather than data carrying proofs. It should be noted that the commitment S in the Halo construction old and S new is always a commitment to the same polynomial S that specifies the constraints, but at different points (i.e., applied to the old and new states). On the verifier side, this is reflected in the verifier using S in the verification equation old In order to use variables as input, S needs to be changed to a different circuit. That is, different transaction chain rule sets will result in different S commitments. For the main transaction chain, the function to be verified will be to check whether Tx i .PrevTxID==z i-1 , where z i-1 =SHA256d(Tx i-1 ).

[0170] Proving and verifying ordered sequences of events

[0171] Embodiments of the present disclosure solve the following problem: Consider a first transaction Tx0 (which may also contain a representation of a digital asset), and consider another transaction Tx0 that occurs sometime after Tx0. n , how to prove that there is a link between Tx0 and Tx n The known scheme requires downloading and verifying each individual transaction from Tx0 until Tx n The complete history of the transaction chain.

[0172] A simple but inefficient solution might be to outsource the use of zkSNARKs for each chain link (Tx i-1 ,Tx i ) generates proofs and provides concise verification. However, in this scheme, users must download and verify each proof. Instead of generating proofs for each transaction, a third party can be used to generate a single proof for the entire transaction chain, where the required computational scale is similar.

[0173] However, in embodiments of the present disclosure, the attestation computing device can provide a single attestation that shows in an inductive manner that all previous attestations have indeed been verified. Thus, to verify a transaction chain, a user need only download the first transaction Tx0 (which may contain digital assets) in addition to the current state of the network (i.e., the latest transaction at the end of the transaction chain) and a single attestation that the state is correct.

[0174] Figure 6 Transactions in a transaction chain transmitted between user computer devices 102 are shown.

[0175] Figure 6 A transaction chain is shown starting with an initial transaction Tx0 602. This initial transaction is called an issuance transaction. The transaction ID TxID0 of the issuance transaction 602 serves as a unique identifier for the transaction chain. That is, the transaction ID of the issuance transaction (i.e., TxID0 = SHA256d (Tx0)) is the identifier that will be carried on the transaction chain.

[0176] As an initial example, Figure 6 A use case is shown, whereby a transaction in a transaction chain represents a transfer of ownership of a digital asset. In this example, Figure 6 As shown, the issuance transaction 602 may include a payload that includes a digital asset (DA). The digital asset may be a digital currency, an image, a sound file, and / or text. In one example, the digital asset is a non-fungible token (NFT). Specifically, the payload of the issuance transaction 602 may include a unique identifier of the NFT (e.g., a serial number), an identifier of the creator of the token, an identifier of the storage location of the NFT, and / or its most recent purchase price), etc. In some implementations, the payload of the issuance transaction 602 may include a hash digest of the DA.

[0177] exist Figure 6 In the issuance transaction 602 shown, there is a signature in the unlocking script of Tx0, which may come from the issuer itself, and the digital asset may be embedded after the OP_RETURN statement. Figure 6 As shown, the first output of Tx0 contains a P2PKH locking script with the public key of user U1. This assigns ownership of the digital asset to user U1.

[0178] like Figure 6 As shown, the issue transaction 602 is sent to the computer device 102a associated with the user U1.

[0179] Assuming user U1 wants to assign a digital asset to user U2, they do this by creating a new transaction Tx1604. In the disclosed embodiment, user U1 performs an initialization process that is only performed once (i.e., other users involved in the transaction chain do not perform the initialization process). Figure 7a and Figure 7b The steps performed by user U1 are described in more detail.

[0180] In the case of the main transaction chain, the first input of transaction Tx1 604 spends the first output of issuance transaction Tx0 602.

[0181] The first output of Tx1 contains a P2PKH script with the public key of user U2. In addition to providing transaction Tx1604 to computer device 102b associated with user U2, user U1 also provides proof data to computer device 102b associated with user U2. This allows subsequent users U2, U3, ... to establish recursive proofs in subsequent transactions.

[0182] Upon receiving transaction Tx1 604, computer device 102b associated with user U2 verifies the attestation provided in the attestation data. Figure 8 Describe user U in more detail i Upon receiving transaction Tx i-1 Steps to be performed when

[0183] Assuming user U2 now wants to transfer the digital asset to user U3, they do this by creating a new transaction Tx2 606. In an embodiment of the present disclosure, user U2 (and any other users involved later in the transaction chain) performs a recursive process. Figure 9a and Figure 9b The steps performed by user U2 are described in more detail.

[0184] In the case of the main transaction chain, the first input of transaction Tx2 606 spends the first output of transaction Tx1 604.

[0185] The first output of Tx2 contains a P2PKH script with the public key of user U3.In addition to providing transaction Tx2 606 to computer device 102c associated with user U3, user U2 also provides proof data to computer device 102c associated with user U3.

[0186] As can be seen above, each of these transactions includes event data related to transferring ownership of a digital asset (where in this use case the event is a digital asset transferred between users).

[0187] Figure 6 The digital asset (or its hash digest) is shown embedded in the issuance transaction 602. Subsequent transactions may also include the digital asset (or its hash digest), but this is optional. In fact, none of these transactions need to include the digital asset (or its hash digest). For example, a database or other storage location on a remote device can store event data associated with each transaction in the transaction chain. For example, in an example where the digital asset is an NFT, the remote device can store the transaction ID of each transaction in the transaction chain and associate the transaction ID with an identifier of the digital asset. In an example where the digital asset is a digital currency, the remote device can store the transaction ID of each transaction in the transaction chain and associate the transaction ID with the amount of digital currency being transferred by the transaction.

[0188] Although Figure 6 A use case is shown whereby a transaction in a transaction chain represents a transfer of ownership of a digital asset, but this is merely an example.

[0189] In other embodiments, each transaction in a transaction chain may include event data in the form of a data record associated with a physical or digital object. For example, the event data in a transaction may record the completion of a manufacturing step of a car (i.e., a physical object), or record a revision to an electronic file (i.e., a digital object) (e.g., a text document, a spreadsheet, or other electronic file). In a further embodiment, each transaction in a transaction chain may include event data in the form of a data record associated with a person. For example, the event data in a transaction may record a communication between a person and his or her doctor. The data record associated with a transaction may be a modified version (e.g., by adding, deleting, or changing data) of a previous data record associated with an immediately preceding transaction. Alternatively, the data record associated with a transaction may include data that is completely different from the data of a previous data record associated with an immediately preceding transaction.

[0190] In these other embodiments, the transactions in the transaction chain may include event data, or in a manner similar to that described above, a database or other storage location on the remote device may store event data associated with each transaction in the transaction chain. For example, the remote device may store a transaction ID for each transaction in the transaction chain and associate the transaction ID with a corresponding data record.

[0191] exist Figure 6 For example, the users (U1, U2, U3, Un) may be individual users, organizations, or departments or divisions within an organization.

[0192] In some embodiments, transactions in a transaction chain are transmitted between computer devices of users involved in the transaction chain.

[0193] In some embodiments, the transaction is a blockchain transaction (i.e., a transaction submitted to blockchain 150 through interaction with blockchain network 106). In these embodiments, in order for user U i To another user U i+1 Transfer transaction, user U i The computer device of user U can send the transaction to one or more blockchain nodes 104, which then propagate the transaction throughout the network of blockchain nodes 104, thereby including it in blockchain 150. Then, user U i+1 The computer device of user U can receive the transaction by reading the transaction from the blockchain. i A computer device can send a transaction to another user U i+1 computer device, and another user U i+1 The computer device may then send the transaction to one or more blockchain nodes 104, which then propagate the transaction throughout the network of blockchain nodes 104, thereby including it in the blockchain 150.

[0194] Although Figure 6 A transaction is shown including attestation data, but this is merely an example and the attestation data may remain outside of the transaction as long as it is propagated between specific users over some communication channel.

[0195] Figure 7a A method 700 for providing proof of an ordered sequence of events is shown. The method 700 is performed by a computer device in response to receiving an initial transaction. For example, referring to Figure 6 , the method 700 is performed by the computer device 102a associated with the user U1.

[0196] In step S702, the computer device 102a receives an issuance transaction Tx0602 associated with an initial event.

[0197] User U1 wants to record another event. In step S704, computer device 102a obtains proof data to transmit to another user. i The obtained proof data includes: (i) proof value π i-1 ; (ii) the transaction ID TxID0 of the issuing transaction 602; and (iii) the identifier z i-1 , which serves as the identifier of the previous transaction in the transaction chain.

[0198] Figure 7b Step S704 is shown in more detail.

[0199] In step S752, the computer device 102a sets the identifier z0 to a predetermined initial value. Figure 7b The identifier z0 is shown set to zero, but this is merely an example and other values ​​may be used as an indicator that the proof is a “null” proof because the previous transaction was issuing transaction Tx0 602.

[0200] In step S754, the computer device 102a sets the initial proof π0 to a predetermined proof value. For example, the initial proof π0 may be set equal to 1 to assume that the proof is valid by default.

[0201] In step S756 , the computer device 102 a identifies the transaction ID of the issuing transaction by reading the transaction ID TxID0 of the issuing transaction 602 from the issuing transaction 602 .

[0202] Reference again Figure 7a Once the computer device 102a has obtained the proof data in step S704, in step S706, the computer device 102a creates a new transaction Tx1 604 including an output containing a P2PKH script with the public key of user U2.

[0203] In step S708, computer device 102a sends transaction Tx1 604 and proof data to computer device 102b associated with user U2. The proof data will provide proof to user U2 that there is a transaction chain linking transaction Tx1 604 to issuing transaction 602.

[0204] As described above, the proof data obtained in step S704 may be provided within a field of transaction Tx1 604. For example, the proof data may be included in a spendable output of transaction Tx1 604. Alternatively, the proof data may be included in an unspendable output of transaction Tx1 604, such as in an OP_RETURN payload or an OP_FALSE OP_RETURN payload.

[0205] Alternatively, the proof data obtained in step S704 and the transaction Tx1 604 may be sent separately to the computer device 102b.

[0206] Figure 8 A method 800 for verifying an ordered sequence of events is shown. The method 800 is performed by a computer device in response to receiving a transaction that is not the initial transaction in a transaction chain. That is, when i ≥ 2, the method 800 is performed by a user U i Upon receiving transaction Tx i-1 Executed when.

[0207] Refer to the above Figure 6 In the example of FIG. 8 , the computer device 102 b associated with the user U2 (as well as the computer devices 102 associated with subsequent users involved in the transaction chain) executes the method 800 .

[0208] In step S802, the user U i Computer equipment associated with U i-1 Another associated computing device receives the transaction Tx i-1 That is, referring to computer device 102b, computer device 102b associated with user U2 receives transaction Tx1 604 from computer device 102a associated with user U1.

[0209] In step S804, the user U i The associated computer device receives the certification data. i The received proof data includes: (i) proof value π i-2 ; (ii) the transaction ID TxID0 of the issuing transaction 602; and (iii) the identifier z of the previous transaction i-2 (That is, by i-1 ) is an identifier of a transaction received by another computing device associated with z. Typically (for i ≥ 3), z i-2 The transaction ID corresponding to the transaction in the transaction chain is generated by the user U i-1 The associated computer device receives, but there are circumstances unique to the user U2, whereby the identifier z0 is set to a predetermined initial value, as described above.

[0210] That is, referring to computer device 102b, computer device 102b associated with user U2 receives initial proof π0, transaction ID TxID0 of issuance transaction 602, and identifier z0.

[0211] As described above, the proof data may be inserted into the transaction Tx1 604 or transmitted to the transaction Tx1 604 externally.

[0212] In step S806, in order to verify the proof π i-2 , with user U i The associated computer device will prove π i-2 , identifier z i-2 , the transaction ID TxID0 of the issuing transaction 602 and the verification key vk are provided as inputs to the proof verification process. The proof verification process outputs an acceptance or rejection decision based on whether the proof is found to be valid or invalid.

[0213] Given vk, TxID0, Tx i-1 、Tx i (It is provided by user U i Created and already contains π i-1 、z i-1 ), if we prove that π i-1 If verified, the new owner U i+1 will accept (Tx0,…,Tx i-1 ) as a transaction chain. If the original transaction Tx0 contains digital assets, the proof will also ensure that Tx i Proof of ownership of the owner.

[0214] The validator checks whether the issuing transaction Tx0 is linked to the given final transaction. Thus, the final verification step ensures that the initial proof starts from the original transaction. In addition, in the case of an issuing transaction with an OP_RETURN payload, such as Figure 6 As shown, once the proof of ownership transfer is verified, the recipient can accept the proof and verify the signature of the original issuer of the asset. issuer .

[0215] Figure 9a and Figure 9b A method 900 of providing proof of an ordered sequence of events is shown. The method 900 is performed by a computer device in response to receiving a transaction that is not an initial transaction in a chain of transactions.

[0216] For example, refer to Figure 6 If user U2 wants to record another event (e.g., if user U2 wants to transfer the digital asset to U3 by generating transaction Tx2 606), method 900 is performed by computer device 102b associated with user U2 and also by any subsequent users in the transaction chain who wish to record an event.

[0217] In step S902, the user U i The associated computer device 102 verifies the received transaction Tx i-1 At least one predetermined condition is satisfied.

[0218] That is, referring to computer device 102b, computer device 102b associated with user U2 verifies that the received transaction Tx1 604 satisfies at least one predetermined condition.

[0219] The at least one predetermined condition may specify that the transaction spends a transaction output of a previous transaction (an immediately preceding transaction) in the transaction chain.

[0220] Additionally or alternatively, the at least one predetermined condition may specify that the transaction includes an index of a transaction output of the transaction. For example, the at least one predetermined condition may specify that the transaction input of the transaction includes an index of a transaction output of the transaction (the transaction output may store event data).

[0221] Additionally or alternatively, the at least one predetermined condition may specify that the first input of the transaction spends the first output of a previous transaction (the immediately preceding transaction) in the transaction chain, i.e., the received transaction is part of the main transaction chain. n is a valid blockchain transaction with multiple input UTXOs and multiple output UTXOs. In addition, assume that (Tx0,…,Tx n ) is the transaction chain. It should be noted that the locking script of the first output of Tx0 may also contain digital assets. The predetermined condition can ensure that TxSet = (Tx0, Tx1, ..., Tx n ) is the main transaction chain. That is, for a given (0, Tx n ), only when all transactions in TxChainSet are transactions Tx0, Tx1, …, Tx n Received transactions (e.g., including ownership transfers) are only accepted when the first index of the transaction is reached.

[0222] Additionally or alternatively, the at least one predetermined condition may specify a unique token ID (UTID) recorded in the received transaction.

[0223] Additionally or alternatively, the at least one predetermined condition may specify that a transaction chain sequence number i is recorded in each transaction in the chain.

[0224] Additionally or alternatively, the at least one predetermined condition may specify that the received transaction records the results of a predetermined program for a given set of inputs. Some of these inputs may be the results of calculations of previous transactions in the transaction chain, while some may be new inputs. The issuance transaction may include a predetermined code and an initial set of inputs. Such a set of rules ensures that the execution of the program can be independently verified at each stage.

[0225] Each transaction may record the state of a Deterministic Finite Automata (DFA), and the at least one predetermined condition may enforce that a correct state transition has been made.

[0226] It should be understood that the at least one predetermined condition may include one or any combination of the above examples.

[0227] In step S904, the computer device 102b obtains the certification data to transmit to another user. i The obtained proof data includes: (i) proof value π i-1 , (ii) the transaction ID TxID0 of the issuing transaction 602, and (iii) the identifier z i-1 , which serves as the identifier of the previous transaction in the transaction chain.

[0228] Figure 9b Step S904 is shown in more detail.

[0229] In step S952, the user U i The associated computer device transmits the transaction Tx i-1 Double hashing is performed to compute the identifier z i-1 That is, referring to computer device 102 b , computer device 102 b associated with user U 2 computes identifier z 1 by double hashing transaction Tx 1 604 .

[0230] In step S954, the user U i The associated computer device uses the attestation key pk and the transaction Tx i-1 (including transactions Tx i-1 The associated transaction may be in Tx i-1 or transmitted separately to transaction Tx i-1 ) to construct proof π i-1 That is, referring to computer device 102b, computer device 102b associated with user U2 constructs proof π1 by providing the proof key pk and transaction Tx1 604 (including the proof data associated with transaction Tx1 604) as input to the proof generation process. Proof π i-1 Proved transaction Tx i-2 With transaction Tx i-1 The connection between.

[0231] In step S956, the user U i The associated computer device identifies the transaction ID TxID0 of the issued transaction in the transaction chain. Step S956 can be performed in several different ways. In one example, user U i From the transaction Tx i-1 The transaction ID TxID0 of the issuance transaction is read to identify the transaction ID of the issuance transaction. That is, referring to computer device 102b, computer device 102b associated with user U2 identifies transaction ID TxID0 of issuance transaction 602.

[0232] Reference again Figure 9a Once the computer device has obtained the proof data in step S904, in step S906, the computer device creates a new transaction Tx i , the new transaction includes a i+1 Therefore, in step S906, computer device 102b creates a new transaction Tx2 606, which includes the output of the P2PKH script containing the public key of user U3.

[0233] In step S908, computer device 102b sends transaction Tx2 606 and proof data to computer device 102c associated with user U3. The proof data will provide proof to user U3 that there is a transaction chain linking transaction Tx2 606 to issuing transaction 602.

[0234] As described above, the proof data obtained in step S904 may be provided within a field of transaction Tx2 606. For example, the proof data may be included in a spendable output of transaction Tx2 606. Alternatively, the proof data may be included in an unspendable output of transaction Tx2 606, such as in an OP_RETURN payload or an OP_FALSE OP_RETURN payload.

[0235] Alternatively, the attestation data obtained in step S904 and the transaction Tx2 606 may be sent separately to the computer device 102c.

[0236] In an embodiment of the present disclosure, the proof size is approximately 3.5kb and is independent of the number of transactions in the chain. The proof is recursive, meaning that if additional transactions are added to the transaction chain, the proof can be updated without repeating any computations.

[0237] The data carrying the proof is small enough to be included in an OP_RETURN statement in every transaction. This enables the scheme to be an on-chain token protocol that avoids the need to trace back to issuance. In this architecture, the blockchain network 106 is used for double-spending protection and stores the data carrying the proof. The blockchain nodes 104 play no role in proof construction or verification.

[0238] in conclusion

[0239] It will be appreciated by those skilled in the art that the steps involved in the attestation generation process implemented by the proving computer device will depend on the specific type of ZKP implemented, and such steps are known to those skilled in the art. Similarly, it will be appreciated by those skilled in the art that the steps involved in the attestation verification process implemented by the verifier computer device will depend on the specific type of ZKP implemented, and such steps are known to those skilled in the art.

[0240] 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.

[0241] Some of the above embodiments 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.

[0242] 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).

[0243] 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.

[0244] 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.

[0245] 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.

[0246] Aspects of the present disclosure are defined below in conjunction with the following terms:

[0247] 1. A computer-implemented method for providing proof of an ordered sequence of events, the method being executed on a computing device and comprising:

[0248] Receive transactions;

[0249] creating another transaction to be sent to another computing device;

[0250] obtaining attestation data associated with the other transaction, the attestation data providing to the other computing device attestation that the other transaction is linked to an initial transaction in a chain of transactions that includes the transaction, wherein the initial transaction is related to an initial event in the ordered sequence of events, and the attestation data comprises: (i) an attestation; (ii) an identifier of the transaction; and (iii) a unique identifier of the initial transaction; and,

[0251] The other transaction and the attestation data are sent to the other computing device.

[0252] 2. A method according to clause 1, wherein the transaction is the initial transaction, and obtaining the proof data includes: setting the proof to a predetermined proof value, and setting the identifier of the transaction to a predetermined initial value.

[0253] 3. A method according to clause 1, wherein the transaction is not the initial transaction in the transaction chain, the method comprising: verifying whether the transaction satisfies at least one predetermined condition.

[0254] 4. A method according to clause 3, wherein the at least one predetermined condition specifies that the transaction spends the transaction output of a previous transaction in the transaction chain.

[0255] 5. The method of clause 3, wherein the at least one predetermined condition specifies that the transaction includes an index of a transaction output of the transaction.

[0256] 6. A method according to any one of clauses 3 to 5, wherein obtaining the certification data comprises:

[0257] generating the attestation using the transaction and an attestation key; and,

[0258] The identifier of the transaction is calculated.

[0259] 7. A method according to any preceding clause, wherein the method comprises: including the proof data in the other transaction.

[0260] 8. A method according to clause 7, wherein the method comprises: including the proof data in a spendable output of the other transaction.

[0261] 9. A method according to clause 7, wherein the method comprises: including the proof data in an unspendable output of the other transaction.

[0262] 10. A method according to any of clauses 1 to 6, wherein the attestation data is not included in the other transaction, and the method comprises sending the other transaction and the attestation data separately to the other computing device.

[0263] 11. A method according to any of the preceding clauses, wherein the transaction represents a transfer of ownership of a digital asset to a user associated with the computing device, and the other transaction represents a transfer of ownership of the digital asset to another user associated with the other computing device.

[0264] 12. The method of clause 11, wherein the digital asset is a non-fungible token.

[0265] 13. A method according to any one of clauses 1 to 10, wherein the transaction is associated with event data, wherein the event data relates to an event in the ordered sequence of events; and wherein the other transaction is associated with another event data, wherein the other event data relates to a later event in the ordered sequence of events.

[0266] 14. The method of clause 13, wherein the event data comprises a data record associated with a physical or digital object, and the further event data comprises another data record associated with the physical or digital object.

[0267] 15. The method of clause 13, wherein the event data comprises a data record associated with a user and the further event data comprises another data record associated with the user.

[0268] 16. A method according to any of clauses 13 to 15, wherein the transaction comprises a representation of the event data and the further transaction comprises a representation of the further event data.

[0269] 17. A method according to any one of clauses 13 to 15, wherein the event data is stored on a remote device in association with the identifier of the transaction, and the method comprises storing the further event data on the remote device in association with the identifier of the further transaction.

[0270] 18. A method according to any of the preceding clauses, wherein the transaction and the other transaction are blockchain transactions.

[0271] 19. A computer program which, when read by a computing device, causes the computing device to perform a method according to any preceding clause.

[0272] 20. A non-transitory computer-readable storage medium comprising computer-readable instructions which, when read by a computing device, cause the computing device to perform the method of any one of clauses 1 to 18.

[0273] 21. A computing device comprising a processor and a memory, the memory storing instructions which, when executed by the processor, cause the computing device to perform the method according to any one of clauses 1 to 18.

[0274] 22. A computer-implemented method for verifying an ordered sequence of events, the method being executed on a computing device and comprising:

[0275] receiving a transaction from another computing device;

[0276] receiving, from the other computing device, attestation data associated with the transaction, the attestation data comprising: (i) an attestation; (ii) an identifier of a previous transaction in a chain of transactions; and (iii) a unique identifier of an initial transaction in the chain of transactions, wherein the initial transaction is associated with an initial event in the ordered sequence of events; and,

[0277] Verifying that the transaction is linked to the initial transaction in the transaction chain using the proof, the identifier of a previous transaction in the transaction chain, the unique identifier of the initial transaction, and a verification key.

[0278] 23. A method according to clause 22, wherein the transaction includes the certification data.

[0279] 24. The method of clause 23, wherein the transaction includes the proof data in a spendable output of the transaction.

[0280] 25. A method as described in clause 23, wherein the transaction includes the proof data in an unspendable output of the transaction.

[0281] 26. The method of clause 22, wherein the attestation data is received separately from the transaction.

[0282] 27. The method of any of clauses 22 to 26, wherein verifying whether the transaction is linked to the initial transaction in the transaction chain further comprises:

[0283] Obtaining the initial transaction;

[0284] calculating a unique identifier for the initial transaction; and,

[0285] Verifying that the calculated unique identifier of the initial transaction matches the unique identifier of the initial transaction in the attestation data.

[0286] 28. A method according to any of clauses 22 to 27, wherein the transaction represents a transfer of ownership of a digital asset from a user associated with the other computing device to a user associated with the computing device.

[0287] 29. The method of clause 28, wherein the digital asset is a non-fungible token.

[0288] 30. A method according to any one of clauses 22 to 27, wherein the transaction is associated with event data, wherein the event data relates to an event in the ordered sequence of events; and wherein the other transaction is associated with another event data, wherein the other event data relates to a later event in the ordered sequence of events.

[0289] 31. A method according to clause 30, wherein the event data comprises a data record associated with a physical or digital object, and the another event data comprises another data record associated with the physical or digital object.

[0290] 32. A method according to clause 30, wherein the event data comprises a data record associated with a user and the further event data comprises another data record associated with the user.

[0291] 33. A method according to any one of clauses 22 to 32, wherein the transaction is a blockchain transaction.

[0292] 34. A computer program which, when read by a computing device, causes the computing device to perform the method according to any of clauses 22 to 33.

[0293] 35. A non-transitory computer-readable storage medium comprising computer-readable instructions which, when read by a computing device, cause the computing device to perform the method of any one of clauses 22 to 33.

[0294] The instructions may be provided on a carrier such as a disk, CD-ROM or DVD-ROM, on a program memory such as a read-only memory (firmware), or on a data carrier such as an optical signal or an electrical signal carrier. The instructions for implementing the embodiments of the present disclosure may include source, object or executable code in a conventional programming language (interpreted or compiled) such as C, assembly code, code for building or controlling an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA), or code for a hardware description language.< / pa>

Claims

1. A computer-implemented method for providing proof of an ordered sequence of events, the method being executed on a computing device and comprising: Receive transactions; creating another transaction to be sent to another computing device; obtaining attestation data associated with the other transaction, the attestation data providing to the other computing device attestation that the other transaction is linked to an initial transaction in a chain of transactions that includes the transaction, wherein the initial transaction is related to an initial event in the ordered sequence of events, and the attestation data comprising: (i) an attestation; (ii) an identifier of the transaction; and (iii) a unique identifier of the initial transaction; and The other transaction and the attestation data are sent to the other computing device.

2. The method of claim 1 , wherein the transaction is the initial transaction, and obtaining the attestation data comprises: The proof is set to a predetermined proof value, and the identifier of the transaction is set to a predetermined initial value.

3. The method according to claim 1, wherein the transaction is not the initial transaction in the transaction chain, the method comprising: Verifying that the transaction satisfies at least one predetermined condition.

4. The method of claim 3, wherein the at least one predetermined condition specifies that the transaction spends a transaction output of a previous transaction in the transaction chain.

5. The method of claim 3, wherein the at least one predetermined condition specifies that the transaction includes an index of a transaction output of the transaction.

6. The method according to any one of claims 3 to 5, wherein obtaining the certification data comprises: generating the attestation using the transaction and the attestation key; as well as The identifier of the transaction is calculated.

7. A method according to any preceding claim, wherein the method comprises: The certification data is included in the other transaction.

8. The method according to claim 7, wherein the method comprises: Including the proof data in a spendable output of the other transaction.

9. The method according to claim 7, wherein the method comprises: Including the proof data in an unspendable output of the other transaction.

10. A method according to any one of claims 1 to 6, wherein the attestation data is not included in the further transaction, and the method comprises: The other transaction and the attestation data are separately sent to the other computing device.

11. A method according to any of the preceding claims, wherein the transaction represents a transfer of ownership of a digital asset to a user associated with the computing device, and the other transaction represents a transfer of ownership of the digital asset to another user associated with the other computing device.

12. The method of claim 11, wherein the digital asset is a non-fungible token.

13. A method according to any one of claims 1 to 10, wherein the transaction is associated with event data, wherein the event data relates to an event in the ordered sequence of events; and wherein the other transaction is associated with another event data, wherein the other event data relates to a later event in the ordered sequence of events.

14. The method of claim 13, wherein the event data comprises a data record associated with a physical or digital object, and the further event data comprises another data record associated with the physical or digital object.

15. The method of claim 13, wherein the event data comprises a data record associated with a user and the further event data comprises another data record associated with the user.

16. A method according to any one of claims 13 to 15, wherein the transaction comprises a representation of the event data and the further transaction comprises a representation of the further event data.

17. A method according to any one of claims 13 to 15, wherein the event data is stored on a remote device in association with the identifier of the transaction, and the method comprises: The further event data is stored on the remote device in association with an identifier of the further transaction.

18. A method according to any preceding claim, wherein the transaction and the further transaction are blockchain transactions.

19. A computer program which, when read by a computing device, causes the computing device to perform a method according to any preceding claim.

20. A non-transitory computer-readable storage medium comprising computer-readable instructions which, when read by a computing device, cause the computing device to perform the method of any one of claims 1 to 18.

21. A computing device comprising a processor and a memory, the memory storing instructions which, when executed by the processor, cause the computing device to perform the method according to any one of claims 1 to 18.

22. A computer-implemented method for verifying an ordered sequence of events, the method being executed on a computing device and comprising: receiving a transaction from another computing device; receiving, from the other computing device, attestation data associated with the transaction, the attestation data comprising: (i) an attestation; (ii) an identifier of a previous transaction in a chain of transactions; and (iii) a unique identifier of an initial transaction in the chain of transactions, wherein the initial transaction is associated with an initial event in the ordered sequence of events; and The transaction is linked to the initial transaction in the transaction chain using the proof, the identifier of the previous transaction in the transaction chain, the unique identifier of the initial transaction, and a verification key.

23. The method of claim 22, wherein the transaction includes the certification data.

24. The method of claim 23, wherein the transaction includes the proof data in a spendable output of the transaction.

25. The method of claim 23, wherein the transaction includes the proof data in an unspendable output of the transaction.

26. The method of claim 22, wherein the attestation data is received separately from the transaction.

27. The method of any one of claims 22 to 26, wherein verifying that the transaction is linked to the initial transaction in the transaction chain further comprises: Obtaining the initial transaction; Calculating a unique identifier for the initial transaction; as well as Verifying that the computed unique identifier of the initial transaction matches the unique identifier of the initial transaction in the attestation data.

28. A method according to any one of claims 22 to 27, wherein the transaction represents a transfer of ownership of a digital asset from a user associated with the other computing device to a user associated with the computing device.

29. The method of claim 28, wherein the digital asset is a non-fungible token.

30. A method according to any one of claims 22 to 27, wherein the transaction is associated with event data, wherein the event data relates to an event in the ordered sequence of events; and wherein the other transaction is associated with another event data, wherein the other event data relates to a later event in the ordered sequence of events.

31. A method according to claim 30, wherein the event data comprises a data record associated with a physical or digital object, and the another event data comprises another data record associated with the physical or digital object.

32. The method of claim 30, wherein the event data comprises a data record associated with a user and the further event data comprises another data record associated with the user.

33. A method according to any one of claims 22 to 32, wherein the transaction is a blockchain transaction.

34. A computer program which, when read by a computing device, causes the computing device to perform a method according to any one of claims 22 to 33.

35. A non-transitory computer-readable storage medium comprising computer-readable instructions which, when read by a computing device, cause the computing device to perform the method of any one of claims 22 to 33.

36. A computing device comprising a processor and a memory, the memory storing instructions which, when executed by the processor, cause the computing device to perform the method according to any one of claims 22 to 33.

Citation Information

Cited By

  • High-performance increment verifiable calculation method suitable for block chain capacity expansion

    CN119865303A

  • Database verification method based on polynomial commitment and memory correctness verification

    WO2026199182A1