Blockchain Virtual Machine Transaction Hash Acquisition
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing Ethereum virtual machine does not support transaction hash acquisition operations, limiting the ability to obtain transaction hashes during transaction execution in blockchain networks based on the Ethereum protocol.
Innovation Solution
Incorporating a transaction hash acquisition instruction into the blockchain virtual machine's instruction set and deploying corresponding logic, along with adding the instruction to the smart contract compiler's set, enables nodes to invoke and execute transaction hash acquisition logic within smart contracts, allowing for the retrieval of transaction hashes during service initiation transactions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If the Ethereum virtual machine uses a default instruction set without transaction hash acquisition capability, then the virtual machine maintains simplicity and compatibility, but it cannot obtain transaction hashes during transaction execution
Solution Approach 1:
The patent introduces a transaction hash acquisition instruction as an intermediary element between the virtual machine execution environment and the transaction data structure. This instruction acts as a mediator that enables nodes to retrieve the transaction hash during smart contract execution without fundamentally altering the virtual machine's core architecture or instruction set design philosophy.
2Ease of operation
If the virtual machine instruction set is expanded to include transaction hash acquisition instruction, then nodes can obtain transaction hashes during execution, but the instruction set and compiler complexity increase
Solution Approach 1:
The transaction hash acquisition instruction is prepared and integrated into the virtual machine instruction set in advance, before actual transaction execution. The smart contract compiler is pre-configured with knowledge of this instruction's syntax and semantics, allowing nodes to directly use the instruction without additional configuration or compilation steps during transaction processing.
3Loss of information
If smart contracts are compiled with transaction hash acquisition instruction support, then service smart contracts can retrieve transaction hashes, but the compilation process becomes more complex
Solution Approach 1:
The smart contract compiler automatically handles the integration of transaction hash acquisition instructions through its existing instruction set processing capabilities. The compiler self-adapts to the new instruction by applying the same compilation rules and optimization techniques it uses for other virtual machine instructions, without requiring manual intervention or special processing procedures.
Data Source
AI summary
Methods, systems and apparatus, including computer programs encoded on computer storage media, for acquiring a blockchain smart contract-based transaction hash. In one example, the method includes: adding, to an instruction set of a blockchain virtual machine associated with a blockchain network, a transaction hash acquisition instruction; deploying, in the blockchain virtual machine, transaction hash acquisition logic corresponding to the transaction hash acquisition instruction; adding, to an instruction set of a smart contract compiler, the transaction hash acquisition instruction; generating, by using the smart contract compiler, a service smart contract that includes at least the transaction hash acquisition instruction; and deploying, in the blockchain network, the service smart contract that includes at least the transaction hash acquisition instruction.


