IP Library Granted Patent US 12,160,469
Granted Patent B2
US 12,160,469 · App. 17/810,065 · Granted Dec 3, 2024

Systems and methods for improved blockchain data indexing by avoiding throughput bottlenecks

Inventors: Jie Zhang (Oakland, CA); Zhicong Liang (Oakland, CA); Yaohua Yang (Oakland, CA); David Lai (Oakland, CA); Chaoqing Lu (Oakland, CA); Jinghan Xu (Oakland, CA); Xu Meng (Oakland, CA)
Assignee: Coinbase, Inc.
H04L67/1076H04L9/50H04L67/1008H04L67/1072
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 12,160,469
App. No.
17/810,065
Granted
Dec 3, 2024
Kind
B2
Abstract

Systems and methods for a unified approach that is compatible with all blockchains, protocols, etc. The systems and methods use a bifurcated indexing system with a dynamically selected application service. The systems and methods bifurcate the indexing process into a storage layer and a compute layer.

Claims (89)

1. A system for improved blockchain data indexing by avoiding throughput bottlenecks caused by reliance on a single blockchain node, the system comprising:

one or more processors and media storing instructions that, when executed by the one or more processors, cause operations comprising:

designating a first blockchain node of a plurality of blockchain nodes for a blockchain network as having a first node type;

based on designating the first blockchain node of the plurality of blockchain nodes as having the first node type, establishing a session with the first blockchain node:

while maintaining the session:

determining an order of a first block and a second block on a canonical chain of the blockchain network;

designating a second blockchain node and a third blockchain node of the plurality of blockchain nodes as having a second node type;

based on designating the second blockchain node and the third blockchain node of the plurality of blockchain nodes as having the second node type, transmitting, in parallel, queries to the second blockchain node and the third blockchain node for first on-chain data from the first block and second on-chain data from the second block, respectively, wherein the first on-chain data and the second on-chain data comprise hexadecimal encoded data; and

receiving the first on-chain data or the second on-chain data;

transforming the first on-chain data and the second on-chain data to a first format, wherein the first format comprises data types with field names identified by a respective integer; and

storing the transformed first on-chain data and the transformed second on-chain data in a first dataset at a blockchain-interface layer, wherein the first dataset comprises the hexadecimal encoded data and uses the first format.

2. A method for improved blockchain data indexing by avoiding throughput bottlenecks caused by reliance on a single blockchain node, the method comprising:

designating a first blockchain node of a plurality of blockchain nodes for a blockchain network as having a first node type;

based on designating the first blockchain node of the plurality of blockchain nodes as having the first node type, establishing a session with the first blockchain node;

determining an order of a first block and a second block on a canonical chain of the blockchain network;

designating a second blockchain node and a third blockchain node of the plurality of blockchain nodes as having a second node type;

based on designating the second blockchain node and the third blockchain node of the plurality of blockchain nodes as having the second node type, transmitting, in parallel, queries to the second blockchain node and the third blockchain node for first on-chain data from the first block and second on-chain data from the second block, respectively;

receiving the first on-chain data or the second on-chain data; and

in response to receiving the first on-chain data or the second on-chain data, indexing, in a first dataset, the first on-chain data or the second on-chain data based on the order of the first block and the second block on the canonical chain.

3. The method of claim 2 , wherein indexing the first on-chain data or the second on-chain data based on the order of the first block and the second block on the canonical chain comprises:

determining a first location on the canonical chain corresponding to the first block;

labeling the first on-chain data as corresponding to the first location in the first dataset;

determining a second location on the canonical chain corresponding to the second block; and

labeling the second on-chain data as corresponding to the second location in the first dataset.

4. The method of claim 2 , wherein transmitting, in parallel, the queries to the second blockchain node and the third blockchain node comprises:

retrieving a second blockchain node identifier of the second blockchain node;

transmitting a second query to the second blockchain node based on the second blockchain node identifier, wherein the second query comprises a request for the first on-chain data from the first block;

retrieving a third blockchain node identifier of the third blockchain node; and

transmitting a third query to the third blockchain node based on the third blockchain node identifier, wherein the third query comprises a request for the second on-chain data from the second block.

5. The method of claim 2 , wherein transmitting, in parallel, the queries to the second blockchain node and the third blockchain node comprises:

retrieving a processing metric indicating a current load on the second blockchain node;

determining that_the processing metric does not equal or exceed a threshold metric; and

in response to determining that the processing metric does not equal or exceed the threshold metric, selecting to query the second blockchain node for the second on-chain data.

6. The method of claim 2 , wherein determining the order of the first block and the second block on the canonical chain of the blockchain network further comprises:

retrieving a first blockchain node identifier of the first blockchain node;

transmitting a first query to the first blockchain node based on the first blockchain node identifier, wherein the first query comprises a request to identify a plurality of blocks on the canonical chain of the blockchain network; and

receiving a first response to the first query, wherein the first response identifies the first block and the second block on the canonical chain, and wherein the first response identifies the order of the first block and the second block on the canonical chain.

7. The method of claim 2 , further comprising:

identifying the plurality of blockchain nodes for the blockchain network; and

determining a plurality of blockchain nodes identifiers, wherein the plurality of blockchain nodes identifiers comprises a respective blockchain node identifier for each of the plurality of blockchain nodes.

8. The method of claim 7 , wherein determining the plurality of blockchain node identifiers comprises:

designating the respective blockchain node identifier for each of the plurality of blockchain nodes; and

configuring each of the plurality of blockchain nodes to output the respective blockchain node identifier in response to a blockchain operation.

9. The method of claim 2 , further comprising:

designating a fourth blockchain node as having the first node type;

detecting a failure in maintaining the session with the first blockchain node; and

in response to detecting the failure in maintaining the session with the first blockchain node, re-establishing the session with the fourth blockchain node.

10. The method of claim 2 , wherein determining the order of the first block and the second block on the canonical chain of the blockchain network comprises:

generating a batch application programming interface call to query a range of blocks of the canonical chain, wherein the range of blocks comprises the first block and the second block; and

transmitting the batch application programming interface call to the first blockchain node.

11. The method of claim 2 , further comprising receiving, at a blockchain-interface layer, the first on-chain data, wherein the first on-chain data comprises hexadecimal encoded data from the first block of the blockchain network, wherein the blockchain-interface layer transforms, using a first compute engine, the first on-chain data to a first format, and wherein the first format comprises data types with field names identified by a respective integer.

12. One or more non-transitory computer-readable media having instructions recorded thereon that, when executed by one or more processors, cause operations comprising:

designating a first blockchain node of a plurality of blockchain nodes for a blockchain network as having a first node type;

based on designating the first blockchain node of the plurality of blockchain nodes as having the first node type, establishing a session with the first blockchain node;

determining an order of a first block and a second block on a canonical chain of the blockchain network;

designating a second blockchain node and a third blockchain node of the plurality of blockchain nodes as having a second node type;

based on designating the second blockchain node and the third blockchain node of the plurality of blockchain nodes as having the second node type, transmitting, in parallel, queries to the second blockchain node and the third blockchain node for first on-chain data from the first block and second on-chain data from the second block, respectively;

receiving the first on-chain data or the second on-chain data; and

in response to receiving the first on-chain data or the second on-chain data, indexing, in a first dataset, the first on-chain data or the second on-chain data based on the order of the first block and the second block on the canonical chain.

13. The one or more_non-transitory computer-readable media of claim 12 , wherein indexing the first on-chain data or the second on-chain data based on the order of the first block and the second block on the canonical chain comprises:

determining a first location on the canonical chain corresponding to the first block;

labeling the first on-chain data as corresponding to the first location in the first dataset;

determining a second location on the canonical chain corresponding to the second block; and

labeling the second on-chain data as corresponding to the second location in the first dataset.

14. The one or more non-transitory computer-readable media of claim 12 , wherein transmitting, in parallel, the queries to the second blockchain node and the third blockchain node comprises:

retrieving a second blockchain node identifier of the second blockchain node;

transmitting a second query to the second blockchain node based on the second blockchain node identifier, wherein the second query comprises a request for the first on-chain data from the first block;

retrieving a third blockchain node identifier of the third blockchain node; and

transmitting a third query to the third blockchain node based on the third blockchain node identifier, wherein the third query comprises a request for the second on-chain data from the second block.

15. The one or more_non-transitory computer-readable media of claim 12 , wherein transmitting, in parallel, the queries to the second blockchain node and the third blockchain node comprises:

retrieving a processing metric indicating a current load on the second blockchain node; and

in response to determining that the processing metric does not equal or exceed a threshold metric, selecting to query the second blockchain node for the second on-chain data.

16. The one or more_non-transitory computer-readable media of claim 12 , wherein determining the order of the first block and the second block on the canonical chain of the blockchain network comprises:

retrieving a first blockchain node identifier of the first blockchain node;

transmitting a first query to the first blockchain node based on the first blockchain node identifier, wherein the first query comprises a request to identify a plurality of blocks on the canonical chain of the blockchain network; and

receiving a first response to the first query, wherein the first response identifies the first block and the second block on the canonical chain, and wherein the first response identifies the order of the first block and the second block on the canonical chain.

17. The one or more non-transitory computer-readable media of claim 12 , wherein the instructions further cause operation comprising:

identifying a plurality of blockchain nodes for the blockchain network; and

determining a plurality of blockchain nodes identifiers, wherein the plurality of blockchain nodes identifiers comprises a respective blockchain node identifier for each of the plurality of blockchain nodes.

18. The one or more_non-transitory computer-readable media of claim 17 , wherein determining the plurality of blockchain node identifiers comprises:

designating the respective blockchain node identifier for each of the plurality of blockchain nodes; and

configuring each of the plurality of blockchain nodes to output the respective blockchain node identifier in response to a blockchain operation.

19. The one or more_non-transitory computer-readable media of claim 12 , wherein the instructions further cause operation comprising:

designating a fourth blockchain node as having the first node type;

detecting a failure in maintaining the session with the first blockchain node; and

in response to detecting the failure in maintaining the session with the first blockchain node, re-establishing the session with the fourth blockchain node.

20. The one or more_non-transitory computer-readable media of claim 12 , wherein determining the order of the first block and the second block on the canonical chain of the blockchain network comprises:

generating a batch application programming interface call to query a range of blocks of the canonical chain, wherein the range of blocks comprises the first block and the second block; and

transmitting the batch application programming interface call to the first blockchain node.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 25, 2022
From: ZHANG, JIE; LIANG, ZHICONG; YANG, YAOHUA; LAI, DAVID; LU, CHAOQING; XU, JINGHAN; MENG, XU
To: COINBASE, INC.
Reel/Frame 060900/0638 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 25, 2022
From: ZHANG, JIE; LIANG, ZHICONG; YANG, YAOHUA; LAI, DAVID; LU, CHAOQING; XU, JINGHAN; MENG, XU
To: COINBASE, INC.
Reel/Frame 060900/0788 →
Continuity (1)
Related Publication 20240007525A1 · Jan 4, 2024