IP Library Granted Patent US 11,086,847
Granted Patent B2
US 11,086,847 · App. 16/464,148 · Granted Aug 10, 2021

System and method for implementing native contract on blockchain

Inventor: He Sun (Hangzhou, CN)
Assignee: ADVANCED NEW TECHNOLOGIES CO., LTD.
G06F16/2365G06F9/45558G06Q10/10G06Q20/0655G06F2009/45591G06Q2220/00
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 11,086,847
App. No.
16/464,148
Granted
Aug 10, 2021
Kind
B2
Abstract

A computer-implemented method for implementing native contract on blockchain comprises: obtaining combined bytecode associated with a blockchain contract, wherein the combined bytecode comprises an indicator representing a type of the blockchain contract; determining the type of the blockchain contract based at least on the indicator; and executing the blockchain contract based on the determined type of the blockchain contract.

Claims (66)

1. A computer-implemented method for implementing blockchain contracts, comprising:

obtaining combined bytecode associated with a blockchain contract, wherein:

source code of the blockchain contract is written in one of a plurality of different high-level programming languages,

a first portion of the combined bytecode representing a type of the blockchain contract indicates the one high-level programming language among the different high-level programming languages,

the type of the blockchain contract comprises native contract type or Solidity contract type,

the native contract type indicates that the one high-level programming language is different from Solidity, and

the Solidity contract type indicates that the one high-level programming language is Solidity;

determining the one high-level programming language based at least on the first portion of the combined bytecode; and

executing the blockchain contract in a blockchain virtual machine matching the one high-level programming language.

2. The method of claim 1 , wherein:

the combined bytecode is low-level machine code; and

at least a part of the combined bytecode is compiled from the source code of the blockchain contract.

3. The method of claim 1 , wherein determining the one high-level programming language based at least on the first portion of the combined bytecode comprises:

determining if the blockchain contract is a Solidity contract or a native contract written in a high-level programming language other than Solidity.

4. The method of claim 1 , wherein:

a second portion of the combined bytecode comprises a dynamic library file in bytecode compiled from the source code of the blockchain contract.

5. The method of claim 4 , wherein executing the blockchain contract in the blockchain virtual machine matching the one high-level programming language comprises:

triggering the blockchain virtual machine to execute the dynamic library file.

6. The method of claim 4 , wherein executing the blockchain contract in the blockchain virtual machine matching the one high-level programming language comprises:

creating a child process to execute the blockchain contract.

7. The method of claim 6 , wherein creating the child process to execute the blockchain contract comprises:

creating an executable file; and

spawning the child process to launch the executable file to execute the dynamic library file.

8. The method of claim 6 , wherein:

the child process and the blockchain virtual machine communicate via socket or shared memory.

9. The method of claim 4 , wherein executing the blockchain contract in the blockchain virtual machine matching the one high-level programming language comprises:

launching a docker container to execute the blockchain contract.

10. The method of claim 9 , wherein launching the docker container to execute the blockchain contract comprises:

creating the docker container; and

launching the docker container to execute the dynamic library file.

11. The method of claim 9 , wherein:

the docker container and the blockchain virtual machine communicate via socket.

12. A non-transitory computer-readable storage medium configured with instructions executable by one or more processors to cause the one or more processors to perform operations comprising:

obtaining combined bytecode associated with a blockchain contract, wherein:

source code of the blockchain contract is written in one of a plurality of different high-level programming languages,

a first portion of the combined bytecode representing a type of the blockchain contract indicates the one high-level programming language among the different high-level programming languages,

the type of the blockchain contract comprises native contract type or Solidity contract type,

the native contract type indicates that the one high-level programming language is different from Solidity, and

the Solidity contract type indicates that the one high-level programming language is Solidity;

determining the one high-level programming language based at least on the first portion of the combined bytecode; and

executing the blockchain contract in a blockchain virtual machine matching the one high-level programming language.

13. The storage medium of claim 12 , wherein:

the combined bytecode is low-level machine code; and

at least a part of the combined bytecode is compiled from the source code of the blockchain contract.

14. The storage medium of claim 12 , wherein determining the one high-level programming language based at least on the first portion of the combined bytecode comprises:

determining if the blockchain contract is a Solidity contract or a native contract written in a high-level programming language other than Solidity.

15. The storage medium of claim 12 , wherein:

a second portion of the combined bytecode comprises a dynamic library file in bytecode compiled from the source code of the blockchain contract.

16. The storage medium of claim 15 , wherein executing the blockchain contract in the blockchain virtual machine matching the one high-level programming language comprises:

triggering the blockchain virtual machine to execute the dynamic library file.

17. The storage medium of claim 15 , wherein executing the blockchain contract in the blockchain virtual machine matching the one high-level programming language comprises:

creating a child process to execute the blockchain contract.

18. The storage medium of claim 17 , wherein creating the child process to execute the blockchain contract comprises:

creating an executable file; and

spawning the child process to launch the executable file to execute the dynamic library file.

19. The storage medium of claim 15 , wherein executing the blockchain contract in the blockchain virtual machine matching the one high-level programming language comprises:

launching a docker container to execute the blockchain contract.

20. 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:

obtaining combined bytecode associated with a blockchain contract, wherein:

source code of the blockchain contract is written in one of a plurality of different high-level programming languages,

a first portion of the combined bytecode representing a type of the blockchain contract indicates the one high-level programming language among the different high-level programming languages,

the type of the blockchain contract comprises native contract type or Solidity contract type,

the native contract type indicates that the one high-level programming language is different from Solidity, and

the Solidity contract type indicates that the one high-level programming language is Solidity;

determining the one high-level programming language based at least on the first portion of the combined bytecode; and

executing the blockchain contract in a blockchain virtual machine matching the one high-level programming language.

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 24, 2019
From: SUN, HE
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 049280/0495 →