Script-Based Blockchain Transactions With Runtime State Constraints
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing blockchain technologies lack the ability to enforce locking scripts that require data not known at the time of script creation, particularly data related to the blockchain state, such as block headers or transactions, leading to limitations in the complexity and flexibility of smart contracts.
Innovation Solution
Implementing constraints on unlocking scripts to require block headers, blockchains, or chains of block headers, and injecting this data into the scripts at runtime, allowing transactions to be based on the current state of the blockchain.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If locking scripts are created with fixed data at script creation time, then the script structure is simple and easy to validate, but the script cannot access or enforce constraints on blockchain state data that is not yet known
Solution Approach 1:
The locking script is created in advance with placeholder structures and constraints defined, but the actual blockchain state data is injected later when it becomes available. This allows the script to be prepared and validated structurally beforehand, while adapting to actual runtime data from the blockchain state.
Solution Approach 2:
An intermediary validation mechanism is introduced that separates the script structure validation (which can be done beforehand) from the blockchain state data validation (which requires runtime data). This intermediary layer allows the system to handle both fixed script constraints and dynamic blockchain state constraints without requiring all data to be available at script creation time.
2Adaptability or versatility
If unlocking scripts require data not known at script creation time (such as block headers or blockchain state), then the smart contract flexibility is improved, but the transaction validation becomes more complex and requires verifying access to secret information
Solution Approach 1:
The requirement for secret information access is extracted and removed from the validation process. Instead of requiring validators to verify that the script creator had access to secret information, the system extracts only the necessary blockchain state data (such as block headers or transaction data) that is publicly available and verifiable, eliminating the need for secret verification.
Solution Approach 2:
The unlocking script itself provides the necessary blockchain state data or references to it, rather than requiring external verification of secret access. The script is self-sufficient in providing the data needed for validation, allowing validators to independently verify the transaction without needing to assess the creator's access to secret information.
3Adaptability or versatility
If constraints are added to require block headers or blockchain state data in unlocking scripts, then the functionality of blockchain-based systems is enhanced, but the complexity of transaction processing increases
Solution Approach 1:
Blockchain state data such as block headers are fetched and prepared in advance before transaction validation begins. This preliminary action allows the validation process to work with pre-loaded data, reducing the time and computational resources needed during actual transaction processing while still enabling complex functionality.
Solution Approach 2:
The system selectively retrieves and processes only the specific portions of blockchain state data that are relevant to each particular transaction validation, rather than loading or processing entire blocks or chains unnecessarily. This localized approach maintains high functionality while optimizing processing efficiency by focusing computational resources on relevant data only.
Data Source
AI summary
A computer-implemented method includes: i) receiving, at a node in a blockchain network, a first transaction associated with a digital asset, the first transaction specifying at least: a) a first set of constraints on a second transaction to transfer control of the digital asset, the first set of constraints including one or more constraints that cause the second transaction to contain a set of data from the blockchain network; and b) a second set of constraints on the second transaction, the second set of constraints including a constraint that the set of data includes a block that includes the first transaction, the block included in a blockchain associated with the blockchain network; ii) verifying that the first set of constraints and the second set of constraints are satisfied; and iii) transferring control of the digital asset based at least in part on the verifying.


