subquery / subql

SubQuery is an Open, Flexible, Fast and Universal data indexing framework for web3. Our mission is to help developers create the decentralised products of the future.
https://subquery.network
GNU General Public License v3.0
18.95k stars 331 forks source link

Big Block Issue Optimization #2599

Open yoozo opened 6 days ago

yoozo commented 6 days ago

Description

Background: Currently, if a large block is encountered, the SDK may fail to index properly. For example, Kusama: 25845986.

It behaves differently under HTTP and WS, and here’s the information we know so far:

Issues:

Optimizations:

stwiname commented 4 days ago

Some more information.

Example block: https://kusama.subscan.io/block/25845986 https://polkadot.js.org/apps/#/explorer/query/0xa5d5bddd0e6a478a54535f8988113d93d70f9e1f41371bc33449afbd0f9c15a6

Logs:

2024-11-19 11:35:57        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: No response received from RPC endpoint in 60s
2024-11-19T11:35:57.918Z <fetch-#1> ERROR failed to fetch events at block 0x8d35c22763788ec8ad467699b75e735f856fca1a3c0dacc5b53ad34f126fa4d3
2024-11-19 11:35:57        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: No response received from RPC endpoint in 60s
2024-11-19 11:35:57        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: No response received from RPC endpoint in 60s
2024-11-19 11:35:57        RPC-CORE: getBlockHash(blockNumber?: BlockNumber): BlockHash:: No response received from RPC endpoint in 60s
2024-11-19 11:35:57        RPC-CORE: getBlockHash(blockNumber?: BlockNumber): BlockHash:: No response received from RPC endpoint in 60s
2024-11-19 11:35:57        RPC-CORE: getBlockHash(blockNumber?: BlockNumber): BlockHash:: No response received from RPC endpoint in 60s
2024-11-19 11:35:57        RPC-CORE: getBlockHash(blockNumber?: BlockNumber): BlockHash:: No response received from RPC endpoint in 60s
2024-11-19 11:35:57        RPC-CORE: getBlockHash(blockNumber?: BlockNumber): BlockHash:: No response received from RPC endpoint in 60s
2024-11-19 11:35:57        RPC-CORE: getBlockHash(blockNumber?: BlockNumber): BlockHash:: No response received from RPC endpoint in 60s
2024-11-19 11:35:57        RPC-CORE: getBlockHash(blockNumber?: BlockNumber): BlockHash:: No response received from RPC endpoint in 60s
2024-11-19 11:35:57        RPC-CORE: getBlockHash(blockNumber?: BlockNumber): BlockHash:: No response received from RPC endpoint in 60s
2024-11-19T11:35:57.918Z <fetch-#1> ERROR failed to fetch events at block 0x0f1780830c6f485c2c9dc14d6e476746fe59b8f57d830d723b8cc072e585bc99
2024-11-19T11:35:57.918Z <fetch-#1> ERROR failed to fetch events at block 0x24032d6e4ed3bd87cf10c27f3ea7073908aa42ace034382b94025837cc0e2a79
2024-11-19T11:35:57.918Z <fetch-#1> ERROR failed to fetch BlockHash 23461156
2024-11-19T11:35:57.918Z <fetch-#1> ERROR failed to fetch BlockHash 23461161
2024-11-19T11:35:57.918Z <fetch-#1> ERROR failed to fetch BlockHash 23461147
2024-11-19T11:35:57.918Z <fetch-#1> ERROR failed to fetch BlockHash 23461146
2024-11-19T11:35:57.918Z <fetch-#1> ERROR failed to fetch BlockHash 23461166
2024-11-19T11:35:57.918Z <fetch-#1> ERROR failed to fetch BlockHash 23461158
2024-11-19T11:35:57.918Z <fetch-#1> ERROR failed to fetch BlockHash 23461169
2024-11-19T11:35:57.918Z <fetch-#1> ERROR failed to fetch BlockHash 23461165
wangminqi commented 3 days ago

Having this issue too. not only Kusama, Polkadot too. Around this period of blocks have ~5000 extrinsic per block. Sample polkadot block: 23527798