Blockchain Digital Contracts Using Merkle Root Condition Encoding
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The current scripting language limitations in blockchain technology restrict the creation of complex smart contracts, particularly due to the linear scaling of script size with the number of dependencies, leading to a frustratingly low capacity for encoding conditions in transactions.
Innovation Solution
The use of a hash tree, specifically a Merkle tree, to encode smart contract conditions using a single hash value (Merkle root), where only a trusted party has access to the secret value for generating the tree, allowing efficient and secure execution of smart contracts with minimal computational requirements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If a stack-based scripting language is used to encode smart contract conditions, then the contract can be executed on the blockchain, but the script size scales linearly with the number of dependencies, limiting the number of conditions that can be included
Solution Approach 1:
The patent segments the contract conditions into a tree structure where conditions are organized hierarchically with intermediate logical operations. This segmentation allows the conditions to be represented more compactly than a linear script, reducing the overall script size while maintaining the ability to encode multiple dependencies.
Solution Approach 2:
The patent transitions from a one-dimensional linear script to a two-dimensional tree structure. By organizing conditions in a hierarchical tree with multiple levels and branches, the system can encode a greater number of conditions within a smaller footprint, effectively adding a dimensional aspect to the condition representation.
2Adaptability or versatility
If more conditions are included in the smart contract, then the contract becomes more complex and capable, but the computational overhead and script size increase
Solution Approach 1:
The patent performs preliminary organization of conditions into a tree structure before execution. By pre-structuring the conditions with logical operators and hierarchical relationships, the system reduces the computational overhead during actual contract execution, as the interpretation engine can efficiently traverse the pre-organized tree rather than processing a linear sequence of conditions.
Solution Approach 2:
The patent changes the structural parameter of condition representation from linear to hierarchical. This parameter change enables more conditions to be encoded with reduced computational overhead, as the tree structure allows for more efficient evaluation and pruning of condition branches during execution.
3Reliability
If all contract conditions are explicitly recorded in transactions, then the contract execution is transparent and verifiable, but the transaction size and storage requirements increase
Solution Approach 1:
The patent extracts the detailed condition structure from the transaction data and represents it compactly using a hash of the condition tree. This extraction allows the full condition verification capability to be maintained while significantly reducing the amount of data that needs to be stored and transmitted in each transaction.
Solution Approach 2:
The patent uses cryptographic hashing to create a compact representation (copy) of the full condition tree. This hash copy maintains the verification capability of the original conditions while occupying minimal storage space, allowing reliable contract verification without proportionally increasing data storage requirements.
Data Source
AI summary
A computer-implemented method of encoding a digital contract between first and second parties of a blockchain network, the digital contract being for transferring an amount of a digital asset from the first to the second party based on a condition being fulfilled; the method comprising: obtaining a plurality of data elements, each representing a different contract condition, wherein at least one of the conditions is linked to the second party; generating a hash tree based on the data elements, wherein the hash tree comprises: i) first leaf hashes generated by hashing a respective data element, and second leaf hashes comprising at least one hash key generated by hashing a secret value known only to the trusted third party, ii) internal hashes, and iii) a root hash; and making the root hash available to the first party for inclusion in a transaction of the blockchain.


