Blockchain Smart Contract Segmentation for Hash Computation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The computing efficiency of hash values in blockchain systems decreases as the amount of data in contracts increases, leading to low overall computing efficiency for node consistency in blockchain networks.
Innovation Solution
Separating smart contracts into logic contracts and data contracts, distributing block data uniformly across multiple data contracts, and computing hash values in parallel using Merkle tree algorithms to improve efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If data is stored in a single smart contract, then data integrity is maintained, but computing efficiency of hash values decreases as data volume increases
Solution Approach 1:
The patent divides a single smart contract into multiple data contracts, each storing a portion of the block data. This segmentation allows hash values to be computed on smaller data sets in parallel, improving computing efficiency while maintaining data integrity through the Merkle tree structure that links all data contracts to the block header.
2Stability of the object's composition
If all block data is stored in one contract, then data consistency is ensured, but the computing time for hash values increases
Solution Approach 1:
Block data is segmented across multiple data contracts, each computing its hash value independently and in parallel. The Merkle tree structure combines these individual hash values to produce the final block hash, reducing total computing time while ensuring data consistency through the cryptographic linking of all segments.
Solution Approach 2:
Hash values of individual data contracts are computed in advance and stored separately before being combined. This preliminary computation allows for parallel processing and reduces the overall time required for block validation, as the final Merkle root calculation only needs to combine pre-computed hash values rather than processing all raw data.
3Quantity of substance
If smart contract size increases to accommodate more data, then data storage capacity improves, but hash value computation becomes slower
Solution Approach 1:
Instead of placing all data in a single large smart contract, the patent segments data across multiple smaller data contracts. Each contract maintains a manageable size that allows for efficient hash computation, while the collective capacity of all contracts provides the necessary storage capacity. The Merkle tree structure efficiently combines the hash values of these smaller contracts to represent the entire data set.
Data Source
AI summary
Methods, system, and apparatus, including computer programs encoded on computer storage media for data processing are provided. One of the methods includes: establishing a logic contract of a blockchain and one or more data contracts corresponding to the logic contract; deploying the logic contract and the one or more data contracts in the blockchain; storing data of a target block in the blockchain into the one or more data contracts; computing a hash value of each of the one or more data contracts; and determining a hash value of the target block in the blockchain based on the hash value of each of the one or more data contracts.


