Smart contract execution method and device, equipment and medium
A technology of smart contracts and execution methods, applied in the field of information security, can solve the problems of long time consumption, poor execution performance, and large time proportion, and achieve the effect of improving execution efficiency and reducing compilation time.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0026] figure 1 It is a flowchart of a smart contract execution method provided in Embodiment 1 of the present invention. This embodiment can be applied to how to execute smart contracts to solve the existing way of realizing smart contracts through bytecode interpretation and execution. There are smart contracts The case of the execution efficiency problem. The solution of the embodiment of the present invention is executed by the blockchain node, and further, can be executed by the contract virtual machine in the blockchain node device. Optionally, the contract virtual machine can be a WebAssembly contract virtual machine. The method can be executed by a smart contract execution device, and the device can be configured in a computing device carrying a block chain node, and implemented in the form of hardware and / or software. see figure 1 , the method may specifically include:
[0027] S110, acquire a transaction request initiated based on the smart contract.
[0028] A ...
Embodiment 2
[0047] figure 2 It is a flow chart of a smart contract execution method provided in Embodiment 2 of the present invention. This embodiment further optimizes the above-mentioned embodiments and proposes a solution for optimizing contract source code files. see figure 2 , the method may specifically include:
[0048] S210. Decompile the smart contract bytecode file into a target high-level language to obtain a contract source code file.
[0049] S220, inserting at least one hook function among a debug hook function, a resource consumption audit control hook function, and a code injection hook function into the contract source code file.
[0050] Among them, the hook function is a part of the Windows message processing mechanism. By setting the "hook", the application program can filter all messages and events at the system level, and access messages that cannot be accessed under normal circumstances. The essence of a hook is a program for processing system messages, which i...
Embodiment 3
[0060] image 3 It is a flowchart of a smart contract execution method provided in Embodiment 3 of the present invention. This embodiment is further optimized on the basis of the foregoing embodiments. see image 3 , the method may specifically include:
[0061] S310. Decompile the smart contract bytecode file into a target high-level language to obtain the contract source code file.
[0062] S320. Compile the contract source code file to obtain a contract dynamic link library file.
[0063] S330. Insert a unified virtual machine calling proxy interface and a virtual machine writing proxy interface into the contract dynamic link library file.
[0064] Since the contract dynamic link library file itself does not have a read-write interface, in the subsequent process of executing the smart contract, the contract dynamic link library file needs to call external functions or external variables. Based on this, after compiling the contract source code file to obtain the contract...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com