Computer-based methods and systems
By providing APIs for blockchain services, clients can securely and efficiently interact with blockchain networks, addressing the challenge of complex processing requirements and ensuring reliable data management.
Patent Information
- Application Number
- JP2023543423
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-06-11
- Filing Date
- 2022-05-27
- Publication Date
- 2026-11-11
- Estimated Expiration
- 2042-05-27
Smart Images

Figure 0007948934000002 
Figure 0007948934000003 
Figure 0007948934000004
Abstract
Description
[Technical Field]
[0001] This disclosure relates to a platform for one or more services related to a distributed ledger, i.e., a method and system for implementing a blockchain, for one or more clients. More specifically, this disclosure relates to the provision and verification of blockchain-related data storage, but is not limited to these. [Background technology]
[0002] A blockchain is a form of decentralized data structure, and copies of a blockchain are maintained and made publicly available on each of the multiple nodes in a decentralized peer-to-peer (P2P) network (hereinafter referred to as the "blockchain network"). A blockchain consists of a chain of data blocks, and each block contains one or more transactions. Each transaction, other than so-called "coinbase transactions," refers to a preceding transaction in a sequence that may span one or more blocks up to one or more coinbase transactions. Coinbase transactions are discussed below. Transactions submitted to the blockchain network are included in new blocks. New blocks are created through a process often called "mining," which involves each of the multiple nodes competing to perform "proof of work," that is, solving a cryptographic puzzle based on a defined representation of an ordered and validated set of unprocessed transactions waiting to be included in a new block of the blockchain. Note that the blockchain may be pruned at the nodes, and the publication of a block can be achieved by publishing only the block header.
[0003] Transactions in a blockchain are used to carry digital assets (i.e., a number of digital tokens), to order sets of entries in a virtualized ledger or register, to receive and process timestamp entries, and / or to temporally order index pointers. Blockchains can also be used to add additional functionality to them. Blockchain protocols can enable the storage of additional user data or indices for data within transactions. There is no predetermined limit to the maximum amount of data 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, or audio or video data, within the blockchain.
[0004] Nodes in a blockchain network (often called "miners") perform the decentralized process of registering and verifying transactions, as detailed below. In short, during this process, nodes validate transactions, insert them into block templates, and attempt to identify a valid proof-of-work solution for that block template. Once a valid solution is found, the new block is propagated to other nodes in the network, allowing each node to record the new block on the blockchain. To ensure a transaction is recorded on the blockchain, a user (e.g., a blockchain client application) sends it to one of the network's nodes so that the transaction can be propagated. Nodes receiving the transaction compete to find a proof-of-work solution that incorporates the validated transaction into a new block. Each node is configured to implement the same node protocol, which includes one or more conditions for a transaction to be valid. Invalid transactions are neither propagated nor incorporated into blocks. Assuming a transaction is validated and accepted on the blockchain, the transaction (including any user data) remains registered and indexed at each node in the blockchain network as an immutable public record.
[0005] Nodes that successfully solve the proof-of-work puzzle to create the latest block are typically rewarded with a new transaction called a "coinbase transaction," which distributes a certain amount of digital assets, i.e., a certain number of tokens. Invalid transactions are detected and rejected by competing nodes, which act as agents of the network and are motivated to report and block fraud. By making information widely public, users can continuously audit the performance of nodes. By publishing only the block header, participants can ensure that the integrity of the blockchain continues.
[0006] In the “output-based” model (sometimes called the UTXO-based model), the data structure of a given transaction comprises one or more inputs and one or more outputs. Every consumable output comprises an element specifying the amount of digital asset that can be derived from the preceding sequence of the transaction. Consumable outputs are sometimes called UTXOs (“unconsumed transaction outputs”). Outputs may further comprise a locking script that specifies the conditions for further redemption of the output. A locking script is a predicate that defines the conditions necessary to validate and transfer a digital token or asset. Each input of a transaction (other than a coinbase transaction) comprises a pointer (i.e., a reference) to such an output in a preceding transaction and may further comprise an unlocking script for unlocking the locking script of the pointed-to output. Thus, consider a pair of transactions, which we will call the first transaction and the second transaction (or “target” transaction). The first transaction comprises at least one output which comprises a locking script that specifies the amount of digital asset and defines one or more conditions for unlocking the output. The second target transaction has at least one input, which includes a pointer to the output of the first transaction and an unlocking script for unlocking the output of the first transaction.
[0007] In such a model, when a second target transaction is sent to the blockchain network to be propagated and recorded on the blockchain, one of the validity criteria applied at each node is that the unlocking script satisfies all one or more conditions defined in the locking script of the first transaction. Another criterion is that the output of the first transaction has not yet been redeemed by another earlier valid transaction. Any node that finds a target transaction to be invalid according to any of these conditions will not propagate the transaction (and in some cases will not propagate it as a valid transaction to register an invalid transaction), nor will it include the transaction in a new block to be recorded on the blockchain.
[0008] An alternative type of transaction model is the account-based model. In this case, each transaction defines the amount to be transferred by referencing the absolute account balance, rather than by referencing the UTXO of a preceding transaction in a sequence of past transactions. The current state of all accounts is stored and periodically updated by a node separate from the blockchain.
[0009] One area of current research is the use of blockchain for the implementation of "smart contracts." These are computer programs designed to automate the execution of machine-readable contracts or agreement terms. Unlike traditional contracts written in natural language, smart contracts are machine-executable programs that have rules that can process inputs to produce results, and these rules allow actions to be performed depending on those results. Another area of interest related to blockchain is the use of "tokens" (or "colored coins") to represent and transfer real-world entities across the blockchain. Items that may require careful handling or may be confidential can be represented by tokens, and tokens have no recognizable meaning or value. Thus, tokens function as identifiers that allow real-world items to be referenced from the blockchain. [Prior art documents] [Patent Documents]
[0010] [Patent Document 1] UK Patent Application No. 2013929.1 [Patent Document 2] UK Patent Application No. 2102217.3 [Patent Document 3] UK Patent Application No. 2106950.5 [Patent Document 4] UK Patent Application No. 2102314.8 [Patent Document 5] UK Patent Application No. 2002285.1 [Overview of the project] [Problems that the invention aims to solve]
[0011] The examples or scenarios mentioned above require that a client, client entity, computing device, or terminal associated with the client include or implement software and / or hardware, or processor / modules, such as a digital wallet for implementing functions to manage digital assets, such as managing cryptographic keys for the Elliptic Curve Digital Signature Algorithm (ECDSA), used by the BSV (Bitcoin Satoshi's Vision) blockchain, while leveraging the advantages of blockchain to provide a persistent and tamper-proof record of events. In addition, the client device must be capable of carrying out the construction of blockchain transactions and having access to the BSV library. Therefore, the client not only needs to include the processing to implement such functions, but also needs to ensure that appropriate security measures are in place for such processes before it can utilize the blockchain network to send, receive, and view data and / or digital assets relating to tokens representing smart contracts or transactions of real-world assets.
[0012] Therefore, regardless of computing power, it is desirable to implement a secure, uncomplicated, user-friendly, efficient, and robust technique that enables any client to instantly access and interact with useful blockchain-related applications in a simple, fast, accurate, reliable, and secure manner that is computationally and functionally less cumbersome. More specifically, it is desirable to leverage distributed ledger (blockchain) technology and its advantages of improved security, transparency, and record reliability to provide a common platform or interface for multiple blockchain-related services or applications that ensure any client computing device can ensure that any client-related data, events, or digital assets can be instantly and securely mined or easily written to the blockchain, thereby providing a permanent, tamper-proof, and auditable record of data that can be created, written, updated, read, or viewed as needed.
[0013] Such improved solutions have been devised. This disclosure addresses the above technical problems by proposing one or more techniques by which data or information relating to a client can be easily, securely, and instantaneously written to or retrieved from the blockchain by methods, devices, and systems that provide application programming interfaces (APIs) for one or more services relating to the blockchain, without requiring such clients to implement any processing or functionality for using the blockchain, while still enabling them to take advantage of all the benefits relating to the blockchain. [Means for solving the problem]
[0014] In a first embodiment, the Disclosure proposes methods, devices, and systems for maintaining the status of a stream on a blockchain. More specifically, a method in a first embodiment comprises the steps of receiving a stream creation message, wherein the stream creation message includes an indication of a condition for a trigger; obtaining data indicating the state of the stream based on the fact that the trigger condition has been met; and generating an additional transaction comprising the data indicating the state of the stream.
[0015] In a second embodiment, the Disclosure proposes methods, devices, and systems for verifying a blockchain-stored representation of a dataset. More specifically, a method in the second embodiment includes the steps of obtaining a reference to an on-chain dataset, the on-chain dataset being stored on a blockchain and comprising data carrying transactions, each data carrying a transaction comprising data indicating an event in an off-chain dataset; examining the on-chain dataset; determining that for each data carrying a transaction in the on-chain dataset, the data indicating an event in the off-chain dataset is associated with a data item in the off-chain dataset; and verifying that the on-chain dataset and the off-chain dataset correspond to each other.
[0016] In a third aspect, the disclosure proposes methods, devices, and systems for creating and verifying blockchain-stored representations of a dataset. More specifically, the method in the third aspect comprises the steps of generating an on-chain dataset using the method according to the first aspect, and verifying the on-chain dataset according to the second aspect.
[0017] Herein, some specific components and embodiments of the disclosed method are described by reference to the accompanying drawings, where similar reference numerals refer to similar features. [Brief explanation of the drawing]
[0018] [Figure 1] This diagram shows an exemplary system for implementing blockchain. [Figure 2] This is a diagram illustrating an exemplary transaction protocol. [Figure 3A] This figure shows an example implementation of a client application and its user interface. [Figure 3B] This figure shows an example implementation of a client application and its user interface. [Figure 4] This figure shows an example of node software running on each blockchain node in the network. [Figure 5] This is a schematic diagram illustrating the submission of event data to the platform processor, database, and blockchain network. [Figure 6A] This flowchart shows how to publish the current state of an event stream to the blockchain. [Figure 6B] This is a sequence diagram showing the data and / or process flow related to the fulfillment of timer conditions. [Figure 7A] This is a schematic diagram showing the transaction chain. [Figure 7B] This is a schematic diagram of an example transaction. [Figure 7C] This is a schematic diagram of an example transaction. [Figure 8] This is a schematic diagram illustrating the verification of a dataset represented on a blockchain. [Figure 9] This flowchart shows a method for validating an on-chain dataset using an off-chain stored event stream. [Figure 10] This is a schematic diagram illustrating the outline of a platform for multiple blockchain-related services in a particular manner. [Figure 11]This is a schematic diagram illustrating the components of a platform for multiple blockchain-related services in a particular manner. [Figure 12] This is a schematic diagram illustrating a computing environment in which various aspects and embodiments of this disclosure may be implemented. [Modes for carrying out the invention]
[0019] Overview of the Exemplary System Figure 1 shows an exemplary system 100 for implementing blockchain 150. System 100 may consist of a packet-switched network 101, which is typically a wide-area internetnet such as the internet. The packet-switched network 101 comprises a plurality of blockchain nodes 104 that can 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 quasi-complete graph. Thus, each blockchain node 104 is highly connected to other blockchain nodes 104.
[0020] Each blockchain node 104 is equipped with the computer equipment of its peers, and different nodes 104 belong to different peers. Each blockchain node 104 is equipped with a processing unit comprising one or more processors, for example, one or more central processing units (CPUs), accelerator processors, application-specific processors and / or field-programmable gate arrays (FPGAs), and other equipment such as application-specific integrated circuits (ASICs). Each node also has memory, i.e., computer-readable storage in the form of non-temporary computer-readable media. The memory may comprise one or more memory units utilizing one or more memory media, for example, magnetic media such as hard disks, solid-state drives (SSDs), electronic media such as flash memory or EEPROMs, and / or optical media such as high-value disk drives.
[0021] Blockchain 150 comprises a chain of data blocks 151, and each copy of Blockchain 150 is maintained in each of the multiple blockchain nodes 104 within the distributed network or blockchain network 160. As mentioned above, maintaining a copy of Blockchain 150 does not necessarily mean completely memorizing Blockchain 150. Instead, Blockchain 150 can be pruned, as long as each blockchain node 150 remembers the block header (discussed below) of each block 151. Each block 151 in the chain comprises one or more transactions 152, where a transaction refers to some kind of data structure. The nature of the data structure depends on the type of transaction protocol used as part of the transaction model or scheme. A given blockchain uses one particular transaction protocol throughout. In a common type of transaction protocol, the data structure of each transaction 152 comprises at least one input and at least one output. Each output designates an amount representing a certain quantity of digital assets as property, an example being user 103, the target of which the output is cryptographically locked (requiring the user's signature or other solution for unlocking, redemption, or consumption). Each input points to the output of the preceding transaction 152, thereby linking those transactions.
[0022] Each block 151 also has a block pointer 155 that points to a previously created block 151 in the chain to define the sequential order of blocks 151. Each transaction 152 (other than coinbase transactions) has a pointer to a previous transaction to define the order of the transaction sequence (note that the sequence of transactions 152 is allowed to fork). The chain of block 151 goes back to the genesis block (Gb) 153, which was the first block in the chain. One or more of the initial original transactions 152 in chain 150 pointed to the genesis block 153, rather than a preceding transaction.
[0023] Each blockchain node 104 is configured to forward transaction 152 to other blockchain nodes 104, thereby ensuring that transaction 152 is propagated throughout the network 106. Each blockchain node 104 is configured to create block 151 and store each copy of the same blockchain 150 in its own memory. Each blockchain node 104 also maintains an ordered set 154 of transactions 152 waiting to be incorporated into block 151. This ordered set 154 is often referred to as a “memory pool”. In this specification, this term is not intended to be limited to any particular blockchain, protocol, or model. It refers to an ordered set of transactions that a node 104 has accepted as valid and that a node 104 is not obligated to accept other transactions attempting to consume the same output.
[0024] In a given current transaction 152j, the input (or each input) contains a pointer to the output of a preceding transaction 152i in the sequence of transactions, specifying that this output will be redeemed, or "consumed," in the current transaction 152j. Generally, a preceding transaction can be any transaction in an ordered set 154 or any block 151. A preceding transaction 152i does not necessarily have to exist when the current transaction 152i is created, or even when it is sent to the network 106, but for the current transaction to be valid, a preceding transaction 152i must exist and be validated. Thus, "preceding" as used herein refers to something that precedes in a logical sequence linked by pointers, and does not necessarily refer to the time of creation or transmission in temporal order, and therefore does not necessarily exclude the possibility that transactions 152i, 152j may be created or sent out of order (see the following discussion on orphan transactions). A preceding transaction 152i may similarly be called an ancestor transaction or predecessor transaction.
[0025] The input to the current transaction 152j also includes input authorization, for example, the signature of user 103a, to whom the output of the preceding transaction 152i is subject to locking. The output of the current transaction 152j may then be cryptographically locked to a new user or entity 103b. Thus, the current transaction 152j can transfer an amount defined in the input of the preceding transaction 152i to a new user or entity 103b, as defined in the output of the current transaction 152j. In some cases, transaction 152 may have multiple outputs to divide the input amount among multiple users or entities (one of which may be the original user or entity 103a to give the remaining balance). In some cases, the transaction may also have multiple inputs to collect amounts from multiple outputs of one or more preceding transactions and redistribute one or more outputs of the current transaction.
[0026] According to output-based transaction protocols such as Bitcoin, when an entity 103, such as a user or machine, wishes to execute a new transaction 152j, the entity sends the new transaction from its computer terminal 102 to a recipient. The entity or recipient then sends this transaction to one or more blockchain nodes 104 on the network 106 (which are usually servers or data centers today, but in principle could be other user terminals). It is not ruled out that the entity 103 executing the new transaction 152j may send the transaction to one or more blockchain nodes 104, and in some examples may not send it to a recipient. The blockchain node 104 receiving the transaction verifies whether the transaction is valid according to the blockchain node protocol applicable to each blockchain node 104. The blockchain node protocol typically requires the blockchain node 104 to verify that 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 verifying that the cryptographic signature or other authorization of entity 103 included in the input of the new transaction 152j matches a condition defined in the output of the preceding transaction 152i assigned by the new transaction, which typically includes verifying that the cryptographic signature or other authorization in the input of the new transaction 152j unlocks the output of the preceding transaction 152i to which the input of the new transaction is concatenated. This condition may be defined at least in part by a script included in the output of the preceding transaction 152i.
[0027] Alternatively, it may be fixed simply by the blockchain node protocol alone, or it may be a combination of these. In any case, if the new transaction 152j is valid, 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, forwarding the new transaction 152j to one or more further nodes 104, and so on. In this way, the new transaction is propagated throughout the network of blockchain nodes 104.
[0028] In an output-based model, the definition of whether a given output (e.g., a UTXO) is allocated is whether it has already been validly redeemed by the input of another preceding transaction 152j according to the blockchain node protocol. Another condition for a transaction to be valid is that the output of the preceding transaction 152i that the transaction attempts to allocate or redeem has not yet been allocated / redeemed by another transaction. Again, if it is not valid, transaction 152j is not propagated on blockchain 150 (unless it is flagged as invalid and propagated for warning) or recorded. This protects against double consumption, such as when a trader attempts to allocate the output of the same transaction more than once. Account-based models, on the other hand, protect against double consumption by maintaining account balances. Again, because there is a defined order of transactions, account balances have a single defined state at any given time.
[0029] In addition to verifying transactions, blockchain node 104 also competes to be the first to create a block of transactions in a process commonly called mining, which is aided by "proof of work". At blockchain node 104, a new transaction is added to an ordered set 154 of valid transactions that have not yet appeared in block 151 recorded in blockchain 150. The blockchain nodes then compete to assemble a new valid block 151 of transaction 152 from the ordered set 154 of transactions by attempting to solve a cryptographic puzzle. Typically, this involves searching for a "nonce" value such that, when the nonce is concatenated with a representation of the ordered set 154 of transactions and hashed, the output of the hash satisfies a predetermined condition. For example, the predetermined condition might be that the output of the hash has a certain number of leading zeros. Note that this is just one specific type of proof of work puzzle, and other types are not excluded. The property of a hash function is that it has an output that is unpredictable with respect to its input. Therefore, this search can only be performed by brute force, which consumes a large amount of processing resources on each blockchain node 104 attempting to solve the puzzle.
[0030] The first blockchain node 104, attempting to solve the puzzle, announces this to the network 106 and provides the solution as proof that can be easily verified by other blockchain nodes 104 in the network (given a solution to the hash, it is simple to verify that the output of the hash satisfies the condition). The first blockchain node 104 propagates the block to the threshold consensus of other nodes that accept the block and thus enforce the protocol rules. The ordered set of transactions 154 is then recorded by each of the blockchain nodes 104 as a new block 151 in blockchain 150. The block pointer 155 is also assigned to a new block 151n that points to a previously created block 151n-1 in the chain. The considerable effort required to create the proof-of-work solution, for example in the form of a hash, demonstrates the intention of the first node 104 to follow the rules of the blockchain protocol. Such rules include not accepting a transaction as valid if it assigns the same output as a previously validated transaction (this is otherwise known as double consumption). Once created, block 151 cannot be altered because it is recognized and maintained at each of the blockchain nodes 104 in the blockchain network 106. The block pointer 155 also imposes a sequential order on block 151. Since transaction 152 is recorded in an ordered block at each blockchain node 104 in the network 106, this provides an immutable public ledger of transactions.
[0031] It should be noted that different blockchain nodes 104 competing to solve the puzzle at any given time may be competing to solve the puzzle based on different snapshots of an ordered set of yet-to-be-published transactions 154 at any given time, depending on when those blockchain nodes began searching for the solution or the order in which the transactions were received. The first to solve each puzzle defines which transactions 152 will be included in the next new block 151n and in what order, and the current set of unpublished transactions 154 is updated. The blockchain nodes 104 then continue to compete to create blocks from the newly defined outstanding ordered set of unpublished transactions 154, and so on. There are also protocols to resolve any "forks" that may occur, which are situations in which two blockchain nodes 104 solve the puzzle to each other in a very short time, resulting in conflicting landscapes of the blockchain propagating between the nodes 104. In other words, the longer the tip of the fork grows, the final blockchain 150 will be. Please note that since the same transaction appears on both forks, this should not affect any users or agents on the network.
[0032] According to the Bitcoin blockchain (and most other blockchains), a node that successfully constructs a new block 104 is given the ability to allocate a permissible amount of digital assets in a new special type of transaction that distributes a predetermined quantity of digital assets (as opposed to inter-agent or inter-user transactions, which transfer a certain amount of digital assets from one agent or user to another agent or user). This special type of transaction is usually called a "coinbase transaction," but may also be called an "initial transaction." It typically forms the first transaction of a new block 151n. Proof of work demonstrates the intent of the node constructing the new block, that it will follow protocol rules that allow this special transaction to be redeemed later. Blockchain protocol rules may require a maturation period, for example, 100 blocks, before this special transaction can be redeemed. Often, a normal (non-generated) transaction 152 also specifies an additional transaction fee in one of its outputs to further reward the blockchain node 104 that created block 151n in which that transaction was published. This fee is usually called a "transaction fee" and will be discussed below.
[0033] Due to the resources involved in validating and publishing transactions, each of the blockchain nodes 104 typically 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 can take the form of a networked set of user terminals or a group of user terminals.
[0034] The memory of each blockchain node 104 stores software configured to run on the processing unit of the blockchain node 104, performing its respective role and handling transaction 152 in accordance with the blockchain node protocol. It will be understood that any activity relating to the blockchain node 104 as described herein may be carried out by software running on the processing unit of each computer device. The node software may be implemented in one or more applications at the application layer, or at lower layers such as the operating system layer or protocol layer, or in any combination thereof.
[0035] The computer devices 102 of each of the multiple stakeholders 103, who act as consuming users, are also connected to the network 101. These users can interact with the blockchain network, but do not participate in the verification, construction, or propagation of transactions and blocks. Some of these users or agents 103 may act as senders or receivers in transactions. Other users may interact with the blockchain 150 without necessarily acting as senders or receivers. For example, some stakeholders may act as storage entities that store copies of the blockchain 150 (e.g., by obtaining a copy of the blockchain from a blockchain node 104).
[0036] Some or all of the stakeholders 103 may be connected as part of a different network, such as a blockchain network 106 superimposed on it. Users of the blockchain network (often called “clients”) are sometimes said to be part of the system that includes the blockchain network. However, these users are not blockchain nodes 104, because they do not perform the roles required of blockchain nodes. Instead, each stakeholder 103 can utilize the blockchain 150 by interacting with the blockchain network 106 and thereby connecting to (i.e., communicating with) the blockchain nodes 106. Two stakeholders 103 and their respective devices 102 are shown for illustrative purposes: a first stakeholder 103a and their respective computer devices 102a, and a second stakeholder 103b and their respective computer devices 102b. It will be understood that more such stakeholders 103 and their respective computer devices 102 may exist and participate in the system 100, but for convenience they are not shown. Each stakeholder 103 may be an individual or an organization. For purely illustrative purposes, the first party 103a is referred to herein as Alice, and the second party 103b is referred to as Bob, but this is not limiting, and it will be understood that any reference to Alice or Bob herein may be replaced by “the first party” and “the second party,” respectively.
[0037] Each of the persons 103's computer equipment 102 comprises a processing unit comprising one or more processors, for example, one or more CPUs, GPUs, other accelerator processors, application-specific processors, and / or FPGAs. Each of the persons 103's computer equipment 102 further comprises memory in the form of a non-temporary computer-readable medium, i.e., computer-readable storage. This memory may comprise one or more memory units utilizing one or more memory media, for example, magnetic media such as hard disks, SSDs, flash memory, or electronic media such as EEPROMs, and / or optical media such as optical disc drives. The memory of each of the persons 103's computer equipment 102 stores software comprising each instance of at least one client application 105 configured to run on the processing unit. It will be understood that any activity arising from this specification with respect to a given person 103 can be performed using software running on the processing unit of each of the persons 102. Each of the persons 103's computer equipment 102 comprises at least one user terminal, for example, a desktop or laptop computer, a tablet, a smartphone, or a wearable device such as a smartwatch. The computer equipment 102 of the given party 103 may also include one or more other network-connected resources, such as cloud computing resources accessed via a user terminal.
[0038] The client application 105 may first be downloaded from a server, for example, or provided to any given person's computer equipment 102 on a suitable computer-readable storage medium, such as a removable SSD, flash memory key, removable EEPROM, removable magnetic disk drive, magnetic floppy disk or tape, optical disk such as a CD or DVD ROM, or removable optical drive.
[0039] The client application 105 has at least a “wallet” function. This has two main functions. One of these is to enable each party 103 to create, approve (e.g., sign) a transaction 152 and send it to one or more Bitcoin nodes 104 so that the transaction 152 is disseminated throughout the network of blockchain nodes 104 and included in blockchain 150. The other is to report to each party the amount of digital assets that each party currently owns. In an output-based system, this second function is to match the amounts defined in the outputs of various 152 transactions scattered throughout blockchain 150 belonging to the party in question.
[0040] Note: While various client functions may be described as being integrated into a given client application 105, this is not necessarily limited. Instead, any client function described herein may be implemented in a set of two or more separate applications, such as interfaced via an API, or one being a plug-in to the other. More generally, client functions may be implemented in the application layer, or in lower layers such as the operating system, or any combination thereof. The following description will be based on, but will not be limited to, client application 105.
[0041] Each computer device 102 instance of a client application or software 105 is operably coupled to at least one of the blockchain nodes 104 of the network 106. This enables the wallet function of client 105 to send transaction 152 to the network 106. Client 105 can also contact blockchain node 104 to query blockchain 150 for any transactions to which each party 103 is a recipient (or, in an embodiment, actually investigate the transactions of other parties on blockchain 150, as blockchain 150 is a public entity that brings credibility to some transactions by being a public entity). The wallet function of each computer device 102 is configured to organize and send transaction 152 according to the transaction protocol. As stated above, each blockchain node 104 runs software configured to validate transaction 152 according to the blockchain node protocol and forward them to propagate transaction 152 throughout the blockchain network 106. The transaction protocol and node protocol correspond to each other, and a given transaction protocol, accompanied by a given node protocol, together implements a given transaction model. The same transaction protocol is used for all 152 transactions within blockchain 150. The same node protocol is used by all 104 nodes within network 106.
[0042] When a given party 103, for example Alice, wishes to send a new transaction 152j to be included in blockchain 150, she organizes the new transaction according to the relevant transaction protocol (using the wallet function of her client application 105). She then sends transaction 152 from client application 105 to one or more blockchain nodes 104 to which she is connected. For example, this could be blockchain node 104 best connected to Alice's computer 102. When any given blockchain node 104 receives the new transaction 152j, blockchain node 104 handles the new transaction 152j according to the blockchain node protocol and its respective role. This includes first checking whether the newly received transaction 152j meets any conditions for being "valid," an example of which will be discussed in more detail shortly. In some transaction protocols, the conditions for validation may be configurable on a per-transaction basis by a script included in transaction 152. Alternatively, this condition may simply be a built-in function of the node protocol, or it may be defined by a combination of the script and the node protocol.
[0043] Under the conditions that a newly received transaction 152j passes the test to be considered valid (i.e., it is "validated"), any blockchain node 104 receiving transaction 152j adds the new validated transaction 152 to the ordered set of transactions 154 maintained on that blockchain node 104. Furthermore, any blockchain node 104 receiving transaction 152j propagates the validated transaction 152 and subsequent transactions to one or more other blockchain nodes 104 in the network 106. Since each blockchain node 104 applies the same protocol, assuming that transaction 152j is valid, this means that it will soon propagate throughout the network 106.
[0044] Once access to an ordered set of transactions 154 maintained on a given blockchain node 104 is granted, that blockchain node 104 begins to compete in solving a proof-of-work puzzle for the latest version of each ordered set of transactions 154, including the new transaction 152. (Note that other blockchain nodes 104 may be attempting to solve the puzzle based on different ordered sets of transactions 154, but the first to arrive will define the ordered set of transactions contained in the latest block 1511. Ultimately, blockchain node 104 solves the puzzle for the portion of the ordered set 154 containing Alice's transaction 152j). Once proof-of-work is performed on the ordered set 154 containing the new transaction 152j, it immutably becomes part of one of the blocks 151 in blockchain 150. The order of transactions is also immutably recorded, as each transaction 152 has a pointer to an earlier transaction.
[0045] Since different blockchain nodes 104 first receive different instances of a given transaction, they may have conflicting views on which instance is "valid" before it is published in the new block 151, but at the time of publication, all blockchain nodes 104 agree that the published instance is the only valid instance. If blockchain node 104 accepts an instance as valid and discovers that a second instance is recorded in blockchain 150, that blockchain node 104 accepts this and discards the first instance it accepted (i.e., the instance not published in block 151) (i.e., treats it as invalid).
[0046] An alternative type of transaction protocol operated by some blockchain networks is sometimes called an “account-based” protocol as part of an account-based transaction model. In the account-based model, each transaction defines the amount to be transferred not by referencing the UTXO of a preceding transaction in a sequence of past transactions, but by referencing the absolute account balance. The current state of all accounts is stored and periodically updated by the network’s nodes, separate from the blockchain. In such a system, transactions are ordered using the account’s running transaction tally (also called “position”). This value is signed by the sender as part of the cryptographic signature and hashed as part of the transaction reference calculation. In addition, an optional data field may also be the signed transaction. This data field may point to a previous transaction, for example, if the previous transaction ID is included in the data field.
[0047] UTXO-based model Figure 2 shows an exemplary transaction protocol, which is an example of a UTXO-based protocol. A transaction 152 (abbreviated as "Tx") is the basic data structure of blockchain 150 (each block 151 contains one or more transactions 152). The following will be described with reference to output-based or "UTXO"-based protocols. However, this is not limited to all possible embodiments. While the exemplary UTXO-based protocol is described with reference to Bitcoin, it should be noted that it can be equally implemented on other exemplary blockchain networks.
[0048] In a UTXO-based model, each transaction ("Tx") 152 comprises a data structure having one or more inputs 202 and one or more outputs 203. Each output 203 may have an unconsumed transaction output (UTXO), which can be used as the source for the inputs 202 of another new transaction (if the UTXO has not yet been redeemed). The UTXO contains a value specifying the amount of a digital asset, which represents a set number of tokens on the distributed ledger. The UTXO may also contain, among other information, the transaction ID of the transaction from which the UTXO originates. The transaction data structure may also have a header 201, which may contain an indicator of the sizes of the input fields 202 and the output fields 203. The header 201 may also contain the ID of the transaction. In an embodiment, the transaction ID is a hash of the transaction data (excluding the transaction ID itself) and is stored in the header 201 of the raw transaction 152 sent to node 104.
[0049] Suppose Alice 103a wants to create transaction 152j to transfer a certain amount of digital assets to Bob 103b. In Figure 2, Alice's new transaction 152j is labeled "Tx1". Tx1 takes the amount of digital assets locked in Alice in output 203 of the preceding transaction 152i in the sequence and transfers at least a portion of it to Bob. The preceding transaction 152i is labeled "Tx0" in Figure 2. Tx0 and Tx1 are merely arbitrary labels. They do not necessarily mean that Tx0 is the first transaction on blockchain 151, nor that Tx1 is the next transaction in pool 154. Tx1 could point to any preceding (i.e., ancestor) transaction that still has an unspent output 203 locked in Alice.
[0050] The preceding transaction Tx0 may already be validated and included in block 151 of blockchain 150 when Alice creates the new transaction Tx1, or at least when she sends it to network 106. It may already be included in one of the blocks 151 at that point, or it may still be waiting in an ordered set 154, in which case it will soon be included in the new block 151. Alternatively, Tx0 and Tx1 may be created together and sent to network 106, or, if the node protocol allows buffering of “orphan” transactions, Tx0 may even be sent after Tx1. The terms “preceding” and “successor” as used herein in the context of a sequence of transactions refer to the order of transactions in a sequence as defined by the transaction pointers specified in the transactions (which transaction points to which other transaction, etc.). They may be equally replaced by “preceder” and “successor,” or “ancestor” and “descendant,” “parent” and “child,” etc. This does not necessarily imply the order in which they are created, the order in which they are sent to network 106, or the order in which they reach any given blockchain node 104. Nevertheless, a subsequent transaction (descendant transaction or "child") pointing to a preceding transaction (ancestor transaction or "parent") will not be validated until the parent transaction has been validated, and unless it has been validated. A child that reaches blockchain node 104 before its parent is considered an orphan. It may be discarded or buffered for a certain period of time to wait for its parent, depending on the node protocol and / or node behavior.
[0051] One of the one or more outputs 203 of the preceding transaction Tx0 contains a specific UTXO, which is hereby labeled UTX00. Each UTXO contains a value specifying the amount of the digital asset represented by the UTXO, and a locking script defining the conditions that must be met by the unlocking script in the input 202 of the subsequent transaction in order for the subsequent transaction to be validated and thus for the redemption of the UTXO to be successful. Typically, the locking script locks the amount to a specific party (the beneficiary of the transaction containing the locking script). That is, the locking script defines an unlocking condition, which typically includes the condition that the unlocking script in the input of the subsequent transaction contains the cryptographic signature of the party to whom the preceding transaction is locked.
[0052] A locking script (also known as scriptPubKey) is code written in a domain-specific language recognized by the node protocol. A specific example of such a language is called "Script" (uppercase S), used by blockchain networks. The locking script specifies what information is needed to consume transaction output 203, for example, the requirements for Alice's signature. The unlocking script appears in the transaction output. The unlocking script (also known as scriptSig) is code written in a domain-specific language that provides the information needed to satisfy the locking script criteria. For example, it might include Bob's signature. The unlocking script appears in transaction input 202.
[0053] Therefore, in the example shown, UTXO0 in output 203 of Tx0 is signed by Alice SIG P so that UTXO0 can be redeemed (more precisely, so that subsequent transactions attempting to redeem UTXO0 become valid). A Locking script that requires [Checksig PA [Equipped with] [Checksig P A ] is the public key P from Alice's public-private key pair. A The input 202 of Tx1 includes a pointer to Tx1 (for example, by its transaction ID TxID0, where TxID0 is, in an embodiment, the hash of the entire transaction Tx0). The input 202 of Tx1 includes an index that identifies UTXO0 within Tx0 in order to identify UTXO0 from all other possible outputs of Tx0. The input 202 of Tx1 further includes an unlocking script containing Alice's cryptographic signature, which is created by Alice applying her private key from a key pair to a predetermined portion of the data (sometimes called a "message" in cryptography). <Sig P A >The data (or "message") that needs to be signed to provide a valid signature by Alice may be defined by a locking script, by the node protocol, or a combination thereof.
[0054] When a new transaction Tx1 reaches blockchain node 104, the node applies the node protocol. This involves executing the locking script and the unlocking script together to verify whether the unlocking script satisfies the conditions defined in the locking script (these conditions may consist of one or more criteria). In embodiments, this involves concatenating the two scripts. <Sig P A > <P A >||[Checksig P A ] Here, "||" represents concatenation, "<...>" means placing data on the stack, and "[...]" is a function included in the locking script (in this example, a stack-based language). Equivalently, instead of concatenating the scripts, the scripts may be executed one after another using a common stack. In any case, when executed together, the scripts are Alice's public key P, such as that contained in the locking script in the output of Tx0 A is used to authenticate that the unlocking script in the input of Tx1 contains Alice's signature that signs the expected portion of the data. The expected portion of the data itself (the "message") also needs to be included to perform this authentication. In embodiments, the signed data comprises the entirety of Tx1 (thus, there is no need to include a separate element that specifies the signed portion of the data in plaintext, as it was already present originally).
[0055] Details of public-private cryptography-based authentication are familiar to those skilled in the art. Basically, when Alice signs a message using her private key, given Alice's public key in plaintext and the message, another entity such as node 104 is able to authenticate that the message must have been signed by Alice. Signing typically comprises hashing the message, signing the hash, and tagging this to the message as a signature, so that any holder of the public key can authenticate the signature. Therefore, it should be noted that any reference herein to signing specific data or a portion of a transaction, etc., in embodiments means signing the hash of that data or portion of the transaction.
[0056] If the unlocking script in Tx1 satisfies one or more conditions specified in the locking script of Tx0 (in the example thus shown, Alice's signature is provided and authenticated in Tx1), blockchain node 104 considers Tx1 valid. This means that blockchain node 104 adds Tx1 to the ordered set of transactions 154. Blockchain node 104 also forwards transaction Tx1 to one or more other blockchain nodes 104 in network 106, so it propagates throughout network 106. Once Tx1 is validated and included in blockchain 150, it defines UTXO0 from Tx0 as to be consumed. Note that Tx1 can only be valid if it consumes an unconsumed transaction output 203. If Tx1 attempts to consume an output that has already been consumed by another transaction 152, Tx1 becomes invalid, even if all other conditions are met. Therefore, blockchain node 104 also needs to check whether the referenced UTXO in the preceding transaction Tx0 has already been consumed (i.e., whether it has already formed a valid input into another valid transaction). This is one reason why it is important for blockchain 150 to impose a predetermined order on transaction 152. In practice, a given blockchain node 104 may maintain a separate database marking which UTXO 203 transaction 152 consumed within, but ultimately, what defines whether a UTXO has been consumed is whether the UTXO has already formed a valid input into another valid transaction in blockchain 150.
[0057] If the total amount specified in all outputs 203 of a given transaction 152 is greater than the total amount indicated by all its inputs 202, this is also grounds for invalidity in most transaction models. Therefore, such a transaction is not propagated and is not included in block 151.
[0058] In a UTXO-based transaction model, it should be noted that a given UTXO must be consumed as a whole. It cannot "leave behind" a portion of the amount defined in the UTXO to be consumed while another portion is consumed. However, the amount from a UTXO can be divided among multiple outputs of subsequent transactions. For example, the amount defined in UTXO0 in Tx0 can be divided among multiple UTX0s in Tx1. Therefore, if Alice does not wish to give Bob the entire amount defined in UTXO0, she can use a reminder to give herself the remainder of the second output of Tx1 or pay it to another party.
[0059] In practice, Alice would normally need to include a fee for the Bitcoin node publishing her transaction 104. If Alice does not include such a fee, Tx0 may be rejected by blockchain node 104 and, therefore, even if technically valid, may not be disseminated and not included in blockchain 150 (the node protocol does not force blockchain node 104 to accept transaction 152 if it does not wish to). In some protocols, the transaction fee does not require a unique separate output 203 (i.e., a separate UTXO). Instead, any difference between the total amount pointed to by input 202 and the total amount specified in output 203 of a given transaction 152 is automatically given to blockchain node 104 publishing the transaction. For example, suppose a pointer to UTXO0 is the sole input to Tx1, and Tx1 has a sole output UTXO1. If the amount of the digital asset specified in UTXO0 is greater than the amount specified in UTXO1, the difference may be allocated by node 104 publishing the block containing UTXO1. However, as an alternative or addition, it is not necessarily ruled out that a transaction fee may be explicitly specified in its own UTXO among UTXO203 of transaction 152.
[0060] Alice and Bob's digital assets consist of UTXOs that are locked to them in any transaction 152 located somewhere on blockchain 150. Thus, typically, the assets of a given party 103 are distributed across the UTXOs of various transactions 152 throughout blockchain 150. There is no single number that defines the total balance of a given party 103, stored somewhere on blockchain 150. The role of the wallet function of the client application 150 is to match together the values of all the various UTXOs that are locked to each party and have not yet been consumed in another subsequent transaction. This wallet function can do this by querying a copy of blockchain 150, such as one stored on one of the Bitcoin nodes 104.
[0061] It should be noted that script code is often expressed in a general way (i.e., without using a strict language). For example, operation codes (opcodes) may be used to represent specific functions. "OP_..." refers to a specific opcode in the Script language. For example, OP_RETURN is a Script language opcode that, when preceded by OP_FALSE at the beginning of a locking script, produces an unconsumable output of the transaction that can store data within the transaction, thereby immutably recording the data on blockchain 150. For example, the data may consist of documents that are desired to be stored on the blockchain.
[0062] Typically, the input to a transaction is the public key P AThis includes a corresponding digital signature. In embodiments, this is based on ECDSA using elliptic curve secp256k1. The digital signature signs specific data. In some embodiments, for a given transaction, the signature signs some of the transaction inputs and some or all of the transaction outputs. The specific parts of the output to sign depend on the SIGHASH flag. The SIGHASH flag is typically a 4-byte code included at the end of the signature (and therefore fixed at the time of signing) to select which outputs are signed.
[0063] A locking script is sometimes called a "scriptPubKey," referring to the fact that it typically contains the public keys of the parties involved in the transaction that will be locked. An unlocking script is sometimes called a "scriptSig," referring to the fact that it typically contains the corresponding signature. However, more generally, it is not required in all application examples of blockchain150 that the condition for a UTXO to be redeemed includes authenticating a signature. More generally, a scripting language can be used to define any one or more conditions. Thus, the more general terms "locking script" and "unlocking script" are sometimes preferred.
[0064] As shown in Figure 1, each client application on Alice and Bob's computer devices 102a and 120b may have additional communication capabilities. This additional capability allows Alice 103a to establish a separate side channel 301 with Bob 103b (at the instigation of either party or a third party). The side channel 301 enables the exchange of data separately from the blockchain network. Such communication is sometimes called “off-chain” communication. For example, this could be used to exchange transaction 152 between Alice and Bob without transaction 152 being registered on the blockchain network 106 or moving toward chain 150 until one of Alice or Bob chooses to broadcast transaction 152 to network 106. Sharing a transaction in this way is sometimes called sharing a “transaction template.” A transaction template may lack one or more inputs and / or outputs required to form a complete transaction. As an alternative or addition, the side channel 301 may be used to exchange any other transaction-related data, such as keys, amounts or terms to be negotiated, or data content.
[0065] A side channel 301 may be established via the same packet-switched network 101 as the blockchain network 106. Alternatively or additionally, a side channel 301 may be established via a different network, such as a mobile cellular network, or a local area network, such as a local wireless network, or even a direct wired or wireless link between Alice's device 102a and Bob's device 102b. In general, a side channel 301 as referred to elsewhere in this specification may have any one or more links via one or more networking technologies or communication media for exchanging data "off-chain," i.e., separately from the blockchain network 106. If more than one link is used, the bundle or collection of off-chain links as a whole may be referred to as a side channel 301. Therefore, when it is said that Alice and Bob exchange some information or data etc. via a side channel 301, this does not necessarily imply that all of this data must be transmitted on the exact same link, or even on the same type of network.
[0066] Client software Figure 3A shows an exemplary implementation of a client application 105 for implementing an embodiment of the scheme disclosed herein. The client application 105 comprises a transaction engine 351 and a user interface (UI) layer 352. The transaction engine 351 is configured to implement transaction-related functions behind the client 105, such as organizing transactions 152, receiving and / or transmitting transactions and / or other data via side channels 301, and / or sending transactions to one or more nodes 104 so that they are propagated through the blockchain network 106, in accordance with the scheme discussed above and which will be discussed in more detail shortly. According to the embodiments disclosed herein, the transaction engine 351 of each client 105 comprises a function 353.
[0067] The UI layer 352 is configured to render a user interface via the user input / output (I / O) means of each user's computer device 102, including outputting information to each user 103 via the user output means of the device 102 and receiving input from each user 103 via the user input means of the device 102. For example, the user output means may include one or more display screens (touchscreen or non-touchscreen) for providing visual output, one or more speakers for providing audio output, and / or one or more haptic output devices for providing haptic output. The user input means may include, for example, one or more input arrays of touchscreens (same or different as those used for the output means), one or more cursor-based devices such as a mouse, trackpad, or trackball, one or more microphones and speech or voice recognition algorithms for receiving speech or voice input, one or more gesture-based input devices for receiving input in the form of hand or body gestures, or one or more mechanical buttons, switches, or joysticks.
[0068] Note: While various functions may be described in this specification as being integrated into the same client application 105, this is not necessarily an limitation. Instead, they may be implemented in a series of two or more separate applications, for example, one plugging into the other, or through interfacing via an API (Application Programming Interface). For example, the functionality of the transaction engine 351 may be implemented in an application separate from the UI layer 352, or the functionality of a given module such as the transaction engine 351 may be divided among one or more applications. It is not excluded that some or all of the functions described may be implemented, for example, in the operating system layer. Wherever a single or given application 105 is referenced anywhere in this specification, this is merely an example, and it should be understood that, more generally, the functions described may be implemented in any form of software.
[0069] Figure 3B provides a mockup of an example of a user interface (UI) 360 that may be rendered by the UI layer 352 of the client application 105a on Alice's device 102a. It will be understood that a similar UI may be rendered by Bob's device 102b client 105b, or by a client on any other party's device.
[0070] As an example, Figure 3B shows UI360 from Alice's perspective. UI360 may comprise one or more UI elements 362, 362, 363 which are rendered as separate UI elements via a user output means.
[0071] For example, a UI element may comprise one or more user-selectable elements 362, which may be various on-screen buttons or various options in a menu. User input means are provided to allow user 103 (in this case, Alice 103a) to select one of the options or otherwise manipulate it by clicking or touching a UI element on the screen or by speaking the name of the desired option (the term “manual” as used herein is intended solely to be in contrast to “automatic” and is not necessarily limited to the use of hands).
[0072] Alternatively or additionally, a UI element may comprise one or more data entry fields 362 through which the user can... These data entry fields may be rendered via user output means, for example, on a screen, and data may be entered into the fields via user input means, for example, a keyboard or touchscreen. Alternatively, data may be received orally, for example, based on speech recognition.
[0073] Alternatively or additionally, a UI element may have one or more information elements 363 outputs for outputting information to the user. For example, these may be rendered on screen or audibly.
[0074] It will be understood that the specific means of rendering various UI elements, selecting options, and entering data are not tangible. The functionality of these UI elements will be discussed in more detail shortly. It will also be understood that UI360 shown in Figure 3 is merely a schematic mockup, and in reality, it may have one or more further UI elements, which are not shown for the sake of brevity.
[0075] Node software Figure 4 shows an example of node software 450 running on each blockchain node 104 of network 106 in an example of a UTXO-based or output-based model. Note that another entity may run node software 450 without being classified as a node 104 of network 106, i.e., without performing the activities required of a node 104. Node software 450 may include, but is not limited to, a protocol engine 451, a scripting engine 452, a stack 453, an application-level decision engine 454, and a set of one or more blockchain-related functional modules 455. Each node 104 may run node software including, but not limited to, all three of the following: consensus module 455C (e.g., proof-of-work), propagation module 455P, and storage module 455S (e.g., database). The protocol engine 351 is typically configured to recognize various fields of transaction 152 and process them according to the node protocol. m-1 Transaction 152j(Tx) has an input that points to the output (e.g., UTXO) of ) j When ) is received, protocol engine 451 will j The unlocking script is identified and passed to the script engine 452. The protocol engine 451 also processes the Tx j Based on the pointer in the input, Tx i Identify and extract. Tx i It may be published on blockchain 150, in which case the protocol engine will take the transaction from a copy of block 151 of blockchain 150 stored on node 104. i It is possible to extract Tx. i It may not yet be publicly available on blockchain 150. In that case, the protocol engine 451 will take Tx from an ordered set of unpublished transactions 154 maintained by node 104. i It can extract. In any case, script engine 451 is Txi Identify the locking script in the referenced output and pass it to script engine 452.
[0076] Therefore, script engine 452 is Tx i Locking script and Tx j It has an unlocking script from the corresponding input. For example, transactions labeled Tx0 and Tx1 are shown in Figure 2, but the same can be true for any pair of transactions. The script engine 452 executes the two scripts together as discussed earlier, which involves placing data on the stack 453 and retrieving data from the stack 453, according to the stack-based scripting language being used (e.g., Script).
[0077] By executing the scripts together, the script engine 452 determines whether the unlocking script satisfies one or more criteria defined in the locking script, i.e., whether the unlocking script "unlocks" the output containing the locking script. The script engine 452 returns the result of this decision to the protocol engine 451. If the script engine 452 determines that the unlocking script satisfies one or more criteria specified in the corresponding locking script, it returns a result of "true". Otherwise, it returns a result of "false".
[0078] In an output-based model, a "true" result from script engine 452 is one of the conditions for a transaction to be valid. There are also typically one or more further protocol-level conditions evaluated by protocol engine 451, which must also be satisfied. These are Tx j The total value of digital assets specified in the output does not exceed the total value indicated by the input, and Tx iThis could be because the output pointed to has not yet been consumed by another valid transaction. The protocol engine 451 evaluates the result from the script engine 452 together with one or more protocol-level conditions and only if they are all true does transaction Tx j The protocol engine 451 validates the transaction. The protocol engine 451 outputs an indication to the application level determination engine 454 indicating whether the transaction is valid. j Under the condition that it is actually validated, decision engine 454 will determine Tx j It is possible to choose to control both the consensus module 455C and the propagation module 455P to perform their respective blockchain-related functions. This means that the consensus module 455C will be used to incorporate the transaction into block 151. j Adding the ordered set 154 to each node of the transaction, and the propagation module 455P, Tx j This includes transferring the transaction to another blockchain node 104 in network 106. Optionally, in the embodiment, the application-level decision engine 454 may apply one or more additional conditions before invoking any or both of these functions. For example, the decision engine may choose to publish a transaction only on the condition that the transaction is valid and leaves a sufficient transaction fee.
[0079] The terms “true” and “false” as used herein are not necessarily limited to returning results expressed in the form of a single binary digit (bit), although it is certainly one possible implementation. More generally, “true” can refer to any state indicating a successful or positive outcome, and “false” can refer to any state indicating an unsuccessful or negative outcome. For example, in an account-based model, a “true” outcome may be indicated by a combination of implicit protocol-level validation of the signature and an additional positive output from the smart contract (if both individual results are true, the overall result is considered to indicate true).
[0080] Other variations or uses of the techniques disclosed may become apparent to those skilled in the art upon being given the disclosures herein. The scope of this disclosure is limited only by the appended claims and not by the embodiments described herein.
[0081] For example, some of the embodiments described above relate to a Bitcoin network 106, a Bitcoin blockchain 150, and a Bitcoin node 104. However, it will be understood that the Bitcoin blockchain is one specific example of blockchain 150, and the above description may generally apply to any blockchain. That is, the present invention is by no means limited to the Bitcoin blockchain. More generally, any above references to Bitcoin network 106, Bitcoin blockchain 150, and Bitcoin node 104 may be replaced with references to blockchain network 106, blockchain 150, and blockchain node 104, respectively. Blockchains, blockchain networks, and / or blockchain nodes may share some or all of the described properties of Bitcoin blockchain 150, Bitcoin network 106, and Bitcoin node 104, as described above.
[0082] 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 described functions of creating, publishing, disseminating, and storing block 151 of 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, rather than all of them. That is, a network entity may perform the function of disseminating and / or storing blocks without creating or publishing them (it is not to be noted that these entities are not considered to be nodes of the preferred Bitcoin network 106).
[0083] In an undesirable embodiment of the present invention, the blockchain network 106 may not be a Bitcoin network. In these embodiments, it is not excluded that a node may perform at least one or some of, but not all, of the functions of creating, publishing, distributing, and storing blocks 151 of blockchain 150. For example, in those other blockchain networks, “node” may be used to refer to a network entity that is configured to create and publish blocks 151 but not to store those blocks 151 and / or to distribute them to other nodes.
[0084] More generally, any reference to the term “Bitcoin node” 104 above may be replaced with the term “network entity” or “network element,” such entities / elements configured to perform some or all of the roles of creating, publishing, distributing, and storing blocks. The functionality of such network entities / elements may be implemented in hardware in the same way as described above with respect to blockchain nodes 104.
[0085] Event Stream Blockchain Memory A first aspect of this disclosure relates in general to providing blockchain storage of event streams as part of a platform that provides a number of blockchain-related services. The platform is implemented by at least one platform processor that performs a method, is provided for multiple clients, and is associated with an application programming interface (API).
[0086] The method comprises the steps of receiving a stream creation message, the stream creation message indicating a condition for a trigger, obtaining data indicating the state of the stream based on the fact that the trigger condition has been met, and generating an additional transaction comprising the data indicating the state of the stream.
[0087] The method preferably comprises the step of generating an additional transaction and then preparing the additional transaction so that it can be broadcast to the blockchain.
[0088] Advantageously, greater flexibility and selectivity regarding how new the blockchain representation of the stream needs to be is achieved by providing triggers for generating (and subsequently submitting) transactions that represent the current state of the stream. When a client creates an event stream, they can select the type of trigger according to their requirements.
[0089] In some embodiments, the method further includes the step of monitoring for the recurrence of the trigger condition.
[0090] In longer-term event streams, trigger conditions may occur multiple times. By monitoring when additional trigger conditions are met, the on-chain dataset is updated as needed.
[0091] In some embodiments, the method further comprises the step of generating (and optionally broadcasting) an initial transaction which comprises at least data based on indicators of conditions for a trigger. In some embodiments, the data based on indicators of conditions for a trigger is stored in the output of the initial transaction. In some embodiments, an additional transaction comprises an input which consumes the output of the initial transaction or a previous additional transaction. Preferably, the data based on indicators of conditions for a trigger is an indicator of conditions for a trigger.
[0092] Advantageously, the order in which each event occurs is preserved on the blockchain by consuming the output of preceding append transactions within the initial or append transaction. If a transaction originates from a transaction that is not yet part of a block, or at least not part of the same block, that transaction cannot be included in the blockchain. The preservation of order is advantageous in that if stakeholders are interested in knowing the current state of the event stream, they only need to examine the consumption chain to the end. Computational resources can be saved because no further confirmation is required to determine whether a transaction with unconsumed output is the last transaction.
[0093] A further advantage of such consumer relationships is the ability to investigate on-chain datasets, as discussed below under the heading "Investigation of On-Chain Datasets."
[0094] In some embodiments, data indicating the state of the stream is stored in the output of an append transaction. Preferably, the OP_RETURN opcode is used. More preferably, the data is stored after the OP_RETURN opcode.
[0095] Advantageously, utilizing existing features of blockchain transactions for other purposes (such as the aforementioned use of transaction output and the use of the OP_RETURN opcode) means that miners or other blockchain processing devices associated with the blockchain do not need any technical capabilities beyond what they already possess.
[0096] In some embodiments, the trigger condition is based on any one or more of the following: receiving a message indicating that the stream is complete, elapsed time, comparing the elapsed time with a threshold time, and / or comparing the number of received events with a threshold number of events.
[0097] Advantageously, different trigger systems are offered to meet the needs of different clients and can be selected by the client.
[0098] In some embodiments, the elapsed time is based on the time since the preceding trigger condition was met and / or the time since the creation message was received. In some embodiments, the creation message further includes a threshold time.
[0099] Preferably, using the features described above to separate the submission of transactions to the blockchain from updating the event stream offers several advantages, including: Concealing the exact number of events that occurred. For example, if a stream is known to be updated on-chain every 50 events, a third party can get an overview of the total number of events simply by counting all on-chain additional transactions and multiplying that count by 50. Depending on the smart contract involved, this could leak sensitive information to a third party. To prevent any loops from occurring where, if the event stream is tracking its own on-chain submissions, every event sent to the event stream triggers the creation of another event, and therefore another event transaction, and so on.
[0100] In some embodiments, the number of events received is based on the number of events received since a preceding trigger condition was met and / or the number of events received since the creation message was received. In some embodiments, the creation message has a number of event thresholds. In some embodiments, the number of event thresholds is 1. In some embodiments, the number of event thresholds is greater than 1.
[0101] In some embodiments, the trigger condition is based solely on a comparison of elapsed time and threshold time. In some embodiments, the trigger condition is based solely on a comparison of the number of received events and the event threshold number.
[0102] In some embodiments, the stream state comprises a hash of the protoimage of the stream's latest event. In some embodiments, the stream state comprises data indicating the data of the stream's latest event. In some embodiments, the data indicating the data of the stream's latest event comprises a hash of the data of the stream's latest event. In some embodiments, the data indicating the data of the stream's latest event is the data of the stream's latest event. Preferably, the protoimage comprises metadata of the stream's latest event.
[0103] The advantages of these technical features are given holistically, but especially under the heading "Current State of the Stream".
[0104] In some embodiments, the stream creation message includes an indication of a data format that shows the status of the stream.
[0105] Advantageously, by providing an indication of the stream state data format exactly as it is recorded on the blockchain each time, any third party wishing to validate, audit, or read the data as it is stored on the blockchain only needs to find the initial transaction to properly read the rest of the on-chain dataset. No further decryption of information beyond what is present on the blockchain, or communication with other parties, data stores, or devices is required.
[0106] In some embodiments, the method further comprises the step of updating an off-chain database with metadata of the additional transactions. In some embodiments, the metadata is used to identify a transaction on the blockchain, to verify the presence of a transaction in a block on the blockchain, or to construct proof that the blockchain contains a transaction.
[0107] Preferably, the metadata comprises one or more of the following: the transaction ID of the append transaction, a subset of the inputs to the append transaction, the block header of the block containing the append transaction, the block ID of the block containing the append transaction, a timestamp associated with the append transaction, and an array of sibling hashes for the transaction ID of the append transaction. More preferably, the metadata comprises the transaction ID of the append transaction, the block header of the block containing the append transaction, and an array of sibling hashes for the transaction ID.
[0108] In some embodiments, the method further comprises: receiving a request to add an event to a stream, wherein the request comprises event data and an override flag; generating a further additional transaction comprising data indicating the event data; and arranging the additional transaction to be broadcast to the blockchain.
[0109] Advantageously, storing proof of existence on the blockchain enhances security and provides auditors with a simpler means of verifying that data exists when it should be in an on-chain dataset.
[0110] According to the first aspect, the device comprises a processor and memory, the memory including executable instructions that cause the device to perform the methods performed in the computer described above as a result of the execution of the processor.
[0111] Furthermore, according to the first embodiment, the system comprises a platform processor using the above-described devices and a client device configured to output event data to the platform processor.
[0112] Advantageously, the methods, devices, and systems described above in the first embodiment allow clients to choose how much information they want to store, how often, and what information they want to store on the blockchain. The benefits and advantages of each different method and data type of storage are described below.
[0113] Figure 5 relates to a system 500 according to a first aspect of this disclosure for enabling event data to be stored in a database and data representing the event data to be stored in a blockchain. Optionally, the representations are the event data itself, a digest of the event data, and / or references to the event data. In this embodiment, the event data relates to an event stream.
[0114] An event stream provides a log of a strict sequence of events that occur in order and is implemented at least partially on a blockchain. In some embodiments, the event stream is implemented using a blockchain and / or in an off-chain database. The event stream may represent or track a finite state machine (FSM), such as a deterministic finite automaton (DFA), which is a well-known computing term that represents a system having a finite number of states, which may be only one state at a given time, and which is accompanied by a transition function or trigger event for transitioning from one state to the next. In some embodiments, such an event stream is useful to represent a means or technique for control of a technical process.
[0115] The disclosure relating to this embodiment provides a smart contract, which may be an FSM, as a way of using the event stream. As will be discussed immediately below, this is given as an example, and others will be apparent to those skilled in the art.
[0116] An event stream represents a machine-readable contract or smart contract on a blockchain, and advantageously, an immutable record of the smart contract's past and present inputs is written to the blockchain. When these inputs are replayed, it results in a deterministic state of the smart contract. Thus, an event stream is associated with a smart contract and / or vice versa. An event stream may also be associated with a sequential data logger, a tracker for off-chain, a real-world process with a fixed set of states, or a sequence of inputs (optionally accompanied by the results of such inputs) provided to a real-world off-chain process. Those skilled in the art will understand that other systems besides smart contracts may also advantageously utilize immutable FSMs or DFAs.
[0117] System 500 comprises a client 502 configured to interact with a platform processor 504 associated with an API for a service. For simplicity of illustration, the platform processor 504 is described herein as a monolithic server. Those skilled in the art will understand that it may be implemented as a single server, a mainframe, a collection of servers, microservices, a collection of microservices, a cloud service, or any combination of preceding and / or other computing platforms.
[0118] Client 502 communicates with platform processor 504 via the platform processor's API (510). In this example of this embodiment, client 502 is configured to at least create, update, and complete an event stream. UK Patent Application No. 2013929.1, filed 4 September 2020 by nChain Holdings Ltd, provides an example for describing a platform processor that may be used to manage smart contracts and / or any other applications using an event stream.
[0119] The platform processor 504 is associated with a snapshot instance database 506, which is configured to store, update, provide, and / or display the current state of smart contracts, such that they are recorded in their respective event streams at any given time. There is only one event stream for each smart contract associated with a given client of a plurality of clients. In some embodiments, each client of the plurality of clients may be associated with an account or identifier which may be used to identify a particular smart contract associated with that client. The platform processor 504 is configured to communicate with the database 506 (512) so that it can store, access, and update at least the recorded event data associated with each event stream.
[0120] The platform processor 504 is configured to store a representation of the event stream in the blockchain. Thus, the platform processor 504 is configured to communicate with the blockchain network 101 (514). The blockchain network 101, an example of which is described above with reference to Figure 1, stores the event data associated with a transaction (or data representing said event data) in the blockchain. An exemplary transaction is described above with reference to Figure 2.
[0121] The platform processor 504 is configured to both send data to the blockchain network 101 and read data from the blockchain network 101. Optionally, the platform processor 504 maintains its own (optionally pruned) copy of the blockchain so that it does not need to query network nodes for blockchain data.
[0122] Referring to Figure 6A, a method is shown for maintaining a representation of an off-chain dataset in an on-chain dataset.600 A dataset is a set of events, and the source of each event is the client that creates it, and / or any party to which authority has been delegated by the client.
[0123] The dataset used as an example with reference to this embodiment and Figure 6A is preferably stored entirely in an off-chain database or other data storage means. In a preferred embodiment, the data represents a subset of events stored in the blockchain. Each transaction stored in the blockchain preferably represents a state in the stream, and more preferably, the state in the stream points to the most recent event.
[0124] This method is preferably performed by the platform processor 504 and is executed whenever the client wishes to create a new event stream. Preferably, the method works as long as the event stream is active. The client 502 optionally provides the platform processor 504 with an indication of when to complete and close the event stream.
[0125] First, when a message is received to create an event stream, the event stream is created (602). This message is optional, takes the form of an API request, and originates from client 502. The create message includes indications of the conditions under which the data should be stored on the blockchain and in what format the data should be stored. These conditions can also be considered "conditions for triggering" or "trigger conditions" because they trigger at a certain point.
[0126] Optionally, an initial transaction is created and posted to the blockchain at this point. The initial transaction 660 is preferably in the form described with reference to Figure 7C. The conditions for the trigger and the type of data to be stored are stored in the initial transaction.
[0127] A transaction is added to the blockchain when the trigger condition is met (604) by the creation of a stream or the receipt of a stream creation message. Optionally, the method waits until the trigger condition is met. In this context, "waiting" preferably refers to an interruption system so that the process does not need to actively search for the condition to be met. Alternatively or additionally, waiting refers to using polling to check whether the condition has been met.
[0128] When the trigger condition is met, the current state of the event stream is retrieved (606). The format and content of the stream's current state, and / or the data indicating the stream's current state, are described in more detail below under the heading "Stream's Current State".
[0129] An append transaction is generated (608), which comprises data indicating the current state of the stream. The append transaction is preferably in the form described with reference to Figure 7B, and the data indicating the current state of the stream is stored in the payload output of the append transaction. The append transaction further comprises an input that consumes the output of the previous transaction, which is put out into the blockchain with respect to the current event stream, as discussed with reference to Figures 7A and 7B. Thus, the generation step further comprises obtaining a reference to the most recent transaction in the chain of transactions, which reference is preferably the dust output point of the preceding transaction.
[0130] The append transaction is arranged to be broadcast to the blockchain network 101 for inclusion in the blockchain (610). Arranging the broadcast of the append transaction in this manner preferably involves sending the append transaction to a further thread, process, or device configured to send the data to a blockchain node for inclusion in the blockchain. This transmission is preferably made using a message bus as described with reference to Figure 6B.
[0131] The generation and appending steps are optional and can be performed independently in separate threads, processes, or devices. For example, this can be done using a message bus, as illustrated with reference to Figure 6B.
[0132] The method returns to the beginning and waits for the trigger condition to be met again. Optionally, the method further waits for a completion message to be received and / or for the completion condition to be met. The completion condition is optional and is included in the creation message, just like the trigger condition.
[0133] Figure 6B relates to an exemplary process 612 of this embodiment. In this exemplary embodiment, a timer-based trigger condition is used. The illustrated exemplary process 612 may be executed or performed by the platform processor 504.
[0134] Before the process as illustrated, the timer is started and established so that the process is invoked in step 614. Then the current stream state is obtained (616), which is obtained from database 506. Optionally, the current stream state is processed.
[0135] The current stream state is published to the blockchain via the message bus (618). The published messages on the message bus allow further services or processes to ingest the stream state data and publish it to the blockchain.
[0136] Optionally, if a transaction with stream state is included in a block and / or confirmed on the blockchain (confirmation usually means that six blocks have been added after the inclusion of the transaction), the transaction metadata and / or the transaction itself are retrieved (620). Transaction metadata is described in more detail below under the heading "Updating Off-Chain Datasets with On-Chain Metadata".
[0137] Transaction metadata is stored in the database (622). Optionally, if the stream state is the latest event in the event stream, the event database entry is updated with the transaction metadata and / or the event database entry is tagged as having been posted to the blockchain and / or confirmed on the blockchain.
[0138] If the latest event has already been posted to the blockchain when the trigger condition is met again, the same latest event will be posted to the blockchain again.
[0139] Alternatively, the existence of tags and / or transaction data in the database is used so that if the trigger conditions are met, no new event data exists, and the current latest event is tagged as already existing on the blockchain, no new transaction is created, and the process waits for further triggers.
[0140] Dust chain Referring to Figure 7A, an exemplary chain of transaction 638 (also known as the “chain of dust”) is shown. The chain of transactions comprises several related transactions 660, 640, 640a, 640b, and 662. The first transaction 660 is the initial transaction and contains metadata about the chain. The chain also comprises several additional transactions 640, 640a, and 640b, which preferably contain data indicating event data stored in an off-chain database. The additional transactions 640, 640a, 640b, and the last transaction 662 also have inputs related to the output from the transactions preceding them, thus establishing a consumption relationship (represented as arrows in Figure 7A). This input is in the form of an output point, where the output point is the transaction ID and the index of the output. This input consumes the transaction output from the previous transaction. As an example, with respect to the Bitcoin protocol, as described above under the heading "UTXO-based model" and referring to Figure 2, the output is an unconsumed transaction output (UTXO) and the input has a reference to a UTXO. Thus, each transaction (except the first) has a backreference to the previous transaction in the dust chain via a consumption relationship. The initial transaction has an input with a backreference to a funding UTXO, as described below with reference to Figure 7C. This funding UTXO is not considered part of the dust chain because it does not store data or metadata about the dust chain.
[0141] The chain of dust is an unbroken chain of Bitcoin inputs and outputs, which is used here to impose a consumption dependency on each blockchain transaction in a sequence to its immediately preceding transaction. In the context of blockchain transactions in this disclosure, "dust" is understood to be a consumable transaction for a digital asset or cryptocurrency with an output of a low or very small value, i.e., its value may be far less than the fee for mining the output on the blockchain.
[0142] Using dust output in transactions is advantageous and important for maintaining an immutable and sequential record of all transactions as transactions occur for ordered, append-only data storage systems such as Event Streams. This is because, while posting transactions to the blockchain ensures that all blockchain transactions are timestamped and remain in a specific order once confirmed or added to the blockchain, this does not guarantee the preservation of their sequential order. This is because transactions may be mined into blocks at different times and / or the order of transactions may differ even within the same block. By using dust output consumed by the first input of the next transaction in a sequence, it is advantageous to ensure that the order of transactions is tracked over time and that a tamper-proof record is created of both the events themselves and the sequential order of the events. This is because, once mined into a block, the payment of dust from the previous transaction to the next transaction in the sequence cannot, according to Bitcoin protocol rules, rearrange the sequence of embedded data-carrying elements, called payloads, as discussed below, and ensure that insertions or deletions cannot occur, as such rearrangements, insertions, or deletions could alter the sequence without immediately becoming apparent that the event stream is compromised. In some embodiments, the double-spending prevention mechanism inherent in the Bitcoin protocol ensures that the movement of cryptocurrency (e.g., dust) between different transaction inputs and outputs remains in a topological order. Chaining of dust transactions leverages topological ordering to preserve the order of transactions (and therefore associated events and data) between and within blocks. Thus, this enhances the integrity of data item storage dedicated to ordered additions. Furthermore, dust is the smallest output that a miner is willing to process.If a malicious third party possesses the private key for a given user, that third party cannot fork the dust chain. This is because any attempt to split the dust output (e.g., 273 satoshis for each output) will be ignored by the miners.
[0143] Thus, blockchain transaction 638 forms a directed graph of transactions. Note that the direction of the graph can be considered unidirectional, from the previous transaction to the next transaction in the sequence, as indicated by the edges (shown as arrows in Figure 7A, in particular the arrows indicating the direction the reference is pointing, i.e., Tx n+1 Tx n It has an input with an output point (which is in the opposite direction regarding how time and data are moving forward). This graph is created by consumption relationships between transactions. These consumption relationships can be considered as a type of reference.
[0144] Referring to Figures 7B and 7C, exemplary blockchain transaction formats are shown for data addition transactions 640a, 640b, the first transaction 660, and the last transaction 662. Since these are blockchain transactions, they are structurally similar to transactions 152i and 152j described with reference to Figure 2, but possess specific components relevant to this aspect of the present invention. The exact order of inputs and outputs is not specific, and alternative orders may be used. This order is preferably consistent on a given chain.
[0145] Data associated with each event is stored in the payload as part of each transaction. The data payload and / or other data that should be "stored" in a transaction (such as trigger conditions for the initial transaction) are held in the transaction's non-consumable OP_RETURN output. This is a Script opcode that can be used to write arbitrary data to the blockchain and also to mark the transaction output as invalid. As another example, OP_RETURN is a Script language opcode for creating a non-consumable output of a transaction that stores data such as metadata within the transaction, thereby immutably recording the metadata on the blockchain.
[0146] Figure 7B shows two data append transactions 640a and 640b. These exemplary data append transactions 640a and 640b arrive in succession in time and in the chain of dust. The dust output 644a of the first transaction 640a is referenced (i.e., consumed) in the dust input 646b of the second transaction 640b. The dust input 646b of the second transaction 640b reference to the dust output 644a of the first transaction 640a has both the transaction id 648a of the first transaction and an index of the UTXO, the index of which is 0 in this exemplary case (because it is the first in the list and zero indexing is used).
[0147] Transactions 640a, 640b, 660, and 662 all have funding inputs 648a, 648b, 648c, and 648d. These funding inputs 648a, 648b, 648c, and 648d are provided by computing devices managing, creating, and putting these transactions onto the blockchain. The total value of the funding inputs is chosen to include a transaction fee (sometimes called a miner's fee) to help miners ensure that transactions are selected and included in blocks. Funding services may provide one or more inputs to ensure that the total value is the input but sufficient. The transaction fee is variable and depends on the network load. The transaction fee can be in units of byte-by-satoshi (or any coin / token used by the blockchain system) (a satoshi is one hundred millionth of a Bitcoin). Therefore, if the payload is large, the fee must also be large, and the funding inputs are adjusted accordingly. As a result of the UTXO model, the total fee paid depends on the values of both the UTXO referenced in the input and the UTXO of the output. Optionally, the balance, including transaction fees, is returned to the same computing device that manages, creates, and posts these transactions to the blockchain via balance outputs 650a, b, c, and d. The funding inputs and the balances resulting from said funding inputs function as floating balances and are managed by the said funding service.
[0148] The first transaction 660 and the last transaction 662 also have stream metadata 664 and 666. The first stream metadata contains values related to maintaining the chain of dust. The metadata 666 of the last transaction 662 contains information to indicate that this transaction is the last in the chain. Preferably, the metadata 666 of the last transaction also contains the transaction ID 648c of the first transaction 660.
[0149] Both data addition transactions 640a and 640b comprise payloads 642a and 642b, respectively. In some embodiments of this model, the payload 642b of the n+1 transaction 640b comprises a reference to the payload 642a of the preceding n transactions 642a.
[0150] Current state of the stream As discussed above with reference to Figure 6A, the current state of the stream and / or data indicating the current state of the stream are stored in the output of the append transaction. Preferably, the current state of the stream is represented using the most recent event in the event stream. In one embodiment, the data indicating the most recent event is in the form of the following payload. This is provided as an example for illustrative purposes, and several embodiments with modifications are discussed below. Payload n =[preimage n [streamDigest] n ][...] Here, lowercase n is used to represent the current transaction, and n-1 is the preceding transaction. Preferably, the payload is stored in the transaction output script in the following format: OP_FALSE OP_RETURN OP_PUSHDATA1 <preimage> 0x20 <streamdigest>[0x20 <data digest> | OP_PUSHDATAN <data>]
[0151] The protoimage contains metadata for the current transaction, event, or event stream state, and for previous transactions, events, or event stream states. For illustrative purposes, the event stream state is used below. A person skilled in the art will understand that a preceding transaction, a previously received event, or a previous state of the event stream may be used, and optionally they may all be the same.
[0152] The terms "previous state of the stream" or "preceding state of the stream" are used, referring to the event stream state, such as one recorded in an off-chain dataset. Optionally, this may also be the same as the on-chain dataset, if all events / updates to the stream state are recorded on-chain.
[0153] The original image is optional and may include one or more of the following fields: • txidcreate: A reference to the first transaction in the chain, preferably the transaction ID of the first transaction in the chain. • index: Index of data or events, • whenRecorded: The time associated with the creation of the transaction and / or data item. ·dataDigest n : A hash of event data, such as that stored off-chain (and optionally stored in the transaction in the payload's event data representation ([...])), and ·streamDigest n-1 : The hash of the preimage of the preceding state of the event stream (also written as the stream digest of the preceding state of the event stream, or a stream digest reference) or the seed of the first transaction (if the first transaction does not have a streamDigest and the transaction is the second transaction in the chain).
[0154] A stream digest is a hash of the preimage.
[0155] Optionally, streamDigest can also be salted. The salt, a unique value, may be randomly generated for each transaction associated with the event stream. The salt is optionally stored off-chain. Salting the data has the advantage of not revealing anything and preventing brute-force preimage attacks such as brain wallet attacks.
[0156] Further exemplary features and uses of salted hashes are discussed throughout the specification of UK Patent Application No. 2102217.3, filed in the name of nChain Holdings Limited on 17 February 2021.
[0157] The payload's event data representation section ([...]) is optional and contains data items to be stored on the blockchain. These data items are: • The data itself that should be stored on the blockchain, • Data hash, • Subsections of data to be stored on the blockchain, or • Nothing and / or empty It may be any one of them.
[0158] In particular, a preimage contains both a hash of the event data (dataDigest) and a streamDigest of the preceding state of the event stream. Thus, the hash chain is constructed such that if data from a preceding event in the event stream (not just the previous event, but any preceding event including transaction creation) is modified in any way, a different preimage is generated, and therefore a different streamDigest. Different streamDigests mean that the next event item also has a different preimage and therefore a different streamDigest, so that a chain reaction of changes in all subsequent streamDigests results from any modification of earlier event items. Therefore, the backreference of streamDigests in preimages provides a mechanism to determine if someone has tampered with a preceding event item, because the streamDigests need to be recalculated and updated.
[0159] This feature, combined with the fact that transactions on the blockchain are immutable once confirmed, makes it possible to determine whether any event items have been altered since the transaction was confirmed. A further advantage of this mechanism is that it does not require the complete event, only the streamDigest of the event. Furthermore, it does not require the entire dataset to detect tampering with previous events. It is sufficient to take the streamDigest of any event stored on the blockchain and compare it with an off-chain database to determine whether any event was altered before the transaction with the streamDigest was confirmed on the blockchain. Verification is further explained under the heading "Event Stream Blockchain Verification".
[0160] The type of data stored in the payload's event data representation section depends on the event stream's configuration. Message creation involves the method and data storage type that the client wishes to choose. There are three different methods the client can choose from: onFinalise, checkpoint, and onEvent. These different methods adjust how frequently data is sent to the blockchain and will be discussed further under the heading "Trigger Conditions".
[0161] At least in the onEvent method, three different data storage types are possible: attest, notarise, and publicise. attest provides a minimal amount of data so that the event can be found and / or validated against data stored in the database or data stored by the client. Preferably, attest stores only a streamDigest. The notarise data storage type stores no data, but stores both a dataDigest (i.e., a hash or salted hash) and a streamDigest. In some embodiments, a preimage may also be present. The publicise data storage type stores the event data itself, and if the data is large, stores it across two or more transactions. The checkpoint method does not store data on the blockchain. Preferably, the checkpoint method stores a streamDigest. In some embodiments, a preimage may also be present. Alternatively, the checkpoint method also uses three different data types. The table below gives an overview of the above.
[0162] [Table 1]
[0163] Trigger conditions As mentioned above, the three different methods change how frequently data is sent out onto the blockchain. At least two datasets are created: an off-chain dataset containing all the events (and event data) in the event stream, and an on-chain dataset or at least a subset of the off-chain dataset containing data representing a subset of those events.
[0164] In the onFinalise method, no transactions are placed on the blockchain except for transaction creation and transaction completion. Therefore, the trigger condition for the onFinalise method is the receipt of a message to terminate the stream. Consequently, the on-chain dataset will only contain two items.
[0165] In situations where events within an event stream should not be made public (such as in short-term voting systems), the onFinalise method may be used. The onFinalise method does not store any event-related data on the blockchain other than transaction creation and transaction completion. Upon completion, the final transaction may contain metadata or statistics about the vote (such as the total number). The final streamDigest at transaction completion may be used to verify that the entire chain has not been tampered with, as discussed above.
[0166] In the onEvent method, every event added to the off-chain database also has data representing it on the blockchain. The type of data stored on the blockchain depends on the data storage type, as discussed above. In onEvent, the trigger condition is the receipt of an event. Therefore, whenever an event is received or created, or whenever the event stream is updated, the platform processor is triggered to add the event to the blockchain. The platform processor looks at the data type (attest, notarise, and publicise) and generates the appropriate data to add to the blockchain. The on-chain dataset for this onEvent embodiment contains all items that also exist in the off-chain dataset. However, the same data may not exist. For example, if the attest data type is used, the actual event data does not exist on-chain, only the streamDigest for each event.
[0167] The onEvent method may be used when the existence of an event and / or the actual content of the event are of public importance. An exemplary use of this method is in an honest tender process. In this exemplary case, it is of public interest to know whether a tender was made and by whom. The existence of the event on a public blockchain serves this purpose. Optionally, depending on the data type to be stored, the content of the event may also exist, thus making more of the tender event public. If the tender needs to be kept secret, the notarise and / or attest data types may be used to conceal the content of the event.
[0168] The checkpoint method provides trigger conditions for two exemplary embodiments. The first is based on time (as briefly discussed in the example in Figure 6B), and the second is based on the number of events received (distinguishable from the onEvent method except that it is every n events, not every event). The on-chain dataset in this embodiment comprises at least some (or optionally all) of the items in the off-chain dataset. However, the same data may not exist. For example, the data storage type of the checkpoint method does not contain the actual event data, but rather contains a streamDigest for each event. In some cases, a preimage may be included.
[0169] Not storing data, or even not storing a representation of the data, reduces the size of transactions posted to the blockchain. Since transaction fees are typically calculated based on the size of the transaction, this saves money for platform processors and / or clients, while also providing the benefit that event streams are represented at least partially on an immutable blockchain, as will be discussed throughout this specification. Similarly, posting only a portion of an event has similar benefits in terms of reducing the entire transaction, the entire amount of data stored on the blockchain, and saving money for all parties involved.
[0170] In addition to the above, reducing transaction size and sending data to the blockchain less frequently, for example at checkpoint or onFinalise, reduces the associated carbon footprint of the transaction. Larger transaction sizes require greater processing. This energy saving is particularly important when proof-of-work consensus mechanisms are used (such as Bitcoin and its derivatives), because such consensus mechanisms are computationally intensive and therefore energy-intensive processes that can result in a large carbon footprint.
[0171] In cases where an event is triggered every time a transaction is placed on the blockchain, using the onEvent method (and / or the checkpoint method when configured to set a threshold of 0 or 1, so that the same or similar data as the onEvent method is placed on the blockchain) can lead to an infinite loop. When the first transaction is placed (whatever triggers it), the onEvent mechanism places further transactions on the blockchain, which in turn places yet another event on the blockchain, and this continues indefinitely, resulting in an infinite loop. This problem can be avoided by using a trigger mechanism as described below. By using one of the trigger mechanisms described below, this problem can be completely avoided.
[0172] All the further advantages of the methods (onEvent, checkpoint, and onFinalise) will be revealed with respect to verification, as described below under the heading "Event Stream Blockchain Verification".
[0173] A time-based trigger condition is a condition that causes the blockchain event stream to be updated at a given time interval. The time interval is set by the client and is a parameter in message creation. Preferably, the time interval is constant and does not change throughout the lifetime of the event stream.
[0174] Time-based trigger conditions are optional and can be implemented using language-level timers, such as Java's Timer and TimerTask. Continuing with the Java example, a message creation is received indicating that a timer-based trigger condition should be used and that there is also a specific time to wait between event submissions to the blockchain (e.g., every minute). The Timer is established to trigger at certain intervals according to the specific time to wait between event submissions. The TimerTask is also established to retrieve the current event stream state and ensure that this current event stream state is submitted to the blockchain. Each time the Timer is triggered, the TimerTask is executed. Exemplary pseudo-Java code may look like this: final long period = 1000L * 60L; / / 1 minute from message creation public void updateBlockchain_timerBasedTrigger() { TimerTask repeatedTask = new TimerTask() { public void run() { / / Retrieves data indicating the state of the stream. / / Generate a transaction containing the aforementioned data / / Broadcast the transaction to the blockchain }; } Timer timer = new Timer("Event Stream Update"); timer.scheduleAtFixedRate(repeatedTask, new Date(), period); }
[0175] Alternatively, an operating system-level scheduler such as cron can be used. An example crontab configured to run every 5 minutes might look like this: * / 5 * * * * / usr / bin / java MyClass.TimerTask()
[0176] Those skilled in the art will understand that there are further methods for establishing timer-based execution beyond the two examples provided herein. These are merely examples to help those skilled in the art understand possible ways of implementing timer-based triggers.
[0177] Instead of, or in addition to, the timer-based trigger condition described above, a trigger condition based on the number of events received is used. A given number of events is set in message creation (e.g., 10). This given number is considered the event threshold number for triggering an update to the blockchain. Each time an event is received, the total number of events received since the previous on-chain stream update (or since message creation was received, if no on-chain stream update has yet occurred) is compared to the event threshold number. Based on this comparison, the on-chain dataset is updated. This comparison is preferably based on whether the number of events received is greater than or equal to the event threshold number. Exemplary pseudo-Java code may look like this (where numberOfEventsBasedTrigger is called each time an event is received or each time the event stream is otherwise updated): final int thresholdEventReceived = 10; / / From message creation static int numberEventsReceived = 0; public void numberOfEventsBasedTrigger() { Task repeatedTask = new Task() { public void run() { / / Retrieves data indicating the state of the stream. / / Generate a transaction containing the aforementioned data / / Broadcast the transaction to the blockchain }; }; numberEventsReceived += 1; if (numberEventsReceived >= thresholdEventReceived) { repeatedTask.run(); numberEventsReceived = 0; } }
[0178] Preferably, only one trigger condition is possible (based on a timer or based on the number of events). Alternatively, both trigger conditions can be used, in which case the on-chain dataset is updated whenever either trigger condition is met.
[0179] The step of “getting data indicating the state of the stream” in the above example preferably involves getting the latest event and extracting or generating a streamDigest, and in some embodiments, a preview of the latest event stream as well. The steps of “generating a transaction with the data” and “broadcasting the transaction” preferably involve the platform service sending a message to the message bus for putting the transaction onto the blockchain, independently of the above method and in a different thread, process, or device. These steps are substantially the same as, or similar to, the steps of the method described with reference to Figure 6A, and are provided as examples of the method.
[0180] Optionally, if the checkpoint method also includes data formatting options (attest, notarise, and publicise), the data will be formatted according to the appropriate scheme.
[0181] Updating off-chain datasets using on-chain metadata When a transaction is broadcast on the blockchain and / or confirmed on the blockchain, an off-chain database is optionally updated with the transaction's metadata. Thus, users whose access to the database has been verified can more easily find datasets represented on the blockchain. This can be useful for verification purposes.
[0182] Optionally, metadata is used to verify the existence of a transaction in a block on the blockchain. Optionally, metadata is used to build proof that a transaction is included in the blockchain.
[0183] The transaction metadata may be any one or more of the following: the transaction ID of the appended transaction, a subset of the inputs to the appended transaction, the block header in which the appended transaction is stored, the block ID in which the appended transaction is stored, a timestamp associated with the appended transaction, and an array of sibling hashes for the transaction ID of the appended transaction.
[0184] Preferably, the proof of inclusion is a Merkle tree proof. A Merkle tree proof is a known authenticated data structure organized as a tree. The hash of each data block is stored in the nodes on the base layer or leaves, and in every inner node of the tree or branch, and includes a cryptographic hash calculated from the hashes of its two child nodes. The top node of the tree and the Merkle root uniquely identify which dataset the tree was built from. Thus, Merkle trees enable efficient proof of inclusion, where a miner or prover node indicates to a submitter or validater node that a given data block is part of an authenticated dataset by sending the proof, along with an audit pass, to the submitter or validater node. The audit pass includes the node hashes necessary to recalculate the Merkle root without requiring the submitter to reveal the entire dataset. In Bitcoin SV, the transactions contained in a block are stored in a Merkle tree.
[0185] Preferably, the transaction metadata comprises a transaction identifier (TxID) for the appended transaction, a block header for the block containing the blockchain transaction, and an array of sibling hashes for the transaction identifier (TxID). The array of sibling hashes is included in the proof because it is used to construct the audit path. The hashes are called Merkle-containing proofs.
[0186] Preferably, the block header is sourced independently from the proof of inclusion (i.e., using the blockhash, which is part of the proof of inclusion). The header is available independently of the blockchain itself, or by using the Headers Client described in UK Patent Application No. 2106950.5, filed 14 May 2021.
[0187] Auditors should ensure that the header shown is indeed part of the longest chain.
[0188] Further exemplary features and uses of proof of inclusion are discussed throughout the specification of UK Patent Application No. 2102217.3, filed in the name of nChain Holdings Limited on 17 February 2021.
[0189] Checkpoint Now When the checkpoint or onFinalise method is used, the optional checkpointNow flag is optionally used. The checkpointNow flag may be optionally set when a new event is received for storage to the off-chain dataset (and possibly to the on-chain dataset if the appropriate trigger conditions are met). If the flag is set, it ensures that data related to the received event is stored in the on-chain dataset, regardless of whether the trigger conditions are met. The check can be considered an override flag because it overrides the checkpointing method to ensure that the data is added to the on-chain dataset.
[0190] Therefore, when an event that should be added to the event stream is received, if the flag is set, the event data, or data based on the event data, is added to the on-chain dataset.
[0191] The type of data that should be included in an on-chain dataset depends on the data formatting options (attest, notarise, and publicise).
[0192] Advantageously, this gives clients sending data to the event stream more freedom to allow or request that critical data or events be committed to an on-chain dataset for auditing. Since critical events may involve passing through specific milestones for the event stream, the storage of data results in reaching a specific state in the associated finite state machine or smart contract.
[0193] Another advantageous use of this technical feature is to allow streams to be resolved at specific critical times that checkpoint methods might miss. For example, if a checkpoint method is used to add data to an on-chain dataset during the day, but a client wants the current event to be recorded at midnight on the last day of the fiscal year (for accounting reporting purposes), the client simply adds a checkpointNow flag to the last event they send out before midnight, and it is added to the on-chain dataset for auditor review, regardless of any previously set checkpoint trigger conditions.
[0194] EventStream Blockchain Verification A second aspect of this disclosure relates, in general, to a computer-based method for verifying on-chain and off-chain datasets as part of a platform that provides a number of blockchain-related services. The platform is provided for multiple clients and is implemented by at least one platform processor associated with an application programming interface (API).
[0195] A computer-based method for verifying a blockchain-based representation of a dataset comprises the steps of obtaining a reference to an on-chain dataset, wherein the on-chain dataset comprises data stored on the blockchain and carrying transactions, and each transaction-carrying data comprises data indicating an event stored in an off-chain dataset; examining the on-chain dataset; determining that for each transaction-carrying data in the on-chain dataset, the data indicating an event in the off-chain dataset is associated with the event in the off-chain dataset; and verifying that the on-chain dataset and the off-chain dataset correspond to each other.
[0196] Preferably, the blockchain is a public blockchain. Advantageously, in a public blockchain and / or a blockchain with the ability to allow third parties to read the blockchain, any interested party, whether they submitted the data, stored the data, or are a complete third party, can audit on-chain and off-chain datasets to ensure they correspond to each other. In particular, the method of the present invention provides a method for allowing third parties to verify data in a trustless manner. The immutability of the blockchain itself provides a method for storing event-related data such that it is virtually impossible to alter the event-related data after submission to the blockchain.
[0197] In some embodiments, data items in an off-chain dataset include at least a protoimage and a digest of the protoimage. Preferably, data representing data in an off-chain dataset includes a digest of the protoimage of the data item in the off-chain dataset. More preferably, the step of determining that data representing a data item in an off-chain dataset is associated with a data item in the off-chain dataset includes finding the data item in the off-chain dataset using the same digest of the protoimage of the on-chain data item.
[0198] Preferably, the original image includes metadata of the associated events, which is linked to each data item.
[0199] Advantageously, the preimage digest serves as proof of existence for off-chain data. By using only the preimage digest (referred to as streamDigest throughout this explanation), an interested third party can attempt to find the corresponding event that has a preimage that hash to the digest. Since the digest used here is a one-way digest, it is computationally extremely difficult for a malicious client or memory provider to find "bad" event data with the same digest as the intended "good" event data and substitute it with it. If such an event with a matching digest can be found, the auditor can be confident in the validity of the absence of tampering. Blockchain immutability further enhances this security, as it limits the ability of malicious blockchain miners to tamper with historical data.
[0200] A further advantage lies in the fact that the entire event data can be validated using only a digest, which is much smaller in size compared to the event data itself. This saves data and processing power on the blockchain, thus reducing the carbon footprint of any related blockchain devices or processes that operate on or store event-related transactions.
[0201] In some embodiments, data indicating a data item in an off-chain dataset additionally includes a protoimage of the data item in the off-chain dataset. Preferably, the step of determining that data indicating a data item in an off-chain dataset is associated with a data item in the off-chain dataset includes finding a data item in the off-chain dataset that has the same protoimage as the on-chain data item.
[0202] In some embodiments, the data indicating a data item in an off-chain dataset further comprises a hash of the event. Preferably, the step of determining that the data indicating a data item in an off-chain dataset is associated with a data item in an off-chain dataset comprises finding the data item in the off-chain dataset that has the same hash of the event.
[0203] Advantageously, the existence of the event's protoimage and / or the hash of the event itself allows for more granular verification of on-chain and off-chain datasets. While a protoimage digest can be used to determine whether data has been tampered with by using the event's protoimage and / or hash, the verifier can determine which parts of the on-chain event have been tampered with.
[0204] In some embodiments, the data indicating a data item in an off-chain dataset further comprises an event and / or a subsection of the event. Preferably, the step of determining that the data indicating a data item in an off-chain dataset is associated with a data item in an off-chain dataset comprises finding the data item in the off-chain dataset that has the same event and / or subsection of the event.
[0205] Advantageously, the event data itself allows a verifier to verify any smart contract, finite state machine, or other process that uses said event data. Not only can the verifier verify the validity of the data, but they can also use the data in the same way or in the same manner as the client writing the data intends to use it. The same advantages mentioned above also apply to more granular verification.
[0206] In some embodiments, the preimage comprises a digest of the preimage of a preceding data item in an off-chain dataset.
[0207] Advantageously, this chain of memories in hashes provides an additional strength against malicious actors attempting to alter past data. With each preimage dependent on a preceding event, alterations to past events propagate to alterations of the preimages of all subsequent events stored. This propagation appears as changes in the digest across the entire chain, moving forward from the point where the event is modified.
[0208] In some embodiments, each transaction in an on-chain dataset contains a reference to further transactions, thus forming a chain of transactions. Preferably, examining an on-chain dataset comprises retrieving a given transaction in the on-chain dataset and retrieving further transactions based on the first reference in the given transaction or a second reference in a further transaction. Optionally, the reference to the on-chain dataset is a reference to the first or last transaction in the chain of transactions. Optionally, the reference to the on-chain dataset contains the transaction ID of the first or last transaction in the chain of transactions. Optionally, the reference to the on-chain dataset contains the block ID of the first transaction.
[0209] Advantageously, the fact that each transaction reference exists in a chain-like manner forces a consumption order on the transactions. This order can be used for verification purposes, for example, to ensure that on-chain events are in the same order as off-chain events. A further advantage is the investigative nature of the transaction chain. These transactions can be investigated using only transaction information (i.e., consumption output points), without any further indexing information or other additional information.
[0210] In some embodiments, the method comprises the step of retrieving data items from an off-chain dataset. In some embodiments, each data item in the off-chain dataset is retrieved by accessing a database and / or by accessing data storage that substantially mirrors the database.
[0211] Advantageously, by accessing data storage that effectively mirrors the database, auditors do not need to overload the database, which may be currently in use, with data access calls to verify historical data.
[0212] In a second embodiment, the device comprises a processor and memory, the memory including executable instructions that, as a result of execution by the processor, cause the device to perform the methods performed in a computer as described above.
[0213] In a second embodiment, the system comprises a device as described above, configured to audit on-chain and off-chain datasets, and a third-party device configured to receive the audit results.
[0214] Referring to Figure 8, the system 800 according to the second embodiment is shown with the same or similar components as those described with reference to Figure 5. Where important, the same reference numbers are used in Figures 5 through 8 to indicate that the same or similar devices or communication channels are used. The client device 502 communicates with the platform processor 504 (510), with the blockchain network 101 (802), and with the client database 804 (806). The platform processor 504 communicates with the blockchain network 101 (514) and with the platform database 506 (514).
[0215] Since client 502 is communicating with the blockchain network 101 (802), it is possible to download blocks and / or transactions from the blockchain and / or query nodes in the network for them. Optionally, client 502 stores a local copy of the blockchain. While communicating with the blockchain network 101, client 502 is not configured to output data to be included in the blockchain for the purposes of this embodiment.
[0216] Client 502 optionally communicates with client database (or data store) 804 (806) to store data sent to platform processor 504. In this case, the event dataset is stored in at least two locations: client database 804 and platform service database 506. The blockchain also optionally stores an on-chain representation of the event dataset, which is a complete replica of the database. Optionally, the dataset is not stored entirely by client 504 in client database 804, and each event in the off-chain dataset is retrieved via platform processor 504.
[0217] Referring to Figure 9, a method 900 for verifying an event dataset is shown. This method can also be considered a method for auditing an event dataset. The dataset is a set of events, and the source of each event is the client that creates it and / or any party authorized by the client. Although the verification is presented as being performed by the client, a person skilled in the art will understand that any party, including the client, the platform processor, and other third parties, can perform the method as long as they have read access to both the blockchain (which is usually public, but not always) and the off-chain dataset. The third party has access to the dataset via delegated read access to the platform processor's database (via the platform processor's API) and / or from its own storage of the dataset, provided by the client. The third party is optionally an auditor.
[0218] In the first step 902, the client obtains a reference to an on-chain dataset that it wishes to validate using an off-chain dataset. The on-chain dataset is preferably stored as a chain of transactions, such that each transaction has references to neighboring transactions. Preferably, the reference to the on-chain dataset is the transaction ID of one of the transactions in the chain of transactions. More preferably, the reference to the on-chain dataset is a reference to the first or last transaction in the chain of transactions. Preferably, the chain of transactions is as described with reference to Figures 7A, 7B, and 7C above.
[0219] Alternatively, a reference to an on-chain dataset is a reference to a list of transaction references.
[0220] When a reference to an on-chain dataset is obtained, the transactions that are part of the on-chain dataset are examined (904) or otherwise retrieved. The method of examination depends on the structure in which the transactions are stored. Further details are provided below under the heading "Examining On-Chain Datasets".
[0221] Each data point carrying a transaction in the on-chain dataset contains data indicating an event that should be stored in an off-chain database. The preferred way in which these on-chain representations are stored on the blockchain is described above under the heading "Blockchain Storage of Event Streams," and each data point carrying a transaction is an append transaction as described above with reference to Figure 7B. In this example, all subsets of events are represented in the on-chain dataset. As described above, append transactions may contain different types of data indicating an event in the off-chain dataset, such as a hash of the protoimage, a hash of the protoimage and event data, and any one or more of the event data. Different data types and structures are described in more detail under the heading "Data Indicating Events Stored in an Off-Chain Dataset."
[0222] For each piece of data carrying a transaction in the on-chain dataset, a decision is made to associate the data present in the on-chain transaction with an event in the off-chain dataset. This step can be considered a verification step, as it verifies whether the transaction and / or the data contained within the transaction legitimately represent the event in the off-chain dataset. The verification / association step comprises confirming that an event corresponding to the data present in the on-chain transaction exists in the off-chain dataset and that it is legitimate for the off-chain event. Verification may optionally include data comparison, timestamp comparison, and / or comparison of any other available metadata.
[0223] In particular, since not all off-chain events are always represented in on-chain transactions, the method merely verifies that all on-chain stored events are valid. For example, when the checkpoint method is used as described above, the trigger condition is optionally set so that not all events are represented in the on-chain dataset.
[0224] A determination is made, based at least on these on-chain dataset validations, as to whether the entire on-chain dataset represents the off-chain dataset. This can also be described as verifying that the on-chain dataset and the off-chain dataset correspond to each other. Preferably, in some embodiments, for the on-chain dataset to properly represent the off-chain dataset, all on-chain data carrying transactions has relevant events in the off-chain dataset, and those relevant events are properly represented by the on-chain transactions.
[0225] Preferably, in another embodiment, i.e., for time-based (trigger) checkpoints, the on-chain transaction may not have a direct off-chain event. In this case, the on-chain transaction may be associated with the last written event. However, if no new events are added between consecutive time periods, the on-chain streamDigest remains unchanged. This indicates that there is no activity during that period. Since the streamDigest encompasses every bit of the stream, whenever the StreamDigest is written on-chain, it protects the integrity of all data written prior to that time.
[0226] The verification 906 of the on-chain dataset and the off-chain dataset may also comprise a comparison of the metadata stored in the on-chain dataset with the off-chain dataset. Preferably, the metadata of the on-chain dataset is stored in the first and / or last transaction in the on-chain dataset. For example, the completion times between the two datasets may be compared to ensure that the two datasets are identical or reasonably close. The total number of events may be stored in the last transaction, which may be compared with the total number in the off-chain dataset.
[0227] Any party may use the methods and systems described herein to verify any one or more of the following according to various use cases and data types. · Does the dataset contain only the elements that should be included? · Does the dataset contain all the elements that should be included? · Is the data of each element recorded faithfully? · Is the order of events recorded faithfully? · Is the time of each event recorded faithfully?
[0228] Preferably, the validation step 906 comprises steps to validate one or more of the following for both on-chain and / or off-chain datasets: The dataset contains only the elements that should be included. The dataset contains all the elements that should be included. The data in each dataset is correctly recorded and compared with each other. The order of events in the dataset is correct, and The timing of each event in the dataset is correct.
[0229] Preferably, the off-chain dataset contains all the events, and the on-chain dataset contains a subset of the events.
[0230] Preferably, the verification step includes the steps of examining an off-chain dataset and verifying that all events that should be recorded in an on-chain dataset are recorded therein.
[0231] In some embodiments, the search of an on-chain dataset may be performed in response to finding an off-chain event that should have a corresponding on-chain event. That is, if an iteration of an off-chain dataset is performed to verify that there is a value that should be included on-chain, this triggers the search of the on-chain dataset to find the event. This search may be incremental so that order and any other verification steps (such as data integrity or time) are additionally checked, or it may start from the beginning of the on-chain dataset to check for each event present in the on-chain dataset.
[0232] In other embodiments, it may be preferable for on-chain investigations to have the blockchain fully indexed beforehand and to fetch transactions in the stream one by one.
[0233] In some embodiments, as can be the case with checkpoint methods and (salted) notarization, i.e., if the preimage is not written on-chain, there may be insufficient on-chain data to perform the calculations to prove that the expected data has been properly considered. This means that an auditor or verifier may have to retrieve the missing information from the platform for metadata that includes the preimage. n stream seed, streamDigest n whenRecorded n , event index n, delegatedWriter index, salt n , and optionally event data n Includes a copy. It is preferable that the auditor entity does not need to read any blockchain transactions.
[0234] Advantageously, in some embodiments, the platform may provide the complete transaction data, a Merkle inclusion proof (an array of hashes), and a blockhash of the block header containing the complete transaction data. The complete transaction data always includes at least a streamDigest in one of its outputs.
[0235] In this case, the audit or verification process may include the following steps: A. Fetch off-chain records of all events from the beginning. • The record is an event metadata. n The sum of the on-chain transaction copy (txn n ), output index used for OP_RETURN (out i ), and Merkle content certificate (P n (Includes if any). Prepare the source data to be sent to the EventStream for use in building B.preimage. ·H n :=sha256(data n |salt) CH n And using the information returned from the platform, preimage n (metadata element whenRecorded n (including delegated writer index, event index n) and streamDigest n-1 This is constructed from the calculation of the previous preimage. • For preimage0, streamDigest n-1 This is replaced by the "seed" value (which is also returned in the metadata). ·streamDigest n Calculate. • Calculated Stream Digest n metadata n Compare it with the streamDigest supplied in [location]. • If they are the same, this is streamDigest n data that triggered creation n This can also be seen as proof that the entire stream from index 0 to n-1 has not been modified. DP n If it includes, streamDigest n We will now proceed to validate that it is being recorded on-chain. ·txn n out i The data carrier output held in (i.e., streamDigest e Extract the following: The format is op_false op_return 0x20 <streamDigest e > is. • Calculated Stream Digest n Extracted streamDigest e Compare it to this. • If they are the same, this is streamDigest n ga txn n This can be considered proof that it is part of something. E. Calculate the Merkle root. ·H D :=sha256(sha256(data n )) calculate. Markle root R n :=merkle(H D ,P n Calculate (nodes). F. Obtain the block header. ·metadata n Send .blockhash to the Headers Client and the actual header H B Obtain it. ·metadata n .blockhash is sha256(H) depending on the hash applied. B ) or sha256(sha256(H B You may also use )). In other words, blockhash can use any hash function, sha256 or sha256(sha256(header)) are examples. GH B (merkleRoot) n Compare it to this. If they are the same, then it is txn n Prove that is part of a block whose hash matches blockhash. Therefore, this is data n This can be considered proof that the specified index and time were provably added to the EventStream.
[0236] Preferably, when the verification step comprises verifying that all events that the on-chain dataset should include are present, the method comprises the steps of finding off-chain events with on-chain metadata, and for each event, verifying that the metadata correctly corresponds to the on-chain transaction representing the event. Preferably, the metadata comprises a proof of inclusion in the blockchain. More preferably, the verification step comprises verifying that the proof is correct. In some examples, as mentioned above (see the steps of the audit process), in practice, the user obtains a certificate from the platform processor, which certificate includes those transactions, transaction IDs, corresponding block IDs, Merkle roots, and inclusion proofs. If this information is stored off-chain, it would be possible to independently verify the information by checking whether the Tx ID and the Merkle inclusion proof provide the same Merkle root as the Merkle root of the block in which the transaction is purportedly contained.
[0237] Preferably, the metadata and / or the proof of inclusion are as described with reference to the discussion under the heading "Updating Off-Chain Datasets Using On-Chain Metadata".
[0238] This method 900 is optionally used to verify event streams, such as those created by the method 500 described above, off-chain and on-chain.
[0239] When verifying that data indicating events stored on-chain is stored off-chain, the verification device also retrieves the off-chain dataset. The verifier (client 502, platform processor 504, or a third-party auditor) retrieves each item in the off-chain dataset one by one, or the dataset as a whole. Typically, client 502 has read access to the off-chain dataset it was previously writing to. Optionally, the client retrieves the entire off-chain dataset before or during the verification process, allowing the verification step to be performed without requiring multiple requests to the platform processor 504, thus saving time and bandwidth. Alternatively, for each on-chain transaction that the verifier wishes to verify, a request is made to the platform processor 504 for the off-chain stored events related to the current on-chain transaction.
[0240] As an addition or alternative to the above, if client 502 was the one writing to platform processor 504 (and / or could see the data because it had been sent to platform processor 504), client 502 stores the data as it was written, so client 504 maintains its own version of the database in its own database 804. In this case, no additional messages need to be sent to platform processor 504. If client 502 wants a third party to verify the data, it can provide its stored version (if any) or delegate read access to the third party.
[0241] Finally, the verifier optionally transmits the decision made regarding whether the on-chain dataset legitimately represents the off-chain dataset. This decision is transmitted to the party that requested the verification and / or any other interested parties.
[0242] Investigation of on-chain datasets In verification method 900, the on-chain dataset is examined in the investigation step 904 discussed above. The investigation method depends on the type and format in which the on-chain dataset is stored. Below, several exemplary embodiments for various on-chain formats and possible methods for examining them are provided. Those skilled in the art will understand that investigation methods may be possible for various data structures.
[0243] As discussed above, on-chain transactions are preferably in a chain such that each transaction has a reference to an adjacent transaction, and more preferably, that reference can be traversed in either direction. That is, if transaction A has a reference to transaction B, in addition to traversing the reference from transaction A to transaction B, the reference can be traversed from transaction B to transaction A (reversely). Even more preferably, the transactions form a chain of dust as described above under the heading "chain of dust". Each transaction in this chain of dust (except the first one) has a back reference in the form of consuming the output point of the previous transaction.
[0244] To explore the chain forward, the output points of "dust outputs" 644a, b, and c are captured, and the transaction consuming that output becomes the next transaction being manipulated. This step is repeated until the end of the chain is reached.
[0245] To trace the chain backward, the output points stored in "dust inputs" 646a, b, and d are retrieved. The transaction ID within that output point is the transaction ID of the previous transaction in the chain. The transaction with that ID is found. These steps are repeated until the beginning of the chain is reached.
[0246] Therefore, if the on-chain dataset is in the form of a chain of transactions, an investigation of the on-chain dataset involves following the references each transaction has until all on-chain transactions have been investigated. As shown above, it is possible to investigate forward or backward by following the references from any transaction in the chain. Therefore, it is possible to investigate the entire chain from any starting point. If the reference to the on-chain dataset is a transaction in the middle of the chain, in order to investigate the entire set, the verifier investigates in one direction until they reach the first or last transaction, and then investigates again in the other direction from the same transaction in the middle of the chain.
[0247] Alternatively, when the reference to the on-chain dataset is a reference to a list of transactions relating to events stored off-chain, the transaction reference is preferably the transaction ID of each transaction on the on-chain dataset, and more preferably the block ID and transaction ID.
[0248] Transactions can be found by iterating through all transactions in the blockchain using only the transaction ID (or by using a blockchain service that has already indexed all transactions). Using the block ID, the client only needs to find the appropriate block and then iterate through only the transactions within that block, rather than the entire transaction history. Therefore, examining an on-chain dataset involves examining each transaction via its transaction ID.
[0249] Further exemplary features of dust chains, and how to investigate them, are discussed throughout the specification of UK Patent Application No. 2102314.8, filed in the name of nChain Holdings Limited on 18 February 2021. These dust chain features include “change-out and change-in transactions” that do not carry data and “rendezvous transactions” that carry data (as well as data on other event streams). Methods for investigating these types of transactions are also disclosed in that specification.
[0250] Data showing events stored in an off-chain dataset. As discussed above, transactions in an on-chain dataset contain data that indicates an event in an off-chain dataset. The data indicating an event in the off-chain dataset is such that it uniquely identifies the event and preferably provides information that allows verification that the data and / or metadata associated with the event have not been altered since being sent to the platform processor 504 or the blockchain. In particular, once a transaction containing event-indicating data is confirmed on the blockchain, the data is considered immutable due to the characteristic of blockchain transactions being immutable.
[0251] Preferably, the event-indicating data in the off-chain dataset is in one form of an embodiment, such as that described above under the heading "Current State of the Stream". Thus, the event-indicating data may be any one or more of the following types. In some embodiments, this may include preimage, StreamDigest, H(data), and one or more possible combinations of data. ·[streamDigest n ] ·[streamDigest n ][H(data n )] ·[streamDigest n [data n ·[preimage n [streamDigest n ·[preimage n [streamDigest n [H(data n )] ·[preimage n [streamDigest n [data n ·[preimage n [streamDigest n [split(data n ), 1 of 2] ·[preimage n [streamDigest n [split(data n ), 2 of 2]
[0252] This may also be described in the following manner. Optionally, the data indicating the event comprises the streamDigest of the event, and the streamDigest is a hash of the preimage of the event. Optionally, the data indicating the event further comprises the preimage of the event. Optionally, the data indicating the event further comprises a hash of the data associated with the event. Additionally or alternatively, the data indicating the event comprises event data. Optionally, if the event data is too large for a single transaction, the event data is split into two or more transactions.
[0253] Preferably, the verifier is configured to identify the format in which the data is stored, and use appropriate steps to verify the data with the existing data. Exemplary steps taken to verify various data types are described below.
[0254] If the data indicating an event only has a streamDigest, this is still sufficient to uniquely identify the event. In some embodiments, this involves identifying the original data, when it was recorded, and its location in the stream relative to previous and subsequent events. To find the event associated with this data indicating the event, we search through the off-chain dataset to find the event that has the same streamDigest. Preferably, the off-chain dataset stores a streamDigest for each event. Alternatively, the off-chain dataset does not store this information, and a preimage of each event in the event stream is constructed (if it does not already exist) and hashed to determine whether it has the same or different streamDigest. The streamDigest can be considered a form of "proof of existence" for an event.
[0255] As explained above, the streamDigest is a hash of the preimage, which in turn has a hash of the data. Finding events with the same streamDigest also serves to verify that the event data has not been altered, because if the data had been altered, the streamDigest should also have changed. Furthermore, the preimage also contains the streamDigest of previous events. Assuming this chain of hashes, verifying a given transaction and event also verifies that the data of all previous events has not been altered.
[0256] Since all data types have at least a streamDigest, these steps can be used for any data type that exists.
[0257] Finding off-chain events can be easier if the data type has a preimage in addition to a streamDigest. The preimage contains an index of events in the stream. Therefore, instead of finding events that have the same streamDigest (a process that may involve building a preimage and hashing it to find a streamDigest for each event in the off-chain dataset), a more time- and computationally efficient method is used: iterating through each event and counting until the event is found in the index provided in the preimage (in particular, no comparison is needed, just counting the index). If events are stored in an array and / or indexed database, events do not need to be iterated through, and the verifier can jump directly to its index, since its location in memory is directly computable and / or already known.
[0258] The preimage may contain further details to verify that the on-chain data correctly represents the off-chain event. For example, the preimage's whenRecorded member is optional and compared to when the event was recorded in the database. These times must be the same or sufficiently similar.
[0259] If the data type contains a hash of the data or the data itself (whether it is split into two or more transactions), this is also verified by the verifier, so the same data exists on-chain as it does off-chain.
[0260] In one alternative embodiment, the disclosure relates to verifying that a stream of events is faithfully represented on-chain without reference to the dust chain mentioned above. In this case, the transaction size, and therefore the transaction cost (i.e., miner fee), is minimized by using the “attest” or “notarise” described above without a preimage. Such a minimal transaction has a single funding input and a single OP_RETURN output. Since the transaction size is known in advance, it is possible to pre-configure the UTXO funding values so that they are available, so that a “remaining balance” output is not required. Such embodiments may not require synchronization of the construction of each transaction. Even if the preimage is not on-chain, as in some examples of attest and notarise. Since the preimage metadata can be obtained from an off-chain source, this can be used for verifying the order of events in this alternative embodiment.
[0261] Platform system In a further embodiment, one or more of the methods and systems of the preceding embodiments may be used in conjunction with a platform processor, as described below, for providing on-chain and off-chain data storage as described in the first embodiment and / or verification of on-chain and off-chain data storage in the second embodiment. This further embodiment may be a Platform as a Service (PaaS) and Software as a Service (SaaS) offering that advantageously enables rapid real-world useful business and technological applications, such as the management of software-controlled technical systems or smart contracts, using a blockchain network such as the BSV blockchain.
[0262] Figure 10 shows an overview of the platform services, illustrating a high-level schematic diagram of the system. The platform services include a platform processor 1500 that provides API 1508, and the services can be accessed by one or more clients via API 1508.
[0263] The platform service 1500, as shown in this diagram, consists of three groups of services and aims to enable users and organizations to easily and securely leverage the benefits provided by the inherent properties of blockchain without actually implementing blockchain-based software, knowledge, or libraries on the client side. - A data service 1502 aimed at simplifying the use of the chain to a product data ledger. Preferably, the data service uses the data structures and methods provided herein to perform writing data to and reading data from the blockchain. - Computing service 1504, which aims to provide a generalized computing network backed by digital assets such as Bitcoin SV. - A commerce service 1506 that provides enterprise-class capabilities for conducting transactions using digital assets such as Bitcoin SV. Since the API is implemented as a web service, requests can be received in the API from a client via or using the HTTPS protocol. The requested service is then implemented by one or more service modules or processing resources 1502-1506 using the underlying software 1510, such underlying software 1510 is for implementing blockchain-related, i.e., blockchain-related, resource, library, and / or key management wallet implementations for creating, processing, and sending blockchain-related transactions. Once processed, the transaction can be sent to the blockchain network 1512 (on behalf of any client implementing such functionality or transaction library). At most, a client may, or can implement, a digital wallet etc. related to cryptocurrency or some other digital asset, but this is not required, as the platform service 1500 may also provide and manage digital assets for the client.
[0264] Figure 11 provides a rougher schematic diagram of several services related to the blockchain, which may be implemented by a platform 1600 relating to an API through which one or more of the services provided can be accessed. As seen in Figure 11, the data service 1602 may include a data writing service 1602a and a data reading service 1602b. An event stream and / or data writer optionally implements a method 600 as described in Figure 6A. Similarly, a client and / or third party wishing to access the data archive (such as a verification method 900 as described in Figure 9) may use the data reader 1602b. Further details of the event stream are discussed with reference to Figures 4 to 8 of UK Patent Application No. 2002285.1 (filed in the name of nChain Holdings Limited on 19 February 2020) and are incorporated herein by reference. The data writing service 1602a enables a client to write data to the blockchain in a simple, secure, and optimized manner. The data reading service 1602b allows clients to submit queries that return data stored on the blockchain. This may involve using filtered streams, allowing clients to predefine the types of data they wish to read from the blockchain ad-hoc or periodically, i.e., within a certain time frame, or the types of data related to relevant or irrelevant events or documents processed on blockchain 1610. The data archiving function allows access to logs of previous transactions for a specified event or contract.
[0265] The computing service 1606 of platform 1600 includes applications 1606a and frameworks 1606b related to smart contracts, which in some embodiments may be represented as state machines in blockchain 1610. The computing service 1606 interacts with the data service 1602 because data needs to be input and results need to be provided to the client for any such computation.
[0266] The commerce service 1604 is responsible for providing enterprise-class capabilities via enterprise wallets 1604a for investigating the blockchain 1610, based on best-in-class security practices and techniques. For example, in some embodiments, the enterprise wallet may implement functionality to enable blockchain transaction processing when more than one person or user or account may need to approve transactions that meet defined criteria, i.e., criteria related to large values of cryptocurrency exceeding predetermined limits. The enterprise wallet may also include functionality to implement a threshold number of signatures and / or signature types for moving large amounts of digital assets, such as cryptocurrencies or tokens representing other resources. The movement of these assets may then be represented on the blockchain according to processing based on criteria applied by such an implementation form of the enterprise wallet.
[0267] SPV service 1608 (Simplified Payment Verification) is an example application that does not run a miner node and therefore requires information from the blockchain but does not include a direct link to it. Such an SPV service 1608 allows lightweight clients to verify that a transaction is included in the blockchain without having to download the entire blockchain 1610.
[0268] Platform devices Figure 12 provides an exemplary simplified block diagram of a computing device 2600 that may be used to implement at least one embodiment of the present disclosure. In various embodiments, the computing device 2600 may be used to implement any of the systems or methods shown and described above. For example, the computing device 2600 may be configured to be used as one or more components of systems 500, 800 in Figure 5 or Figure 8, or the computing device 2600 may be configured as a client entity relating to a given user, a client entity making database requests and / or submissions, a platform processor, and / or a database manager. Thus, the computing device 2600 may be a portable computing device, a personal computer, or any electronic computing device. As shown in Figure 12, the computing device 2600 may include one or more processors with one or more levels of cache memory and memory controllers (collectively labeled 2602) that may be configured to communicate with a storage subsystem 2606 including main memory 2608 and persistent storage 2610. The main memory 2608 may include a dynamic random access memory (DRAM) 2618 and a read-only memory (ROM) 2620 as shown. The storage subsystem 2606 and cache memory 2602 may be used for storing information, such as transaction and block-related details as described in this disclosure. The processor 2602 may be used to provide a step or function of any embodiment as described in this disclosure.
[0269] The processor 2602 can also communicate with one or more user interface input devices 2612, one or more user interface output devices 2614, and a network interface subsystem 2616.
[0270] The bus subsystem 2604 may provide a mechanism for enabling various components and subsystems of the computing device 2600 to communicate with each other as intended. Although the bus subsystem 2604 is schematically shown as a single bus, alternative embodiments of the bus subsystem may utilize multiple buses.
[0271] The network interface subsystem 2616 can provide interfaces to other computing devices and networks. The network interface subsystem 2616 can act as an interface for receiving data from other systems to and sending data to the computing device 2600. For example, the network interface subsystem 2616 could enable data engineers to connect the device to a network, allowing them to send and receive data from the device while they are in a remote location, such as a data center.
[0272] The user interface input device 2612 may include one or more user input devices such as a keyboard, integrated mouse, trackball, touchpad, or pointing device such as a graphics tablet, scanner, barcode scanner, touchscreen integrated into a display, voice recognition system, microphone or other audio input devices, and other types of input devices. In general, the use of the term “input device” is intended to include all possible types of devices and mechanisms for inputting information into the computing device 2600.
[0273] One or more user interface output devices 2614 may include non-visual displays such as display subsystems, printers, or audio output devices. The display subsystem may be a flat panel device such as a cathode ray tube (CRT), liquid crystal display (LCD), light-emitting diode (LED) display, or projection, or other display device. Generally, the use of the term “output device” is intended to include any possible type of device and mechanism for outputting information from the computing device 2600. One or more user interface output devices 2614 may be used, for example, to present a user interface to assist user interaction with applications performing the described process and its variations, where such interaction may be appropriate.
[0274] The storage subsystem 2606 may provide a computer-readable storage medium for storing basic programming and data constructs that can provide functionality in at least one embodiment of the Disclosure. Applications (programs, code modules, instructions), when executed by one or more processors, may also provide functionality in one or more embodiments of the Disclosure and may be stored in the storage subsystem 2606. These application modules or instructions may be executed by one or more processors 2602. The storage subsystem 2606 may additionally provide repositories for storing data used in accordance with the Disclosure. For example, main memory 2608 and cache memory 2602 may provide volatile storage for programs and data. Persistent storage 2610 may provide persistent (non-volatile) storage for programs and data and may include flash memory, one or more solid-state drives, one or more magnetic hard disk drives, one or more floppy disk drives with associated removable media, one or more optical drives with associated removable media (e.g., CD-ROM or DVD or Blu-ray), and other similar storage media. Such programs and data may include programs for performing steps of one or more embodiments as described in this disclosure, as well as data related to transactions and blocks as described in this disclosure.
[0275] The computing device 2600 can be of various types, including portable computer devices, tablet computers, workstations, or any other devices described below. In addition, the computing device 2600 may include other devices that can be connected to the computing device 2600 through one or more ports (e.g., USB, headphone jack, Lightning connector, etc.). A device that can be connected to the computing device 2600 may include multiple ports configured to accept fiber optic connectors. Thus, this device may be configured to convert optical signals into electrical signals that can be transmitted through the ports connecting the device to the computing device 2600 for processing. Due to the ever-changing nature of computers and networks, the description of the computing device 2600 shown in Figure 12 is intended only as a specific example for the purpose of illustrating a preferred embodiment of the device. Many other configurations are possible, having more or fewer components than the system shown in Figure 12.
[0276] Example - Equipment Activity Log Manufacturers of high-end equipment desire access to critical activity logs of their customers' equipment. This may be part of a warranty or service agreement. By analyzing the logs, manufacturers may be able to take preventative steps to ensure that the equipment is operating at maximum efficiency. Manufacturers may configure individual Event Streams for each product family using a checkpoint method. The equipment automatically logs critical events throughout its product life after registration. Manufacturers can remotely monitor all activities, including heartbeats, operating hours, replacement of critical parts, and use of appropriate materials.
[0277] Using a checkpoint method, large amounts of data can be stored in an off-chain database for access to individual data points of interest, and the on-chain dataset is used as a heartbeat monitor so that manufacturers can verify that the data is being updated but are not interested in the data itself.
[0278] The various methods described above can be implemented by computer programs. Computer programs may include computer code that instructs a computer to perform one or more functions of the various methods described above. Computer programs and / or code for performing such methods may be provided to a device such as a computer in one or more computer-readable media, or more generally, in a computer program product. Computer-readable media may be temporary or non-temporary. One or more computer-readable media may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system or propagation medium for data transmission, for example, for code downloads over the Internet. Alternatively, one or more computer-readable media may take the form of one or more physical computer-readable media, such as semiconductors or solid-state memory, magnetic tape, removable computer diskettes, random-access memory (RAM), read-only memory (ROM), hard magnetic disks, and optical disks such as CD-ROMs, CD-R / Ws, or DVDs.
[0279] In some implementations, the modules, components, and other features described herein may be implemented as individual components or integrated into the functionality of hardware components such as ASICs, FPGAs, DSPs, or similar devices.
[0280] In addition, modules and components may be implemented as functional circuits within firmware or hardware devices. Furthermore, modules and components may be implemented in any combination of hardware devices and software components, or solely in software (for example, as code stored or otherwise embodied in a machine-readable or transmission medium).
[0281] Unless otherwise stated, as will be evident from the following discussion, any use of terms such as “determine,” “provide,” “calculate,” “compute,” “identify,” “combine,” “establish,” “transmit,” “receive,” “store,” “estimate,” “verify,” and “obtain” throughout the explanation will be understood to refer to the activities and processes of a computer system or similar electronic computing device that manipulate and transform data represented as physical (electrical) quantities in the registers and memory of a computer system into other data similarly represented as physical quantities in computer system memory or registers or other storage, transmission, or display devices of such information.
[0282] As used herein and in the claims, the term “comprising” means “consisting of at least a part of.” When interpreting each statement herein and in the claims that contains the term “comprising,” other features may also exist besides those that follow the term. Related terms such as “comprise” and “comprises” should be interpreted in the same way.
[0283] As used herein, the term "and / or" means "and" or "or" or both.
[0284] As used herein, "(s)" following a noun signifies the plural and / or singular form of the noun.
[0285] Referring to an element in the singular form does not preclude referring to the same element in the plural form, and vice versa.
[0286] Enumerated embodiments The following clauses are provided as examples relating to this disclosure and to aid in further understanding of this disclosure.
[0287] 1. A computer-based method for verifying the representation of a dataset stored on a blockchain, A step of obtaining a dataset reference to an on-chain dataset, wherein the on-chain dataset contains data stored on the blockchain and carrying transactions, and each piece of data carrying a transaction contains data indicating an event stored in an off-chain dataset. Steps to examine the on-chain dataset and each data point carrying a transaction within the on-chain dataset: The steps include determining whether data representing an event in an off-chain dataset is associated with an event in an off-chain dataset, A method comprising the step of verifying that on-chain datasets and off-chain datasets correspond to each other.
[0288] 2. A computer-based method according to Clause 1, wherein data items in an off-chain dataset include at least a protoimage and a digest of the protoimage.
[0289] 3. A computer-based method according to Clause 2, wherein the data representing the data of the off-chain dataset comprises a digest of the original image of the data items in the off-chain dataset.
[0290] 4. The step of determining whether data representing a data item in an off-chain dataset is associated with a data item in an off-chain dataset is: A computer-based method according to Clause 3, comprising the step of finding a data item in an off-chain dataset that has the same digest as the original image of an on-chain data item.
[0291] 5. A computer-based method, according to one or more of clauses 2 to 4, which includes data representing data items of an off-chain dataset, as well as original images of data items of an off-chain dataset.
[0292] 6. The step of determining whether data representing a data item in an off-chain dataset is associated with a data item in an off-chain dataset is: A computer-based method according to Clause 5, comprising the step of finding a data item in an off-chain dataset that has the same original image as an on-chain data item.
[0293] 7. A computer-based method, according to one or more of clauses 2 through 6, wherein the data indicating data items in an off-chain dataset further comprises hashes of events.
[0294] 8. The step of determining whether data representing a data item in an off-chain dataset is associated with a data item in an off-chain dataset is: A method performed by computer according to Clause 7, comprising the step of finding a data item in an off-chain dataset that has the same hash of an event.
[0295] 9. A method by which data representing data items in an off-chain dataset is performed on a computer by any one or more of the provisions of Clauses 2 through 8, further comprising events and / or subsections of events.
[0296] 10. The step of determining whether data representing a data item in an off-chain dataset is associated with a data item in an off-chain dataset is: A computer-based method according to Clause 7, comprising the step of finding data items in an off-chain dataset having the same event and / or subsections of the event.
[0297] 11. A computer-based method, according to one or more of clauses 2 through 10, wherein the preimage comprises a digest of the preimage of a preceding data item in an off-chain dataset.
[0298] 12. A method by which each transaction in an on-chain dataset is executed on a computer by any one or more of the preceding clauses, wherein each transaction has transaction references to further transactions so that a chain of transactions is formed.
[0299] 13. The step of investigating on-chain datasets is, Steps to retrieve a given transaction from an on-chain dataset, A computer-based method according to Clause 12, comprising the step of obtaining a further transaction based on a first transaction reference in a given transaction, or based on a second transaction reference in a further transaction.
[0300] 14. A method implemented on a computer according to Clause 12 or 13, in which a dataset reference to an on-chain dataset is a reference to the first or last transaction in a chain of transactions.
[0301] 15. A method by which a dataset reference to an on-chain dataset is performed on a computer by any one or more of the provisions of Clauses 12 to 14, wherein the dataset reference includes the transaction ID of the first or last transaction in the chain of transactions.
[0302] 16. A method by which a dataset reference to an on-chain dataset is performed on a computer by any one or more of the clauses 12 to 15, wherein the dataset reference includes the block ID of the first transaction.
[0303] 17. A computer-based method, comprising one or more of the preceding clauses, further comprising the step of retrieving data items from an off-chain dataset.
[0304] 18. Each data item of an off-chain dataset is obtained by accessing a database and / or by accessing data storage that substantially mirrors the database, in a manner performed on a computer by one or more of the preceding clauses.
[0305] 19. A device comprising a processor and memory, wherein the memory includes executable instructions that, as a result of execution by the processor, cause the device to perform any one or more of the methods described in the preceding clauses of a computer.
[0306] 20. Devices under Clause 19 configured to audit on-chain and off-chain datasets, A system comprising a third-party device configured to receive audit results.
[0307] It should be understood that the above description is intended to be illustrative, not restrictive. Many other implementations will become apparent to those skilled in the art upon reading and understanding the above description. While this disclosure has been described with reference to specific exemplary implementations, it will be recognized that this disclosure is not limited to the described implementations and can be practiced with modifications and changes within the appended claims. Therefore, the specification and drawings should be considered illustrative, not restrictive. Accordingly, the scope of this disclosure should be determined in relation to the appended claims, along with the full scope of equivalents to which such claims are entitled. [Explanation of Symbols]
[0308] 100 Systems 101 Packet-switched networks, blockchain networks 102 Computer terminals, computer equipment 103 Users, Stakeholders 104 Blockchain Nodes 105 Client Applications 106 Peer-to-peer (P2P) network 150 Blockchains 151 blocks 152 transactions 153 Genesis Block 201 Header 202 Input Fields 203 Output Fields 301 Side Channel 351 Transaction Engine 352 User Interface (UI) Layer 360 User Interface (UI), Client Application 362 UI elements, data entry fields 363 UI elements, information elements 450 node software 451 Protocol Engine 452 Script Engine 453 stacks 454 Application Level Determination Engine 455 Blockchain-related functional modules 502 Client 504 Platform Processor 506 Databases 644 Dust Output 646 Dust Input 648 Funding Input 650 Remaining balance output 660 First Transaction 662 Last Transaction 664 stream metadata 666 stream metadata 1500 platform processors, platform services 1502 Data Services 1504 Computing Services 1506 Commerce Services 1508 Platform API 1510 Blockchain Node Software 1512 Blockchain Network 1600 platforms 1602 Data Services 1604 Commerce Services 1606 Computing Services 1608 SPV Service 1610 Blockchain 2600 Computing Devices 2602 Processor 2604 Bus Subsystem 2606 Storage Subsystem 2608 Main memory, memory subsystem 2610 File Storage Subsystem, Persistent Storage 2612 User Interface Input Devices 2614 User Interface Output Device 2616 Network Interface Subsystem 2618 Dynamic Random Access Memory (DRAM) 2620 Read-only memory (ROM) 2624 Clock< / data> < / streamdigest> < / preimage>
Claims
1. A computer-based method for verifying the representation of a dataset stored on a blockchain, A step of obtaining a dataset reference to an on-chain dataset, wherein the on-chain dataset comprises data stored on the blockchain and carrying transactions, each data carrying a transaction comprises data indicating an event stored in an off-chain dataset, the off-chain dataset comprises a plurality of data items, each data item comprises a protoimage and a digest of the protoimage, each data item of the off-chain dataset is associated with one of the events stored in the off-chain dataset, and the data indicating the event stored in the off-chain dataset comprises a digest of one of the protoimages in the off-chain dataset, The steps include verifying that the on-chain dataset and the off-chain dataset correspond to each other by examining the on-chain dataset, For each data point in the on-chain dataset that carries a transaction, A step of determining that the data representing an event in the off-chain dataset is associated with an event in the off-chain dataset, wherein the determination step comprises finding a data item in the off-chain dataset that has the same original image digest as the digest provided in the data representing the event stored in the off-chain dataset, A method that includes [a certain feature].
2. The computer-based method according to claim 1, wherein the data representing the data items of the off-chain dataset also comprises original images of the data items of the off-chain dataset.
3. The step of determining that the data representing the data item in the off-chain dataset is associated with the data item in the off-chain dataset is, The computer-based method according to claim 2, comprising the step of finding a data item in an off-chain dataset that has the same original image as the data item in the on-chain dataset.
4. The computer-based method according to claim 1, wherein the data representing the data item of the off-chain dataset further comprises an event hash.
5. The step of determining that the data representing the data item in the off-chain dataset is associated with the data item in the off-chain dataset is, A method performed on a computer according to claim 4, comprising the step of finding a data item in the off-chain dataset that has the same hash of an event.
6. The method performed on a computer according to claim 1, wherein the data representing the data items of the off-chain dataset further comprises the event and / or a subsection of the event.
7. The step of determining that the data representing the data item in the off-chain dataset is associated with the data item in the off-chain dataset is, A computer-based method according to claim 4, comprising the step of finding a data item in the off-chain dataset having the same event and / or a subsection of the event.
8. The computer-based method according to claim 1, wherein the original image comprises a digest of the original image of a preceding data item in the off-chain dataset.
9. The computer-based method according to claim 1, wherein each transaction in the on-chain dataset has transaction references to further transactions so that a chain of transactions is formed.
10. The step of investigating the aforementioned on-chain dataset is, The steps include: obtaining a given transaction from the aforementioned on-chain dataset; The steps include obtaining a further transaction based on a first transaction reference in the given transaction, or based on a second transaction reference in a further transaction. A computer-based method according to claim 9, comprising:
11. The method performed on a computer according to claim 9, wherein the reference to the on-chain dataset is a reference to the first or last transaction in the chain of transactions.
12. The method performed on a computer according to claim 9, wherein the dataset reference to the on-chain dataset comprises the transaction ID of the first or last transaction in the chain of transactions.
13. The method performed on a computer according to claim 9, wherein the dataset reference to the on-chain dataset comprises the block ID of the first transaction.
14. The method performed on a computer according to claim 1, further comprising the step of obtaining data items from the off-chain dataset.
15. The computer-based method according to claim 1, wherein each data item of the off-chain dataset is obtained by accessing a database and / or by accessing data storage that substantially mirrors the database.
16. A device comprising a processor and memory, wherein the memory includes executable instructions that, as a result of execution by the processor, cause the device to perform a method performed by a computer according to any one of claims 1 to 15.
17. The device according to claim 16, configured to audit the on-chain dataset and the off-chain dataset, A third-party device configured to receive the results of the aforementioned audit and A system equipped with these features.
Citation Information
Patent Citations
Computer-implemented system and method
GB202002285D0
Computer-implemented system and method
GB202013929D0
Computer-implemented system and method
GB202102217D0
Computer implemented system and method
GB202102314D0
Headers client
GB202106950D0
