Blockchain Transaction Pre-execution for Double-Spending Avoidance
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In read-write set-model-based blockchain technology, such as Hyperledger Fabric, the double-spending problem occurs when multiple parallel blockchain transactions modify the same data, leading to inefficiencies and resource consumption issues due to data modification by one transaction causing failures in subsequent transactions.
Innovation Solution
Pre-executing smart contracts for each blockchain transaction to generate special instructions instead of read-write sets, which validate the current data value supports the transaction during execution, ensuring all transactions can execute successfully if there is enough balance, using special instructions to validate data status during data storage verification.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multiple parallel blockchain transactions are executed on the same data in read-write set-model-based blockchain technology, then transaction throughput and processing speed are improved, but the double-spending problem occurs causing transaction failures and resource consumption
Solution Approach 1:
The patent applies preliminary action by pre-executing smart contracts for each blockchain transaction before actual execution. This generates special instructions that validate data status in advance, ensuring that multiple parallel transactions can be verified against the original data state before any modifications occur, thereby preventing double-spending while maintaining high throughput
Solution Approach 2:
The patent introduces special instructions as an intermediary mechanism between the smart contract execution and data modification. These special instructions act as mediators that carry validation information from the pre-execution phase to the execution phase, enabling parallel transactions to be validated without directly conflicting with each other's data modifications
2Reliability
If sequential transaction execution is implemented as in Ethereum, then the double-spending problem is avoided, but transaction processing speed and throughput deteriorate
Solution Approach 1:
The patent uses preliminary action to pre-validate all transactions against the original data state before execution. This eliminates the need for sequential execution because the validation phase occurs in parallel for all transactions, yet maintains reliability by ensuring none of them conflict with the base state
Solution Approach 2:
The patent segments the transaction processing into two distinct phases: a pre-execution validation phase where smart contracts are executed to generate special instructions, and an execution phase where transactions are applied. This segmentation allows parallel processing in the validation phase while maintaining data integrity, avoiding the sequential bottleneck
3Productivity
If pre-execution smart contract scheme based on read-write set is implemented as in Hyperledger Fabric, then parallel transaction processing is enabled, but data verification failures occur due to data modification by other transactions
Solution Approach 1:
The patent applies copying by creating special instructions that capture and preserve the data validation state from the pre-execution phase. These special instructions are copies of the validation logic that can be independently verified during execution without requiring access to the original data, which may have been modified by other parallel transactions
Solution Approach 2:
The patent performs preliminary validation by pre-executing smart contracts to generate special instructions that encode the expected data state. This preliminary action simplifies the execution phase verification because validators only need to check against the pre-computed special instructions rather than re-evaluating complex data dependencies
Data Source
AI summary
Disclosed herein are methods, systems, and apparatus, including computer programs encoded on computer storage media, for avoiding double-spending problem in read-write set-model-based blockchain technology. One of the methods includes receiving instructions to execute two or more blockchain transactions on a piece of data, where all blockchain transactions of the two or more blockchain transactions modify a value of the piece of data, and for each blockchain transaction from the two or more blockchain transactions, pre-executing a smart contract associated with the blockchain transaction to generate a special instruction indicating the blockchain transaction, where the special instruction is used to validate that a current value of the piece of data supports the blockchain transaction when executing the smart contract to write the blockchain transaction to a blockchain.


