An extended smart contract execution method, device and electronic equipment
By building a contract extension library and configuring an extension engine, the problems of instruction limitations and poor storage flexibility in smart contract execution methods are solved, and efficient parallel processing and flexible contract operation are achieved.
Patent Information
- Application Number
- CN202210224367.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-07
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-03-07
AI Technical Summary
Existing smart contract execution methods are limited by the number of instructions and stack-oriented execution methods, and cannot provide high-performance parallel processing and flexible state storage, resulting in poor contract operation flexibility.
Build a contract extension library and configure an extension engine for the virtual machine, create an external contract object through external operation, process the virtual machine's contract tasks and generate processing results, and return to the stack.
The virtual machine is enabled to handle tasks beyond the built-in contracts, improving the flexibility and efficiency of contract operation.
Smart Images

Figure CN114936063B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computers, and in particular to a smart contract execution method and device based on extension and an electronic device. BACKGROUND
[0002] The smart contract execution instruction set of a blockchain generally has a number limit, such as a maximum of 256 instructions using a stack-based virtual machine. Meanwhile, such built-in instructions are stack-oriented instruction execution, which cannot provide underlying object-oriented support, and can only be executed through a serial or lock mechanism, otherwise atomic operations such as transactions are not supported, and contracts cannot be executed in parallel; secondly, all contracts involve statistical calculations such as multi-layer loops, and have poor flexibility and cannot meet high performance requirements. In the state storage of a smart contract, the state is generally stored in a unified state tree, and as the amount of certain business data increases, the data storage cannot be isolated. In the smart contract language, the built-in contract instruction method cannot provide auxiliary information similar to an independent library or a secondary index for the underlying distributed database, and has poor flexibility.
[0003] Therefore, it is necessary to provide a contract execution method with flexibility. SUMMARY
[0004] The embodiments of the present specification provide a smart contract execution method and device based on extension and an electronic device to improve flexibility.
[0005] The embodiments of the present specification provide a smart contract execution method based on extension, which includes:
[0006] A contract extension library is constructed, and an extension engine is configured for a virtual machine;
[0007] The extension engine is called to compile a smart contract in the contract extension library, an external contract object is created through an external running manner, a contract task of the virtual machine is processed by using the external contract object, a processing result is generated, and the processing result is returned to a stack of the virtual machine.
[0008] Optionally, the method further includes:
[0009] When the virtual machine executes a contract request, it is determined whether an object supporting the contract request is a built-in object, if yes, the built-in object is called to execute the contract request, otherwise, the extension engine is triggered.
[0010] Optionally, the external contract object is created through an external running manner, which includes:
[0011] An integer object, a floating-point object, and a parallel annotation object are created.
[0012] Optionally, the processing of the contract task of the virtual machine by the external contract object comprises:
[0013] If the virtual machine has multiple contract tasks to be processed, multiple external contract objects are run to process the contract tasks of the virtual machine.
[0014] Optionally, the calling of the extension engine to compile the smart contract in the contract extension library comprises:
[0015] The calling of the extension engine triggers a saving extension, and the smart contract in the contract extension library is compiled in a native compilation environment of the virtual machine.
[0016] Optionally, the processing of the contract task of the virtual machine by the external contract object comprises:
[0017] The parameter transmitted by the virtual machine is received, and the parameter is processed by the external contract object.
[0018] Optionally, the method further comprises:
[0019] Different contract identification sets are associated with different extension engines;
[0020] The calling of the extension engine to compile the smart contract in the contract extension library comprises:
[0021] The extension engine is called to determine the corresponding smart contract set, search for corresponding multiple contracts in the contract extension library, and compile the contracts.
[0022] The embodiments of the present specification also provide an extension-based smart contract execution device, comprising:
[0023] A construction module constructs a contract extension library and configures an internal extension engine for a virtual machine;
[0024] An extension module calls the extension engine to compile a smart contract in the contract extension library, creates an external contract object in an externally running manner, processes a contract task of the virtual machine by the external contract object, generates a processing result, and returns the processing result to a stack of the virtual machine.
[0025] The embodiments of the present specification also provide an electronic device, wherein the electronic device comprises:
[0026] A processor; and
[0027] A memory storing a computer executable program, the executable program causing the processor to execute any of the above methods when executed.
[0028] The embodiment of the present specification also provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs, when executed by a processor, implement any of the above methods.
[0029] The various technical solutions provided by the embodiment of the present specification construct a contract extension library, and configure an embedded extension engine for a virtual machine, call the extension engine to compile a smart contract in the contract extension library, create an external contract object in an external running manner, and process a contract task of the virtual machine by using the external contract object, generate a processing result, and return the processing result to a stack of the virtual machine. By the embedded extension engine for the virtual machine, an extended object is created outside the virtual machine, and the object is supported to process the contract task of the virtual machine, and finally the processing result is returned to the stack of the virtual machine, so that the virtual machine can process the contract task outside the embedded contract, extension is achieved, and the contract running flexibility is improved. BRIEF DESCRIPTION OF DRAWINGS
[0030] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:
[0031] Figure 1 A principle schematic diagram of an extension-based smart contract execution method provided by the embodiment of the present specification;
[0032] Figure 2 A principle schematic diagram of an extension-based smart contract execution method provided by the embodiment of the present specification;
[0033] Figure 3 A principle schematic diagram of an extension-based smart contract execution method provided by the embodiment of the present specification;
[0034] Figure 4 A structure schematic diagram of an extension-based smart contract execution device provided by the embodiment of the present specification;
[0035] Figure 5 A structure schematic diagram of an electronic device provided by the embodiment of the present specification;
[0036] Figure 6 A principle schematic diagram of a computer-readable medium provided by the embodiment of the present specification. DETAILED DESCRIPTION
[0037] Exemplary embodiments of the present application will now be described more fully with reference to the accompanying drawings. The exemplary embodiments, however, can be implemented in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the inventive concept to those skilled in the art. Like reference numerals refer to like elements throughout the specification. Repetitive descriptions of like elements will be omitted for sake of brevity.
[0038] In the case of a certain specific embodiment, the features, structures, characteristics or other details described do not exclude that they can be combined in a suitable manner in one or more other embodiments, in line with the technical idea of the present application.
[0039] In the description of the specific embodiments, the features, structures, characteristics or other details described are intended to enable a full understanding of the embodiments by those skilled in the art. However, it is not excluded that one or more of the features, structures, characteristics or other details can be practiced without them.
[0040] The flowcharts shown in the drawings are merely exemplary illustrations and do not necessarily include all contents and operations / steps, nor are they necessarily executed in the order described. For example, some operations / steps can be further broken down, and some operations / steps can be combined or partially combined, so that the actual execution order can be changed according to the actual situation.
[0041] The block diagrams shown in the drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0042] The term "and / or" or "and / or" includes all combinations of one or more of the associated listed items.
[0043] Figure 1 A principle schematic diagram of an extended-based smart contract execution method is provided for the embodiments of the present specification. The method can include:
[0044] S101: Construct a contract extension library and configure an inbuilt extension engine for a virtual machine.
[0045] In the embodiments of the present specification, a smart contract extension library can be built, which can specifically include:
[0046] A: A smart contract extension library, a tool suite for a development language, for example, an extension library for the Solidity language, is a standard contract, including:
[0047] A01: Configure the basic entry of the smart contract extension library, including the creation of A02, A03, A04, and the address will be replaced after compilation The built-in contract on the blockchain; run in parallel without the extension engine foundation.
[0048] A02: Parallel annotation contract, including parallelizable methods, ABI encoded parameter range, including: contract address, sender address and recipient address;
[0049] A03: Atomic floating point contract, defines basic operations of floating point numbers, including addition, subtraction, multiplication, and division;
[0050] A04: Atomic integer contract, defines basic operations of floating point numbers, including addition, subtraction, multiplication, and division.
[0051] In the embodiments of the present specification, the built-in extension engine can be configured for the virtual machine, specifically including:
[0052] B: Smart contract extension engine, oriented to ABI instruction set, realizing the corresponding contract instance in A;
[0053] B01: Smart contract extension built-in instruction, corresponding to A01, the address is specified in the blockchain, the object entity corresponding to the extension contract will be started, thereby constructing B02, B03, B04;
[0054] B02: Parallel annotation implementation, including parallelizable methods, ABI encoded parameter range, such as contract address, sender address, and recipient address;
[0055] B03: Atomic floating point implementation, defines basic operations of floating point numbers, including addition, subtraction, multiplication, and division;
[0056] B04: Atomic integer implementation, defines basic operations of floating point numbers, including addition, subtraction, multiplication, and division.
[0057] In the embodiments of the present specification, in order to enable the contract extension engine to call a plurality of external contracts corresponding thereto, different contract identification sets can be associated with different extension engines.
[0058] Among them, built-in refers to a code logic built in the main chain at a specified address of the virtual machine, such as 0x0000000000000000FF, the external engine is essentially a built-in instruction, but when executing the associated external contract, it is executed in an external manner, and finally the execution result is returned to the virtual machine as the execution result of the engine.
[0059] S102: calling the extension engine to compile the smart contract in the contract extension library, creating an external contract object through external running, processing the contract task of the virtual machine by using the external contract object, generating a processing result, and returning the processing result to the stack of the virtual machine.
[0060] The method can compile the smart contract in the contract extension library by constructing the contract extension library and configuring the built-in extension engine for the virtual machine, create an external contract object through external running, process the contract task of the virtual machine by using the external contract object, generate a processing result, and return the processing result to the stack of the virtual machine. By configuring the built-in extension engine for the virtual machine, the extended object is created outside the virtual machine and object support is provided to process the contract task of the virtual machine, and finally the processing result is returned to the stack of the virtual machine, so that the virtual machine can process the contract task in addition to the built-in contract, extension is achieved, and the contract running flexibility is improved.
[0061] In the embodiments of the present specification, the following can also be included:
[0062] When the virtual machine executes a contract request, it is determined whether the object supporting the contract request is a built-in object. If yes, the built-in object is called to execute the contract request, otherwise the extension engine is triggered.
[0063] The execution stack of the virtual machine can have multiple contract addresses, which are read in sequence. If a built-in instruction is read, it is directly executed in a built-in manner. If an extension engine address is read, it is executed in an external manner, thereby achieving extension.
[0064] In the embodiments of the present specification, the external contract object created through external running can include:
[0065] An integer object, a floating-point object, and a parallel annotation object are created.
[0066] In the embodiments of the present specification, the contract task of the virtual machine processed by using the external contract object can include:
[0067] If the virtual machine has multiple contract tasks to be processed, multiple external contract objects are run to process the contract task of the virtual machine in parallel.
[0068] In this way, parallel processing can be achieved, further improving flexibility.
[0069] In the embodiments of the present specification, the extension engine can include:
[0070] The extension engine is called to trigger a saving extension, and the smart contract in the contract extension library is compiled in the native compilation environment of the virtual machine.
[0071] Compatibility can be improved by compiling with a native compilation environment.
[0072] In the embodiments of the present specification, the processing of the contract task of the virtual machine by using the external contract object can include:
[0073] Receiving parameters from the virtual machine, and processing the parameters by using the external contract object.
[0074] In the embodiments of the present specification, it can also include:
[0075] Associating different contract identification sets with different extension engines;
[0076] The calling of the extension engine to compile the smart contract in the contract extension library can include:
[0077] Calling the extension engine, determining its corresponding smart contract set, searching for corresponding multiple contracts in the contract extension library, and compiling the same.
[0078] In this way, different extension engines can share one contract extension library, improving reusability and reducing development cost.
[0079] Figure 2 A principle schematic diagram of an extension-based smart contract execution method is provided for the embodiments of the present specification.
[0080] Among them, there is a built smart contract extension library A, a native smart contract compiler C00 and a configured smart contract extension engine B.
[0081] Figure 3 A principle schematic diagram of an extension-based smart contract execution method is provided for the embodiments of the present specification.
[0082] Figure 3 The specific flow during execution is shown, and the specific flow is as follows:
[0083] Writing a parallel extension contract; according to the provided extension contract library, writing a parallel annotation contract;
[0084] 1. Compile the extended contract to obtain bytecode.
[0085] 2. Loop to execute the bytecode.
[0086] Loop to execute the corresponding bytecode until the instruction execution is completed, and if an external contract is encountered, go to step 3.
[0087] 3. XVM external instruction generates corresponding objects: according to the instruction transmitted by XVM, generate or call objects, and push the address of the created object to the stack.
[0088] 4. Execute object method: when the address on the stack is a built-in object, execute the corresponding method directly;
[0089] 5. Return the result to the virtual machine stack: according to the returned result, ABI encode the stack and add it to the execution stack, and continue to step 2.
[0090] Figure 4 A structure diagram of an extended-based smart contract execution device provided for an embodiment of the present specification. The device can include:
[0091] The construction module 401 constructs a contract extension library and configures a built-in extension engine for a virtual machine;
[0092] The extension module 402 calls the extension engine to compile the smart contract in the contract extension library, creates an external contract object through external running, processes the contract task of the virtual machine using the external contract object, generates a processing result, and returns the processing result to the stack of the virtual machine.
[0093] Optionally, it further includes:
[0094] When the virtual machine executes a contract request, it determines whether the object supporting the contract request is a built-in object. If so, it calls the built-in object to execute the contract request. Otherwise, it triggers the call of the extension engine.
[0095] Optionally, the external contract object is created through external running, including:
[0096] Creating integer type objects, floating point type objects and parallel annotation objects.
[0097] Optionally, the virtual machine processes the contract task using the external contract object, including:
[0098] If the virtual machine has multiple contract tasks to be processed, multiple external contract objects are run to process the contract tasks of the virtual machine.
[0099] Optionally, the extension engine is called to compile the smart contract in the contract extension library, including:
[0100] The extension engine is called to trigger the saving extension, and the smart contract in the contract extension library is compiled in the native compilation environment of the virtual machine.
[0101] Optionally, the processing of the contract task of the virtual machine by using the external contract object comprises:
[0102] Receiving parameters from the virtual machine, and processing the parameters by using the external contract object.
[0103] Optionally, the method further comprises:
[0104] Correlating different contract identification sets with different extension engines;
[0105] The compiling of the smart contract in the contract extension library by the extension engine comprises:
[0106] Calling the extension engine, determining the corresponding smart contract set, searching for the corresponding multiple contracts in the contract extension library, and compiling the contracts.
[0107] The device creates an external contract object by constructing a contract extension library and configuring an internal extension engine for the virtual machine, compiles the smart contract in the contract extension library by the extension engine, creates an external contract object by an external running mode, processes the contract task of the virtual machine by using the external contract object, generates a processing result, and returns the processing result to the stack of the virtual machine. By the internal extension engine for the virtual machine, the extended object is created outside the virtual machine and the object support is provided to process the contract task of the virtual machine, and finally the processing result is returned to the stack of the virtual machine, so that the virtual machine can process the contract task other than the internal contract, the extension is realized, and the contract running flexibility is improved.
[0108] Based on the same inventive concept, the present specification also provides an electronic device.
[0109] The electronic device of the present application is described below, which can be regarded as a specific entity implementation of the above-mentioned method and device embodiments of the present application. For the details described in the electronic device embodiment of the present application, it should be regarded as a supplement to the above-mentioned method or device embodiments; for the details not disclosed in the electronic device embodiment of the present application, it can be realized by referring to the above-mentioned method or device embodiments.
[0110] Figure 5 The structure of an electronic device provided by the embodiment of the present specification is shown in the figure. The electronic device 500 according to the embodiment of the present application is described below with reference to Figure 5 Figure 5 The displayed electronic device 500 is only an example, and should not bring any limitation to the function and use range of the embodiment of the present application.
[0111] As Figure 5 As shown, the electronic device 500 is in the form of a general computing device. The components of the electronic device 500 can include, but are not limited to, at least one processing unit 510, at least one storage unit 520, a bus 530 that connects the various system components, including the storage unit 520 and the processing unit 510, a display unit 540, and the like.
[0112] The storage unit stores program code that can be executed by the processing unit 510 such that the processing unit 510 performs the steps described in the processing method section of the present specification according to various exemplary embodiments of the present application. For example, the processing unit 510 can execute the steps shown in Figure 1
[0113] The storage unit 520 can include a readable medium in the form of volatile storage such as a random access memory (RAM) 5201 and / or cache memory 5202, and can further include a read-only memory (ROM) 5203.
[0114] The storage unit 520 can also include program / utility 5204 having a set of at least one program modules 5205, including operating system, one or more application programs, other program modules, and program data, and can include an implementation of a network environment, for example, in each or some combination of these examples.
[0115] The bus 530 can be representative of one or more of several types of bus structures, including a storage bus or bus controller, a peripheral bus, a graphics bus, a processor or local bus using any of a variety of bus structures.
[0116] The electronic device 500 can also communicate with one or more external devices 600 such as a keyboard or pointing device, a Bluetooth device, and / or other devices that enable a user to interact with the electronic device 500. Additionally, the electronic device 500 can further communicate with one or more devices that enable a user to interact with the electronic device 500 in a network environment, and / or to display information to the user, including other electronic devices that can enable universal or interoperable operation with the electronic device 500 and / or software applications not typically associated with the electronic device 500. The communication can occur via an input / output (I / O) interface 550. Still yet, the electronic device 500 can communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), and / or a public network, such as the Internet, via a network adapter 560. The network adapter 560 can be any of a plurality of types of network adapters known in the art, such as a Bluetooth adapter, an Ethernet adapter, a wireless adapter, and / or the like. The network adapter 560 can include an antenna, which can be internal or external to the electronic device 500. It will be appreciated that although the network adapter 560 is shown as a single component, the network adapter 560 can include a plurality of components, such as a plurality of antennas, and / or the like. Figure 5 Other hardware and / or software modules can be used in conjunction with electronic device 500, as desired, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0117] Through the above description of the embodiments, those skilled in the art can easily understand that the exemplary embodiments described in the present application can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a computer readable storage medium (which can be a CD-ROM, an U disk, a mobile hard disk, etc.) or a network, and includes a number of instructions to make a computing device (which can be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present application. When the computer program is executed by a data processing device, the computer readable medium can realize the above-mentioned method of the present application, i.e., the method shown in Figure 1 .
[0118] Figure 6 A schematic diagram of a computer readable medium according to an embodiment of the present application is shown in
[0119] A computer program implementing the method shown in Figure 1 may be stored on one or more computer readable media. The computer readable media can be a readable signal medium or a readable storage medium. The readable storage medium, for example, can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0120] The computer readable storage medium can include a data signal carried in a baseband or propagated as a carrier wave in a propagated data signal, in which the readable program code is carried. Such a propagated data signal can take on many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium can also be any readable medium that can send, propagate, or transmit the program code for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium can be transmitted in any suitable medium, including but not limited to wireless, wired, optical, RF, etc., or any suitable combination of the above.
[0121] The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0122] In summary, the present invention can be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that general data processing equipment such as a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing a part or all of the methods described herein. Such a program for implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0123] The specific embodiments described above further illustrate the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the present invention is not inherently related to any specific computer, virtual device, or electronic device, and various general-purpose devices can also implement the present invention. The above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.
[0124] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0125] The above merely provides an example of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the scope of claims of the present application.
Claims
1. A smart contract execution method based on extension, characterized in that: include: Build a contract extension library and configure a built-in extension engine for the virtual machine. This includes configuring the basic entry point for the smart contract extension library and replacing the address with the built-in contract on the blockchain after compilation. Implement the corresponding contract instance in the smart contract extension library based on the ABI instruction set. Call the object entity corresponding to the extended contract and build parallel annotation implementation, atomic floating-point implementation, and atomic integer implementation. When the virtual machine executes a contract request, if the object that supports the contract request is not a built-in object, it triggers the call of the extension engine to compile the smart contract in the contract extension library; An extended external contract object is created outside the virtual machine by external operation, and the external contract object is used to process the contract task of the virtual machine, generate a processing result, and return the processing result to the stack of the virtual machine.
2. The method according to claim 1, characterized in that Also includes: If the object supporting the contract request is a built-in object, the built-in object is called to execute the contract request.
3. The method according to claim 1, characterized in that The creation of an external contract object by external operation includes: Create integer objects, floating-point objects, and parallel annotation objects.
4. The method according to claim 1, wherein The utilizing the external contract object to process the contract task of the virtual machine includes: If the virtual machine has multiple contract tasks to be processed, multiple external contract objects are run to process the contract tasks of the virtual machine.
5. The method according to claim 1, wherein The calling of the extension engine to compile the smart contract in the contract extension library includes: The extension engine is called to trigger the saving extension, and the smart contract in the contract extension library is compiled in the native compilation environment of the virtual machine.
6. The method according to claim 1, characterized in that The utilizing the external contract object to process the contract task of the virtual machine includes: Receive parameters from the virtual machine and process the parameters using the external contract object.
7. The method according to claim 1, characterized in that Also includes: Associate different contract identifier sets with different extension engines; The calling of the extension engine to compile the smart contract in the contract extension library includes: The extension engine is called to determine the corresponding smart contract set, and the corresponding multiple contracts are searched in the contract extension library and compiled.
8. An extension-based smart contract execution device, characterized in that: include: Build modules, build a contract extension library, and configure a built-in extension engine for the virtual machine. This includes configuring the basic entry point for the smart contract extension library and replacing the address with the built-in contract on the blockchain after compilation. Implement the corresponding contract instance in the smart contract extension library based on the ABI instruction set. Call the object entity corresponding to the extension contract and build parallel annotation implementation, atomic floating-point implementation, and atomic integer implementation. Extension module: When the virtual machine executes a contract request, if the object that supports the contract request is not a built-in object, it triggers the call of the extension engine to compile the smart contract in the contract extension library, creates an extended external contract object through external operation outside the virtual machine, and uses the external contract object to process the contract task of the virtual machine, generates a processing result, and returns the processing result to the stack of the virtual machine.
9. An electronic device, wherein: The electronic device includes: processor; and, A memory storing a computer executable program which, when executed, causes the processor to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, wherein: The computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method of any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Intelligent contract calling method and device based on block chain
CN112487092A
Smart contract deployment and execution method and device, and storage medium
CN114116134A