Blockchain Contract State Access for Faster Transaction Execution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing blockchain transaction execution methods face inefficiencies due to the need to read state variables during transaction execution, leading to increased waiting times and reduced processing efficiency.
Innovation Solution
Pre-storing read/write information for contracts in the blockchain allows for pre-reading the values of state variables requested by transactions, reducing the time required for read results during execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If state variables are read during transaction execution, then transaction execution can be completed, but waiting time increases and processing efficiency decreases
Solution Approach 1:
The patent pre-calculates and stores storage location information of state variables in the contract code during contract deployment. This preliminary action eliminates the need for runtime calculation of storage locations, allowing direct access to state variables during transaction execution and significantly reducing waiting time for read results.
2Speed
If storage location information is calculated during transaction execution, then state variables can be accessed, but execution time increases
Solution Approach 1:
The storage location information of state variables is pre-calculated and embedded in the contract code during contract deployment rather than being calculated during transaction execution. This shifts the computational burden to contract deployment time, enabling direct access to state variables during execution and improving transaction execution speed.
Data Source
AI summary
Blockchain transaction execution methods, blockchain nodes, and systems are provided. In an example method, a first transaction is obtained, where the first transaction invokes a first contract, contract data of the first contract is stored in a blockchain, the contract data includes a first access information table, and the first access information table includes first storage location information of a first state variable requested to be read by the first contract; the first storage location information is read from the blockchain; and a value of the first state variable is read from the blockchain based on the first storage location information, to execute the first transaction.


