Agent-based turing complete transactions integrating feedback within a blockchain system
Patent Information
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2017-02-21
- Publication Date
- 2023-04-01
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure TWG2TB001698797_001 
Figure TWG2TB001698797_002 
Figure TWG2TB001698797_003
Abstract
Description
[Technical Field]
[0001] This invention relates to a consensus-based electronic ledger, and more particularly to a blockchain implementation and technology. This invention is particularly suitable for use with the Bitcoin blockchain, and can be used to implement applications such as device / system control, process control, decentralized computing, and storage. [Previous Technology]
[0002] As used in this document, the term "blockchain" encompasses all forms of distributed ledgers that are consensus-based and computerized, including but not limited to blockchain and transaction chain technologies, authorized and unauthorized ledgers, shared ledgers, and variations thereof. While other blockchain applications have been proposed and developed, the most widely known application of blockchain technology is currently the Bitcoin ledger. Although reference may be made to Bitcoin for convenience and illustrative purposes, it should be noted that this invention is not limited to use with the Bitcoin blockchain and alternative blockchain implementations and protocols, all of which fall within the scope of this invention.
[0003] Blockchain is a consensus-based electronic ledger implemented as a decentralized computer system composed of blocks, which in turn consist of multiple transactions. Each transaction is a data structure that encodes the control transfer of digital assets between participants in the blockchain system and includes at least one input and at least one output. Each block contains a hash of the previous block, and these blocks are chained together to create a permanent and immutable record of all transactions written since the beginning of the blockchain. Transactions contain small programs called scripts embedded in their inputs and outputs, which specify how and by whom the transaction's outputs are accessed. On the Bitcoin platform, these scripts are written using a stacked scripting language.
[0004] Transactions written to the blockchain must be "verified." Network nodes (miners) perform work to ensure that each transaction is valid; invalid transactions are rejected by the network. Software clients installed on nodes verify the work script by performing lock and unlock operations on unspent transactions (UTXOs). If the execution of the lock and unlock script evaluates to "TRUE," the transaction is valid and is written to the blockchain. Therefore, in order for a transaction to be written to the blockchain, it must i) be verified by the first node receiving the transaction – if the transaction is verified, the node forwards it to other nodes in the network; ii) be added to a new block built by miners; and iii) be mined, i.e., added to the public ledger of past transactions.
[0005] Blockchain technology is the most widely known and used cryptocurrency. Digital entrepreneurs have begun exploring Bitcoin using cryptographic security systems and new systems that can store Bitcoin on the blockchain, including but not limited to: • Storing metadata • Executing digital tokens • Establishing contracts signed with digital signatures
[0006] If blockchain can be used for automated tasks and processes not limited to the cryptocurrency field, it will have great advantages. This solution will be able to leverage the advantages of blockchain (such as permanence, tamper-proof records, decentralized processing, etc.) while being more comprehensive in its applications.
[0007] One area of current focus within the blockchain system is Turing-completeness, particularly how to promote the integration of Turing-complete behavior into blockchain technology, which restricts functionality for security reasons.
[0008] Some have questioned whether Bitcoin's scripting language is Turing complete because it does not support complex control flow features, such as loops. One advantage of this limitation is that the program's execution time is predictable. Another significant advantage of restricting Bitcoin scripts to linear or tree-like decision-making tasks is the avoidance of infinite loops, thus preventing attacks exploiting infinite loops (such as denial-of-service (DoS) or DDoS attacks). Due to this limitation, Bitcoin scripts are typically limited to linear tasks rather than more complex applications such as automated task control, device management, etc.
[0009] The Ethereum blockchain platform addresses this issue by incorporating a "built-in" Turing-complete language called "Solidity." This language is the native language of the Ethereum platform, so scripts written in Solidity can include control flow mechanisms such as loops. However, Ethereum has suffered several attacks and vulnerabilities.
[0010] Due to the security issues mentioned above and the widespread use and familiarity with the scripting language used by Bitcoin, it is still desirable to retain a limited number of scripting languages that use blockchain technology in a large part of the blockchain system.
[0011] Therefore, the present invention provides a solution that facilitates the integration of Turing-complete features, such as loop mechanisms and other complex control structures, with blockchain scripts while avoiding the destructive effects of potential security weaknesses, such as infinite loops. This solution will provide numerous benefits, including: • Automation of complex blockchains; • Control of the flow of metadata recorded on the blockchain; • Extension of the functionality and applications of blockchain platforms that do not rely on or intentionally incorporate Turing-complete languages.
[0012] This invention provides a solution comprising a novel combination of blockchains coupled with parallel computing resources, capable of mimicking, simulating, and / or incorporating loops and other Turing-complete functionalities beyond typical blockchain scripts. This, in turn, facilitates a variety of applications related to automated tasks such as distributed data storage, distributed computing, and drone control, or any Internet of Things (IoT) device. These applications may include using blockchain for metadata storage, managing digital tokens, and establishing contracts.
[0013] Therefore, the present invention provides the solutions and claims as described above. The present invention provides a (program) control method and a corresponding system. The present invention may be referred to as a blockchain-implemented control method / system. It can control automated tasks or processes. [Summary of the Invention]
[0014] This invention utilizes blockchain to emulate / simulate Turing completeness. Furthermore, this invention enables applications involving Turing complete control mechanisms to execute on a blockchain platform.
[0015] Furthermore, the present invention describes a method or system for controlling programs executed on computing resources under a blockchain using blockchain and / or one or more blockchain transactions. Therefore, the present invention configures different computing components with different functions and architectures to interact in order to provide new technical results. The interaction of different computing systems (computing resources and blockchain) produces powerful control solutions.
[0016] From a computational resource perspective, this invention provides the advantages of permanent program execution and prevention of record tampering. From a blockchain perspective, this invention provides an improved blockchain that can at least partially simulate Turing-complete behavior by using the blockchain, thereby enabling the configuration of more complex blockchain applications. All of this is achieved while maintaining a limited use of scripting languages for blockchain transactions. The scripting language can be restricted so as to avoid or at least prevent the incorporation of complex control flow mechanisms (such as loops) into code written in that language. The instruction set of the language can be set, i.e., the "commands" or "opcodes" that the programmer can use, but excluding commands for complex flow control mechanisms.
[0017] A blockchain uses a blockchain protocol that includes a finite language, which may be a scripting language. This invention can extend the functionality of a finite scripting language to perform tasks using a blockchain.
[0018] The present invention can use the state of the blockchain to execute a loop program, which can be executed on a computing resource that operates in parallel with the blockchain network. This computing resource may be different from the blockchain network (not part of the blockchain network), and the computing resource may be referred to as "oracle" or "bot".
[0019] This enables blockchain protocols to utilize scripting languages with limited functionality while allowing control flow mechanisms, such as loop mechanisms, to be implemented on the blockchain. This novel combination enhances the versatility of blockchain technology while maintaining security.
[0020] This method includes the following steps: executing a loop on a computing resource; and influencing the execution of the loop with the state of the blockchain.
[0021] Furthermore, the present invention includes the step of implementing a Turing machine using a blockchain referenced by code provided in one or more transactions and / or (transaction) blocks.
[0022] Computing resources can be any processing device or system, such as a server or multiple servers, which can be independent or distributed resources. The blockchain can be the Bitcoin blockchain or any other blockchain-related platform; a blockchain is a distributed ledger based on consensus.
[0023] Information from at least one iteration of a loop is stored in a transaction on the blockchain, and the information can be stored as metadata. The loop may contain "If condition then action" (ICTA) instructions.
[0024] The method of the present invention further includes generating a cryptographic hash of the code associated with the loop and storing the cryptographic hash in a transaction of a blockchain. The code may be a code block containing a control flow state, such as an "if condition re-action" state. The code block may be a portion of the code, such as all or part of a subroutine (such as a function, method, or program). The control flow state can control or influence the execution of the loop, such as the number of iterations.
[0025] Computing resources can be used to monitor the blockchain state at the time of a transaction, which contains one of the cryptographic hashes of the code associated with the cycle.
[0026] The method of the present invention further includes the following steps: For each iteration of the loop, the method includes: evaluating a condition and performing at least one action based on the result of the evaluation, the at least one action including: writing at least one transaction into the blockchain; and / or performing an off-blockchain action.
[0027] Conditions can be used to monitor where, how, and by whom any value, signal, or input originates, whether on or off the blockchain. Conditions can be related to received, detected, or generated data from computing resources, or to the state of the blockchain. This condition can be considered a "trigger." This is a special state of the blockchain, or an event detected on the blockchain (such as a date or temperature) or a combination of both.
[0028] An action may include transmitting a signal to generate an event under the blockchain, or broadcasting a new transaction, or a combination of both. An index may maintain (i) a value under the blockchain within computing resources (managers) or may be (ii) a value stored in a subsequently broadcast transaction. (i) and (ii) are two alternative methods for maintaining control data.
[0029] Computing resources are used to monitor: the state of the blockchain; the values generated or received by the computing resources; and / or the data or signal sources provided under the blockchain.
[0030] The method of the present invention includes the following steps: i) using the blockchain as a storage component for data, instructions or pointers to data and / or instructions; ii) using a computing resource as a control flow management component of a Turing complete process, the computing data being used to execute a loop mechanism.
[0031] Therefore, blockchain can serve as the non-erasable band of a Turing machine. Computational resources can be used to control the execution flow of programs, implement loops, and extend the functionality of scripting languages.
[0032] The method of the present invention further includes the step of restarting the loop at a specific iteration. If computing resources find a predetermined hash of a portion of the code in a transaction in the blockchain, the loop can be restarted. This portion of the code is located in the body of the loop and may include an ICTA state.
[0033] The computing resource can regenerate the loop in each iteration, which can be manifested in various ways. For example, a code block of the loop can be: hardcoded into or on the computing resource; stored in a private or public available file; stored as an entry in a private or public hash table file; or a combination of the above.
[0034] Code blocks can be static and have hard-coded variables, or they can be static but contain parameters that can be populated. Parameters can be single values of any data format, code of small blocks, or a combination thereof. Parameters can be populated by retrieving them directly from metadata in a transaction (e.g., a Bitcoin transaction) or from external resources such as internal repositories, private / public archives, or hash tables, or any combination thereof. Indices pointing to external parameter values can be stored in the transaction's metadata.
[0035] Metadata provided in or associated with a transaction can be used to specify information related to the iteration.
[0036] The computing resource may include a registry, database, repository, or other storage facility, or communicate with a registry, database, repository, or other storage facility to enable the computing resource to access a pre-stored version of the subroutine. The registry stores: i) a password hash of one of the codes associated with the loop; and ii) information pointing to a location that allows access to a copy of the code.
[0037] The method of the present invention further includes the step of using a blockchain transaction to update cyclical code, thereby replacing existing code with new code. Furthermore, the blockchain transaction is a multi-signature Pay to script hash (P2SH) transaction. The hashes of the existing code and the hashes of the new code are stored.
[0038] The present invention further provides a system for performing any of the embodiments of the above methods.
[0039] The present invention provides a computer system that uses a blockchain to control program execution on computing resources. In addition, the system uses the blockchain (interacting with the blockchain) to simulate or imitate Turing complete applications, or uses the blockchain to execute control flow structures such as loops.
[0040] This system includes: a blockchain; and a computing resource for executing a loop, the execution of which is affected by the state of the blockchain.
[0041] Information related to at least one iteration of the cycle is stored in a transaction on the blockchain, preferably as metadata in the transaction.
[0042] Preferably, the computing resources are used to generate a cryptographic hash of code related to the cycle, and preferably, the cryptographic hash is stored in a transaction on the blockchain. Alternatively, the computing resources can be used to monitor the state of the blockchain, the transaction state of the blockchain including the cryptographic hash of code related to the cycle.
[0043] Preferably, for each iteration of the loop: a condition is evaluated, and at least one action is performed based on the result of the evaluation; the at least one action includes: causing at least one transaction to be written into the blockchain; and / or performing an action under the blockchain.
[0044] This condition relates to data received, detected, or generated by computing resources, or to the state of the blockchain.
[0045] The computing resources are configured to monitor: the state of the blockchain; a value received or generated by the computing resources; and / or the data or signal sources provided by the blockchain.
[0046] Blockchain serves as a storage component for data, instructions, or pointers to data and / or instructions. Computational resources act as a control flow management component of a Turing-complete process, using computational data to execute a loop mechanism. Blockchain can be operated using a restricted language, such as the Bitcoin scripting language.
[0047] When computing resources find a predetermined hash of a portion of the code in a transaction on the blockchain, the loop is restarted at a specific iteration. The information associated with that iteration is specified using metadata provided in or associated with the transaction.
[0048] The computing resource includes a registry or can communicate with a registry, which enables the computing resource to access a pre-stored version of a program. This registry may store: i) a password hash of code related to a loop; and ii) information pointing to a location that allows access to a copy of the code.
[0049] The system of the present invention utilizes a blockchain transaction to update cyclical code, thereby replacing existing code with new code, and the blockchain transaction is a multi-signature Pay to script hash (P2SH) transaction. Preferably, the system is configured to store the hash of the existing code and the hash of the new code.
[0050] Any feature described in the embodiments of the present invention may also be applied to any other aspect or embodiment. For example, any feature described in relation to the method may also be used in the system, and vice versa.
Implementation Method
[0051] The following describes an embodiment using the Bitcoin blockchain, but other blockchain protocols and implementations may also be used, and the present invention is not limited thereto.
[0052] This invention solves the problem of Turing completeness on blockchain platforms with limited operations (i.e., platforms using scripting languages that do not support complex control mechanisms), and thus expands the uses or applications on which blockchains can be placed. Marvin Minsky (Minksy et al., Computation: Finite and Infinite Machines, Prentice Hall, Inc., 1967) disclosed how to implement a Turing-complete machine using indelible magnetic tape, capable of executing any algorithm and running on a general-purpose Turing machine.
[0053] This invention includes a computing resource that operates in conjunction with a blockchain, acting as an indelible magnetic tape in a Turing machine implementation. This computing resource operates in parallel with the blockchain network, monitoring and processing the execution of loop programs. Loop programs are designed to perform given tasks, such as program automation or the control of devices or systems (e.g., the control of IoT devices). The parallel resource is used to monitor the state of the blockchain and can write transactions into the blockchain; therefore, for convenience, it is referred to herein as a "manager".
[0054] This invention includes the following features and advantages: ˙ Using the blockchain as an indelible magnetic tape in a Turing machine ˙ Functionality and implementation of a computer monitoring and management component (manager) operating in parallel with the blockchain ˙ Using the manager as the instruction list of the Turing machine ˙ Managing the manager using a code registry ˙ Metadata and recurring loops related to the manager's code in transactions ˙ Executing software updates of the manager using digital signatures ˙ Using a backup blockchain for the manager in special implementations
[0055] Blockchain as the Unerasable Tape of the Turing Machine
[0056] Please refer to Figure 1. This invention utilizes blockchain as the indelible magnetic tape for a Turing machine, including the following definitions and features: 1. The blockchain operates like a magnetic tape for a Turing machine; each transaction in a blockchain block is represented as a unit on the tape, which can contain symbols from a finite alphabet. 2. The tape head can read information from blocks already written to the blockchain. 3. The tape head can write new blocks containing many transactions to the end of the blockchain, but cannot write to existing blocks; therefore, the blockchain tape is indelible. 4. The metadata of each transaction can be stored as part of a multi-signature pay-to-script-hash (P2SH) transaction.
[0057] A key function of the administrator is to act as an agent to monitor the current state of the blockchain and to receive signals or inputs from any off-block source. Based on the blockchain state and / or the received inputs, the administrator can perform certain actions. The administrator decides which actions to perform, which may or may not involve actions in the "real world" (i.e., off-block) and / or on the blockchain (such as creating and broadcasting new transactions). The actions taken by the administrator may be triggered by the blockchain state or some off-block inputs. The administrator can also decide which set of transactions to broadcast to the Bitcoin network and subsequently write them into the blockchain.
[0058] The actions of the administrator are parallel and synchronous with the Bitcoin network, which in a sense extends the functionality of the limited Bitcoin script. This continuous monitoring realizes a "loop" control flow structure, making the combination of the administrator and the blockchain system Turing complete.
[0059] The administrator acts as the Turing machine instruction table
[0060] In an embodiment of the present invention, the Turing machine includes two stacks: • Data stack: represented by the aforementioned blockchain. • Control stack: represented by the manager function, storing information related to recurring control flow functions.
[0061] Separating the control stack from the data stack has the advantage of preventing infinite loops in the core of a blockchain (such as Bitcoin) and also reduces denial-of-service attacks on the Bitcoin system.
[0062] The manager can manage and run loop subroutines through any type of loop structure (such as FOR-NEXT, WHILE, REPEAT UNTIL, etc.). The embodiments described in this invention include a program utilizing a "repeated" structure (see Figure 2), where the user specifies an index (i) and a limit (J) representing the current number of iterations (usually counted from 0) and the total number of iterations for each repeated loop.
[0063] For each iteration: 1. Increment the index starting from 1. For the exit condition, the iteration stops when the index reaches the limit; 2. Execute the code block containing the syntax "if condition then action" (ICTA); the action can be any action on or off the blockchain; 3. Calculate the cryptographic hash of this subroutine and store it in the blockchain as part of a transaction (Tx). Since the hash is unique for each code block, it can be used to verify that the code has been used.
[0064] Therefore, the loop body includes a code block, each code block including an "if condition then action" (ICTA) syntax (as shown in Figure 3), which monitors the current state of the blockchain to match the following transactions: • Start or trigger condition (e.g., when a specific Bitcoin address reaches 10 BTC). • Repetition condition (e.g., metadata or hashes associated with previous iterations). • Stop condition (e.g., the last iteration of the loop).
[0065] The ICTA syntax allows the administrator to decide the next transaction to proceed based on the current state of the blockchain. Proceeding with the next transaction involves broadcasting the transaction to the Bitcoin network and writing the new transaction to the blockchain as a record of this iteration. Once a transaction is written to the blockchain, the administrator then finds that the previous iteration has been executed and written to the blockchain, and then proceeds to execute the next iteration. When index (i) reaches the limit (J) specified in the code block, subsequent iterations will continue until the repeating loop ends.
[0066] Each transaction is stored in the blockchain in a reusable manner. When using Bitcoin, each signature in a transaction is appended with a SIGHASH flag, which can have different values, each representing whether other parts of the transaction can be modified without involving the owner of that signature. Reusable transactions have a SIGHASH flag "SigHash_AnyoneCanPay" in one of the transaction's inputs, allowing anyone to contribute to the transaction's inputs, and this parameter allows the administrator's ICTA function to be executed and repeated multiple times, each time with different inputs. The use of this function can be limited to authorized parties, such as through the copyright of reusable transactions.
[0067] The "If Condition" section of the ICTA code block can monitor any type of condition, similar to other programming languages (such as C, C++, Java), and is not limited to information stored on the blockchain. Examples of some conditions are shown below: • Monitoring dates and times (e.g., when a certain date and time are reached). • Monitoring weather (e.g., when the temperature is below 10°C and it is raining). • Monitoring social media (e.g., when I receive a message from a friend). • Monitoring the conditions of contracts or trusts (e.g., when company A buys company B). • Monitoring news and events (e.g., when football team A wins a match). • Monitoring information from the Internet of Things (e.g., when a light bulb needs to be replaced). • Monitoring data from mobile / wearable devices (e.g., when a wearable step tracker counts 10,000 steps). • Monitoring results from cloud computing (e.g., when a calculation is complete and the result is received). • Monitoring remote data storage (e.g., if a file still exists remotely).
[0068] The "Then action" section of the ICTA code block can perform multiple actions. This invention does not limit the number or type of actions that can be taken, and the actions are not limited to transactions on the blockchain, although transactions containing metadata related to the actions may all be written on the blockchain.
[0069] The administrator can specify metadata in any form, but in one embodiment of the invention, the metadata can store a hyperlink in a file containing more action-related data or instructions. Alternatively, the metadata can simultaneously store the hash of the hyperlink and the action in a hash table containing more action-related data or instructions, where the action is the look-up key of the hash table. In one embodiment, a link similar to the magnet URL format used in BitTorrent can be used.
[0070] The following are examples of actions: • Bitcoin transactions (e.g., sending Bitcoin to a specific address). • Social media (e.g., sending a message to a friend). • Transactions (e.g., selling X shares). • Internet of Things (e.g., turning off a light bulb). • Commerce (e.g., purchasing goods online). • Online services (e.g., paying monthly fees or paying for services requested using Bitcoin).
[0071] Since the present invention is not limited in terms of the nature, type or number of actions performed, it provides a highly versatile solution with great advantages in a wide range of applications.
[0072] The administrator’s control stack can be implemented in a variety of specific ways depending on the needs of each user. For example, the repetitive loop of the control stack can be used in any Turing-complete language. One possible language choice is a Forth-type stack language. One of the advantages of using this language is that its programming style is consistent with that of the known and widely used Bitcoin scripts.
[0073] Use the spare stack of the Bitcoin script as data storage space.
[0074] Bitcoin scripts contain commands, also known as operation codes, that allow users to move data to an alternative stack, called an "alternative stack".
[0075] The operation codes are: ˙ OP_TOALTSTACK - Moves data from the top of the primary stack to the top of the alternative stack. ˙ OP_FROMALTSTACK - Moves data from the top of the alternative stack to the top of the primary stack (see Figure 4).
[0076] Data from intermediate computation steps can be stored in an alternative stack, similar to the "memory" function that allows data to be stored on a calculator. In embodiments of the invention, the alternative stack is used to allow Bitcoin scripts to solve computationally intensive tasks and return the results to the computation.
[0077] The administrator is managed using a registry key.
[0078] The administrator also manages a registry of all the code it owns and runs. The structure of this registry is similar to a lookup table or dictionary that maps a specific key to a specific value (see Figure 5). The pairing of key and value is represented by the hash of the code block (H1) and the IPv6 address where the code is stored, respectively. To retrieve a code block using key H1, the associated value (the location where the code is stored) is first retrieved using the lookup table, and then the source code is retrieved accordingly.
[0079] There are several ways to implement a code registry. For example, a lookup table can be implemented using a locally managed list or a peer-to-peer distributed hash table. The source code can be stored locally, remotely, or using a distributed file storage system, implemented using a magnet link format or any link format that uses shared zero-knowledge encryption.
[0080] Regeneration of transaction metadata and cycles in the manager code
[0081] In a specific iteration, the manager's cycle needs to be regenerated. The required information is stored as metadata in the transactions recorded on the blockchain (see Figures 6 and 7).
[0082] In this way, transactions on the blockchain store or provide access to information related to a given iteration of one of the loops being executed on the manager. The information may include the value of any variable related to the loop, such as index i, and any other necessary information, such as parameter values used in code blocks or information related to the location where further information is needed to confirm access.
[0083] The metadata itself is stored in the transaction as part of the multi-signature paid script hash script (P2SH). Please refer to Figure 8 for the script format. The metadata recorded in the transaction can also be used to record an audit trail of past code execution.
[0084] Administrators can regenerate recurring code blocks in each iteration in various ways. These code blocks can be hardcoded into the administrator, stored in a private or publicly accessible file, stored as a private or public hash table file, or a combination thereof. Code blocks can be static with hardcoded variables, or they can be static but contain populated parameters. Parameters can be single values in any data format, small block codes, or a combination thereof. These parameters can be populated by obtaining them directly from metadata in a transaction (e.g., Bitcoin transactions) or from external sources such as internal databases, private or public files or hash tables, or any combination thereof. Indicators pointing to external parameter values can be stored in the transaction's metadata.
[0085] The following steps illustrate how the administrator can regenerate the repeating code block in the i-th iteration. In this embodiment, the code registry is a hash table, where the hash value serves as the lookup key and is stored in the transaction's metadata. 1. The administrator monitors transactions in the blockchain, including hash values in the code block that match the code registry. 2. The administrator finds a transaction containing the hash (H1). 3. The administrator reads the "metadata-code hash," obtains the CodeHash field to get H1, and uses it to retrieve the code (C1). If RIPEMD-160 (SHA256(C1)) equals H1, it means the code has not been changed, and the next step can proceed. 4. The administrator reads the "metadata-code hash" (Metadata-CodeHash) storing index I and regenerates the code in the i-th iteration. In other words, the loop is "reloaded" at the appropriate iteration. 5. The user's signature is included in the P2SH command to verify the source of the metadata. 6. If the iteration of the loop requires a "Metadata-OutputHash" and a "Metadata-OutputPointer" (as shown in Figure 7) to retrieve the output of the previous step, then the administrator reads that data.
[0086] Unlocking a transaction may require multiple signatures (such as those of the user, operating system, software developer, and software vendor), so a digital rights management (DRM) system can manage the rights to the operating codes of the parties involved in a P2SH transaction.
[0087] Update administrator code
[0088] Software updates and patches for code blocks related to the administrator are securely authorized using multi-signature P2SH transactions (see Figure 8). The multi-signature transaction records, as shown in Figures 8 and 9, contain metadata for both old and new code blocks. Records of converting old code to new code provide an audit trail for software updates. The administrator needs to store all hash values of both old and new blocks in the source code and use these hash values to verify the integrity of the code archive.
[0089] In one embodiment of the present invention, the transaction requires multiple signatures for unlocking (e.g., user, operating system, software developer, and software vendor), and a digital rights management system is used to manage software updates and patches for the code used by the administrator.
[0090] Most software does not allow updates during runtime, but the advantage of this invention is that software updates can be performed during the execution cycle. This provides a dynamic and responsive solution that can be reconfigured instantly and minimizes the damage that may be caused by the program controlled by this invention.
[0091] The information obtained on the blockchain (see Figures 8 and 9) can be used to update the new code in the loop and start the next iteration step using the output metadata from the previous iteration of the old code.
[0092] Example
[0093] Current Bitcoin scripting languages do not allow loops to occur, preventing future attackers from using Bitcoin payments to trigger continuous and automated actions that would otherwise require external intervention to prevent. However, because the administrator of this invention continuously monitors information on the blockchain, complex automated operations can be executed securely based on the latest information on the blockchain.
[0094] The following describes the procedures for how the administrator controls the stack to automatically and online vote counting robots. This part is not limited to "voting" in elections or political voting, but can be used in any application involving selection. The term "vote" can be simply used to mean "choose," "pick," or "instruct."
[0095] The voting counting bot aims to promote fair and pseudo-anonymous voting, with the voting counting process recorded by the blockchain as an immutable, permanently auditable process. The voting counting bot automatically uses a controlled stack controlled by an administrator and repeats in a loop (see Figure 10). The following explains how it operates.
[0096] There are 100 voters. If 57 unique "yes" votes are received before January 1, 2016, payment will be made to Chairman Jason. The voting process consists of two parts: • Token distribution • Counting
[0097] For token allocation, each authorized voter is allocated 100 voting tokens, each token represented by a (Bitcoin) public-key and private-key pair, distributed to each voter using a secret exchange protocol. Each Bitcoin public key and address contains a small amount of Bitcoin representing one vote. The bot maintains a list of public keys associated with each authorized token and publishes this list before voting begins. To ensure that votes cannot be bound and that anonymous voting is possible, the list of private keys and the mapping between the voter's identity and their token are destroyed (i.e., never stored).
[0098] Having an anonymous and pre-authorized list of addresses has other important benefits, ensuring that only authorized individuals can cast valid votes, and facilitating the exclusion of any unwanted votes (such as spam or ineligible voters) from specific addresses without compromising the voter's identity. The administrator executes a recurring loop to implement the counting procedure, storing the address list in a Bitcoin script and transferring it to a spare stack for data storage. Once an address has been counted, it is removed from the spare stack and no longer added to the next transaction; the recurring loop stops when the address list is empty.
[0099] The voting bot administrator ensures that the intermediate vote count is stored in the blockchain by using its stored vote count intermediate value instead of using an integer index i to track the current position in the loop. This section provides an audit trail and shows that the vote counting process is fair.
[0100] If 57 unique "yes" votes are received, the agreed amount of Bitcoin will be paid into Jason's account. The cryptographic hash of the vote counting script and the IPv6 address storing this script will be publicly released, meaning the public has sufficient information to recalculate and ensure the fairness and accuracy of the vote counting process.
[0101] It should be noted that the above embodiments are not intended to limit the invention, and those skilled in the art will be able to design many alternative embodiments without departing from the scope of the invention as defined by the appended claims. Any reference numerals placed in parentheses within the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps other than those listed in any of the claims or the specification as a whole; in this specification, "comprising" means "including or consisting of". Singular references to elements do not exclude plural references to those elements, and vice versa. The invention can be implemented by hardware comprising several different elements, and by means of a suitably coded computer. In the device claims listing several means, several of these means can be implemented by the same item of means. The fact that certain measures are described in mutually different dependent claims does not mean that a combination of these measures cannot be used advantageously. [Simplified Explanation of the Diagram]
[0102] These and other aspects of the invention will be apparent from the embodiments described herein. Embodiments of the invention will now be described by way of example only and with reference to the drawings, wherein: Figure 1 is a schematic diagram of the blockchain as an ineradicable strip of a Turing machine; Figure 2 is a schematic diagram of a subroutine by an administrator combining the blockchain with a recurring loop; Figure 3 is a schematic diagram of the code of an ICTA code block in one embodiment of the invention; Figure 4 is a schematic diagram of Bitcoin commands allowing users to move data into and out of an alternative stack in one embodiment of the invention; Figure 5 is a code registry of an administrator in one embodiment of the invention; Figure 6 is metadata associated with an administrator's code block in one embodiment of the invention; Figure 7 is metadata associated with the administrator's output during a specific iteration of a loop in one embodiment of the invention; Figure 8 is a schematic diagram of transaction scripts and metadata in one embodiment of the invention; Figure 9 is a schematic diagram of administrator software patch verification and audit trails in one embodiment of the invention; and Figure 10 is a recurring loop of a counting robot in pseudocode in one embodiment of the invention.
Claims
1. A method for controlling program execution on a computing resource using a blockchain, the computing resource operating in parallel with a blockchain network and used to monitor the state of the blockchain, the method comprising the steps of: executing a loop on the computing resource; and influencing the execution of the loop using the state of the blockchain, wherein the computing resource is used to monitor the state of the blockchain for a transaction, the blockchain containing a cryptographic hash of code associated with the loop, and wherein, for each iteration of the loop, the loop is restarted on an iteration specified by information provided in or associated with a transaction in the blockchain, thereby influencing the execution of the loop using the state of the blockchain.
2. The method as described in Request 1, wherein the information is stored in the transaction's metadata.
3. The method as described in claim 1 further includes generating a cryptographic hash of code associated with the loop and storing the cryptographic hash in a transaction on the blockchain.
4. The method as described in claim 1 further includes the following steps: for each iteration of the loop, the method includes the following steps: evaluating a condition and performing at least one action based on the result of the evaluation, the at least one action including: To ensure that at least one transaction is written to the blockchain; and / or to perform an off-blockchain action.
5. The method as described in claim 4, wherein the condition is related to data received, detected, or generated by the computing resource, or to the state of the blockchain.
6. The method as described in claim 1, wherein the computing resource is i) a resource under a blockchain, separate from the blockchain; and / or ii) configured to implement a control stack for a Turing machine; and / or iii) configured to use the blockchain as an indelible tape in the Turing machine; and / or iv) configured to monitor: the state of the blockchain; a value received or generated by the computing resource; and / or a source of data or signals provided by the blockchain.
7. The method as described in claim 1 further includes the following steps: i) using the blockchain as a storage component for data, instructions, or a pointer to data and / or instructions; ii) using the computing resource as a control flow management component of a Turing complete process, the computing resource being used to execute a loop mechanism.
8. The method as described in claim 1 further includes the following steps: if the computing resource finds a predetermined hash of a portion of the code in a transaction of the blockchain, then restarts the loop at a specific iteration; wherein the information associated with the iteration is specified in metadata, which is provided in or associated with the transaction.
9. The method as described in claim 1, wherein the code of the loop is: hardcoded into or on the computing resource; stored in a private or public available file; and / or stored as an entry in a private or public hash table file; and / or a static code block having a complex number of hardcoded variables or at least one parameter; and / or associated with or containing at least one parameter, which is: populated, initialized, or instantiated as a single value in any data format; a part of the code; retrieving metadata from a blockchain transaction or a resource outside the computing resource; retrieving from a database, a private or public file, or a hash table; and / or populated with complex values, the equivalent of which accesses a data source using at least one indicator, wherein the at least one indicator is stored in the metadata of a transaction on the blockchain.
10. The method as described in claim 1, wherein the computing resource includes or communicates with a registry, the registry enabling the computing resource to access a pre-stored version of a program; wherein the registry stores: i) a password hash of code associated with the loop; and ii) information pointing to a location for accessing a copy of the code.
11. The method as described in claim 1 further includes the step of: using a blockchain transaction to update the code of the loop, thereby replacing the existing code with the new code; wherein: i) The blockchain transaction is a multi-signature Pay to script hash (P2SH) transaction; or ii) A hash storing the existing code and a hash storing the new code.
12. The method as described in claim 1 further includes the step of: influencing the execution of the loop by monitoring the current state of the blockchain to match an initial or triggering condition, a repeating condition, or a stopping condition.
13. The method as described in claim 1, wherein the procedure: i) is an automated voting procedure; and / or ii) includes the allocation or configuration of tokens to a voter, wherein each of the tokens is associated with a quantity of cryptocurrency.
14. The method as described in claim 1, wherein: The loop executed on the computing resource is based on a Turing-complete language; and the blockchain is associated with a blockchain protocol or a limited-function scripting language, wherein the limited-function scripting language itself does not support incorporating control mechanisms into code written in that language, wherein the control mechanisms include the loop.
15. A computer system for implementing the method described in any one of claims 1 to 14, and for controlling the execution of the program on the computing resource using the blockchain, comprising: The blockchain; And the computing resources used to execute the loop, the execution of which is affected by the state of the blockchain, and wherein, for each iteration of the loop, the loop is restarted on an iteration specified by information provided in or associated with a transaction in the blockchain, thereby utilizing the state of the blockchain to affect the execution of the loop.
Citation Information
Patent Citations
Internet-based consumer product brand marketing communication system which enables manufacturers, retailers and their respective agents, and consumers to carry out product-related functions along the demand side of the retail chain in an integrated manner
US20020198791A1
System and method for monitoring third party access to a restricted item
US20150120567A1
System and method for securely receiving and counting votes in an election
US20160027229A1