Hello! I am trying to parse interval in blockchain by incremental moving among the blocks in masterchain. All examples below are for the shard 8000000000000000, I am using toncenter.com API.
for -1 chain, 18276434 block /shards function returns me 0 chain, 23311858 block
for -1 chain, 18276435 block /shards function returns me the same 0 chain, 23311858 block
for -1 chain, 18276436 block /shards function returns me 0 chain, 23311860 block
So my question why is 23311859 block disappeared from results, why is 23311858 block returned twice and what is the correct way to parse missing transactions of block 23311859. I thought that linear search with shards querying is enough, but it seems it is not.
Apr 19, 2023, 8:18 PM
Multiple shardchain blocks can be confirmed by one masterchain block. You need to iterate over unseen block heights.
Apr 20, 2023, 3:07 AM
- Query shards for the highest masterchain block that you need;
- iterate over all shardchain blocks and also get their parents
- iterate over their parents and repeat step 2 until you reach the lowest block you need
- iterate over all shardchain blocks and also get their parents
- iterate over their parents and repeat step 2 until you reach the lowest block you need
Apr 20, 2023, 5:15 AM