CN112487092B - Intelligent contract calling method and device based on blockchain - Google Patents

Intelligent contract calling method and device based on blockchain Download PDF

Info

Publication number
CN112487092B
CN112487092B CN202011404300.8A CN202011404300A CN112487092B CN 112487092 B CN112487092 B CN 112487092B CN 202011404300 A CN202011404300 A CN 202011404300A CN 112487092 B CN112487092 B CN 112487092B
Authority
CN
China
Prior art keywords
virtual machine
contract
intelligent contract
calling
call
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011404300.8A
Other languages
Chinese (zh)
Other versions
CN112487092A (en
Inventor
李陈希
李辉忠
张开翔
范瑞彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN202011404300.8A priority Critical patent/CN112487092B/en
Publication of CN112487092A publication Critical patent/CN112487092A/en
Application granted granted Critical
Publication of CN112487092B publication Critical patent/CN112487092B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides an intelligent contract calling method and device based on a blockchain. When receiving the asynchronous intelligent contract calling request sent by the first virtual machine, the host machine can immediately send a calling response to the first virtual machine, so that the first virtual machine can continuously execute the subsequent steps of the first intelligent contract without waiting for the execution result of the asynchronous intelligent contract calling request, the execution efficiency of external intelligent contract calling can be improved, and the execution cost of external intelligent contract calling can be saved.

Description

Intelligent contract calling method and device based on blockchain
Technical Field
The embodiment of the invention relates to the field of financial science and technology (Fintech), in particular to an intelligent contract calling method and device based on a blockchain.
Background
With the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually changed into financial technology, but due to the requirements of safety and instantaneity of the financial industry, the technology is also required to be higher.
At present, the external intelligent contract call mainly adopts a synchronous call mode to execute the call of the external intelligent contract. That is, when the caller contract needs to call the external smart contract, an external smart contract call request is initiated to the hosting environment, so that the hosting environment creates a new virtual machine based on the external smart contract request, and executes the called contract based on the virtual machine. At this time, the caller contract needs to wait for the called contract to be executed and obtain the return value of the called contract before executing the subsequent steps. However, since the external smart contract call itself involves host environment communication, virtual machine creation, and execution overhead of the external smart contract itself, executing the external smart contract in a synchronous call manner may result in a relatively high execution cost of the external smart contract and a low execution efficiency of the external smart contract.
In summary, there is a need for a blockchain-based smart contract invoking method to improve the execution efficiency of external smart contract invocation.
Disclosure of Invention
The embodiment of the invention provides an intelligent contract calling method and device based on a blockchain, which are used for improving the execution efficiency of external intelligent contract calling.
In a first aspect, an embodiment of the present invention provides a blockchain-based intelligent contract invoking method, including:
The host machine receives an asynchronous intelligent contract calling request sent by a first virtual machine and sends a calling response to the first virtual machine; the asynchronous intelligent contract call request is generated by the first virtual machine in executing a first call statement with an asynchronous call identifier in a first intelligent contract; the first calling statement is used for calling a second intelligent contract; the call response is used for indicating the first virtual machine to continue executing the first intelligent contract;
the host creates a second virtual machine for executing the asynchronous smart contract call request;
And the host machine stores a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine.
According to the technical scheme, an asynchronous intelligent contract calling request sent by the first virtual machine is received, and a calling response is sent to the first virtual machine; the asynchronous intelligent contract call request is generated by the first virtual machine in executing a first call statement with an asynchronous call identifier in the first intelligent contract; the first calling statement is used for calling the second intelligent contract; the call response is to instruct the first virtual machine to continue executing the first smart contract. And then creating a second virtual machine for executing the asynchronous intelligent contract call request, and storing a first execution result obtained by executing the asynchronous intelligent contract call request by the second virtual machine into the first virtual machine. When receiving an asynchronous intelligent contract call request sent by a first virtual machine, a host machine can immediately send a call response to the first virtual machine, so that the first virtual machine can continuously execute subsequent steps of the first intelligent contract without waiting for an execution result of the asynchronous intelligent contract call request, the execution efficiency of external intelligent contract call can be improved, the execution cost of the external intelligent contract call can be saved, and the problems that the execution cost of the intelligent contract is high and the execution efficiency of the external intelligent contract call is low due to the fact that the external intelligent contract is executed in a synchronous call mode in the prior art can be solved.
Optionally, the method further comprises:
The host receives a synchronous intelligent contract calling request sent by the first virtual machine; the synchronous intelligent contract call request is generated by the first virtual machine executing a second call statement with synchronous call identification in the first intelligent contract, and the second call statement is used for calling a third intelligent contract;
the host creates a third virtual machine for executing the synchronous intelligent contract call request;
and the host machine sends a second execution result obtained by the third virtual machine executing the synchronous intelligent contract calling request to the first virtual machine as the calling response.
In the above technical solution, when executing the synchronous intelligent contract call request generated by the second call statement having the synchronous call identifier in the first intelligent contract, some steps in the first intelligent contract located after the second call statement may need to rely on the execution result of the synchronous intelligent contract call request, but for some steps in the first intelligent contract located after the second call statement that do not need to rely on the execution result of the synchronous intelligent contract call request, some subsequent steps unrelated to the execution result of the synchronous intelligent contract call request may be executed in advance, so that the execution efficiency of external intelligent contract call may be improved.
Optionally, the asynchronous smart contract call request includes a instrumentation identification;
Before the host creates the second virtual machine for executing the asynchronous smart contract call request, the method further includes:
the host records that the state of the pile inserting mark is incomplete;
after the host machine stores the first execution result obtained by the second virtual machine executing the asynchronous intelligent contract call request into the first virtual machine, the method further comprises:
and the host records the state of the pile inserting mark as completed.
According to the technical scheme, before the second virtual machine is created, the state of the instrumentation mark in the asynchronous intelligent contract call request is set and recorded to be incomplete, and after the first execution result obtained by executing the asynchronous intelligent contract call request is stored in the first virtual machine, the state of the instrumentation mark in the asynchronous intelligent contract call request is set and recorded to be completed, so that a host machine can conveniently and accurately know the execution state of the asynchronous intelligent contract call request in time, and support can be provided for a subsequent host machine to quickly and accurately check whether the first virtual machine is in a dormant state.
Optionally, after the call response is sent to the first virtual machine, the method further includes:
The first virtual machine generates a waiting-to-call instruction when executing a program statement with a waiting-to-call result identifier in the first intelligent contract; the waiting calling instruction is used for searching the state of the host machine with the instrumentation mark corresponding to the program statement;
and the first virtual machine enters a dormant state when the state of the instrumentation mark is determined to be incomplete.
According to the technical scheme, the state of the instrumentation mark corresponding to the program statement in the host machine is searched based on the waiting call instruction, and whether the first virtual machine needs to enter the dormant state can be rapidly and accurately determined according to the state of the instrumentation mark.
Optionally, after the host machine stores the first execution result obtained by the second virtual machine executing the asynchronous smart contract call request into the first virtual machine, the method further includes:
and the host machine wakes up the first virtual machine if determining that the first virtual machine is in a dormant state.
According to the technical scheme, when the host machine determines that the first virtual machine is in the dormant state, the host machine can wake up the first virtual machine in time based on the execution result of the asynchronous intelligent contract call request.
Optionally, the asynchronous call identifier is obtained by:
For any contract method in the first intelligent contract, if the fact that a jth program statement in the contract method contains a calling statement of the intelligent contract and temporary storage variables used for storing an execution result of the calling statement exist is determined, marking the jth program statement with the asynchronous calling identifier and the instrumentation identifier j; recording the temporary variable; j is an integer greater than or equal to 1;
if the temporary storage variable is used in the mth program statement, marking a waiting calling result mark and a instrumentation mark j for the mth program statement; the mth program statement is a program statement located after the jth program statement in the contract method.
According to the technical scheme, for any contract method in the first intelligent contract, if the fact that the jth program statement in the contract method contains the calling statement of the intelligent contract and temporary storage variables used for storing the execution result of the calling statement exist is determined, the jth program statement can be marked with the asynchronous calling identifier and the instrumentation identifier timely and accurately, and therefore the corresponding calling statement can be conveniently and accurately executed based on the asynchronous calling identifier.
Optionally, the synchronous call identifier is obtained by the following way:
And for any one of the first intelligent contracts, if the fact that the kth program statement in the contract method contains the calling statement of the intelligent contract and no temporary storage variable used for storing the execution result of the calling statement exists is determined, marking the synchronous calling identification for the kth program statement.
According to the technical scheme, for any contract method in the first intelligent contract, if the fact that the kth program statement in the contract method contains the calling statement of the intelligent contract and no temporary variable used for storing the execution result of the calling statement exists is determined, the synchronous calling identification can be marked on the kth program statement timely and accurately, and therefore the corresponding calling statement can be conveniently and accurately executed based on the synchronous calling identification.
In a second aspect, an embodiment of the present invention further provides a blockchain-based intelligent contract invoking device, including:
The receiving unit is used for receiving an asynchronous intelligent contract calling request sent by the first virtual machine and sending a calling response to the first virtual machine; the asynchronous intelligent contract call request is generated by the first virtual machine in executing a first call statement with an asynchronous call identifier in a first intelligent contract; the first calling statement is used for calling a second intelligent contract; the call response is used for indicating the first virtual machine to continue executing the first intelligent contract;
A processing unit for creating a second virtual machine for executing the asynchronous smart contract call request; and storing a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine.
Optionally, the processing unit is further configured to:
Receiving a synchronous intelligent contract calling request sent by the first virtual machine; the synchronous intelligent contract call request is generated by the first virtual machine executing a second call statement with synchronous call identification in the first intelligent contract, and the second call statement is used for calling a third intelligent contract;
Creating a third virtual machine for executing the synchronous smart contract call request;
And sending a second execution result obtained by the third virtual machine executing the synchronous intelligent contract calling request to the first virtual machine as the calling response.
Optionally, the asynchronous smart contract call request includes a instrumentation identification;
The processing unit is further configured to:
the host records that the state of the pile inserting mark is incomplete;
The processing unit is further configured to:
and the host records the state of the pile inserting mark as completed.
Optionally, the receiving unit is further configured to:
Generating a waiting call instruction when executing a program statement with a waiting call result identifier in the first intelligent contract; the waiting calling instruction is used for searching the state of the host machine with the instrumentation mark corresponding to the program statement;
and when the state of the pile inserting mark is determined to be incomplete, entering a dormant state.
Optionally, the processing unit is further configured to:
and if the first virtual machine is determined to be in the dormant state, waking up the first virtual machine.
Optionally, the processing unit is specifically configured to:
For any contract method in the first intelligent contract, if the fact that a jth program statement in the contract method contains a calling statement of the intelligent contract and temporary storage variables used for storing an execution result of the calling statement exist is determined, marking the jth program statement with the asynchronous calling identifier and the instrumentation identifier j; recording the temporary variable; j is an integer greater than or equal to 1;
if the temporary storage variable is used in the mth program statement, marking a waiting calling result mark and a instrumentation mark j for the mth program statement; the mth program statement is a program statement located after the jth program statement in the contract method.
Optionally, the processing unit is specifically configured to:
And for any one of the first intelligent contracts, if the fact that the kth program statement in the contract method contains the calling statement of the intelligent contract and no temporary storage variable used for storing the execution result of the calling statement exists is determined, marking the synchronous calling identification for the kth program statement.
In a third aspect, embodiments of the present invention provide a computing device comprising:
a memory for storing a computer program;
And the processor is used for calling the computer program stored in the memory and executing the intelligent contract calling method based on the block chain according to the obtained program.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing a computer-executable program for causing a computer to execute a blockchain-based smart contract invoking method.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for invoking intelligent contracts based on blockchain according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of pile insertion according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of pile compiling according to an embodiment of the present invention;
FIG. 5 is a flow chart of an embodiment of the present invention for executing an asynchronous external contract call instruction;
FIG. 6 is a flowchart illustrating a method for executing a wait result call instruction according to an embodiment of the present invention;
Fig. 7 is a schematic structural diagram of an intelligent contract invoking device based on a blockchain according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The following is a description of some of the terms involved in the embodiments of the present invention to facilitate understanding by those skilled in the art.
(1) Intelligent contract: a smart contract is a collection of code and data that runs on top of a blockchain system, where the code is responsible for implementing the functionality of the smart contract and the data is responsible for storing the state of the smart contract, which can receive and send information.
(2) Transaction: in the blockchain, any operation (deploying contracts, invoking contract interfaces, etc.) is performed by way of a send transaction. The transaction is initiated by the user and sent to the blockchain node through the client. After receiving the transaction, the blockchain node packages the transaction into blocks and executes the blocks.
(3) Virtual machine: in architecture in computer science, a special piece of software is meant that can simulate a complete computer system with complete hardware system functionality, operating in a completely isolated environment, providing the functionality of a physical computer designed to execute a computer program in a platform independent environment. In the blockchain domain, virtual machines are used to build the execution environment of smart contracts.
(4) Host environment: virtual machines, as software, have to run on real hardware. The software running a virtual machine on real hardware is called a hosting environment. The host environment is mainly responsible for creating and scheduling the virtual machine and provides an interface for accessing the external environment for the virtual machine.
(5) Contract address: in a blockchain, after each smart contract is deployed on the chain, a corresponding address is generated for marking the smart contract. When calling the interface of the intelligent contract through the transaction, the contract address needs to be provided.
(6) External contract invocation: on the blockchain, some functions cannot be completed through one intelligent contract, at this time, the functions required to be used are split into a plurality of intelligent contracts and are deployed on the blockchain respectively, and when a certain function needs to be called, the intelligent contract corresponding to the function is directly called, and at this time, the call is called external contract call.
(7) Byte code: generally refers to intermediate code that has been compiled but not related to the specific machine code, and that requires translation by an interpreter to become machine code. Bytecodes are typically not readable to humans as source code, but rather are sequences of encoded numerical constants, references, instructions, etc. Bytecode is primarily for the purpose of implementing specific software operations and software environments, independent of hardware environments. The implementation of the bytecode is through a compiler and a virtual machine. The compiler compiles the source code into bytecode, and a virtual machine on a particular platform translates the bytecode into instructions that can be run directly.
(8) Code instrumentation: on the basis of ensuring the original logic integrity of the program, the lexical analysis and the grammar analysis are carried out on the source code of the program, and some codes are injected into the source code at some special positions, thereby automatically realizing the specific functions for the program. In colloquial terms, instrumentation is the insertion of a piece of code into or the replacement of another piece of code by some policy. Code here can be divided into source code and bytecode, and what we say is generally referred to as bytecode instrumentation.
The above describes some terms related to the embodiments of the present invention, and the following describes technical features related to the embodiments of the present invention.
To facilitate an understanding of embodiments of the present invention, a smart contract invocation system architecture suitable for use with embodiments of the present invention is first described with reference to the system architecture shown in FIG. 1. The intelligent contract calling system architecture can be applied to calling among intelligent contracts of a blockchain and the like, and the invention is not limited to the above in the actual application scene. As shown in fig. 1, the system architecture may be a server 100 including a processor 110, a communication interface 120, and a memory 130.
The communication interface 120 is used for communicating with a terminal device, receiving and transmitting information transmitted by the terminal device, and realizing communication.
The processor 110 is a control center of the server 100, connects various parts of the entire server 100 using various interfaces and lines, and performs various functions of the server 100 and processes data by running or executing software programs and/or modules stored in the memory 130, and calling data stored in the memory 130. Optionally, the processor 110 may include one or more processing units.
The memory 130 may be used to store software programs and modules, and the processor 110 performs various functional applications and data processing by executing the software programs and modules stored in the memory 130. The memory 130 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required for at least one function, and the like; the storage data area may store data created according to business processes, etc. In addition, memory 130 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
It should be noted that the structure shown in fig. 1 is merely an example, and the embodiment of the present invention is not limited thereto.
Based on the above description, fig. 2 illustrates a flow of a blockchain-based intelligent contract invoking method according to an embodiment of the present invention, where the flow may be executed by a blockchain-based intelligent contract invoking device.
As shown in fig. 2, the process specifically includes:
Step 201, a host machine receives an asynchronous intelligent contract call request sent by a first virtual machine, and sends a call response to the first virtual machine.
At step 202, the host machine creates a second virtual machine for executing the asynchronous smart contract call request.
And 203, the host machine stores a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract call request into the first virtual machine.
In step 201, the first virtual machine generates an asynchronous smart contract call request when executing a first call statement having an asynchronous call identifier in the first smart contract, where the first call statement is used to call the second smart contract. And then the asynchronous intelligent contract call request is sent to the host, and the host immediately sends a call response to the first virtual machine when receiving the asynchronous intelligent contract call request sent by the first virtual machine, so that the first virtual machine continues to execute the first intelligent contract. Therefore, the first virtual machine can conveniently continue to execute the subsequent steps of the first intelligent contract without waiting for the execution result of the asynchronous intelligent contract call request, the execution efficiency of the external intelligent contract call can be improved, and the execution cost of the external intelligent contract call can be saved. The asynchronous call identifier can be generated by the following steps: for any contract method in the first intelligent contract, if the j-th program statement in the contract method contains the call statement of the intelligent contract and has a temporary storage variable for storing the execution result of the call statement, the j-th program statement is marked with an asynchronous call identifier and a instrumentation identifier j, and the temporary storage variable is recorded, so that the corresponding call statement can be accurately executed based on the asynchronous call identifier. If the temporary storage variable is used in the mth program statement, marking the waiting calling result identifier and the instrumentation identifier j for the mth program statement, so that the corresponding calling statement can be accurately executed based on the waiting calling result identifier. Wherein j is an integer of 1 or more; the mth program statement is a program statement located after the jth program statement in the contract method.
In step 202, before the host creates the second virtual machine for executing the asynchronous smart contract call request, the host sets and records the status of the instrumentation flag in the asynchronous smart contract call request as incomplete, and after the first execution result obtained by the second virtual machine executing the asynchronous smart contract call request is stored in the first virtual machine, sets and records the status of the instrumentation flag in the asynchronous smart contract call request as completed. Therefore, the host machine can conveniently and accurately know the execution state of the asynchronous intelligent contract call request in time, and can provide support for the subsequent host machine to rapidly and accurately check whether the first virtual machine is in the dormant state.
In step 203, the host machine obtains the external contract byte code from the corresponding external intelligent contract according to the external contract address in the asynchronous external intelligent contract call request, executes the external contract byte code based on the second virtual machine, and stores the first execution result of the asynchronous external intelligent contract call request into the first virtual machine after the execution is completed.
The first virtual machine generates a synchronous intelligent contract call request when executing a second call statement with a synchronous call identifier in the first intelligent contract, wherein the second call statement is used for calling a third intelligent contract. And then the synchronous intelligent contract call request is sent to the host machine, so that the host machine creates a third virtual machine for executing the synchronous intelligent contract call request based on the synchronous intelligent contract call request. The host acquires an external contract byte code from the corresponding external intelligent contract according to the external contract address in the synchronous intelligent contract call request, executes the external contract byte code based on the second virtual machine, and stores a second execution result of the synchronous intelligent contract call request into the first virtual machine after the execution is completed. When a synchronous intelligent contract call request generated by a second call statement with a synchronous call identifier in a first intelligent contract is executed, some steps positioned after the second call statement in the first intelligent contract may need to depend on the execution result of the synchronous intelligent contract call request, but for some steps positioned after the second call statement in the first intelligent contract, which do not need to depend on the execution result of the synchronous intelligent contract call request, some subsequent steps which are not related to the execution result of the synchronous intelligent contract call request can be executed in advance, so that the execution efficiency of external intelligent contract call can be improved.
The synchronous call identifier can be generated by the following steps: for any contract method in the first intelligent contract, if the fact that the kth program statement in the contract method contains the calling statement of the intelligent contract and no temporary variable used for storing the execution result of the calling statement exists is determined, the kth program statement is marked with a synchronous calling identifier, and therefore the corresponding calling statement can be conveniently and accurately executed based on the synchronous calling identifier. Wherein k is an integer of 1 or more.
In the prior art, when executing the external contract call, a synchronous mode is adopted, that is, when the caller contract calls the external contract, the caller contract must wait for the called contract to finish execution and obtain the return value of the called contract before continuing to execute downwards. Thus, some computations that do not rely on the execution results of the called contract cannot be performed in advance for the caller contract while waiting for the execution results. For example, there is logic in the caller contract as follows: a. and calling the external contract X, acquiring a specific hash value, and storing the result into the variable X. b. The hash value of the variable y is calculated. c. The sizes of x and y are compared. It can be seen that the calculation of step b does not depend on the result of step a, and therefore should be able to be executed in advance while waiting for the result of step a, however, the synchronous external contract call is such that the execution of step b has to wait for the execution of step a to be completed first, which results in a decrease in the efficiency of the external contract call execution. In addition, it should be noted that, when there are a plurality of consecutive external contract calls that are independent of each other in the caller contract, all the external contract calls will be performed in a completely serial manner, and since the external contract calls themselves involve host environment communication, virtual machine creation, and execution overhead of the external contract itself, the execution cost of the synchronized external contract call is high, and the execution efficiency of the synchronized external contract call is low.
Based on the above, the embodiment of the invention provides an intelligent contract calling method based on a blockchain. When the intelligent contract executing process needs to call the external contract for calling, the caller contract can continue to execute downwards without waiting for the execution of the called contract to finish, but can execute logic irrelevant to the execution result of the external contract in advance while waiting for the execution of the called contract to finish, thereby improving the overall execution efficiency of the contract.
Specifically, the embodiment of the invention designs two additional instructions for the virtual machine executing the intelligent contract, namely an asynchronous external contract CALL instruction CALL_ASYNC < ID > and a waiting result CALL instruction AWAIT < ID >. Wherein, the ID is an integer identifier used for representing a certain external contract call; CALL_ASYNC < ID > represents an asynchronous execution of an external contract CALL with ID; AWAIT < ID > then represents the result of waiting for an external contract call with ID. Note that the CALL ASYNC < ID > instruction is executed in a similar manner to the CALL instruction. In contrast, when the host environment receives an asynchronous external contract CALL request generated by a CALL_ASYNC < ID > instruction in the execution intelligent contract, the host environment immediately returns the execution right to the virtual machine executing the caller contract, and simultaneously starts an additional thread to create a new virtual machine to execute the external contract. Since the call_async < ID > instruction returns immediately, the caller contract can continue to execute down until execution of the AWAIT < ID > instruction suspends itself when it is necessary to rely on the external contract CALL results, waiting for the hosting environment to return the external contract execution results. When the external contract is executed and the execution result is returned to the host environment, the host environment writes the execution result into the designated storage area and wakes up the virtual machine executing the caller contract, so that the caller contract can continue to execute downwards.
In addition, the embodiment of the invention also designs an automatic pile inserting method of the intelligent contract compiler. In compiling the intelligent contract into byte codes, traversing program sentences in the method by taking the method in the contract as a unit. If the program statement contains an external contract calling statement, whether the external contract calling result needs to be used immediately is judged according to whether the external contract calling result is temporarily stored in a temporary variable or not. If the external contract call result is needed to be immediately used, inserting a stub representing synchronous call before the program statement, otherwise inserting a stub representing asynchronous call before the program statement. When the external contract can be called asynchronously, the name of the temporary storage variable is recorded, the subsequent program statement is traversed, and if the temporary storage variable with the same name is used in a program statement for the first time, a pile representing a 'waiting for calling result' is inserted in front of the program statement. When compiling the contract, the intelligent contract compiler compiles and generates a CALL instruction if encountering a synchronous CALL pile; if encountering an asynchronous CALL pile, compiling and generating a CALL_ASYNC < ID > instruction; if a "wait for call result" stub is encountered, then the compile generates an AWAIT < ID > instruction. The automatic instrumentation method can make the asynchronous external contract calling mode completely transparent to the user, and the user does not need to change the original code at all.
In view of this, the implementation process of the intelligent contract call in the embodiment of the invention is described in detail below.
Step1: the stake is inserted.
Referring to fig. 3, fig. 3 is a schematic flow chart of pile insertion according to an embodiment of the present invention. By automatically analyzing the intelligent contracts written by the user and inserting corresponding piles in the program sentences, the intelligent contract compiler is guided to compile external contract calls in the intelligent contracts into an asynchronous form. The concrete process of pile insertion is as follows:
(1) And reading the intelligent contract written by the user.
(2) And sequentially reading contract methods in the intelligent contracts.
(3) The initialization variable I is 1.
(4) It is checked whether I is greater than the total number of contract methods. If yes, jump to (20); otherwise, jumping to (5).
(5) Program statements in the ith contract method are read in sequence.
(6) Initializing variable J to 1.
(7) It is checked whether J is greater than the total number of program statements in the current method. If yes, jumping to (19); otherwise, jumping to (8).
(8) It is checked whether the external contract call statement is included in the jth program statement. If yes, jumping to (9); otherwise, the process jumps to (18).
(9) It is checked whether the result of the external contract call is registered in a certain temporary variable. If yes, jumping to (11); otherwise, the process jumps to (10).
(10) The "synchronous call" stub is inserted before the J-th program statement, and the process jumps to (18).
(11) Inserting an asynchronous call pile before the J-th program statement, wherein the pile comprises an ID field with the value of J.
(12) And recording a temporary variable name for temporarily storing the external contract call result.
(13) The initialization variable K is j+1.
(14) It is checked whether K is greater than the total number of program statements in the current method. If yes, jump to (18); otherwise, the process jumps to (15).
(15) Check if the same name temporary variable is used in the kth program statement. If yes, jumping to (16); otherwise, the process jumps to (17).
(16) Inserting a pile waiting for calling results before the Kth program statement, wherein the pile comprises an ID field, and the value of the ID field is J.
(17) K=k+1, jump to (14).
(18) J=j+1, jump to (7).
(19) I=i+1, jump to (4).
(20) And (5) ending.
Step2: and compiling piles.
Referring to fig. 4, fig. 4 is a schematic flow chart of pile compiling according to an embodiment of the present invention. The smart contract compiler compiles external contract calls in the smart contracts into an asynchronous form by inserting piles based on program statements. The pile compiling method comprises the following specific processes:
(1) And reading the intelligent contract code after the instrumentation.
(2) All program statements in the smart contract code are read in sequence.
(3) The initialization variable I is equal to 1.
(4) It is checked whether I is greater than the number of program statements in the smart contract code. If yes, jumping to (14); otherwise, jumping to (5).
(5) Check if the I-th program statement is a "synchronous call" stub. If yes, jumping to (6); otherwise, jumping to (7).
(6) A CALL instruction is generated and the process goes to (13).
(7) Check if the I-th program statement is an "asynchronous call" stub. If yes, jumping to (8); otherwise, the process jumps to (10).
(8) The ID field in the stub is fetched.
(9) A CALL ASYNC < ID > instruction is generated and the process proceeds to (13).
(10) Check if the I-th program statement is a "wait for call result" stub. If yes, jumping to (1); otherwise, the process jumps to (13).
(11) The ID field in the stub is fetched.
(12) An AWAIT < ID > instruction is generated.
(13) I=i+1, jump to (4).
(14) And (5) ending.
Step3: an asynchronous external contract CALL instruction CALL ASYNC < ID > is executed.
Referring to fig. 5, fig. 5 is a schematic flow chart of an asynchronous external contract call instruction according to an embodiment of the present invention. The virtual machine of the caller contract generates an asynchronous external contract call request when executing an asynchronous external contract call instruction in the intelligent contract, and sends the asynchronous external contract call request to the hosting environment so that the hosting environment processes the asynchronous external contract call request. The specific process of executing the asynchronous external contract calling instruction is as follows:
(1) The virtual machine of the caller contract encodes the calling parameter and stores the calling parameter in a certain position in the memory of the virtual machine.
(2) The virtual machine of the caller contract allocates a piece of memory area for storing the return value of the external contract.
(3) The virtual machine of the caller contract initiates an asynchronous external contract call request to the host environment, wherein the asynchronous external contract call request comprises an ID, an external contract address, a memory starting address where the encoded call parameter is located, the length of the encoded call parameter and a memory starting address for storing a return value.
(4) The hosting environment receives an asynchronous external contract invocation request.
(5) The host environment solves out the ID, the external contract address, the memory starting address where the encoded calling parameter is located, the length of the encoded calling parameter and the memory starting address for storing the return value from the asynchronous external contract call request.
(6) The hosting environment creates a commitment with an identifier of ID and sets its status to "incomplete".
(7) The hosting environment returns execution rights to the virtual machine that originated the asynchronous external contract call request.
(8) The hosting environment invokes the external contract bytecode according to the external contract address.
(9) The hosting environment starts a new thread, creates a virtual machine and executes external contract bytecodes.
(10) And after the called contract is executed, returning an execution result to the host environment.
(11) The hosting environment closes the virtual machine executing the external contract.
(12) The hosting environment writes the execution results into the virtual machine executing the caller contract.
(13) The host environment sets the status of commitment with the identifier ID to "completed".
(14) The hosting environment checks whether the virtual machine executing the caller contract is in a dormant state. If yes, jumping to (15); otherwise, the process jumps to (16).
(15) The hosting environment wakes up the virtual machine executing the caller contract.
(16) And (5) ending.
Step4: the wait result call instruction AWAIT < ID > is executed.
Referring to fig. 6, fig. 6 is a flowchart illustrating a process of executing a wait result call instruction according to an embodiment of the present invention. When the virtual machine of the caller contract executes to the program statement which must depend on the external contract calling result, the virtual machine executes the AWAIT < ID > instruction to suspend itself, and waits for the host environment to return the external contract executing result. And when the external contract is executed and the execution result is returned to the host environment, waking up the virtual machine executing the caller contract, so that the caller contract can continue to execute downwards. The specific process of executing the waiting result calling instruction is as follows:
(1) The virtual machine of the caller contract checks whether the status of the promise with the identifier ID in the hosting environment is "completed". If yes, jumping to (4); otherwise, jumping to (2).
(2) The virtual machine of the caller contract brings itself into a dormant state waiting to be awakened by the hosting environment.
(3) The virtual machine of the caller contract is awakened by the hosting environment and jumps to (1).
(4) And (5) ending.
When the virtual machine of the caller contract executes the CALL instruction of the synchronous external contract CALL instruction, a synchronous intelligent contract CALL request is generated and sent to the host environment, so that the host environment processes the synchronous intelligent contract CALL request. The specific process of executing the synchronous external contract calling instruction is as follows:
a. The caller contract will first encode the call parameters and store the encoded call parameters in a certain location in the memory, then designate a memory area for later storing the return value of the external contract. Then, the caller contract executes the CALL instruction through the virtual machine, and initiates a synchronous external contract CALL request to the host environment, wherein the synchronous external contract CALL request comprises an external contract address, a memory starting address where the coded CALL parameter is located, the length of the coded CALL parameter and a memory starting address for storing a return value.
B. After receiving the request for synchronizing external contract, the host environment creates a new virtual machine. And searching the byte codes of the called contract according to the external contract address in the synchronous external contract call request and loading the byte codes. The host environment then passes the encoded calling parameters passed by the caller contract into the new virtual machine, which begins executing the bytecode of the called contract.
C. After the called contract is executed, the called contract returns the memory address and the length of the return value to the host environment, and the host environment acquires the return value transmitted by the called contract according to the memory address and the length of the return value and writes the return value into a memory area which is designated in the synchronous external contract calling request and used for storing the return value. Then the host environment closes the virtual machine executing the called contract and returns the execution right to the virtual machine where the caller contract is located, and at this time the external contract call flow ends.
The above embodiment shows that, by receiving an asynchronous intelligent contract call request sent by a first virtual machine, and sending a call response to the first virtual machine; the asynchronous intelligent contract call request is generated by the first virtual machine in executing a first call statement with an asynchronous call identifier in the first intelligent contract; the first calling statement is used for calling the second intelligent contract; the call response is to instruct the first virtual machine to continue executing the first smart contract. And then creating a second virtual machine for executing the asynchronous intelligent contract call request, and storing a first execution result obtained by executing the asynchronous intelligent contract call request by the second virtual machine into the first virtual machine. When receiving an asynchronous intelligent contract call request sent by a first virtual machine, a host machine can immediately send a call response to the first virtual machine, so that the first virtual machine can continuously execute subsequent steps of the first intelligent contract without waiting for an execution result of the asynchronous intelligent contract call request, the execution efficiency of external intelligent contract call can be improved, the execution cost of the external intelligent contract call can be saved, and the problems that the execution cost of the intelligent contract is high and the execution efficiency of the external intelligent contract call is low due to the fact that the external intelligent contract is executed in a synchronous call mode in the prior art can be solved.
Based on the same technical concept, fig. 7 illustrates an exemplary block chain-based intelligent contract invoking apparatus according to an embodiment of the present invention, which may execute a flow of a block chain-based intelligent contract invoking method.
As shown in fig. 7, the apparatus includes:
A receiving unit 701, configured to receive an asynchronous smart contract call request sent by a first virtual machine, and send a call response to the first virtual machine; the asynchronous intelligent contract call request is generated by the first virtual machine in executing a first call statement with an asynchronous call identifier in a first intelligent contract; the first calling statement is used for calling a second intelligent contract; the call response is used for indicating the first virtual machine to continue executing the first intelligent contract;
A processing unit 702 configured to create a second virtual machine for executing the asynchronous smart contract call request; and storing a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine.
Optionally, the processing unit 702 is further configured to:
Receiving a synchronous intelligent contract calling request sent by the first virtual machine; the synchronous intelligent contract call request is generated by the first virtual machine executing a second call statement with synchronous call identification in the first intelligent contract, and the second call statement is used for calling a third intelligent contract;
Creating a third virtual machine for executing the synchronous smart contract call request;
And sending a second execution result obtained by the third virtual machine executing the synchronous intelligent contract calling request to the first virtual machine as the calling response.
Optionally, the asynchronous smart contract call request includes a instrumentation identification;
the processing unit 702 is further configured to:
the host records that the state of the pile inserting mark is incomplete;
the processing unit 702 is further configured to:
and the host records the state of the pile inserting mark as completed.
Optionally, the receiving unit 701 is further configured to:
Generating a waiting call instruction when executing a program statement with a waiting call result identifier in the first intelligent contract; the waiting calling instruction is used for searching the state of the host machine with the instrumentation mark corresponding to the program statement;
and when the state of the pile inserting mark is determined to be incomplete, entering a dormant state.
Optionally, the processing unit 702 is further configured to:
and if the first virtual machine is determined to be in the dormant state, waking up the first virtual machine.
Optionally, the processing unit 702 is specifically configured to:
For any contract method in the first intelligent contract, if the fact that a jth program statement in the contract method contains a calling statement of the intelligent contract and temporary storage variables used for storing an execution result of the calling statement exist is determined, marking the jth program statement with the asynchronous calling identifier and the instrumentation identifier j; recording the temporary variable; j is an integer greater than or equal to 1;
if the temporary storage variable is used in the mth program statement, marking a waiting calling result mark and a instrumentation mark j for the mth program statement; the mth program statement is a program statement located after the jth program statement in the contract method.
Optionally, the processing unit 702 is specifically configured to:
And for any one of the first intelligent contracts, if the fact that the kth program statement in the contract method contains the calling statement of the intelligent contract and no temporary storage variable used for storing the execution result of the calling statement exists is determined, marking the synchronous calling identification for the kth program statement.
Based on the same technical idea, an embodiment of the present invention provides a computing device including:
a memory for storing a computer program;
And the processor is used for calling the computer program stored in the memory and executing the intelligent contract calling method based on the block chain according to the obtained program.
Based on the same technical idea, the embodiment of the invention provides a computer-readable storage medium storing a computer-executable program for causing a computer to execute a blockchain-based intelligent contract invoking method.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROK, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (9)

1. A blockchain-based intelligent contract invoking method, comprising:
The host machine receives an asynchronous intelligent contract calling request sent by a first virtual machine and sends a calling response to the first virtual machine; the asynchronous intelligent contract call request is generated by the first virtual machine in executing a first call statement with an asynchronous call identifier in a first intelligent contract; the first calling statement is used for calling a second intelligent contract; the call response is used for indicating the first virtual machine to continue executing the first intelligent contract;
the host creates a second virtual machine for executing the asynchronous smart contract call request;
The host machine stores a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract call request into the first virtual machine;
The asynchronous call identification is obtained by the following steps:
For any contract method in the first intelligent contract, if the fact that a jth program statement in the contract method contains a calling statement of the intelligent contract and temporary storage variables used for storing an execution result of the calling statement exist is determined, marking the jth program statement with the asynchronous calling identifier and the instrumentation identifier j; recording the temporary variable; j in the jth program statement is an integer greater than or equal to 1;
if the temporary storage variable is used in the mth program statement, marking a waiting calling result mark and a instrumentation mark j for the mth program statement; the mth program statement is a program statement located after the jth program statement in the contract method.
2. The method of claim 1, wherein the method further comprises:
The host receives a synchronous intelligent contract calling request sent by the first virtual machine; the synchronous intelligent contract call request is generated by the first virtual machine executing a second call statement with synchronous call identification in the first intelligent contract, and the second call statement is used for calling a third intelligent contract;
the host creates a third virtual machine for executing the synchronous intelligent contract call request;
and the host machine sends a second execution result obtained by the third virtual machine executing the synchronous intelligent contract calling request to the first virtual machine as the calling response.
3. The method of claim 1, wherein the asynchronous smart contract call request includes a instrumentation identification;
Before the host creates the second virtual machine for executing the asynchronous smart contract call request, the method further includes:
the host records that the state of the pile inserting mark is incomplete;
after the host machine stores the first execution result obtained by the second virtual machine executing the asynchronous intelligent contract call request into the first virtual machine, the method further comprises:
and the host records the state of the pile inserting mark as completed.
4. The method of claim 1, wherein after sending the call response to the first virtual machine, further comprising:
The first virtual machine generates a waiting-to-call instruction when executing a program statement with a waiting-to-call result identifier in the first intelligent contract; the waiting calling instruction is used for searching the state of the host machine with the instrumentation mark corresponding to the program statement;
and the first virtual machine enters a dormant state when the state of the instrumentation mark is determined to be incomplete.
5. The method of claim 1, wherein after the host machine stores the first execution result obtained by the second virtual machine executing the asynchronous smart contract call request in the first virtual machine, further comprising:
and the host machine wakes up the first virtual machine if determining that the first virtual machine is in a dormant state.
6. The method of claim 2, wherein the synchronous call identification is obtained by:
And for any one of the first intelligent contracts, if the fact that the kth program statement in the contract method contains the calling statement of the intelligent contract and no temporary storage variable used for storing the execution result of the calling statement exists is determined, marking the synchronous calling identification for the kth program statement.
7. A blockchain-based intelligent contract invoking device, comprising:
The receiving unit is used for receiving an asynchronous intelligent contract calling request sent by the first virtual machine and sending a calling response to the first virtual machine; the asynchronous intelligent contract call request is generated by the first virtual machine in executing a first call statement with an asynchronous call identifier in a first intelligent contract; the first calling statement is used for calling a second intelligent contract; the call response is used for indicating the first virtual machine to continue executing the first intelligent contract;
A processing unit for creating a second virtual machine for executing the asynchronous smart contract call request; storing a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract call request into the first virtual machine;
the asynchronous call identifier is obtained by the processing unit through the following steps:
For any contract method in the first intelligent contract, if the fact that a jth program statement in the contract method contains a calling statement of the intelligent contract and temporary storage variables used for storing an execution result of the calling statement exist is determined, marking the jth program statement with the asynchronous calling identifier and the instrumentation identifier j; recording the temporary variable; j in the jth program statement is an integer greater than or equal to 1;
if the temporary storage variable is used in the mth program statement, marking a waiting calling result mark and a instrumentation mark j for the mth program statement; the mth program statement is a program statement located after the jth program statement in the contract method.
8. A computing device, comprising:
a memory for storing a computer program;
a processor for invoking a computer program stored in said memory, performing the method according to any of claims 1 to 6 in accordance with the obtained program.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer-executable program for causing a computer to execute the method of any one of claims 1 to 6.
CN202011404300.8A 2020-12-03 2020-12-03 Intelligent contract calling method and device based on blockchain Active CN112487092B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011404300.8A CN112487092B (en) 2020-12-03 2020-12-03 Intelligent contract calling method and device based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011404300.8A CN112487092B (en) 2020-12-03 2020-12-03 Intelligent contract calling method and device based on blockchain

Publications (2)

Publication Number Publication Date
CN112487092A CN112487092A (en) 2021-03-12
CN112487092B true CN112487092B (en) 2024-06-18

Family

ID=74939282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011404300.8A Active CN112487092B (en) 2020-12-03 2020-12-03 Intelligent contract calling method and device based on blockchain

Country Status (1)

Country Link
CN (1) CN112487092B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113378240B (en) * 2021-06-23 2023-03-28 浪潮云信息技术股份公司 Synchronous calling user identity authentication method based on block chain
CN114979165B (en) * 2022-05-18 2024-05-07 杭州顶天网络有限公司 Contract interaction method based on blockchain

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109146679A (en) * 2018-06-29 2019-01-04 阿里巴巴集团控股有限公司 Intelligent contract call method and device, electronic equipment based on block chain

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109003078B (en) * 2018-06-27 2021-08-24 创新先进技术有限公司 Intelligent contract calling method and device based on block chain and electronic equipment
US11418510B2 (en) * 2019-04-29 2022-08-16 Salesforce.Com, Inc. Systems, methods, and apparatuses for implementing a role based access control and authorization validator via blockchain smart contract execution using distributed ledger technology (DLT)
CN110263536B (en) * 2019-06-21 2024-05-24 深圳前海微众银行股份有限公司 Method and device for monitoring intelligent contracts in block chain
CN111176791B (en) * 2019-12-31 2023-09-29 杭州趣链科技有限公司 Cross-virtual machine calling method based on multi-virtual machine blockchain platform
CN111736954B (en) * 2020-06-24 2024-01-05 陈鹏 Multi-intelligent contract virtual machine implementation method, multi-intelligent contract virtual machine and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109146679A (en) * 2018-06-29 2019-01-04 阿里巴巴集团控股有限公司 Intelligent contract call method and device, electronic equipment based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于区块链的智能合约技术研究进展;朱岩;王静;郭倩;刘国伟;;网络空间安全;20200916(09);23-28+58 *

Also Published As

Publication number Publication date
CN112487092A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
CN101421711B (en) Virtual execution system for resource-constrained devices
US9760350B2 (en) Optimistically assuming types in a dynamically typed language
US11249758B2 (en) Conditional branch frame barrier
CN112487092B (en) Intelligent contract calling method and device based on blockchain
US10466985B2 (en) Hybrid deoptimization mechanism for class hierarchy analysis
CN106547520B (en) Code path analysis method and device
US20160098346A1 (en) Assisted garbage collection in a virtual machine
CN103729235A (en) Java virtual machine (JVM) and compiling method thereof
CN110599183B (en) Intelligent contract calling method and device and storage medium
CN105511942A (en) Recognition method and device for hot point intermediate code in language virtual machine
EP3350696A1 (en) Overriding a migrated method of an updated type
US20160246622A1 (en) Method and system for implementing invocation stubs for the application programming interfaces embedding with function overload resolution for dynamic computer programming languages
CN112219196B (en) Method and apparatus for representing active frames for non-suspended garbage collection
CN111768183A (en) Method for executing intelligent contract, block chain node and storage medium
CN111240772A (en) Data processing method and device based on block chain and storage medium
US9454382B2 (en) Verification of UML state machines
CN116841564B (en) Data processing method, device, equipment and computer readable storage medium
CN111770202B (en) Method for executing intelligent contract, block chain node and storage medium
CN116594622A (en) Python program compiling method and system based on type deduction and data flow analysis
CN113791770B (en) Code compiler, code compiling method, code compiling system, and computer medium
CN114020278B (en) Data processing method, device, equipment and storage medium
Shrestha et al. JVMCSP-Approaching Billions of Processes on a Single-Core JVM
US10379885B2 (en) Enhanced local commoning
CN112527460A (en) Method and system for controlling consistency of data state of bottom assets of block chain
JP2010140233A (en) Emulation system and emulation method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant