I am writing a visualisation application; I need to get transactions from multiple blocks from the blockchain. However, I am not sure how the numbering of uncles and blocks works. Since Geth client is very slow to query 1000 blocks, I am slowly scrapping data from Geth client and caching it into MongoDB. I currently query the initial block using either its
hash and then make subsequent queries using
block.parentHash, recursively. For a large number of blocks queried in such fashion hurts MongoDB's performance. So if I could assume that block numbers are sequential in order, I could just request 1000 blocks straight away from MongoDB and speed up my application.
So could you please explain how the block number and uncle numbers differ and given 3,500,000 starting block, where I need 10,000 preceding blocks in the chain could I use the
$lt operators to query blocks from 3,500,000 to 3,490,000 and be assured that no uncles will be present, or do I have to rely on