Storing programs on the blockchain

A file format for storing and executing executable software on a blockchain addresses the lack of standardized protocols in existing blockchain technology, enabling easy development and execution of decentralized applications.

JP7600217B2Active Publication Date: 2024-12-16NCHAIN LICENSING AG
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2022515631
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-09-12
Filing Date
2020-08-21
Publication Date
2024-12-16
Estimated Expiration
2040-08-21

AI Technical Summary

Technical Problem

Existing blockchain technology lacks standardized architecture and network protocols for easily building applications and software without extensive knowledge of underlying technology, hindering its widespread adoption and utilization.

Method used

A file format is developed for storing executable software on a blockchain that can be locally reconfigured and executed on individual computers, integrating access to the blockchain through high-level programming languages and utilizing a request-response protocol for data interaction, enabling the execution of self-contained programs.

Benefits of technology

This solution facilitates easy development of blockchain-based applications by allowing executable code to be stored and executed on a decentralized network, enhancing accessibility and usability of blockchain technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007600217000003
    Figure 0007600217000003
  • Figure 0007600217000004
    Figure 0007600217000004
  • Figure 0007600217000005
    Figure 0007600217000005
Patent Text Reader

Abstract

The method includes reading a header file from a first transaction recorded in a blockchain maintained across multiple nodes of a blockchain network. The header file includes program header information and reference information including one or more respective transaction IDs of one or more respective second transactions stored in the blockchain. Each of the second transactions includes a respective section of the body of the program file, at least one of the sections including executable program code. The method includes reading, from the blockchain, a respective section of the program file from at least one of the one or more second transactions based on the reference information, and executing a program including the program header information and the at least one read section.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to file formats for storing executable programs in blockchain transactions and for initiating such programs. [Background technology]

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

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

[0004] Miners who successfully solve the proof-of-work puzzle to generate an updated block are typically rewarded with a new transaction, called a "generation transaction," that generates a new amount of the digital asset. Proof-of-work incentivizes miners not to cheat the system by including double-spending transactions in their blocks, because it requires a huge amount of computational resources to mine a block, and because blocks containing double-spending attempts may not be accepted by other nodes.

[0005] In an “output-based” model (sometimes called a UTXO-based model), the data structure of a given transaction includes one or more inputs and one or more outputs. Any spendable output includes an element, sometimes called a UTXO (for “unspent transaction output”), that specifies an amount of digital assets. The output may further include a locking script that specifies a condition for redeeming the output. Each input includes a pointer to such an output in a prior transaction and may further include an unlocking script for unlocking the pointed-to output’s locking script. Thus, when considering a pair of transactions, we refer to them as a first transaction and a second transaction (or “target” transaction). The first transaction includes at least one output that includes a locking script that specifies an amount of digital assets and defines one or more conditions for unlocking the output. The second target transaction includes at least one input that includes a pointer to an output of the first transaction and an unlocking script for unlocking the output of the first transaction.

[0006] In such a model, when the second target transaction is sent to the P2P network to be propagated and recorded in the blockchain, one of the validity criteria applied at each node is that the unlock script meets all of one or more conditions defined in the lock script of the first transaction, and another is that the output of the first transaction has not yet been redeemed by another previous valid transaction. Any node that finds the target transaction invalid according to any of these conditions will not propagate it or mine it for inclusion in a block for recording in the blockchain.

[0007] An alternative type of transaction model is the account-based model, where each transaction transfers by referencing absolute account balances, rather than defining the amount to be transferred by referencing back to the UTXO of the preceding transaction in the past sequence of transactions. The current state of every account is stored and constantly updated by miners separate from the blockchain.

[0008] Traditionally, transactions in a blockchain are used to convey digital assets, i.e., data that acts as a store of value. However, blockchains can also be used to layer additional functionality on top of a blockchain. For example, blockchain protocols allow for the storage of additional payload data (i.e., user data or application content, as opposed to data that is fundamentally related to how a transaction operates as a transaction on a blockchain network) in a transaction. For example, such payload data may include unusable outputs of a transaction in an output-based model, e.g., due to an OP_RETURN opcode included in a lock script that, when executed on a node of the blockchain network, terminates the lock script and thus renders the output unusable in terms of trading with the input of another transaction. Modern blockchains increase the maximum data capacity that can be stored within a single transaction, making it possible to incorporate more complex data. For example, this can be used to store electronic documents on the blockchain, or even audio or video data.

[0009] It is also known that transaction payloads contain small blocks of executable code; that is, code other than lock and unlock scripts in an output-based model, or other than the operational parts of a smart contract in an account-based model. The executable code instead has some other secondary or "layer 2" (i.e., application level) functionality. In other words, from the perspective of the transaction protocol utilized by the blockchain network, the executable code is just like any other payload data. A client can download the code by inspecting the portion of the blockchain stored in one of the storage nodes of the blockchain network and accessing the code from the payload of the relevant transaction. The code can then be executed locally on the client computer. Summary of the Invention

[0010] However, while it is known for transaction payloads to contain small blocks of executable code, it is not previously known to include self-contained programs on a blockchain.

[0011] Blockchain offers a decentralized, tamper-resistant alternative to traditional database servers with the potential to revolutionize data storage, access, and distribution. However, due to its infancy, blockchain lacks standardized architecture and network protocols to easily build applications and software without extensive knowledge of the underlying technology. For blockchain to reach a point where it becomes as fundamental an infrastructure as the Internet, it is essential to develop easy-to-use protocols for both users and software to access data stored on the blockchain.

[0012] The following discloses a file format suitable for standardizing a wide range of blockchain-enabled applications. This disclosure establishes a means of storing executable software (i.e., executable code) on the blockchain that can be locally reconfigured to run on individual computers with authorized access. It introduces a novel blockchain-based file format for files stored on the blockchain that can be run locally or on a virtual machine.

[0013] According to one aspect disclosed herein, a method for executing a program is provided. The method includes the following steps executed by a consumer party's computer device. First, the method includes the step of reading a header file from a first transaction recorded in a blockchain maintained across multiple nodes of a blockchain network. The header file includes program header information and reference information including one or more respective transaction IDs of one or more respective second transactions stored in the blockchain. Each of the second transactions includes a respective section of a body of the program file, at least one of the sections including an active program code. The method then includes the steps of reading, from the blockchain, a respective section of the program file from at least one of the one or more second transactions based on the reference information, and executing a program including the program header information and the at least one read section.

[0014] In an embodiment, permissions can be encoded into either the transaction storing the file or the file itself to allow control over who can execute the file.

[0015] Embodiments may integrate access to the blockchain into a high-level programming language to enable local software to interact with the blockchain. A request-response protocol may be provided to access data referenced by transaction hyperlinks in a blockchain hypertext document. For example, a request-response protocol may be implemented by a hypertext-enabled wallet to make requests with the OP_RETURN flag.

[0016] This disclosure also discusses example system and computer architectures, as well as how computer hardware and software components interact in implementing the disclosed techniques. [Brief description of the drawings]

[0017] To aid in the understanding of embodiments of the present disclosure and to show how such embodiments may be put into effect, reference is made, by way of example only, to the accompanying drawings in which: [Figure 1] FIG. 1 is a schematic block diagram of a system for implementing a blockchain. [Diagram 2] 1 illustrates diagrammatically some examples of transactions that may be recorded on a blockchain. [Diagram 3] FIG. 2 is a schematic block diagram of an exemplary transaction set for storing a program. [Figure 4] FIG. 2 is a schematic block diagram of a client application. [Diagram 5] 1 illustrates a schematic diagram of a blockchain-based file format according to an embodiment of the present disclosure. [Figure 6] FIG. 1 is a schematic block diagram of an exemplary computer architecture for implementing the techniques of this disclosure. [Figure 7A] 4 illustrates an exemplary process for accessing and reconstructing executable program files according to embodiments disclosed herein. [Figure 7B]4 illustrates an exemplary process for accessing and reconstructing executable program files according to embodiments disclosed herein. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0018] <Exemplary System Overview> FIG. 1 illustrates an exemplary system 100 for implementing a blockchain 150. The system 100 includes a packet-switched network 101, which is typically a wide area internetwork such as the Internet. The packet-switched network 101 includes a number of nodes 104 arranged to form a peer-to-peer (P2P) overlay network 106 within the packet-switched network 101. Each node 104 includes a peer computing device with different nodes 104 belonging to different peers. Each node 104 includes a processing device including one or more processors, e.g., one or more central processing units (CPUs), accelerator processors, application specific processors, and / or field programmable gate arrays (FPGAs). Each node also includes a memory, i.e., a computer-readable storage device in the form of one or more non-transitory computer-readable media. The memory may include one or more memory units using one or more memory media, e.g., magnetic media such as hard disks, electronic media such as solid-state drives (SSDs), flash memory or EEPROMs, and / or optical media such as optical disk drives.

[0019] Blockchain 150 refers to a chain of blocks 151 of data, with a respective copy of the blockchain 150 maintained at each of multiple nodes in a peer-to-peer (P2P) network 160. Each block 151 in the chain includes one or more transactions 152, where transaction in this context refers to a type of data structure. The nature of the data structure depends on the type of transaction protocol used as part of the transaction model or scheme. A given blockchain typically uses one particular transaction protocol throughout. In one common type of transaction protocol, the data structure of each transaction 152 includes at least one input and at least one output. Each output specifies an amount that represents the quantity of a digital asset belonging to a user for which that output is cryptographically locked (requiring that user's 103 signature to be unlocked and thereby redeemed or used). Each input points back to the output of a preceding transaction 152, thereby linking the transactions.

[0020] At least some of the nodes 104 assume the role of forwarding nodes 104F, which forward and thereby propagate transactions 152. At least some of the nodes 104 assume the role of miners 104M, which mine blocks 151. At least some of the nodes 104 assume the role of storage nodes 104S (also called "full-copy" nodes), with each node storing a respective copy of the same blockchain 150 in its respective memory. Each miner node 104M also maintains a pool 154 of transactions 152 waiting to be mined into blocks 151. A given node 104 may be a forwarding node 104, a miner 104M, a storage node 104S, or any combination of two or all of these.

[0021] For a given current transaction 152j, the input (or each of them) includes a pointer that references the output of a previous transaction 152i in the sequence of transactions, specifying that this output is redeemed or "spent" in the current transaction 152j. In general, the previous transaction can be any transaction in the pool 154 or any block 151. The previous transaction 152i does not necessarily have to exist when the current transaction 152j is created or sent to the network 106, but the previous transaction 152i must exist and be verified for the current transaction to be valid. Thus, "preceding" in this specification refers to something that precedes in a logical sequence linked by a pointer, and not necessarily to a time of creation or transmission in the chronological order. Thus, it does not necessarily exclude transactions 152i, 152j from being created or transmitted out of order (see the discussion of orphan transactions below). A preceding transaction 152i may equally be referred to as an antecedent or predecessor transaction.

[0022] The input of the current transaction 152j also includes the signature of the user 103a to whom the output of the previous transaction 152i is locked. The output of the current transaction 152j can also be cryptographically locked to the new user 103b. Thus, the current transaction 152j can transfer an amount defined in the input of the previous transaction 152i to the new user 103b defined in the output of the current transaction 152j. In some cases, a transaction 152 may have multiple outputs and split the input amount among multiple users (one of which becomes the original user to make the change). In some cases, a transaction may have multiple inputs and aggregate amounts from multiple outputs of one or more previous transactions and redistribute them into one or more outputs of the current transaction.

[0023] This is sometimes called an "output-based" transaction protocol, and sometimes also called an "unspent transaction output (UTXO) type protocol" (where the outputs are called UTXOs). A user's total balance is not defined by one number stored in the blockchain, instead, the user needs a special "wallet" application 105 to collate the values ​​of all of the user's UTXOs, which are distributed across many different transactions 152 in the blockchain 151.

[0024] As part of the account-based transaction model, another type of transaction protocol is sometimes called an "account-based" protocol. In the account-based case, each transaction transfers by referencing an absolute account balance, rather than defining the amount to be transferred by referencing back to the UTXO of a preceding transaction in the past sequence of transactions. The current state of every account is stored and constantly updated by miners separate from the blockchain. In such a system, transactions are ordered using the successive transaction records (so-called "positions") of the accounts. This value is signed by senders as part of their cryptographic signatures and hashed as part of the transaction reference calculation. In addition, an optional data field can also sign the transaction. This data field may point back to a previous transaction, for example if a previous transaction ID is included in the data field.

[0025] In both types of transaction protocols, when a user 103 wants to execute a new transaction 152j, he sends the new transaction from his computer terminal 102 to one of the nodes 104 of the P2P network 106 (currently usually a server or a data center, but in principle it could be another user terminal). This node 104 checks whether the transaction is valid according to a node protocol applied to each node 104. The details of the node protocol correspond to the type of transaction protocol used in the blockchain 150 in question and together form an overall transaction model. The node protocol typically requires the nodes 104 to check that the cryptographic signature in the new transaction 152j matches an expected signature, which depends on the previous transaction 152i in the ordered sequence of transactions 152. In the output-based case, this may include checking that the cryptographic signature of the user included in the input of the new transaction 152j matches a condition defined in the output of the previous transaction 152j that the new transaction consumes, which typically includes at least checking that the cryptographic signature in the input of the new transaction 152j unlocks the output of the previous transaction 152i to which the input of the new transaction points. In some transaction protocols, the condition may be defined, at least in part, by custom script included in the input and / or output. Alternatively, it may be fixed solely in the node protocol, or by a combination of these. In any case, if the new transaction 152j is valid, the current node forwards the new transaction to one or more other nodes 104 in the P2P network 106. At least some of these nodes 104 also act as forwarding nodes 104F, applying the same tests according to the same node protocol and forwarding the new transaction 152j to one or more further nodes 104, etc.In this manner, the new transaction is propagated throughout the network of nodes 104.

[0026] In an output-based model, the definition of whether a given output (e.g., UTXO) is spent is whether it has already been validly redeemed by an input of another onward transaction 152j according to the node protocol. Another condition for a transaction to be valid is that the output of the preceding transaction 152i that it attempts to spend or redeem has not yet been consumed / redeemed by another valid transaction. Again, if not valid, the transaction 152j is not propagated or recorded in the blockchain. This prevents double-spending, where a payer attempts to spend the same transaction output multiple times. On the other hand, an account-based model prevents double-spending by maintaining an account balance. Again, because of the defined order of transactions, the account balance has a single defined state at a time.

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

[0028] The first miner node 104M to solve the puzzle announces this to the network 106 and provides its solution as a proof. This solution can be easily checked by other nodes 104 in the network (it is easy to verify that the hash output satisfies the condition given the solution for the hash). The pool 154 of transactions for which the winner solved the puzzle is recorded as a new block 151 in the blockchain 150 by at least some of the nodes 104 acting as storage nodes 104S, based on checking the winner's published solution at each node. The new block 151n is also assigned a block pointer 155, which points to the previously created block 151n-1 in the chain. The proof-of-work helps to reduce the risk of double spending, since it takes a lot of effort to create a new block 151, and blocks containing double spending are likely to be rejected by other nodes 104, thus providing an incentive for mining nodes 104M not to include double spending in their blocks. Once created, blocks 151 cannot be altered because they are known and maintained at each storage node 104Si in the P2P network 106 according to the same protocol, and block pointers 155 impose an order on blocks 151. This provides an immutable public ledger of transactions, as transactions 152 are recorded in ordered blocks at each storage node 104S in the P2P network 106.

[0029] Note that different miners 104M, who are constantly competing to solve the puzzle, may be solving the puzzle based on different snapshots of the unmined transaction pool 154 at any given time, depending on when they started looking for a solution. Whoever solves the puzzle first defines the transactions 152 to be included in the next new block 151n, and the current unmined transaction pool 154 is updated. Miners 104M then continue to compete to produce blocks from the newly defined unsolved pool 154. There is also a protocol to resolve possible "forks", which are cases when two miners 104M solve the puzzle within a very short time of each other and inconsistent views of the blockchain propagate. In essence, whenever a branch of a fork grows, the longest one becomes the final blockchain 150.

[0030] In most blockchains, the winning miner 104M is automatically rewarded with a special type of new transaction that creates a new amount of digital assets out of nothing (a normal transaction transfers an amount of digital assets from one user to another). Thus, the winning node is said to have "mined" an amount of digital assets. This special type of transaction is sometimes called a "generation" transaction. It automatically forms part of a new block 151n. This reward motivates miners 104M to participate in the proof-of-work competition. Often, normal (non-generation) transactions specify an additional transaction fee in one of their outputs to further reward the winning miner 104M who generated the block 151n that contains the transaction.

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

[0032] The memory of each node 104 stores software configured to run on the processing unit of the node 104 to perform one or more respective roles and process transactions 152 according to the node protocol. It will be appreciated that any operation attributable to a node 104 may be performed by software executing on the processing unit of the respective computing device. The node software may be implemented in one or more applications at the application layer, or a lower layer such as the operating system layer or protocol layer, or any combination thereof. Additionally, the term "blockchain" as used herein is a general term referring to a general type of technology and is not limited to any particular proprietary blockchain, protocol, or service.

[0033] Also connected to the network 101 are computing devices 102 of each of a number of parties 103 acting as consumer users. These act as payers and payees in transactions, but do not necessarily participate in mining or propagating transactions on behalf of other parties. They do not necessarily execute the mining protocol. Two parties 103 and their respective devices 102 are shown for illustration purposes: a first party 103a and its respective computing device 102a, and several second parties 103b and their respective computing devices 102b. It will be understood that many more such parties 103 and their respective computing devices 102 may exist and participate in the system, but for convenience they are not shown. Each party 103 may be an individual or an organization. Purely by way of example, the first party 103a will be referred to herein as Alice and the second party 103b will be referred to as Bob, although it will be understood that this is not limiting and that references herein to Alice or Bob may be interchangeable with "first party" and "second party", respectively.

[0034] The computing equipment 102 of each party 103 comprises a respective processing device comprising one or more processors, for example one or more CPUs, GPUs, other accelerator processors, application specific processors, and / or FPGAs. The computing equipment 102 of each party 103 further comprises a memory, i.e. a computer readable storage device in the form of a non-transitory computer readable medium or media. This memory may include one or more memory units using, for example, a magnetic medium such as a hard disk, an electronic medium such as a SSD, a flash memory or an EEPROM, and / or an optical medium such as an optical disk drive. The memory on the computing equipment 102 of each party 103 stores software including a respective instance of at least one client application 105 arranged to operate on the processing device. It will be understood that any operation belonging to a given node 104 may be performed by using software executed on the processing device of the respective computing equipment 102. The computing equipment 102 of each party 103 comprises at least one user terminal, for example a desktop or laptop computer, a tablet, a smartphone, or a wearable device such as a smart watch. The computing device 102 of a given party 103 may also include one or more other networked resources, such as cloud computing resources, accessed via a user terminal.

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

[0036] The client application 105 has at least a "wallet" functionality, which has two main functions. One of these is to allow each user party 103 to create, sign and send transactions 152 that are propagated throughout the network of nodes 104 and thereby included in the blockchain 150. The other is to report to each party the amount of digital assets that it currently owns. In an output-based system, this second function involves reconciling the amount defined in the outputs of the various transactions 152 scattered throughout the blockchain 150 that belong to that party.

[0037] NOTE: Although various client functions are sometimes described as being integrated into a given client application 105, this is not necessarily limiting; instead, any client functionality described herein may be implemented in two or more different suites of applications, interfacing, for example, via an API, or one plugging into the other. More generally, client functions may be implemented at the application layer, or at a lower layer such as an operating system, or any combination of these. The following is described in terms of a client application 105, but it will be understood that this is not limiting.

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

[0039] As mentioned above, the blockchain 150 includes a chain of blocks 151, each of which includes a set of one or more transactions 152 created by the proof-of-work process, as described above. Each block 151 also includes a block pointer 155 that points back to a previously created block 151 in the chain, so as to define a sequential order to the blocks 151. The blockchain 150 also includes a pool of valid transactions 154 waiting to be included in a new block by the proof-of-work process. Each transaction 152 (other than the creation transaction) includes a pointer to a previous transaction, so as to define an order to the sequence of transactions (note: the sequence of transactions 152 is allowed to diverge). The chain of blocks 151 goes back to the genesis block (Gb) 153, which was the first block in the chain. Early in the chain 150, one or more original transactions 152 pointed to the genesis block 153, but not to a preceding transaction.

[0040] When a given party 103, for example Alice, wants to send a new transaction 152j to be included in the blockchain 150, she formulates the new transaction (using the wallet functionality of her client application 105) according to the relevant transaction protocol. Then, from the client application 105, she sends the transaction 152 to one of one or more forwarding nodes 104F to which she is connected. For example, this may be the forwarding node 104F that is closest or best connected to Alice's computer 102. When any given node 104 receives the new transaction 152j, it processes it according to the node protocol and its respective role. This includes first checking whether the newly received transaction 152j meets certain conditions to be "valid", examples of which will be detailed shortly. In some transaction protocols, the conditions for validation may be configurable per transaction by a script included in the transaction 152. Alternatively, the conditions may simply be a built-in feature of the node protocol, or may be defined by a combination of the script and the node protocol.

[0041] Provided that the newly received transaction 152j passes the tests to be considered valid (i.e., is "valid"), any storage node 104S that receives the transaction 152j adds the newly validated transaction 152 to a pool 154 in the copy of the blockchain 150 maintained at that node 104S. Additionally, any forwarding node 104F that receives the transaction 152j propagates the validated transaction 152 to one or more other nodes 104 in the P2P network 106. Because each forwarding node 104F applies the same protocol, assuming the transaction 152j is valid, this means that it will soon be propagated throughout the P2P network 106.

[0042] Once it enters the pool 154 within a copy of the blockchain 150 maintained by one or more storage nodes 104, the miner node 104M starts competing to solve the proof-of-work puzzle for the latest version of the pool 154 that includes the new transaction 152 (other miners 104M are still trying to solve the puzzle based on an older view of the pool 154, but whoever gets there first defines where the next new block 151 ends and a new pool 154 starts, and ultimately someone solves the puzzle for a part of the pool 154 that includes Alice's transaction 152j). Once the proof-of-work is done for the pool 154 that includes the new transaction 152j, it becomes part of one of the blocks 151 within the blockchain 150. Since each transaction 152 includes a pointer to the previous transaction, the order of the transactions is also immutably recorded.

[0043] Different nodes 104 may first receive different instances of a given transaction and thus may have conflicting views as to which instance is "valid" before one instance is mined into the block 150, at which point all nodes 104 agree that only the mined instance is the valid instance. If a node 104 accepts one instance as valid and then discovers that a second instance is recorded in the blockchain 150, the node 104 must accept this and discard the previously accepted yet unmined instance (i.e., treat it as invalid).

[0044] <UTXO-based model> Figure 2 shows an example of a transaction protocol. This is an example of a UTXO-based protocol. A transaction 152 (abbreviated as "Tx") is the fundamental data structure of a blockchain 150 (each block 151 contains one or more transactions 152). The following is described with reference to an output-based or "UTXO"-based protocol. However, this is not limited to all possible implementations.

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

[0046] For example, Alice 103a wants to create a transaction 152j that transfers the amount of the digital asset in question to Bob 103b. In FIG. 2, Alice's new transaction 152j is labeled "Tx1". It takes the amount of the digital asset locked to Alice into the 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 FIG. 2. Tx0 and Tx1 are just arbitrary labels. They do not necessarily mean that Tx0 is the first transaction in the blockchain 151 or that Tx1 is the immediate next transaction in the pool 154. Tx1 could point to any preceding (i.e., ancestor) transaction that still has an unspent output 203 locked to Alice.

[0047] The preceding transaction Tx0 may already be validated and included in the blockchain 150 by the time Alice creates her new transaction Tx1, or at least by the time she sends it to the network 106. It may already be included in one of the blocks 151 at that point, or it may still be waiting in the pool 154, in which case it will be included in the new block 151 immediately. Alternatively, Tx0 and Tx1 may be generated and sent to the network 102, or Tx0 may be sent after Tx1 if the node protocol allows for buffering of "orphan" transactions. The terms "preceding" and "following" as used herein in the context of a sequence of transactions refer to the order of transactions in a sequence defined by transaction pointers specified in the transaction (such as which transaction points to which other transaction). They may equally be replaced by "preceding" and "inheriting" or "ancestor" and "descendant", "parent" and "child", etc. This does not necessarily mean the order in which they are created, sent to the network 106, or arrive at any given node 104. Nevertheless, a subsequent transaction (descendant transaction or "child") that points to a preceding transaction (ancestor transaction or "parent") will not be validated unless the parent transaction is validated. A child that arrives at node 104 before its parent is considered an orphan. It may be discarded or buffered for a certain amount of time to wait for its parent, depending on the node protocol and / or miner behavior.

[0048] One of the one or more outputs 203 of the preceding transaction Tx0 includes a particular UTXO, labeled herein as UTXO0. Each UTXO includes a value that specifies the amount of the digital asset represented by the UTXO, and a locking script that defines the conditions that must be met by an unlocking script in the input 202 of the following transaction for the following transaction to be validated, and thus for the UTXO to be successfully redeemed. Typically, the locking script locks the amount to a particular party (the beneficiary of the transaction in which it is included). That is, the locking script typically defines the unlocking conditions as follows: the unlocking script in the input of the following transaction includes a cryptographic signature of the party to whom the preceding transaction was locked.

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

[0050] In the example shown, UTXO0 of output 203 of Tx0 is A ], which means that Alice's signature SigP must be present in order for UTXO0 to be redeemed (or, more precisely, for a subsequent transaction that attempts to redeem UTXO0 to be valid). A[ChecksigPA] contains the public key PA from Alice's public / private key pair. Input 202 of Tx1 contains a pointer to Tx1 (e.g., by its transaction ID, TxID0, which in an embodiment is a hash of the entire transaction Tx0). Input 202 of Tx1 contains an index that identifies UTXO0 in Tx0, in order to identify it among any other possible outputs of Tx0. Input 202 of Tx1 further contains an unlock script that contains Alice's cryptographic signature, created by Alice applying her private key from her key pair to a given portion of data (sometimes called a "message" in cryptography). <sigpa>The data (or "message") that Alice needs to sign in order to provide a valid signature may be defined by the lock script, or by the node protocol, or by a combination of these.

[0051] When a new transaction Tx1 arrives at node 104, the node applies the node protocol, which involves running the lock script and the unlock script together to check if the unlock script satisfies the conditions defined in the lock script (which may include one or more criteria). In an embodiment, this involves concatenation of the two scripts.

number

[0052] The details of authentication using public-private cryptography will be well known to those skilled in the art. Essentially, if Alice signs a message by encrypting it with her private key, then with Alice's public key and the message in the clear (unencrypted message), another entity, such as node 104, can authenticate that the encrypted version of the message must have been signed by Alice. Signatures typically allow the holder of the public key to authenticate the signature by hashing the message, signing the hash, and tagging this as the signature on a clear version of the message. Thus, in embodiments, references to signing a particular piece of data or portion of a transaction, etc., may mean signing a hash of the piece of data or portion of the transaction.

[0053] If the unlock script in Tx1 satisfies one or more conditions specified in the lock script of Tx0 (in the example shown, Alice's signature is provided and authenticated in Tx1), the node 104 considers Tx1 valid. If it is a mining node 104M, this means adding it to the pool 154 of transactions waiting for proof-of-work. If it is a forwarding node 104F, it forwards the transaction Tx1 to one or more other nodes 104 in the network 106, which will cause it to be propagated throughout the network. Once Tx1 is validated and included in the blockchain 150, this defines it as having spent UTXO0 from Tx0. Note that Tx1 is only valid if it uses unspent transaction outputs 203. If it tries to spend an output that has already been spent by another transaction 152, Tx1 becomes invalid even if all other conditions are met. Therefore, node 104 also needs to check whether the UTXO referenced in the preceding transaction Tx0 has already been spent (already formed a valid input to another valid transaction). This is one of the reasons why it is important for blockchain 150 to impose a defined order on transactions 152. In practice, a given node 104 may maintain a separate database that marks UTXOs 203 that transactions 152 have spent, but ultimately, what defines whether a UTXO is spent is whether it already forms a valid input to another valid transaction in blockchain 150.

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

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

[0056] In practice, Alice should usually also include a fee for the winning miner, because today, the reward of the generating transaction alone is usually not enough to motivate mining. If Alice does not include a fee for the miner, Tx0 will likely be rejected by the miner's node 104M, and thus, although technically valid, it will still not be propagated and included in the blockchain 150 (the miner's protocol does not force the miner 104M to accept the transaction 152 if the miner does not want to). In some protocols, the mining fee does not require its own separate output 203 (i.e., it does not require a separate UTXO). Instead, the difference between the total amount pointed to by the input 202 and the total amount specified in the output 203 of a given transaction 152 is automatically given to the winning miner 104. For example, suppose that a pointer to UTXO0 is the only input to Tx1, and Tx1 has only one output UTXO1. If the amount of the digital asset specified in UTXO0 is greater than the amount specified in UTXO1, the difference automatically goes to the winning miner 104M. However, nothing in this document precludes that a miner's fee may alternatively or additionally be explicitly specified in a unique one of the UTXOs 203 of transaction 152.

[0057] Alice and Bob's digital assets consist of the unspent UTXOs locked to them in any transaction 152 in the blockchain 150. Thus, typically, the assets of a given party 103 are distributed across the UTXOs of various transactions 152 throughout the blockchain 150. No single number is stored anywhere in the blockchain 150 that defines the total balance of a given party 103. It is the role of the wallet function in the client application 105 to aggregate the value of all the various UTXOs locked to each party that have not yet been spent in another onward transaction. This can be done by querying the copy of the blockchain 150 stored in any of the storage nodes 104S, for example, the storage node 104S that is closest or best connected to each party's computer device 02.

[0058] Note that script code is often expressed diagrammatically (i.e., not in a precise language). For example, A ] to [ChecksigP A ]=OP_DUPOP_HASH160 <H(P A )>OP_EQUALVERIFYOP_CHECKSIG. "OP_..." represents a specific opcode in a scripting language. OP_CHECKSIG (also called "Checksig") is a scripting opcode that takes two inputs (a signature and a public key) and verifies the validity of the signature using the Elliptic Curve Digital Signature Algorithm (ECDSA). At runtime, the occurrence of the signature ("sig") is removed from the script, but additional requirements such as a hash puzzle remain for transactions to be verified by the "sig" input. As another example, OP_RETURN is a scripting language opcode for generating an unspent output of a transaction that can store metadata within the transaction, thereby immutably recording the metadata to the blockchain 150. For example, the metadata can include a document that is desirable to store on the blockchain.

[0059] A signature PA is a digital signature. In an embodiment, it is based on ECDSA using the elliptic curve secp256k1. A digital signature signs specific data. In an embodiment, for a given transaction, the signature signs some of the transaction inputs and all or some of the transaction outputs. The specific parts of the outputs to sign depend on the SIGHASH flag, which is a 4-byte code included at the end of the signature that selects which outputs are signed (and is therefore fixed at the time of signing).

[0060] A lock script is sometimes referred to as a "scriptPubKey" to indicate that the respective transaction includes the public key of the party being locked. An unlock script is sometimes referred to as a "scriptSig" to indicate that it provides a corresponding signature. However, more generally, it is not required in all applications of blockchain 150 that the conditions under which a UTXO is redeemed include authenticating a signature. More generally, a scripting language may be used to define one or more conditions. Thus, the more general terms "lock script" and "unlock script" are preferred.

[0061] <Client software> 4 illustrates an exemplary implementation of a client application 105 for implementing embodiments of the disclosed technology. The client application 105 includes a transaction engine 404 and a user interface (UI) layer 401. The transaction engine 404 is configured to implement the underlying transaction-related functionality of the client 105, such as forming transactions 152 according to the above-described scheme, receiving and / or sending transactions and / or other data via side channels 301, and / or sending transactions to be propagated through the P2P network 106. Furthermore, according to embodiments disclosed herein, the transaction engine 401 of at least Bob's client 105b (and possibly other clients) further includes a data transfer engine 403, a program launcher 405, and optionally a hyperdocument engine 402. The hyperdocument engine 402, data transfer engine 403, and transaction engine 404 together may form a "smart wallet" functionality 406 (of which the hyperdocument engine 402 is an optional part). The functionality of these various modules will be discussed in more detail shortly. The smart wallet function 460 may also be referred to herein simply as the "smart wallet" for short.

[0062] The UI layer 401 is configured to render a user interface via user input / output (I / O) means of each user computing device 102, including outputting information to each user 103 by user output means of the device 102 and receiving input from each user 103 by user input means of the device 102. For example, the user output means may include one or more display screens (touch or non-touch screen) to provide visual output, one or more speakers to provide audio output, and / or one or more haptic output devices to provide haptic output, etc. The user input means may include, for example, an input sensor matrix of one or more touch screens (which may be the same as or different from the display 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 to receive speech or audio input, one or more gesture-based input devices to receive input in the form of manual or physical gestures, or one or more mechanical buttons, switches, or joysticks, etc.

[0063] The transaction engine 403 of the smart wallet 406 operates to access code stored in the payload (e.g., unspendable output in an output-based transaction model) of a transaction 152 on the blockchain 150 and passes the code therefrom to the program launcher 405. The code launcher 405 executes the code and presents any user-visible effects of the program to the user 103b through the UI layer 401. In particular, according to embodiments disclosed herein, the code launcher 405 is configured to reconstruct a program file from multiple transactions 152 on the blockchain 150 and execute the reconstructed program file, which will be discussed in more detail shortly.

[0064] Note: Although various functions may be described herein as being integrated into the same client application 105, this is not necessarily limiting and instead they may be implemented in two or more different suites of applications, e.g. one plugging into the other or interfacing via an API (application programming interface). For example, the functionality of any of the modules 401, 402, 403, 404, 405 may be implemented in two or more separate applications in any combination. Also, it does not exclude that some or all of the described functionality is implemented, for example, in the operating system layer. Whenever reference is made elsewhere in this specification to a single or given application 105, etc., it is understood that this is merely an example and, more generally, that the described functionality may be implemented in any form of software.

[0065] <Blockchain-based program file format> To support the integration of blockchain technology as a basic technology infrastructure, it is desirable to have a straightforward process for building and accessing higher level applications. To do this, it is desirable to provide a standard data format for developers to build software to execute code stored in blockchain transactions as well as include in transactions. This may include dedicated smart wallets that can immediately interact with the blockchain for data requests and to implement software connections on local computers, central processing units (CPUs), and computer storage devices. While blockchain data can be integrated into traditional programming languages, a broader range of applications can be developed on the blockchain to power more secure and tamper-resistant desktop and mobile applications.

[0066] The system disclosed herein provides direct interaction between software and the blockchain by providing a transaction-aware file format to include programming languages ​​other than the scripting language used for lock and unlock scripts, etc. Current programming languages ​​such as C, C++, and Java have objects called pointers that act as references to specific memory addresses. The present disclosure provides similar objects, which may be called blockchain pointers, that can be integrated into programming languages ​​that act as references to specific transaction data or metadata.

[0067] Some embodiments may also utilize a system for requesting and responding to data requests through linked hyperdocuments referenced by their TxIDs.

[0068] FIG. 5 illustrates a blockchain-based program file format for storing a program file across multiple transactions 152 on the blockchain 150, according to an embodiment disclosed herein. The left side a) of FIG. 5 illustrates a program file in fragment form stored across multiple transactions 152 on the blockchain 150. The program file in fragment form includes a header file 501 stored in a first transaction 152Y on the blockchain 150, and one or more body sections 502i...502n. Each of the body sections is stored in a respective second transaction 152Z on the blockchain (see also FIG. 6, described in more detail below). In an output-based model, the header file 501 and each of the body sections 502 may be stored in an un-spendable output (e.g., UTXO) of the respective first or second transaction 152Y, 152Z.

[0069] An example of this is shown diagrammatically in Figure 3. In the following example scenario, Alice 103a is a provider party that creates first and second transactions 152Y, 152Z and broadcasts them (directly or via a third party) to the blockchain network 106 for recording on the blockchain 150. Bob 103b is a consumer party that reads the header file 501 and the section 502 from each of the first and second transactions 152Y, 152Z to reconstruct a program file 507.

[0070] As shown in FIG. 3, in the output-based model, the first transaction 152Y includes at least one input 202Y that points back to an output of some other prior transaction 152 on the blockchain 150. The output of the prior transaction may be an output locked to Alice, i.e., Alice has therefore paid an amount of digital assets from herself to have the first transaction 152Y recorded on the blockchain 150. The first transaction 152Y may be required to include at least one spendable output 203Y0, which may include a lock script that locks the output 203Y0 to a recipient. The lock script may be written in a relevant scripting language recognized by the transaction protocol utilized by the blockchain network 106, e.g., the Script language. The amount specified in the spendable output 203Y0 may be a dust (i.e., negligible) amount, and / or the recipient may be Alice herself. That is, Alice therefore pays herself (and the mining fee) to have the first transaction 152Y recorded on the blockchain 150. As an alternative, it is not excluded that a transaction model or protocol may be used that does not require all transactions to include a usable output. Either way, the first transaction 152Y also includes the unspent output 203Y1. In an embodiment, this is implemented by including a specific opcode of a scripting language in the lock script of the unspent output 203Y1. This is an opcode that, when executed on one of the nodes of the blockchain network 106, terminates the execution of the lock script in which it is contained. This allows any other payload not created in the scripting language to be included in the unspent output without otherwise affecting the function of the transaction 152Y as a transaction on the blockchain network 106.

[0071] According to embodiments disclosed herein, this mechanism is used to include the header file 501 in the unspent output 203Y1 of the first transaction 152Y, and thus store the header file 501 in the first transaction 152Y on the blockchain 150. The header file 501 is created in a format or language other than the scripting language (e.g., Script) used in the lock script according to the transaction protocol utilized by the blockchain network 106.

[0072] A similar mechanism may be used to include each of the body sections 502 in the unspent output 203Z1 of each second transaction 152Z on the blockchain 150. Each body section 502 includes program code written in a language other than the scripting language (e.g., Script) used in the lock script.

[0073] In alternative implementations, it is not precluded that the header file 501 and the body section 502 may be included as a transaction payload according to different mechanisms in other transaction protocols or models. For example, in alternative implementations, the blockchain network 106 may utilize an account-based model, and the header file 501 and the body section 502 may each be included in a data field or smart contract of a respective transaction 152Y, 152Z. In this case, the header file 501 and the body section 502 may each be written in a language other than that recognized by the node 104 to execute the smart contract.

[0074] Returning to Figure 5, header file 501 includes at least some program header information 503 and a list of one or more transaction IDs 504. Program header information 503 includes basic header information for a program file that, when reconstructed, will form at least part of the header of program file 507. This may include, for example, any one or more or all of the following: program version number, target computer system version number, size of the program or reconstructed program file, descriptors, reserved variables, date / timestamp, and / or checksums to check that the reconstructed program is error-free.

[0075] The transaction IDs included in the list 504 serve as pointers to the respective body sections 502 of the program file stored in respective other second transactions 152Z on the blockchain 150. As shown in the right-hand side b) of FIG. 5, the consumer party Bob 103b reconstructs an instance of the program file 507 in an unfragmented form formed by combining the header information header 503 with each of the one or more body sections 502i...502n pointed to by the respective transaction IDs 504 included in the header file 501.

[0076] In an embodiment, header file 501 may also include an indication of one or more conditions 505, and a code stub 506 for evaluating the one or more conditions. The functionality of these portions is discussed in more detail below.

[0077] 6 illustrates an exemplary computer architecture for a computing device 102b of a consumer party 103b, also referred to herein as a client device. This architecture may be implemented locally on a single user device or may be distributed across multiple devices, which may include user devices, server resources, or a combination thereof.

[0078] The client device 102b includes hardware 608, input / output (I / O) devices 607, and software. The hardware 608 includes at least one processor 609, such as a CPU. The hardware 608 also includes random access memory (RAM) and hard storage 611 (i.e., non-volatile memory such as a hard disk or solid state drive (SSD)). The central processing unit (CPU) 609 includes electronic circuitry that executes machine-level instructions by performing arithmetic logic and input / output operations. The RAM 610 provides temporary storage of data and machine-level instructions that serves as an intermediary between the software and the hard disk 611 with the CPU 609.

[0079] The user 103b can interact with the input / output devices 607 and the commands are converted into instructions / data that are relayed to the software in the operating system 602. The various options for the I / O devices 607 have already been described above with reference to FIG.

[0080] The software includes an operating system 602, a program launcher 405 and a smart wallet function 406 that execute the operating system 602. The operating system 602 includes system software that manages computer hardware and software resources.

[0081] The following definitions may be adopted herein.

[0082] Virtual Machine: An emulation of a computer system.

[0083] System Virtual Machine: A virtual machine that provides the functionality to run an entire operating system. The hypervisor uses native execution (machine code, executed directly by the computer's CPU) to share and manage the hardware, allowing multiple isolated environments to exist on a single physical machine.

[0084] Hypervisor: Computer software, firmware, or hardware that creates and runs virtual machines.

[0085] Dynamin Linker: The part of an operating system that, when executed ("at run-time"), loads and links shared libraries required by an executable file by copying the contents of the libraries from permanent storage to RAM, filling jump tables and relocating pointers. The particular operating system and executable format determine how the Dynamin Linker functions and how it is implemented.

[0086] Library: A collection of resources (configuration data, documentation, pre-written code, and subroutine, class, value, or type specifications) used by a computer program.

[0087] Shared Library: A file that is shared by executable files and also shared object files. The modules used are loaded into memory from individual shared objects at run time, rather than being copied by the linker when generating a single monolithic executable file for the program.

[0088] Assembler: a computer program that generates object code by translating combinations of storage and syntax for operations and addressing modes into their numerical equivalents (machine code).

[0089] Compiler: a computer program that translates computer code written in one programming language into another (typically from a high-level language to a low-level language) to produce an executable program.

[0090] Executable File or Executable Program: A file that causes a computer to perform indicated tasks according to coded instructions. Note that, most generally, the terms "execute" or "executable" as used herein can refer to software that executes in any manner, and is not necessarily limited to the execution of, for example, low-level machine code instructions. For example, "execute" as used herein can also refer to compiling, thus executing a high-level language, assembling, thus executing an assembly-level language, or interpreting an interpreted language.

[0091] FIG. 6 also shows transactions 152 of the blockchain 150 stored in the blockchain network 106, including a first transaction 152Y and a second transaction 152Z.

[0092] In operation, consumer party Bob 103b uses at least one of the I / O devices 607 to select and access the header file 501 from the first transaction 152Y stored in the blockchain 150 ("first" and "second" as used herein in this context are merely arbitrary labels). In some embodiments, this may be accomplished by selecting a hyperlink in a hypertext document 601. For example, this may be created in HTML, but augmented with an additional type of tag that allows a link to a transaction ID of a transaction 152 on the blockchain 150 instead of to a URL as in a traditional hyperlink. In such an embodiment, the hypertext engine 402 of the smart wallet 406 renders the hypertext document 601 to Bob through the UI layer 401 and detects the selection of the hyperlink. In response, it triggers the data transfer engine 403 of the wallet 406 to retrieve the header file 501 from the linked transaction (first transaction 152Y) on the blockchain 150 via the blockchain network 106 (by querying the storage node 104S).

[0093] The hypertext document 601 may be accessed from a local store on Bob's computing device 102b or via the web. Alternatively, the hypertext document 601 itself may be stored as payload data in a source transaction 152X on the blockchain 150, such as in an unusable output in an output-based model. In this case, in a preliminary step, the data transfer engine 403 accesses the hypertext document 601 from the source transaction 152X on the blockchain via the blockchain network 106 and passes it to the hypertext engine 402 for rendering to the user 103b.

[0094] In alternative embodiments, it is not necessary to use the hypertext document 601 to link to the header file 501. Instead, the data transfer engine 402 may retrieve the header file 501 by directly querying the blockchain 150 in a known manner. For example, the spendable output 203Y0 (perhaps for a dust amount) of the first transaction 152Y may be addressed to Bob 103b, thus allowing him to find it on the blockchain 150 using conventional wallet functionality. And / or Alice 103a or a third party may signal the address of the first transaction 152Y to Bob via an off-chain side channel (not shown). In such embodiments, the hypertext engine 402 is not required as part of the wallet functionality 406.

[0095] Regardless of the means by which it is accessed, the header file 501 is read by the data transfer engine 403 of the wallet 406 and passed to the program launcher 405. The program launcher 405 is configured to read one or more transaction IDs 504 from the read header file 501 and use these as pointers to cause the data transfer engine 403 of the wallet 406 to read each body section 502 from each second transaction 502 on the blockchain (again, by querying one or more storage nodes 104S). The program launcher 405 then combines the program header information 503 with the one or more read body sections 502 to reconstruct a program file 507. The program launcher 405 may execute the reconstructed program file. Alternatively or additionally, it may store the reconstructed program file 507 in memory or return it to another transaction 152 on the chain 150 and / or it may communicate the reconstructed file 507 to a third party for execution or storage.

[0096] At least a portion of at least one of the body sections 502 contains program code for a desired application. In an embodiment, one or more of the body sections 502 may also contain data to be operated on by the program code (i.e., target data or operand data), and / or one or more libraries for use in compiling and / or linking the program code.

[0097] The program code in the body section 502 of the program file 507 may be written in any suitable language, such as C, C++, Java Script, Python, Basic, etc. It is written in a language other than the scripting language (e.g., Script) used for the lock script. Thus, this code may be referred to as non-script code in embodiments. The program may have any application functionality desired by the developer, such as a game, an office tool, a communication client, or a diagnostic tool, etc. The consumer party 103b may be an end user or an operator of the node 104, such as a miner. The consumer device (client device) 102b may include user equipment, server resources, or a combination thereof. In some cases, the consumer device 102b may additionally act as a node 104 of the blockchain network 106, rather than a pure consumer.

[0098] In an embodiment, the program launcher 405 may take the form of a virtual machine. It may include a compiler 603, an assembler 604, and / or a linker 605. It may include one or more pre-stored libraries 606. The execution of the program file 507 may include compiling high-level code, assembling assembly level code, and / or linking. In the case of linking, this may include linking between sections 502 from different transactions, linking parts within a given section 502, and / or linking with one of the pre-stored libraries 606. In a further alternative embodiment, the execution of the program file 507 may include interpretation of high-level code in an interpreted language. In yet another alternative, the program may already include low-level machine code, in which case the execution includes execution of the machine code.

[0099] Note: The header file 501 itself may contain a body section (not shown) containing portions of the program code, which, together with one or more body sections 502 pointed to by the transaction ID 504, may also be included as one of the sections in the final reconstructed program file 507.

[0100] In an embodiment, the header file 501 may optionally include a portion 505 that specifies one or more conditions for executing one or more or all of the body sections 502. These control under what circumstances the body sections 502 can be executed. For example, these may include one or more access controls that determine who can access one or more or all of the body sections to reconstruct or execute a file. More generally, the conditions 505 may include any condition associated with one or more or all of the body sections 502, such as a compatibility condition, such as what operating system the client device 102b is using (e.g., to check that Bob is not trying to run a Windows program on a Mac), or a conduction that the client device 102b has enough memory. Desirably, the header file 501 also includes a code stub 506 for evaluating the conditions 505. This is not one of the body sections 502, and need not be included in the final reconstructed program file 507. Instead, the code stub 506 is automatically executed by the code launcher when the header file 501 is read from the blockchain 150. However, like the body section, the code stub 506 may be written in a language other than the scripting language used for the lock script (e.g., a non-scripting language).

[0101] When executed, the code stub 506 performs the relevant functionality for evaluating the condition 505. Alternatively, it is not excluded that the evaluation could be performed by code pre-stored on Bob's device 102b or by Alice or a third party. Although shown diagrammatically as a separate element in FIG. 5, it is also noted that in some embodiments utilizing the code stub 506, the condition 505 could be integrated into the stub 506 as an integrated part of the code of the stub 506. Alternatively, however, the condition 505 could actually be specified in a separate portion of the header file 501 and referenced by the code stub 506.

[0102] Conditions 505 may, for example, include one or more access conditions whereby access to one or more of body sections 502 is conditional on the identity of the consumer party attempting to reconstruct program file 107. In this case, the evaluation involves checking that the identity of consumer party 103b is the same as the identity specified in access conditions 505. It may also involve authenticating the identity of consumer party 103b. Suitable authentication and identity checking techniques will be themselves familiar to those skilled in the art.

[0103] As another alternative or additional example, the conditions 505 may include one or more compatibility conditions, which are conditions regarding the compatibility (i.e. compatibility with one or more of the body sections 502) of the client computing equipment 102b of the consumer party 103b that is seeking to reconstruct the program file 107. In this case, the evaluation involves checking that the computing equipment 102b complies with one or more technical specifications specified in the compatibility conditions 505. Suitable compatibility checking techniques are themselves familiar to those skilled in the art.

[0104] If the conditions 505 specified in the header file 501 are not met, the code launcher 405 i) does not access one or more or all of the body sections 502 from the blockchain 150 at all, or ii) does not include them at least in the final reconstructed program file 507. This may mean that the program file 507 is not reconstructed, or that a version of the program file 507 is generated that has only reduced functionality (lacking any body sections 502 for which the consumer party 103 and / or his computing equipment 102b does not meet the relevant conditions 505).

[0105] In an embodiment, a list 504 in a header file 501 points to multiple transaction IDs that store multiple body sections of a program file 507. In some such embodiments, there may be different respective conditions 505 associated with different ones of the body parts. This can be used to create different tiers of access. An example application of this could be a program that reads from and writes to a text file. The "READ" and "WRITE" functions are two separate pieces of code, each with its own access control.

[0106] In some embodiments, header file 501 may be stored on chain 150 in an encrypted form, encrypted based on a shared secret shared between Alice and Bob. This allows only Bob (and any other person who knows the shared secret), and not the public, to access header file 501 and thus reconstruct program file 507. The shared secret may be obtained by a key negotiation process between Alice and Bob via an off-chain side channel (not shown) or an on-chain process. Alternatively, in other embodiments, header file 501 need not be encrypted and may instead be made freely available to the public via blockchain 150.

[0107] Data stored in a transaction can persist in the UTXO set. In an embodiment, an output containing the data can be used to update the information. Previous data is recorded in the blockchain, but only the latest information exists in the UTXO set. Thus, a blockchain pointer can always refer to the data stored in the UTXO set as the latest data.

[0108] A record of the latest UTXO is stored in a UTXO set at each storage and / or mining node 104S, 104M. This is a reflection of the latest state of the blockchain 150 and is typically kept by all miners and some nodes that store a full copy of the blockchain 150. Once recorded in the blockchain, an existing transaction cannot be modified. Instead, therefore, in an embodiment, an update can be performed by post-adding a new transaction to the chain, where the new transaction uses the spendable output of the existing transaction that stores the data being updated. Thus, the existing transaction (the one being updated) may include at least the spendable output (and potentially the unspendable output under OP_RETURN, etc., if data is included). Once validated, the spendable output is included in the UTXO set maintained at some or all of the storage and / or mining nodes 104S, 104M. To update, one may use the spendable UTXO of the existing transaction and include the updated data in the new transaction (e.g., in the new unspendable output of the new transaction, again using the OP_RETURN opcode, etc.). Once verified, this new transaction is now included in the UTXO set, so that the most up-to-date information is always available in the UTXO set maintained by each storage and / or mining node 104S / M.

[0109] Some example implementation details of the above concepts are discussed in detail below.

[0110] An executable file consists of assembly level code together with any data, libraries or scripts required by the code at run time. Typically it is structured in a standardized format depending on the operating system, e.g. portable executable (PE) format in Windows, executable and linkable format (ELF) in Linux. The structure varies depending on the format, but it typically consists of the following components: A program header that specifies information such as machine and version information, file size, and pointers to the file data; A section header table that references the data contained in the file; A data section containing the code and other requirements for execution.

[0111] A reference to the memory address where the required data is stored is specified in a file. This file and each of its dependencies are stored on disk and reconstructed in memory at run time based on the instructions specified in the file.

[0112] A similar executable file format is disclosed here where instead of storing files and dependencies on a local disk, they are stored in a decentralized manner on the blockchain, which may be referred to herein as the blockchain executable format (BEF).

[0113] The assembly level code, necessary libraries and possibly even critical data are stored, compressed and referenced on the blockchain 150. Each component is stored in a separate transaction 152 and the header file 501 only needs to hold the TxID 504 along with any header information 503, conditions 505 and / or stubs 506. The configuration, linking and execution process can all be performed by a unified smart wallet / virtual machine as shown in the diagram below.

[0114] The header file 501 has a header 503 that contains some or all of the information listed above (version, checksum, etc.). When fragmenting a BEF file 507, the executable file stub 506 and the header 503 are stored in a single transaction 152Y together with the TxID 504 needed for reassembly and any access checks 505. This transaction 152Y is also called the compressed version of the file 507. The stub 506 is the executable code that checks the access conditions for the entire file 507.

[0115] BEF execution may occur as follows: The method is also illustrated in Figures 7A-7B below.

[0116] 7A, an initial file request is initiated from an HTML document, user input, or locally executed code embedded in a previous blockchain and sent to the blockchain network 106. In response, a header file 501 is returned and interpreted by the smart wallet 406.

[0117] In step S0, the TxID of the transaction containing the header file 501 is selected by user 103b. This can be done by an existing hyperlink in a hypertext document, a locally stored address, or a blockchain pointer in locally running code.

[0118] In step S1, the smart wallet 406 requests a BEF file with a TxID request that references transaction 152Y, which includes a header file 501.

[0119] In step S2, the network 106 responds with transaction information, which is interpreted by the smart wallet 406.

[0120] The steps of FIG. 7B show how the smart wallet checks the compatibility and validation conditions 505 placed in the header file 501. For example, this may be done by executing the stub 506. If all requirements are met, the wallet 406 requests the parts of the body 502 addressed in the TxID list 503 of the header file 501 and an executable file 507 is assembled locally. The executable file, together with any required local libraries, is passed to the linker 605. The linker 605 then generates a file in memory 610 or 611 that runs on the CPU 609. The results can be presented to the user through the UI device 607, written to the blockchain 150, or used in additional scripts.

[0121] In step S3, upon noting the file format structure flag in the read transaction, wallet 406 interprets the BEF file 507 and requests any further transactions referenced in the BEF document (checking any access / key conditions, if applicable).

[0122] In step S4, the assembled file 507, and any local libraries, are passed to a linker 605 in the virtual machine.

[0123] At run-time, the machine code and any data is pulled from disk 611, assembled in memory 610 and executed on CPU 609, in step S5.

[0124] In step S6, the output is interpreted according to the program code, which may include (not shown) (i) display output to the user 103b, (ii) pushing onto a stack for in-script computation, (iii) providing as input to other code running in the virtual machine 405, and / or (iv) writing to the blockchain 150 as new data or an update to existing data via another transaction generated by the smart wallet 406.

[0125] The structure of the BEF file is shown in Fig. 5. The format of the BEF file expected to be interpreted by the smart wallet 406 is presented. The assembled structure 507 resembles a conventional Windows PE file, but for compression, the file is broken down into several different transactions, allowing to manage the data independently and to restrict access if desired. The header file 501 contains all the necessary TxID pointers 504 for reconstruction. The left side of Fig. 5 a) shows a fragmented executable file distributed over several transactions 152Y, 152Z. The header file 501 contains the STUB program 506, the header details 503, and references 504 to transactions that hold the SECTIONS table and data required for execution. The structure on the right side shows the locally assembled structure.

[0126] Stubs 506 can be used to control where or under what conditions file 507 can run. The remainder of the header file 501 may also contain code that determines the flow and format of the resulting program. This can be a simple loader or can use multiple UTXOs and transactions. The interpreted code can be segmented into different forms of software depending on the user interaction or for certain automata use cases. Header file 501 can have the following format: This shows parts 503, 504, and 505. Stubs 506 can be added to this format. [Table 1] The UTXO relocation table is a list of pointers 504 to one or more sections in one or more other transactions 152Z. In this implementation, it actually identifies not only the TxID, but also the particular UTXO within the referenced TxID. So, for example, it z may refer to the unusable UTXO1.

[0127] The end of the header contains ordering information for the different sections 502. When multiple sections 502 are assembled, the order should be maintained for execution, similar to standard assembly / execution. This may be accomplished by including the assembly sequence in the header file 501 (e.g., in the header information 501).

[0128] Alternatively, the header file 501 may only contain a pointer to a single other TxID. In this case, if there are multiple sections 501 to be assembled, each but the last section 502 will itself contain a small header portion that contains at least a pointer to the next TxID in the ordered chain. The program launcher 405 then follows each pointer in the chain to gather together all of the sections 502 to reconstruct the entire file 507. In an embodiment, the header portion of each section 502 may contain some or all of the same format as the header file 501, such as the format shown in the table above. A combination of approaches may be used. For example, the header file 501 may contain a list 504 to several sections 502 of the entire file 507, at least one of which itself contains a header portion that points to one or more other sections. Again, the program launcher 405 follows each pointer to gather the sections 502 needed to reconstruct the entire file 507.

[0129] For example, the ordering information at the end of the header format described above may contain a reference to the next portion of the file that may be stored in a separate transaction and read by wallet 406 if certain validation conditions are met. This may cause an error if used incorrectly, and may flag the need for a signature, or that the following UTXO is not of the correct type, or requires permissions such as a key, or meets a payment condition.

[0130] This may be implemented in the form of a key verification or selective decryption function, such as XOR-based decryption. Having reconstructed the code from one or more data in one or various UTXOs on the blockchain, the method jumps to the original execution point (OEP) after the code is assembled. This executable is then passed to a linker 605 and executed on the local computer. The data is loaded as an initial disk image file (e.g., ISO) and reconstructed in a virtual machine or possibly a browser.

[0131] The header file 501 is independently reconstructed in a single initiating transaction that is publicly or selected key readable (e.g., XOR encrypted software link, or encoded as may be disclosed in PCT / IB2017 / 050856). This information, received and interpreted by the smart wallet 406, allows the virtual machine 405 to determine the software version and ensure compatibility. An example of how to do this is described in the next paragraph.

[0132] Execute the stub program: As mentioned above, the smart wallet 406 embedded in the device, virtual machine, or browser takes the information and determines that it is an executable image file via the reference flag in the transaction. The first part of the BEF file to be executed is the STUB, similar to that of the PE format. In the PE format, the DOS STUB verifies that the file is not being run in DOS, and if so, outputs "This program cannot be run in DOS mode" and stops execution. In the context of the BEF file, the STUB can be used to specify the execution environment (Windows, Linux, or a specified virtual machine) and can also be used to initiate access authentication. The client credentials can be interpreted, and if enough information is presented for access to the secure area of ​​the virtual machine, etc., the STUB program can be used to prompt the user for identity verification, such as username and password. A protocol can also be specified to prove the access credentials in case of failure, such as: (I) output a message to the user and terminate execution; (II) limit functionality by assembling only specified portions of the executable data; (III) limit access to input data; and / or (IV) blacklist the IP addresses attempting to access the executable file.

[0133] <Conclusion> It will be understood that the above-described embodiments have been described by way of example only.

[0134] More generally, according to one aspect disclosed herein, there is provided a method of executing a program, the method including: reading, by a consumer party's computing device, a header file from a first transaction recorded on a blockchain maintained across multiple nodes of a blockchain network, the header file including program header information and reference information including one or more respective transaction IDs of one or more respective second transactions stored on the blockchain, each of the second transactions including a respective section of a body of a program file, at least one of the sections including executable program code. The method further includes reading, from the blockchain, a respective section of the program file from at least one of the one or more second transactions based on the reference information, and executing a program including the program header information and the at least one read section.

[0135] In an embodiment, the execution of the program comprises: This may include reconstructing a program file containing the program from the header information and the at least one read section, storing the reconstructed program file in a memory of the computing equipment of the consumer party, and executing the reconstructed program file on the computing equipment of the consumer party.

[0136] Alternatively, the consumer party may execute each section separately and then pass on to the next section without assembling everything into a single executable file.

[0137] In an embodiment, the code may include assembly level code and the executing may include assembling the assembly level code and executing the assembled code. Alternatively, in an embodiment, the code may include a high-level language and the executing may include compiling the high-level code of the program file and executing the compiled program, for example using just-in-time (JIT) compilation. As another alternative, the program file may include raw machine code and the executing may include executing the machine code. In yet another alternative, the code may include a high-level language and the executing may include interpreting high-level code.

[0138] In embodiments, the executing may further include linking, for example linking between different sections from different transactions or between different sub-sections within a given section from a given transaction.

[0139] In embodiments, the reference information may include a plurality of transaction IDs of a plurality of second transactions, each second transaction storing a respective body section of the program file.

[0140] The different sections may contain program code, one or more libraries, and / or data to be operated on by the program.

[0141] In embodiments, the reading may include reading respective sections from two or more of the plurality of second transactions from the blockchain; The program that is executed may include the program header information and the read sections from the two or more second transactions.

[0142] Alternatively, the reference information in the header file may only include a single transaction ID that references only a single body section within a single second transaction.

[0143] In an embodiment, at least one of the body sections in at least one of the second transactions may include a header portion including at least a reference to a third transaction which itself includes a further body section, in which case the program to be executed may include the program header and the body sections from the second and third transactions.

[0144] In embodiments, the header file may further include one or more conditions: The method may include evaluating the condition, the reading or execution of at least one of the sections of the program being conditional on a result of the evaluation.

[0145] In an embodiment, the evaluation may be performed by the computing device of the consumer party.

[0146] In embodiments, the header file may include an executable code stub for evaluating the one or more conditions, in which case the method may include executing the code stub on the computing device of the consumer party to perform the evaluation.

[0147] In embodiments, the conditions may include at least one access condition that is a condition on the identity of the consumer party, in which case the evaluation includes verifying that the identity of the consumer party matches an identity specified by the at least one access condition, and the reading or execution of at least one of the sections of the program is conditioned on a positive outcome of the verification.

[0148] In an embodiment, said conditions may include at least one compatibility condition which is a condition relating to the compatibility of a computing equipment of said consumer party, in which case said evaluation comprises checking that said computing equipment of said consumer party meets one or more technical criteria specified by said compatibility condition, and the reading or execution of at least one of said sections of the program is conditional on a positive outcome of said check.

[0149] The technical criteria for compatibility may include one or more criteria set for the hardware of the consumer party's computer equipment. Alternatively or additionally, the technical criteria for compatibility may include one or more criteria set for the software installed on the consumer party's computer equipment, for example one or more criteria relating to an operating system and / or one or more companion applications that need to be installed.

[0150] In embodiments, the conditions may include respective conditions associated with each of the plurality of sections, at least some of the respective conditions being different from one another, and the method may include evaluating the conditions associated with each of the plurality of sections, and reading or execution of each such section being conditioned on a result of the evaluation.

[0151] This advantageously provides different tiers of access or operability whereby some sections are made available and some are not on a modular basis depending on the conditions (e.g. depending on the identity of the consumer party).

[0152] In an embodiment, the conditions may include respective access conditions for the consumer party's identity for each of some or all of the sections, and the evaluation includes verifying that the consumer party's identity matches the respective identity specified by the respective conditions for each section, and reading or execution of the respective section is conditioned on a positive outcome of the respective verification.

[0153] In an embodiment, the conditions may include, for each of some or all of the sections, respective compatibility conditions for compatibility of the consumer party's computing equipment with the respective sections, and the evaluation includes verifying that the consumer party's computing equipment meets one or more respective technical criteria specified by the respective conditions for each section, and reading or execution of the respective sections is conditioned on a positive outcome of the respective check.

[0154] In further alternative or additional embodiments, since the non-script code is more versatile than the lock / unlock scripts typically used in blockchain transactions, the one or more access conditions may include any user-defined conditions desired by the developer.

[0155] In an embodiment, the program header information may include one or more of: a version number of the program file, a version number of the system on which the program file is to run, a size of the program file, a descriptor, a list of reserved variables, a date and / or timestamp, a checksum, and / or ordering information for the body sections.

[0156] For example, in an embodiment, the program header information includes a minimum of version and size information.

[0157] In an embodiment, the blockchain and blockchain network may be configured to operate according to an output-based model, where each transaction includes at least one output and at least one input, where each output includes a lock script, where each input includes a pointer to an output of another transaction and an unlock script for unlocking the lock script of the pointed output, where the script is written in a scripting language. In this case, the header file and the program code may be written in a language other than the scripting language. In embodiments, the header file and each of the one or more sections may be stored in at least one unspent output of the respective first or second transaction on the blockchain.

[0158] For example, each unspendable output may be made unspendable by the inclusion of an opcode in a scripting language that, when executed by a node in the blockchain network, terminates the script. For example, the opcode may be OP_RETURN (where the scripting language is Script).

[0159] In an embodiment, the reference information in the header file may include an identifier for each respective output in each second transaction, and the reading may include reading each of the sections read from the identified outputs.

[0160] In an embodiment, the header file as stored in the first transaction may be stored in an encrypted form encrypted based on a shared secret shared between the consumer party and a provider party providing the program, in which case reading the header file comprises decrypting the header file based on the shared secret.

[0161] Alternatively, the header file may be unencrypted and therefore freely available to the public on the chain.

[0162] According to another aspect disclosed herein, there is provided a computer program embodied on a computer readable storage device and configured to perform the steps of any of the methods disclosed herein when executed on a computing device of a consumer party.

[0163] According to another aspect, a consumer party device includes: a memory including one or more memory units; a processing device including one or more processing units; Including, An apparatus is provided, the memory storing code configured to execute on the processing device, the code being configured, when executed, to perform a method of the consumer party according to any embodiment disclosed herein.

[0164] According to another aspect disclosed herein, there is provided a group of transactions for recording on a blockchain, the group including a first transaction embodied on a computer-readable data medium and including a header file, and one or more second transactions, each including a respective section of a body of the program file, at least one of the sections including executable program code, the header file including program header information and a set of one or more respective transaction IDs for one or more of the second transactions stored on the blockchain, enabling a program file to be constructed from the program header information and at least one of the sections.

[0165] According to another aspect disclosed herein, there may be provided a method that includes operation of a first party, a second party, any third parties that may be involved, and / or a network of nodes.

[0166] According to another aspect disclosed herein, a system may be provided that includes a first party computing device, a second party computing device, any third party computing device, and / or a network of nodes.

[0167] Other variations or uses of the disclosed technology may become apparent to those skilled in the art upon review of this specification, and the scope of the present disclosure is not limited by the described embodiments, but only by the appended claims.< / sigpa>

Claims

1. 1. A method of executing a program, said method comprising: reading a header file from a first transaction recorded in a blockchain maintained across a plurality of nodes of a blockchain network, the header file including program header information and reference information including one or more respective transaction IDs of one or more respective second transactions stored in the blockchain, each of the second transactions including a respective section of a body of a program file, at least one of the sections including executable program code; retrieving, from the blockchain, respective sections of the program file from at least one of the one or more second transactions based on the reference information; executing a program including the program header information and the at least one retrieved section; The method includes:

2. The execution of the program includes:

2. The method of claim 1, comprising reconstructing a program file containing said program from said program header information and said at least one retrieved section, storing said reconstructed program file in a memory of said computing device at said consumer party, and executing said reconstructed program file on said computing device at said consumer party.

3. The method of claim 1 or 2, wherein the reference information comprises a plurality of transaction IDs of a plurality of second transactions, each second transaction storing a respective body section of the program file.

4. the reading step includes reading from the blockchain respective sections from two or more of the plurality of second transactions; 4. The method of claim 3, wherein the program that is executed includes the program header information and the read sections from the two or more second transactions.

5. at least one of the body sections within at least one of the second transactions itself includes a header portion including at least a reference to a third transaction including a further body section; The method of any preceding claim, wherein the program that is executed includes a program header and a body section from the second and third transactions.

6. The header file further includes one or more conditions, The method according to any one of claims 1 to 5, wherein the method comprises the step of evaluating the condition, and wherein the reading or execution of at least one of the sections of the program is conditional on a result of the evaluation.

7. The method of claim 6 , wherein the evaluation is performed by the computing device of the consumer party.

8. the header file includes executable code stubs for evaluating the one or more conditions; 8. The method of claim 7, wherein the method includes executing the code stub on the computing device of the consumer party to perform the evaluation.

9. the conditions include at least one access condition that is a condition on the identity of the consumer party; A method according to any one of claims 6 to 8, wherein the evaluation comprises verifying that the identity of the consumer party matches an identity specified by the at least one access condition, and the reading or execution of at least one of the sections of the program is conditional on a positive outcome of the verification.

10. said conditions including at least one compatibility condition which is a condition regarding the compatibility of said computer equipment of said consumer party; 10. The method according to claim 6, wherein the evaluation comprises checking that the computing equipment of the consumer party meets one or more technical criteria specified by the compatibility conditions, and the reading or execution of at least one of the sections of the program is conditional on a positive result of the check.

11. the conditions include respective conditions associated with each of a plurality of sections, at least some of the respective conditions being different from one another; A method according to any one of claims 6 to 10 when dependent on claim 3, 4 or 5, wherein the method comprises evaluating a condition associated with each of at least a portion of the plurality of sections, the reading or execution of each such section being conditional on a result of the evaluation.

12. 12. The method of claim 11, wherein the conditions include respective access conditions for the identity of the consumer party for each of some or all of the sections, and the evaluation includes verifying that the identity of the consumer party matches a respective identity specified by the respective conditions for each section, and reading or execution of the respective section is conditioned on a positive outcome of the respective verification.

13. A method according to any one of claims 6 to 12 when dependent on claim 3, 4 or 5, wherein the conditions include, for each of some or all of the sections, respective compatibility conditions for compatibility of the consumer party's computing equipment with the respective sections, and the evaluation includes verifying that the consumer party's computing equipment meets respective one or more technical criteria specified by the respective conditions for each respective section, and the reading or execution of the respective section is conditioned on a positive outcome of the respective check.

14. 14. A method according to any preceding claim, wherein the program header information includes one or more of the following: a version number of the program file, a version number of the system on which the program file is to run, a size of the program file, a descriptor, a list of reserved variables, a date and / or timestamp, a checksum, and / or body section ordering information.

15. The blockchain and blockchain network are configured to operate according to an output-based model, where each transaction includes at least one output and at least one input, where each output includes a lock script, where each input includes a pointer to an output of another transaction and an unlock script for unlocking the lock script of the pointed output; The method according to any one of claims 1 to 14, wherein the lock script and the unlock script are each written in a scripting language, and the header file and the program code are written in a language other than the scripting language.

16. 16. The method of claim 15, wherein the header file and each of the one or more sections are stored in at least one unspent output of the respective first or second transaction on the blockchain.

17. 17. A method according to claim 15 or 16, wherein the reference information in the header file includes an identifier for each respective output in each second transaction, and wherein the reading includes reading each of the sections read from the identified outputs.

18. A method according to any one of claims 1 to 17, wherein the header file stored in the first transaction is stored in an encrypted form encrypted based on a shared secret shared between the consumer party and a provider party providing the program, and reading the header file includes decrypting the header file based on the shared secret.

19. A computer program embodied on a computer readable storage device and arranged to carry out the method according to any of claims 1 to 18 when executed on a computing device of a consumer party.

20. A consumer party device, comprising: a memory including one or more memory units; a processing device including one or more processing units; Including, An apparatus, wherein the memory stores code configured to run on the processing device, the code being configured, when executed, to perform a method according to any preceding claim.

Citation Information

Patent Citations

  • Block chain large file secure storage method and system

    CN110062034A

  • Management method, management apparatus, and program

    JP2019220148A

  • Authentication system using blockchain for distributed storage of personal information after separation

    JP2020504930A

  • Apparatus and method for storing data based on blockchain

    KR1020190076197A

  • Distributed electronic ledger with metadata

    US20180096349A1