IP Library Granted Patent US 11,153,072
Granted Patent B2
US 11,153,072 · App. 17/135,813 · Granted Oct 19, 2021

Processing blockchain data based on smart contract operations executed in a trusted execution environment

Inventors: Changzheng Wei (Hangzhou, CN); Ying Yan (Hangzhou, CN); Boran Zhao (Hangzhou, CN); Xuyang Song (Hangzhou, CN); Huabing Du (Hangzhou, CN)
Assignee: Advanced New Technologies Co., Ltd.
H04L9/0637G06F9/45558H04L9/0643H04L9/321G06F2009/45595H04L2209/38
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,153,072
App. No.
17/135,813
Granted
Oct 19, 2021
Kind
B2
Abstract

Disclosed herein are methods, systems, and apparatus, including computer programs encoded on computer storage media, for processing blockchain data under a trusted execution environment (TEE). One of the methods includes receiving, by a blockchain node, a request to execute one or more software instructions in a TEE executing on the blockchain node; determining, by a virtual machine in the TEE, data associated with one or more blockchain accounts to execute the one or more software instructions based on the request; traversing, by the virtual machine, a global state of a blockchain stored in the TEE to locate the data; and executing, by the virtual machine, the one or more software instructions based on the data.

Claims (47)

1. A computer-implemented method for processing blockchain data under a trusted execution environment (TEE), the method comprising:

receiving, by a blockchain node, a request to execute one or more software instructions in the TEE executing on the blockchain node;

determining, by a virtual machine in the TEE based on the request, data associated with one or more blockchain accounts related to the execution of the one or more software instructions;

traversing, by the virtual machine, a global state of a blockchain stored in the TEE to locate the data associated with the one or more blockchain accounts;

generating, by the virtual machine, an updated global state by encoding a hash of a storage content of the one or more blockchain accounts;

in response to executing the one or more software instructions, generating, by the blockchain node, an encrypted representation of the updated global state; and

storing, by the blockchain node, the encrypted representation of the updated global state in a cache separate from the TEE for cache syncing the encrypted representation of the updated global state to a database of a trusted computing base that is separate from the TEE.

2. The computer-implemented method of claim 1 , wherein the encrypted representation of the updated global state is generated using a private key of the blockchain node.

3. The computer-implemented method of claim 1 , wherein the request includes one or more input parameters and is made to an interface function of the TEE.

4. The computer-implemented method of claim 1 , wherein the global state is stored in the TEE as a Merkle Patricia tree (MPT).

5. The computer-implemented method of claim 1 , wherein the global state includes a mapping between addresses and states of the one or more blockchain accounts of the blockchain, and the one or more blockchain accounts include one or more of externally owned accounts or contract accounts, and wherein each of the contracts accounts includes a storage root.

6. The computer-implemented method of claim 5 , wherein the storage root includes a root node hash of a Merkle Patricia tree (MPT), and wherein the MPT encodes a hash of storage content of a corresponding contract account.

7. The computer-implemented method of claim 6 , wherein the updated global state is produced by updating the MPT that encodes the hash of the storage content of the corresponding contract account.

8. The computer-implemented method of claim 1 , wherein the cache comprises an overlay database accessible from the TEE through direct memory access.

9. The computer-implemented method of claim 1 , wherein the request is received through an application programming interface associated with the TEE.

10. A non-transitory, computer-readable storage medium storing one or more instructions executable by a computer system to perform operations for processing blockchain data under a trusted execution environment (TEE), the operations comprising:

receiving, by a blockchain node, a request to execute one or more software instructions in the TEE executing on the blockchain node;

determining, by a virtual machine in the TEE based on the request, data associated with one or more blockchain accounts related to the execution of the one or more software instructions;

traversing, by the virtual machine, a global state of a blockchain stored in the TEE to locate the data associated with the one or more blockchain accounts;

generating, by the virtual machine, an updated global state by encoding a hash of a storage content of the one or more blockchain accounts;

in response to executing the one or more software instructions, generating, by the blockchain node, an encrypted representation of the updated global state; and

storing, by the blockchain node, the encrypted representation of the updated global state in a cache separate from the TEE for cache syncing the encrypted representation of the updated global state to a database of a trusted computing base that is separate from the TEE.

11. The non-transitory, computer-readable storage medium of claim 10 , wherein the encrypted representation of the updated global state is generated using a private key of the blockchain node.

12. The non-transitory, computer-readable storage medium of claim 10 , wherein the request includes one or more input parameters and is made to an interface function of the TEE.

13. The non-transitory, computer-readable storage medium of claim 10 , wherein the global state is stored in the TEE as a Merkle Patricia tree (MPT).

14. The non-transitory, computer-readable storage medium of claim 10 , wherein the global state includes a mapping between addresses and states of the one or more blockchain accounts of the blockchain, and the one or more blockchain accounts include one or more of externally owned accounts or contract accounts, and wherein each of the contracts accounts includes a storage root.

15. The non-transitory, computer-readable storage medium of claim 14 , wherein the storage root includes a root node hash of a Merkle Patricia tree (MPT), and wherein the MPT encodes a hash of storage content of a corresponding contract account.

16. The non-transitory, computer-readable storage medium of claim 15 , wherein the updated global state is produced by updating the MPT that encodes the hash of the storage content of the corresponding contract account.

17. The non-transitory, computer-readable storage medium of claim 10 , wherein the cache comprises an overlay database accessible from the TEE through direct memory access.

18. The non-transitory, computer-readable storage medium of claim 10 , wherein the request is received through an application programming interface associated with the TEE.

19. A computer-implemented system, comprising:

one or more computers; and

one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations for processing blockchain data under a trusted execution environment (TEE), the operations comprising:

receiving, by a blockchain node, a request to execute one or more software instructions in the TEE executing on the blockchain node,

determining, by a virtual machine in the TEE based on the request, data associated with one or more blockchain accounts related to the execution of the one or more software instructions,

traversing, by the virtual machine, a global state of a blockchain stored in the TEE to locate the data associated with the one or more blockchain accounts,

generating, by the virtual machine, an updated global state by encoding a hash of a storage content of the one or more blockchain accounts,

in response to executing the one or more software instructions, generating, by the blockchain node, an encrypted representation of the updated global state, and

storing, by the blockchain node, the encrypted representation of the updated global state in a cache separate from the TEE for cache syncing the encrypted representation of the updated global state to a database of a trusted computing base that is separate from the TEE.

20. The system of claim 19 , wherein the encrypted representation of the updated global state is generated using a private key of the blockchain node.

21. The system of claim 19 , wherein the request includes one or more input parameters and is made to an interface function of the TEE.

22. The system of claim 19 , wherein the global state is stored in the TEE as a Merkle Patricia tree (MPT).

23. The system of claim 19 , wherein the global state includes a mapping between addresses and states of the one or more blockchain accounts of the blockchain, and the one or more blockchain accounts include one or more of externally owned accounts or contract accounts, and wherein each of the contracts accounts includes a storage root.

24. The system of claim 23 , wherein the storage root includes a root node hash of a Merkle Patricia tree (MPT), and wherein the MPT encodes a hash of storage content of a corresponding contract account.

25. The system of claim 24 , wherein the updated global state is produced by updating the MPT that encodes the hash of the storage content of the corresponding contract account.

26. The system of claim 19 , wherein the cache comprises an overlay database accessible from the TEE through direct memory access.

27. The system of claim 19 , wherein the request is received through an application programming interface associated with the TEE.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 18, 2025
From: ADVANCED NEW TECHNOLOGIES CO., LTD.
To: ANTCHAIN TECHNOLOGY PTE. LTD.
Reel/Frame 070253/0064 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 26, 2021
From: WEI, CHANGZHENG; YAN, YING; ZHAO, BORAN; SONG, XUYANG; DU, HUABING
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 055122/0281 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 26, 2021
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 055122/0293 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 26, 2021
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 055122/0348 →