Search

US-12626252-B2 - Blockchain-implemented systems and methods for concurrent bytecode interpretation

US12626252B2US 12626252 B2US12626252 B2US 12626252B2US-12626252-B2

Abstract

Computer-implemented methods are provided that create and validate a spending blockchain transaction created by a node in a blockchain network and including a locking script representing an instance of an execution thread joined from a plurality of execution threads represented at least one previous blockchain transaction. The spending blockchain also represents an execution thread joined from the execution thread instances pointed to by the spending blockchain transaction. Once created and validated, the spending blockchain transaction can be communicated on a blockchain network for storage in a blockchain ledger. The blockchain transactions can implement thread-specific locking scripts and associated fork, join and barrier constructs for concurrent or asynchronous threads of execution. The blockchain transactions can be validated according to constraints of a smart contract that encodes the terms for the blockchain transactions. The blockchain transactions can further be mined, and stored in a blockchain ledger.

Inventors

  • Ying CHAN
  • Dean Kramer

Assignees

  • NCHAIN LICENSING AG

Dates

Publication Date
20260512
Application Date
20240110
Priority Date
20171213

Claims (10)

  1. 1 . A computer-implemented method comprising: creating and validating a spending blockchain transaction that includes two or more transaction inputs Vin[x] and Vin[y], each transaction input respectively representing an execution thread of separate previous blockchain transaction, and a transaction output Vout[x] comprising a locking script representing an instance of an execution thread joined according to a join construct from execution thread instances of the transaction inputs; and communicating the spending blockchain transaction on a blockchain network for storage in a blockchain: wherein the spending blockchain transaction points to a plurality of locking scripts of one or more previous blockchain transactions and the plurality of locking scripts each represent an instance of the execution thread; and wherein the locking script representing the execution thread joined from the execution thread instances pointed to by the spending blockchain transaction is generated by replicating a bytecode sequence of the plurality of locking scripts of the one or more previous blockchain transactions.
  2. 2 . The computer-implemented method of claim 1 , further comprising: storing the one or more previous blockchain transactions in a blockchain maintained by the blockchain network.
  3. 3 . The computer-implemented method of claim 2 , wherein the spending blockchain transaction is created by a node of the blockchain network.
  4. 4 . The computer-implemented method of claim 1 , wherein the locking script representing the execution thread joined from the execution thread instances pointed to by the spending blockchain transaction is generated by replicating the bytecode sequence and interpreter code of the plurality of locking scripts of the one or more previous blockchain transactions.
  5. 5 . A system, comprising: a processor; and memory including executable instructions that, as a result of execution by the processor, causes the system to perform the computer-implemented method of claim 1 .
  6. 6 . A non-transitory computer-readable storage medium having stored thereon executable instructions that, as a result of being executed by a processor of a computer system, cause the computer system to perform the computer-implemented method of claim 1 .
  7. 7 . A computer-implemented method comprising: creating and validating a spending blockchain transaction that includes two or more transaction inputs Vin[x] and Vin[y], each transaction input respectively representing an execution thread of separate previous blockchain transaction, and a transaction output Vout[x] comprising a locking script representing an instance of the execution thread joined according to a join construct from the execution thread instances of the transaction inputs; communicating the spending blockchain transaction on a blockchain network for storage in a blockchain, storing or accessing a collection of valid bytecode sequences; and generating the locking script representing the execution thread joined from the execution thread instances pointed to by the spending blockchain transaction by replicating a valid bytecode sequence of the collection.
  8. 8 . The computer-implemented method of claim 7 , further comprising: storing or accessing valid interpreter code; and generating the locking script representing the execution thread joined from the execution thread instances pointed to by the spending blockchain transaction by replicating the valid bytecode sequence and the valid interpreter code of the collection.
  9. 9 . A computer-implemented method comprising: creating and validating a spending blockchain transaction that includes two or more transaction inputs Vin[x] and Vin[y], each transaction input respectively representing an execution thread of separate previous blockchain transaction, and a transaction output Vout[x] comprising a locking script representing an instance of the execution thread joined according to a join construct from the execution thread instances of the transaction inputs; and communicating the spending blockchain transaction on a blockchain network for storage in a blockchain: wherein the spending blockchain transaction points to a plurality of locking scripts of one or more previous blockchain transactions and the plurality of locking scripts each represent an instance of the execution thread, and wherein the spending blockchain transaction is created by generating execution state information for the execution thread joined from the execution thread instances pointed to by the spending blockchain transaction and including the execution state information into the locking script of the spending blockchain transaction.
  10. 10 . A computer-implemented method comprising: creating and validating a spending blockchain transaction that includes two or more transaction inputs Vin[x] and Vin[y], each transaction input respectively representing an execution thread of separate previous blockchain transaction, and a transaction output Vout[x] comprising a locking script representing an instance of the execution thread joined according to a join construct from the execution thread instances of the transaction inputs; communicating the spending blockchain transaction on a blockchain network for storage in a blockchain, wherein the spending blockchain transaction is received by a node of the blockchain network; and validating, by the node, the spending blockchain transaction by verifying the locking script of the spending blockchain transaction against one or more conditions, wherein the verifying includes matching the locking script of the spending blockchain transaction to a plurality of locking scripts of one or more previous blockchain transactions and/or executing the plurality of locking scripts of the one or more previous blockchain transactions to generate resultant execution state information and then merging or combining such resultant execution state information.

Description

CROSS REFERENCE SECTION TO RELATED APPLICATIONS This application is a continuation of U.S. patent application Ser. No. 16/772,145, filed Jun. 11, 2020, entitled “BLOCKCHAIN-IMPLEMENTED SYSTEMS AND METHODS FOR CONCURRENT BYTECODE INTERPRETATION,” which is a 371 National Stage of International Patent Application No. PCT/IB2018/059757, filed Dec. 7, 2018, which claims priority to United Kingdom Patent Application No. 1720767.1, filed Dec. 13, 2017, the disclosures of which are incorporated herein by reference in their entirety. TECHNICAL FIELD This invention relates generally to computer-implemented methods of processing blockchain transactions, and more particularly to implementing locking scripts within the structure of blockchain transaction processing to support concurrent and/or asynchronous thread execution. This invention is particularly suited to, but not limited to, use in methods and apparatus that process and transact in smart contract transactions. BACKGROUND OF INVENTION In this document, the term “blockchain” refers to any of several types of electronic, computer-based, distributed ledgers. These include consensus-based blockchain and transaction-chain technologies, permissioned and un-permissioned ledgers, shared ledgers and variations thereof. The most widely known application of blockchain technology is the Bitcoin blockchain, although other blockchain implementations have been proposed and developed. While the example of Bitcoin may be referred to herein for the purpose of convenience and illustration in the present disclosure, it should be noted that the invention is not limited to use with the Bitcoin blockchain; and alternative blockchain implementations and protocols fall within the scope of the present invention. For example, the invention may be useful in other blockchain implementations that have limitations similar to Bitcoin regarding what constraints can be encoded within transactions. The term “Bitcoin” is used herein to include any variant of the Bitcoin protocol. A blockchain is a peer-to-peer, electronic ledger that is implemented as a computer-based, decentralised, distributed system made up of blocks, which in turn are made up of transactions and other information. A blockchain system or blockchain network comprises a plurality of blockchain nodes and a set of operations. A blockchain node might be configured to perform some or all of the operations in the set of operations. Various blockchain nodes might be implemented as computer hardware, computer software, or a combination of both, operated by a node operator, wherein node operators can be independent and unrelated to other node operators. Blockchain nodes might each maintain a copy of the blockchain ledger, or some portion of it. The set of operations might include creating transactions, propagating transactions, reading the blockchain ledger, evaluating the blockchain ledger, generating (mining) a new block for proposed addition to the blockchain ledger, communicating with other blockchain nodes, and providing wallet functions for a user to manage blockchain assets. The blockchain ledger is decentralised, in that there is no single blockchain node or entity that decides when the ledger gets modified. Instead, the blockchain nodes each are programmed with knowledge of rules of the blockchain protocol in order to verify the blockchain ledger and verify that actions taken by other blockchain nodes are consistent with those rules. The term “blockchain” may refer to the fact that a blockchain ledger comprises a series of chained blocks, each representable as a data structure in computer memory, readable by a computer process and transmittable as a data transmission. A block comprises one or more transactions, also representable as data structures in computer memory, readable by a computer process and transmittable as a data transmission. The blocks are chained, in that each new block that is officially added to the blockchain contains immutable references to an immediately previous block, which contains immutable references to its immediate prior block, and so on. One of the rules of the blockchain protocol would be that once a block is added to the blockchain, it cannot be changed, i.e., it is immutable, and the only modification possible of the blockchain ledger is the addition of a new block. Since blockchain nodes are programmed with that as a rule, they would not modify blocks in their copy of the blockchain ledger, but only add blocks, and even then, only add blocks after running a verification process on the proposed block to ensure it complies with the blockchain protocol. Since blocks are immutable once added to the ledger, transactions in a block are also immutable. Some of the nodes of the blockchain network operate to create transactions. It is contemplated that the creation of transactions can involve operations involving an electronic wallet node, an agent node, or some other node of the blockchain network. When