IP Library Granted Patent US 10,942,756
Granted Patent B2
US 10,942,756 · App. 16/883,817 · Granted Mar 9, 2021

System and method for executing different types of blockchain contracts

Inventor: Shifeng Wang (Hangzhou, CN)
Assignee: ADVANCED NEW TECHNOLOGIES CO., LTD.
G06F9/45533G06F8/30
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,942,756
App. No.
16/883,817
Granted
Mar 9, 2021
Kind
B2
Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for executing blockchain contracts are provided. One of the methods includes: obtaining a bytecode of a blockchain contract, wherein the bytecode comprises one or more indicators, and the one or more indicators comprise a first indicator indicating a virtual machine type for executing the blockchain contract; and executing the blockchain contract using a virtual machine of the virtual machine type associated with the first indicator.

Claims (61)

1. A computer-implemented method, comprising:

generating a bytecode of a blockchain contract, wherein:

the bytecode comprises a first indicator indicating a virtual machine type for executing the blockchain contract and a second indicator indicating a virtual machine version for executing the blockchain contract,

the first indicator corresponds to a first byte of the bytecode,

the second indicator corresponds to a second byte of the bytecode,

a third to an n th byte of the bytecode correspond to code for executing the blockchain contract, and

the first to the n th byte of the bytecode specify an application binary interface (ABI) format, n being a natural number no less than three; and

transmitting the bytecode to a blockchain node for the blockchain node to trigger a virtual machine of the virtual machine type corresponding to the first indicator to execute the blockchain contract.

2. The method of claim 1 , wherein generating the bytecode of the blockchain contract comprises:

compiling source code of the blockchain contract to obtain the bytecode of the blockchain contract, wherein the source code is in a high-level programming language and comprises the first indicator, and the bytecode comprises machine code.

3. The method of claim 1 , wherein generating the bytecode of the blockchain contract comprises:

compiling source code of the blockchain contract, wherein the source code is in a high-level programming language and does not comprise the first indicator; and

adding the first indicator to the compiled source code to obtain the bytecode of the blockchain contract, wherein the bytecode comprises machine code.

4. The method of claim 1 , wherein:

the first indicator as compiled into a part of the bytecode is in a hexadecimal representation.

5. The method of claim 1 , wherein the blockchain node comprises a plurality of language-specific virtual machines including the virtual machine corresponding to the first indicator and is configured to trigger the virtual machine corresponding to the first indicator based on the bytecode.

6. The method of claim 1 , wherein:

the virtual machine type for executing the blockchain contract comprises: a GNU compiler collection (GCC) virtual machine for executing blockchain contracts written in C++, a Java virtual machine (JVM) for executing blockchain contracts written in Java, an Ethereum virtual machine (EVM) for executing blockchain contracts written in Solidity, or a Python virtual machine (PVM) for executing blockchain contracts written in Python.

7. The method of claim 1 , wherein:

the first indicator as compiled into a part of the bytecode is in a binary representation.

8. A non-transitory computer-readable storage medium storing instructions that, when executable by one or more processors, cause the one or more processors to perform operations comprising:

generating a bytecode of a blockchain contract, wherein:

the bytecode comprises a first indicator indicating a virtual machine type for executing the blockchain contract and a second indicator indicating a virtual machine version for executing the blockchain contract,

the first indicator corresponds to a first byte of the bytecode,

the second indicator corresponds to a second byte of the bytecode,

a third to an n th byte of the bytecode correspond to code for executing the blockchain contract, and

the first to the n th byte of the bytecode specify an application binary interface (ABI) format, n being a natural number no less than three; and

transmitting the bytecode to a blockchain node for the blockchain node to trigger a virtual machine of the virtual machine type corresponding to the first indicator to execute the blockchain contract.

9. The storage medium of claim 8 , wherein generating the bytecode of the blockchain contract comprises:

compiling source code of the blockchain contract to obtain the bytecode of the blockchain contract, wherein the source code is in a high-level programming language and comprises the first indicator, and the bytecode comprises machine code.

10. The storage medium of claim 8 , wherein generating the bytecode of the blockchain contract comprises:

compiling source code of the blockchain contract, wherein the source code is in a high-level programming language and does not comprise the first indicator; and

adding the first indicator to the compiled source code to obtain the bytecode of the blockchain contract, wherein the bytecode comprises machine code.

11. The storage medium of claim 8 , wherein:

the first indicator as compiled into a part of the bytecode is in a hexadecimal representation.

12. The storage medium of claim 8 , wherein the blockchain node comprises a plurality of language-specific virtual machines and is configured to trigger one of the language-specific virtual machines corresponding to the first indicator based on the bytecode.

13. The storage medium of claim 8 , wherein:

the virtual machine type for executing the blockchain contract comprises: a GNU compiler collection (GCC) virtual machine for executing blockchain contracts written in C++, a Java virtual machine (JVM) for executing blockchain contracts written in Java, an Ethereum virtual machine (EVM) for executing blockchain contracts written in Solidity, or a Python virtual machine (PVM) for executing blockchain contracts written in Python.

14. A system comprising one or more processors and one or more non-transitory computer-readable memories coupled to the one or more processors and configured with instructions executable by the one or more processors to cause the system to perform operations comprising:

generating a bytecode of a blockchain contract, wherein:

the bytecode comprises a first indicator indicating a virtual machine type for executing the blockchain contract and a second indicator indicating a virtual machine version for executing the blockchain contract,

the first indicator corresponds to a first byte of the bytecode,

the second indicator corresponds to a second byte of the bytecode,

a third to an n th byte of the bytecode correspond to code for executing the blockchain contract, and

the first to the n th byte of the bytecode specify an application binary interface (ABI) format, n being a natural number no less than three; and

transmitting the bytecode to a blockchain node for the blockchain node to trigger a virtual machine of the virtual machine type corresponding to the first indicator to execute the blockchain contract.

15. The system of claim 14 , further comprising the blockchain node, wherein the blockchain node comprises a plurality of language-specific virtual machines and is configured to:

obtain the bytecode;

determine one of the language-specific virtual machines corresponding to the first indicator by parsing the bytecode; and

trigger the one of the language-specific virtual machines to execute the blockchain contract.

16. The system of claim 14 , wherein generating the bytecode of the blockchain contract comprises:

compiling source code of the blockchain contract to obtain the bytecode of the blockchain contract, wherein the source code is in a high-level programming language and comprises the first indicator, and the bytecode comprises machine code.

17. The system of claim 14 , wherein generating the bytecode of the blockchain contract comprises:

compiling source code of the blockchain contract, wherein the source code is in a high-level programming language and does not comprise the first indicator; and

adding the first indicator to the compiled source code to obtain the bytecode of the blockchain contract, wherein the bytecode comprises machine code.

18. The system of claim 14 , wherein:

the first indicator as compiled into a part of the bytecode is in a hexadecimal representation.

19. The system of claim 14 , wherein:

the virtual machine type for executing the blockchain contract comprises: a GNU compiler collection (GCC) virtual machine for executing blockchain contracts written in C++, a Java virtual machine (JVM) for executing blockchain contracts written in Java, an Ethereum virtual machine (EVM) for executing blockchain contracts written in Solidity, or a Python virtual machine (PVM) for executing blockchain contracts written in Python.

20. The system of claim 14 , wherein:

the first indicator as compiled into a part of the bytecode is in a binary representation.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 16, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053796/0281 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 3, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053702/0392 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 26, 2020
From: WANG, SHIFENG
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 052753/0921 →
Continuity (3)
Continuation 16716016 · Dec 16, 2019
Continuation PCTCN2019093591 · Jun 28, 2019
Related Publication 20200293346A1 · Sep 17, 2020