Agent-based Turing-complete transactions with feedback integration within blockchain systems
By integrating parallel computing resources with blockchain to emulate Turing-complete functions, the method addresses scripting language limitations, enabling secure and versatile blockchain applications with complex control structures and automation capabilities.
Patent Information
- Application Number
- JP2023191329
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2016-02-23
- Filing Date
- 2023-11-09
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2037-02-14
AI Technical Summary
Existing blockchain technologies, such as Bitcoin, are limited by their non-Turing complete scripting languages, restricting complex control flow mechanisms and preventing applications like automated tasks and device management, while attempts to enhance functionality, like Ethereum's Solidity, face security vulnerabilities.
A method and system that integrates parallel computing resources with blockchain to emulate Turing-complete functions, using a computational resource (manager) to execute loops and control processes outside the blockchain, maintaining security by limiting scripting languages to basic operations and utilizing blockchain for data storage and metadata management.
Enables versatile blockchain applications with complex control structures, ensuring security by preventing infinite loops and mitigating DoS attacks, while allowing automation of tasks and enhancing functionality beyond traditional scripting limitations.
Smart Images

Figure 0007748658000001 
Figure 0007748658000002 
Figure 0007748658000003
Abstract
Description
[Technical Field]
[0001] The present invention relates generally to consensus-based electronic ledgers, and more particularly to blockchain implementations and technologies. The present invention is particularly suited for use with the Bitcoin blockchain and for applications such as, but not limited to, device / system control, process control, distributed computation and storage. [Background technology]
[0002] The term "blockchain" is used herein to include all forms of consensus-based, electronic, computer-based distributed ledgers, including, but not limited to, blockchain and transaction chain technologies, permissioned and permissionless ledgers, shared ledgers, and variations thereof. While other blockchain implementations have been proposed and developed, the most widely known application of blockchain technology is the Bitcoin ledger. While Bitcoin is referenced herein for convenience and explanation, it should be noted that the present invention is not limited to use with the Bitcoin blockchain, and other blockchain implementations and protocols are within the scope of the present invention.
[0003] A blockchain is a consensus-based electronic ledger implemented as a computer-based, decentralized, distributed system composed of blocks, each of which consists of transactions. Each transaction is a data structure that encodes the transfer of control of a digital asset 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 for which the blocks are chained together to create a permanent, immutable record of all transactions written to the blockchain since its inception. Transactions contain small programs, known as scripts, embedded in their inputs and outputs that specify how and by whom the transaction's outputs are accessible. In the Bitcoin platform, these scripts are written using a stack-based scripting language.
[0004] For a transaction to be written to the blockchain, it must be "validated." Network nodes (miners) perform the work of ensuring each transaction is valid, with invalid transactions being rejected by the network. A software client installed on a node performs this validation on unspent transactions (UTXOs) by executing its lock and unlock scripts. If the execution of the lock and unlock scripts evaluates to TRUE, the transaction is valid and is written to the blockchain. Thus, for a transaction to be written to the blockchain, it must i) be validated by the first node that receives the transaction; if the transaction is validated, the node relays it to other nodes in the network; ii) be added to a new block constructed by miners; and iii) be mined, i.e., added to the public ledger of past transactions.
[0005] While blockchain technology is most widely known for its use as an enabler of cryptocurrencies, digital entrepreneurs have begun to explore the use of both the cryptographic security system that Bitcoin is based on and the data that can be stored on the blockchain to enable new systems, including but not limited to: ·Storing metadata - Realization of digital tokens · Finalize signed contracts with digital signatures Includes.
[0006] It would be extremely effective if blockchain could be used to automate tasks and processes that are not limited to the cryptocurrency realm. Such a solution would be more versatile in its applications, while still being able to take advantage of the benefits of blockchain (e.g., permanent, tamper-resistant recording of events, distributed processing, etc.).
[0007] One current area of interest within the blockchain community is Turing completeness, or specifically, how to achieve Turing-complete behavior in blockchain technology, which is designed to limit functionality for security reasons.
[0008] The Bitcoin scripting language is considered Turing complete because it does not natively support complex flow control functions, such as executing loops. One effect of this limitation is that programs have predictable execution times.
[0009] Another significant effect of limiting Bitcoin scripts to linear or tree-like decision tasks is that it avoids infinite loops that can be used as a means of launching exploits such as Denial of Service (DoS) or DDoS attacks. As a result of this limitation, Bitcoin scripts are often limited to linear tasks rather than more complex uses such as controlling automated tasks, device management, etc.
[0010] The Ethereum blockchain approaches this problem by including a "built-in" Turing-complete language called Solidity. This language originates from the Ethereum platform, and scripts written in Solidity can contain control flow mechanisms such as loops. However, Ethereum has suffered from multiple attacks and exploits.
[0011] Due to the security concerns discussed above, and also due to the widespread use and familiarity of the scripting language utilized by Bitcoin, there also remains a desire within a significant portion of the blockchain community to keep the use of scripting languages limited in connection with blockchain technology. Summary of the Invention
[0012] It is therefore desirable to provide a solution that allows Turing-complete functionality, such as loop mechanisms and other complex control structures, to be integrated into or combined with blockchain scripts while avoiding the harmful effects of potential security weaknesses such as infinite loops. Enabling the automation of complex blockchain-related transactions Controlling the metadata stream that is recorded on the blockchain Extending the functionality and uses of blockchain platforms that intentionally do not rely on or include a Turing-complete language It offers numerous advantages, including:
[0013] Such an improved solution has now been devised. The present invention provides a solution with a novel combination of a blockchain coupled with parallel computing resources that allows for emulation, simulation, and / or implementation of loops and other Turing-complete functions outside of typical blockchain scripts. Furthermore, this enables numerous applications, for example, for automated tasks related to distributed data storage, distributed computing, and control of drones or any Internet of Things (IoT) device. Such applications may include utilizing the blockchain for metadata storage, managing digital tokens, and finalizing contracts.
[0014] Therefore, according to the present invention, there is provided a solution as defined in the attached claims. According to the present invention, a (processing) control method and a corresponding system may be provided. The present invention may be referred to as a blockchain-enabled control method / system, which may control automated tasks or processes.
[0015] The present invention may be configured to utilize blockchain to emulate / simulate Turing completeness. Additionally or alternatively, the present invention may enable applications relating to Turing complete control mechanisms to be run on a blockchain platform.
[0016] Additionally or alternatively, the present invention may be described as a method or system configured to control processes executed on off-block computational resources using a blockchain and / or one or more blockchain transactions. Thus, the present invention comprises an arrangement in which separate computational components, functionally and structurally distinct from one another, are configured to interact to provide novel technical results. The interaction of different computational systems (computational resources and blockchain) provides a very powerful means of control.
[0017] From a computational resource perspective, the present invention provides the benefits of a persistent, tamper-resistant record of program execution. From a blockchain perspective, the present invention provides an improved blockchain implementation because it allows Turing-complete operations to be at least partially simulated through the use of blockchain, and then more functionally complex blockchain-based applications can be deployed. This is all achieved while maintaining the use of a limited scripting language for blockchain transactions. Scripting languages can be limited in that their design or implementation prevents, or at least does not natively support, complex control flow mechanisms such as loops from being incorporated into code written in the language. The language's instruction set, i.e., "commands" or "opcodes," available to a programmer may be configured so that it does not include commands for complex flow control mechanisms.
[0018] A blockchain may be associated with or utilize a blockchain protocol that has a limited language, which may be a scripting language. The present invention may utilize a blockchain to extend the functionality of the limited scripting language for the performance of tasks.
[0019] The present invention may utilize the state of the blockchain to perform loop-based processing. The loop-based processing may be performed on a computational resource that operates in parallel with the blockchain network. The computational resource may be separate from (not part of) the blockchain network. The computational resource may be referred to as an "oracle" or a "bot."
[0020] This allows blockchain protocols to utilize limited-function scripting languages while allowing control flow mechanisms such as loops to be implemented outside of the blockchain. This novel combination enhances the versatility of blockchain technology while ensuring security.
[0021] The method comprises: executing a loop on a computational resource; using the state of the blockchain to influence the execution of the loop; may include: Additionally or alternatively, the invention may include using a blockchain to implement a Turing machine with code references provided in one or more transactions and / or blocks (of transactions). The computational resource may be any processor-based device or system. It may be, for example, a server or multiple servers. It may be a standalone or distributed resource. The blockchain may be the Bitcoin blockchain or any other blockchain-related platform. The blockchain may be a consensus-based distributed ledger.
[0022] Information related to at least one iteration of the loop may be stored in a transaction on the blockchain. The information may be stored as metadata in the transaction. The loop may include an "If condition then action" (ICTA) instruction.
[0023] The method may further include generating a cryptographic hash of the code associated with the loop, and preferably storing the cryptographic hash within a transaction on the blockchain. The code may be a code block containing a control flow statement, such as an "If condition then action" statement. The code block may be a portion of code, such as a full or partial subroutine (e.g., function, method, procedure). The control flow statement may control or influence how the loop is executed, such as the number of iterations.
[0024] The computational resource may be configured to monitor the state of the blockchain for transactions that have a cryptographic hash of the code associated with the loop.
[0025] The method comprises: For each iteration of the loop, further comprising the steps of evaluating the condition and performing at least one action based on a result of the evaluation; At least one action is causing at least one transaction to be written to said blockchain; and / or Steps to perform off-blockchain actions It may further include:
[0026] Conditions may be used to monitor any value, signal, or input, regardless of where, how, or to whom it is generated, on or off the blockchain. Conditions may relate to data received, detected, or generated by a computational resource and / or the state of the blockchain. A condition may be described as a "trigger." It may be or relate to a specific state of the blockchain, an event detected off-block (e.g., a date or temperature reading), or a combination of both.
[0027] The action may include sending a signal to take an event off-clock, broadcasting a new transaction, or a combination of both. The index may be (i) maintained off-block within a computational resource (the "manager"), or (ii) a value stored in a subsequently broadcast transaction. (i) and (ii) represent two alternative ways of maintaining control data.
[0028] The computational resources are It may be configured to monitor the state of the blockchain, values generated or received by the computational resources, and / or data or signal sources provided away from the blockchain.
[0029] The method comprises: i) using a blockchain as a storage component for data, instructions or pointers to data and / or instructions; ii) utilizing a computational resource as a control flow management component for a Turing-complete process, the computational resource being configured to execute a loop mechanism; may have
[0030] Thus, the blockchain may act as the indelible tape of a Turing machine. Computational resources may also serve to control the flow of execution of processes, implementing loops and extending the functionality of scripting languages.
[0031] The method may further include restarting the loop at a designated iteration. The loop may be restarted if the computational resource detects a predetermined hash of a portion of code in a transaction in the blockchain. The portion of code may be associated with the body of the loop, which may include an ICTA statement.
[0032] The computational resource may restart the loop at each iteration. This may be done in a variety of ways. For example, the code block for the loop may be: Hard-coded into the computing resources themselves, stored in a privately or publicly available file, They may be stored as entries on a private or public hash table file, or a combination of the above.
[0033] A code block may be static with hard-coded variables, or it may be static but contain parameters that can be entered. A parameter may be a single value in any data format, or a small chunk of code, or a combination of the above. Parameters may be entered directly from metadata in the transaction (e.g., a Bitcoin transaction), or by extracting them from an external source such as an internal database or a private / public file or hash table, or any combination of the above. A pointer to the external source of the parameter value may be stored in the metadata in the transaction.
[0034] Information regarding recurrence may be specified using metadata provided within or associated with the transaction.
[0035] A computing resource may have or communicate with a registry, database, repository, or other storage facility that allows the computing resource to access pre-stored versions of subroutines. i) a cryptographic hash of the code associated with the loop; and ii) information indicating the location from which copies of the code are accessible; and may be stored.
[0036] The method may further include updating the code for the loop using a blockchain transaction to replace the existing code with a new code. Preferably, the transaction is a multi-signature P2SH transaction. A hash of the existing code and a hash of the new code may be stored.
[0037] The present invention also provides a system for implementing any of the above-described method embodiments.
[0038] The present invention may provide a computer-based system. The system may be configured to utilize a blockchain to control processes running on computational resources. Additionally or alternatively, the system may be configured to utilize (interact with) the blockchain to simulate or emulate Turing completeness and / or enable tasks (applications) involving control flow structures, such as loops, to be executed via the blockchain.
[0039] The system is Blockchain and a computational resource configured to execute a loop such that execution of the loop is affected by the state of the blockchain; may have
[0040] Information relating to at least one iteration of the loop is stored in a transaction on the blockchain, preferably as metadata in the transaction.
[0041] Preferably, the computational resource is configured to generate a cryptographic hash of code associated with the loop. Preferably, the cryptographic hash is stored in a transaction on the blockchain. Additionally or alternatively, the computational resource is configured to monitor the state of the blockchain for transactions having the cryptographic hash of code associated with the loop.
[0042] Preferably, for each iteration of the loop, the condition is evaluated and at least one action is performed based on the result of the evaluation, the at least one action being: causing at least one transaction to be written to the blockchain; and / or Allowing off-blockchain actions to be performed; It has.
[0043] The conditions may relate to data received, detected, or generated by the computational resource, or to the state of the blockchain.
[0044] The computational resources are The state of the blockchain, Values generated or received by the computational resources, and / or Data or signal sources provided off the blockchain The device may be configured to monitor the
[0045] The blockchain may act as a storage component for data, instructions, or pointers to data and / or instructions. The computational resources may act as control flow management components for Turing-complete processing, where the computational resources are configured to execute loop mechanisms. The blockchain may be configured to operate with a restricted language, such as the Bitcoin scripting language.
[0046] If the computational resource detects a predetermined hash of a portion of the code in a transaction in the blockchain, the loop may be restarted at a specified iteration. Information related to the iteration may be specified using metadata provided in or associated with the transaction.
[0047] A computing resource may have or communicate with a registry that allows the computing resource to access pre-stored versions of subroutines. i) a cryptographic hash of the code associated with the loop; and ii) information indicating the location from which copies of the code are accessible; and may be stored.
[0048] The system may be configured to update a code for a loop using a blockchain transaction such that an existing code is replaced with a new code. Preferably, the transaction is a multi-signature P2SH transaction. Preferably, the system is configured to store a hash of the existing code and a hash of the new code.
[0049] Any feature described with respect to one aspect or embodiment of the present invention may also be applicable with respect to any other aspect or embodiment, for example, any feature described with respect to a method may also be utilized with respect to a system, and vice versa.
[0050] These and other aspects of the invention will be apparent from and elucidated with reference to the embodiment(s) described hereinafter, which are described, by way of example only, with reference to the accompanying drawings, in which: [Brief explanation of the drawings]
[0051] [Figure 1] We present an exemplary use of the blockchain as an indestructible tape for a Turing machine. [Figure 2] 10 shows a subroutine that can be used by a manager to implement a repeat loop in relation to a blockchain. [Figure 3] 10 shows an example of an If Condition Then Action (ICTA) code block that can be used in accordance with an embodiment of the present invention. [Figure 4] 10A-10C illustrate Bitcoin commands that allow a user to move data to and from alternative stacks according to an embodiment of the present invention. [Figure 5] 1 illustrates a code registry for a manager according to an embodiment of the present invention. [Figure 6] 10 illustrates metadata associated with a code block of a manager according to an embodiment of the present invention. [Figure 7]10 illustrates metadata associated with the output of a particular iteration of a manager loop according to an embodiment of the present invention. [Figure 8] 1 illustrates a transaction script and metadata according to an embodiment of the present invention. [Figure 9] 1 illustrates an exemplary manager software patching verification and tracking record. [Figure 10] 1 illustrates an exemplary use of the present invention, showing an example of a vote-counting bot iteration loop in pseudocode. DETAILED DESCRIPTION OF THE INVENTION
[0052] The following describes an exemplary embodiment that utilizes the Bitcoin blockchain, although other blockchain protocols and implementations may be utilized and the invention is not limited in this respect.
[0053] The present invention achieves Turing completeness on a limited-operation blockchain platform (i.e., one that uses a scripting language that does not support complex control mechanisms), thus solving the problem of how to expand the uses or applications that blockchains can be deployed for. (Universal Turing Machines, Prentice Hall, Inc, 1967) described how inerasable tape could be used to implement a machine that was Turing complete and could run any algorithm that was also runnable on a Universal Turing Machine.
[0054] The present invention includes a computational resource that operates in conjunction with a blockchain, utilizing it as an indelible tape in a Turing machine implementation. This computational resource runs in parallel with the blockchain network, managing and processing the execution of loop processes. The loop processes are designed to perform a given task, such as automating a process or controlling a device or system (e.g., controlling an IoT device). This parallel resource monitors the state of the blockchain and allows transactions to be written to the blockchain. As such, it may be referred to herein as a "manager" for ease of reference.
[0055] The features and advantages of the present invention are: Enabling the blockchain to act as an indestructible tape for Turing machines Functions and implementation of the computer-based monitoring and management component (manager) that operates in parallel with the blockchain · Use the manager as an instruction table for a Turing machine · Manage managers using a code registry Transaction metadata related to manager code and loop restart · Using digital signatures to enable software updates to the manager Special implementation of the manager using other blockchains Includes.
[0056] Blockchain as the indestructible tape of a Turing machine Referring to FIG. 1, the present invention utilizes a blockchain as the indelible tape of a Turing machine with the following definition and characteristics: 1. The blockchain acts as the tape of a Turing machine. Each transaction in the blockchain represents a cell on the tape, which can contain symbols from a finite alphabet. 2. The tape head can read information from blocks that have already been written to the blockchain. 3. The tape head can write new blocks containing multiple transactions to the end of the blockchain, but they cannot write to blocks that already exist. Also, the blockchain tape is immutable. 4. Metadata for each transaction can be stored as part of a multi-signature pay-to-slash (P2SH) transaction.
[0057] The key function of the Manager is to act as an agent that monitors the current state of the blockchain. It can also receive signals or inputs from any off-block source. Depending on the state of the blockchain and / or the inputs received, the Manager may take certain actions. The Manager decides which actions should be taken. These may or may not involve actions in the "real world" (i.e., off-block) and / or actions on the blockchain (such as creating and broadcasting new transactions). The actions taken by the Manager may be triggered by the state of the blockchain or some off-block input. The Manager may also determine the next set of transactions to be broadcast to the Bitcoin network and subsequently written to the blockchain.
[0058] Manager actions are executed in parallel and simultaneously with the Bitcoin network. In a sense, this extends the functionality of the limited-operation Bitcoin script. This continuous monitoring enables a "loop" control flow construct that makes the combined manager and blockchain system Turing complete.
[0059] The manager as a Turing machine instruction table According to an embodiment of the present invention, a Turing machine: · Data stack: This is represented by the blockchain as described above. Control stack: This is represented by a manager function. It stores information related to repeating control flow functions. Includes.
[0060] Separating the control stack from the data stack provides the benefit of preventing infinite loops from occurring within the blockchain (e.g., Bitcoin) core. Additionally, this mitigates DoS attacks against the Bitcoin system.
[0061] The manager manages and executes loopable subroutines via any type of loop construct (e.g., FOR-NEXT; WHILE, REPEAT UNTIL, etc.). The exemplary embodiment described herein includes a process utilizing an example of an "iterate" construct (see FIG. 2). The user specifies an index (i) and a limit (J), which represent the current iteration number (typically counted starting from 0) and total number of iterations, respectively, of the iterative loop.
[0062] For each iteration, 1. The index is incremented by 1. For the exit condition, when the index reaches the limit, the iteration stops. 2. A block of code containing an “if condition then action” (ICTA) statement is executed, where the action can be any action on or off the blockchain. 3. A cryptographic hash of this subroutine is calculated, which can be stored on the blockchain as part of the transaction (Tx). Because the hash is unique for each code block, it allows for verification of which code was used.
[0063] Thus, the body of the loop contains code blocks, each of which contains an "if condition then action" (ICTA) statement (see Figure 3). Start or trigger conditions (e.g., when a specific Bitcoin address reaches 10 BTC) Iteration criteria (i.e., metadata or hash related to the previous iteration) Stopping condition (i.e., the last iteration of the loop) Monitor the current state of the blockchain for transactions that match
[0064] The ICTA statement allows the manager to determine the next transaction to be performed based on the current state of the blockchain. Performing the next transaction involves broadcasting the transaction to the Bitcoin network and writing a new transaction to the blockchain, which serves as a record that the iteration has been performed. Once the transaction has been written to the blockchain, the manager will subsequently detect that the previous iteration has been performed and written to the blockchain, and will perform the next iteration. The latter continues until the iteration loop exits when the index (i) reaches the limit (J) specified in the code block.
[0065] Each transaction is stored on the blockchain in a reusable manner. In Bitcoin implementations, each signature in a transaction is accompanied by a SIGHASH flag. This flag can take on different values, each value indicating whether other parts of the transaction can be amended without the signature owner's involvement. Reusable transactions have the SIGHASH flag "SigHash_AnyoneCanPay" in one of the transaction inputs, which allows anyone to contribute to the transaction's inputs. This parameter allows the manager's ICTA function to be executed and repeated multiple times with different inputs. The use of this function can be restricted to authorized parties, for example, through copyright of the reusable transaction.
[0066] The "If condition" portion of an ICTA code block can monitor any type of condition. This is similar to other programming languages (e.g., C, CC++, Java) and is not limited to information stored on the blockchain. Some example conditions are listed below. Monitor the date and time (i.e. when a specific date and time is reached) Monitor the weather (i.e. when the temperature is below 10°C and it is raining) Monitor social media (i.e. when I receive a message from a friend) Monitor the terms of a contract or trust (i.e., when company A acquires company B) Monitor news and events (i.e., when soccer team A wins the game) IoT (Internet of Things) Monitor information from the System of Things (e.g., when an incandescent light bulb needs to be replaced) Monitor data from mobile / wearable devices (i.e., when a wearable step-tracking device counts 10,000 steps) Monitor results from cloud computing (i.e., when computations are completed and results are received) Monitor remote data storage (i.e. if files still reside remotely) The "Then action" portion of an ICTA code block can perform several actions. The present invention is not limited with respect to the number or type of actions that can be taken. Actions are not limited to transactions on the blockchain, although transactions including metadata related to the action may be written to the blockchain.
[0067] The metadata may have any format specified by the manager. However, according to one embodiment of the present invention, the metadata may store a hyperlink to a file containing more data or instructions related to the action. The metadata may store both a hash of the action that serves as a lookup key for the hash table, as well as a hyperlink to a hash table containing more data or instructions related to the action. An embodiment may utilize links in a style similar to the BitTorrent Magnet URL format.
[0068] A list of example actions is listed below. Bitcoin transactions (i.e. sending Bitcoin to a specific address) Social media (i.e. sending a message to a friend) Trading (i.e. selling X shares) IoT (i.e., switching off incandescent light bulbs) Commerce (i.e., purchasing items online) Online services (i.e., paying a monthly fee or paying for requested services using Bitcoin) Because the present invention is not limited as to the nature, type or number of actions performed, it provides an extremely versatile solution that can be applied to great effect across a wide range of applications.
[0069] The manager's control stack can be realized in several ways specific to each user's needs. For example, the control stack's iteration loop can be based on any Turing-complete language. One possible language choice is a Forth-style stack-based language. The effect of using this language is to keep the control stack consistent in programming style with the known and widely used Bitcoin script.
[0070] Using Bitcoin Script Alternative Stacks as Data Storage Spaces Bitcoin scripts contain commands, also called opcodes, that allow users to move data to an alternative stack, known as an "alt stack."
[0071] The opcode is OP_TOALTSTACK - Moves data from the top of the main stack to the top of the alternate stack OP_FROMALTSTACK - Moves data from the top of the alternate stack to the top of the main stack (see Figure 4). Similar to the "memory" feature that allows data to be stored in a computer, this allows data from intermediate steps in a computation to be stored in an alternative stack. According to an exemplary embodiment of the present invention, an alternative stack is used to configure Bitcoin scripts to solve small computational tasks and return the results of the computation.
[0072] Use of code registers to manage managers The manager also maintains a register of all the code it owns and executes. This register is organized similar to a lookup table or dictionary that maps specific keys to specific values (see Figure 5). Each key-value pair is represented by the hash of the code block (H1) and the IPv6 address where the code is stored. To extract a code block using key H1, the lookup table is used to extract the associated value (which is the location where the code is stored) and extract the source code.
[0073] The code registry can be implemented in a variety of ways. For example, the lookup table can be implemented using a locally maintained list or a P2P distributed hash table. The source code can be stored using a local, remote, or decentralized file storage system. This can be implemented using the Magnet URI format or any link format using shared zero-knowledge encryption.
[0074] Transaction metadata and loop restart in manager code The information needed to restart the manager's loop at a particular iteration is stored as metadata in the transaction recorded on the blockchain (see Figures 6 and 7).
[0075] In this way, a transaction on the blockchain stores or provides access to information about a given iteration of a loop running on the manager. This information can include the values of any variables related to the loop, such as the index i, and any other necessary information, such as location-related data specifying where further needed information can be accessed or the values of parameters used in code blocks.
[0076] The metadata itself is stored as part of the multi-signature pay-to-script-hash (P2SH) of the transaction. The metadata recorded with the transaction also provides the ability to record an audit trail of how the code was previously executed.
[0077] There are several ways in which the manager can restart a code block in a repeat loop at each iteration. The code block may be hard-coded into the manager itself, or it may be stored in a privately or publicly available file, or it may be stored as an entry in a private or public hash table file, or it may be a combination of the above. The code block may be static with hard-coded variables, or it may be static but contain input-able parameters. The parameters may be single values in any data format, or they may be small chunks of code, or it may be a combination of the above. The parameters may be input directly from metadata in the transaction (e.g., a Bitcoin transaction), or from external sources such as internal databases, private / public files, or hash tables, or by extracting them from any combination of the above. A pointer to an external source of parameter values may be stored in the metadata in the transaction.
[0078] The following steps provide an example of how the manager can resume a code block of a repeat loop at the iteration: In this example, the code registry is a hash table, whereby the hash value serves as the lookup key for the table and is stored in the metadata on the transaction. 1. The manager monitors the blockchain for transactions containing hashes of code blocks that match entries in the code registry. 2. The manager finds the transaction containing the corresponding hash (H1). 3. The manager reads "Metadata-CodeHash" and retrieves the CodeHash field to get H1, and uses it to extract the code (C1). If RIPEMD-160(SHA256(C1)) is equal to H1, the code has not been altered and it is safe to proceed to the next step. 4. The manager reads the "Metadata-CodeHash" that stores the index I and restarts the code at the ith iteration, i.e. the loop is "reloaded" at the appropriate iteration. 5. The user's signature is included in the P2SH command to verify the origin of the metadata. 6. The Manager reads the "Metadata-OutputHash" and "Metadata-OutputPointer" (see Figure 6) and extracts the output of the previous step if these data are needed for this iteration of the loop.
[0079] Multiple signatures may be required to unlock a transaction (e.g., user, operating system, software developer, and software vendor), which allows Digital Rights Management (DRM) systems that manage rights to execute code from all parties involved in a P2SH transaction.
[0080] Manager code updates Software updates and patches for code blocks associated with the manager are securely authenticated using multi-signature P2SH transactions (see Figure 8). The multi-signature transaction records the metadata of the old and new code blocks, as shown in Figures 8 and 9. This creates a record of the switch from old code to new code, thereby providing an audit trail of the software update. The manager must store all hashes of the old and new blocks of source code. The hashes of the new and old source code blocks can be used to verify the integrity of the code files.
[0081] According to an embodiment of the present invention, multiple signatures are required to unlock a transaction (e.g., user, operating system, software developer, and software vendor). This provides a DRM system for managing software updates and patches of code utilized by managers.
[0082] Unlike most software that does not allow software to be updated while it is running, an advantage of the present invention is that software updates can be performed in the middle of loop execution, providing a dynamic and responsive solution that can be reconfigured in real time with minimal interruption to the processes controlled by the present invention.
[0083] The information captured on the blockchain (see Figures 8 and 9) can be used to update to new code mid-loop and start the next iteration step using the metadata output from the previous iteration of the old code.
[0084] Usage example The current Bitcoin scripting language does not allow loops to be performed. This prevents would-be attackers from using Bitcoin payments to trigger continuous automated actions that require external intervention to stop them. However, when the manager of the present invention continuously monitors information on the blockchain, it allows complex automated actions to be safely executed based on the latest information on the blockchain.
[0085] The following describes how the Manager's control stack can be used to automate processes related to automated online vote-counting bots. It should be noted that this is not limited to "voting" in the sense of an election or political vote, but can be used for any application involving a choice or choice action. The term "voting" can simply be used to mean "selection" or "instruction."
[0086] The vote counting bot is designed to ensure fair and pseudo-anonymous voting with a blockchain that records an immutable and permanent track record of the vote counting process. The vote counting bot is automated using a manager's control stack and a repeat loop (see Figure 10). The following scenario illustrates how this works:
[0087] There are 100 voters. If 57 unique "Yes" votes are received by January 1, 2016, the payment will be made to Chair, The voting process will be released to Jason. Token Distribution Counting It is divided into two parts:
[0088] For token distribution, 100 voting tokens are distributed to each authenticated voter. Each token is represented by a Bitcoin public and private key pair, which is distributed to each voter using a secret exchange protocol. Each Bitcoin public key and address is loaded with a small amount of Bitcoin representing one vote. The bot maintains a list of public keys associated with each authenticated token and makes this list public before voting begins. To ensure that votes are tamper-proof and anonymous, the list of private keys and the mapping between voter identities and their tokens are destroyed (i.e., never stored).
[0089] Having a list of anonymized, pre-authenticated addresses provides other important advantages. It ensures that only those who are authenticated can cast a valid vote. It also allows for the elimination of any unwanted votes originating from a particular address (e.g., spammers, fraudulent voters) without compromising the voter's identity. To implement the counting process, the manager runs a repeating loop. The list of addresses is maintained in the Bitcoin script and transferred to the alternative stack for data storage. Once an address has been counted, it is removed from the alternative stack and is no longer added to the next transaction. The repeating loop stops when the list of addresses is empty.
[0090] Instead of using the integer index i to keep track of where the loop is currently at, the VoteBot Manager uses it to store intermediate vote counting values, which ensures that intermediate vote counting values are stored in the blockchain, which provides a record of authenticity and shows that the vote counting process is fair.
[0091] If the number of unique "Yes" votes received reaches 57, the agreed amount of Bitcoin will be paid to Jason's account. A cryptographic hash of the vote-counting script and the IPv6 address where it is stored will be released to the public, meaning that the public has enough information to perform a recount and ensure that the vote-counting process was fair and correct.
[0092] It should be noted that the above-described embodiments illustrate rather than limit the present invention, and that those skilled in the art can design numerous other embodiments without departing from the scope of the present invention as defined by the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The use of a word such as "comprises" does not exclude the presence of elements or steps other than those listed in any claim or the specification as a whole. In this specification, "comprises" means "comprises or comprises." The singular reference of an element does not exclude the plural reference of such elements, and vice versa. The invention may also be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a device claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The mere fact that certain means are recited in mutually different dependent claims does not indicate that a combination of these means cannot be used to advantage.
Claims
1. 1. A method, comprising: a computing resource configured to execute in parallel with a network of blockchains to manage processing and execution of a loop process; the computational resource monitoring a state of the blockchain and using the state of the blockchain to influence execution of the loop to cause one or more transactions to be written to the blockchain, the computational resource not being part of the blockchain network; Executing the loop process includes the computational resource managing and executing a loop, the loop having an index (i) representing a current iteration and a limit (J) indicating a total number of iterations of the loop, the iterations of the loop comprising: i) incrementing the index (i) by 1; ii) executing a code block of said loop containing an "if condition then action" (ICTA) statement; iii) computing a cryptographic hash of steps i) and ii), storing the cryptographic hash in a blockchain transaction, and broadcasting the blockchain transaction to the blockchain network to record execution of the loop iterations; repeating steps i) to iii) until the limit (J) is reached; A method comprising:
2. the computational resource is configured to monitor a current state of the blockchain for transactions that match a start or trigger condition, a repeat condition, or a stop condition, and, if a matching transaction occurs, to affect execution of the loop; 10. The method of claim 1, wherein information associated with at least one iteration of the loop is stored as metadata within a transaction on the blockchain.
3. 3. The method of claim 1 or 2, wherein the computational resource is configured to monitor the state of the blockchain for transactions that include the cryptographic hash of code associated with the loop.
4. The method comprises: For each iteration of the loop, iv) evaluating a condition and performing at least one action based on a result of said evaluation, said at least one action including causing an off-blockchain action to be performed; The method according to any one of claims 1 to 3, further comprising:
5. The condition is: data received, detected, or generated by the computational resource; or the state of the blockchain; The method of claim 4, wherein
6. restarting the loop at a specified iteration if the computational resource detects a predetermined hash of a portion of code in a transaction in the blockchain; The method of any preceding claim, wherein the information relating to the recurrence is specified using metadata provided within or in association with the transaction.
7. The code for the loop is: hard-coded in or on the computing resource; stored in a privately or publicly available file; and / or stored as entries in a private or public hash table file, and / or A static block of code with a hard-coded variable or at least one parameter, The method according to any one of claims 1 to 6.
8. The code of the loop relates to or includes at least one parameter, the at least one parameter being: be populated, initialized, or instantiated with a single value in any data format; Part of the code is retrieved from metadata in a blockchain transaction or from a source external to the computational resource; retrieved from a database, or a private or public file or hash table; and / or The transaction is populated using a value accessed using at least one pointer to a data source, the at least one pointer being stored as metadata within the transaction on the blockchain. The method according to any one of claims 1 to 7.
9. the computing resource includes or communicates with a registry that allows the computing resource to access pre-stored versions of steps i) through iii); The registry may include: i) a cryptographic hash of the code associated with the loop; and ii) information indicating where a copy of said code can be accessed; and The method according to any one of claims 1 to 8, wherein
10. updating the code of the loop using a blockchain transaction to replace existing code with new code; the transaction is a multi-signature P2SH transaction, storing a hash of the existing code and a hash of the new code; The method of any one of claims 1 to 9, further comprising:
11. 1. A computer-based system comprising: Blockchain network and A computational resource configured to run in parallel with the blockchain network and manage the processing and execution of loop processes; Including, the computational resource monitors the state of the blockchain and uses the state of the blockchain to affect execution of the loop to cause one or more transactions to be written to the blockchain, the computational resource is not part of the blockchain network; Executing the loop process includes the computational resource managing and executing a loop, the loop having an index (i) representing a current iteration and a limit (J) indicating a total number of iterations of the loop, the iterations of the loop comprising: i) incrementing the index (i) by 1; ii) executing a code block of said loop containing an "if condition then action" (ICTA) statement; iii) computing a cryptographic hash of steps i) and ii), storing the cryptographic hash in a blockchain transaction, and broadcasting the blockchain transaction to the blockchain network to record execution of the loop iterations; repeating steps i) to iii) until the limit (J) is reached; Including, the system.
12. The computational resources include: a value generated or received by said computational resource; and / or a data or signal source provided external to the blockchain; The system of claim 11 configured to monitor:
13. If the computational resource detects a predetermined hash of a portion of code in a transaction in the blockchain, the loop resumes at a specified iteration; The system of any of claims 11 to 12, wherein the information relating to the recurrence is specified using metadata provided within or in association with the transaction.
14. the computing resource includes or communicates with a registry that allows the computing resource to access pre-stored versions of subroutines; The registry may include: i) a cryptographic hash of the code associated with the loop; and ii) information indicating where a copy of said code can be accessed; and The system according to any one of claims 11 to 13, wherein the system stores:
15. The system comprises: configured to update the code of the loop using blockchain transactions to replace existing code with new code; the transaction is a multi-signature P2SH transaction, The system of any of claims 11 to 14, wherein the system is configured to store a hash of the existing code and a hash of the new code.
Citation Information
Patent Citations
Method for creating, issuing and redeeming payment assured contracts based on mathemematically and objectively verifiable criteria
US20150206106A1
System and method for securely receiving and counting votes in an election
US20160027229A1
Devices, systems, and methods for facilitating low trust and zero trust value transfers
WO2015171580A1