As per this post bitcoin nodes do not maintain an index from addresses to TxIDs and hence querying for the unspent tokens by addresses essentially involves traversing the entire UTXO set.
However, the blockchain explorers enable search by addresses not just on the unspent outputs but on the entire blockchain. They list all the transactions that involve an address. I have the following questions:
- How do the block explorers do the search by addresses -- do they search the entire blockchain at query time, which is very inefficient, or do they maintain some sort of index which they update iteratively?
- If they maintain an index, it looks like the index will be pretty huge since it will always keep on growing. So how big is the index currently?
- Also, can the blockchain nodes currently do such a search (of course efficiently)?