In Iota, addresses are defined by an incremental index from 0 to 2,147,483,647 (potentially infinite depending on the IRI implementation).
For the sake of the example, let's say the last address you used was at index 1,000,000
In order to get the balance of a seed, you'd need to query all transactions referencing addresses from index 0 to index 1,000,000.
Even with efficient algorithms such as MapReduce, that seems like a heavy operation on a database + computation for such a simple request.
- Is the premise correct ?
- If correct, is there a mechanism to limit the weight of the operation ?
- Overall, how will large address indexes affect scalability in the long run ?
getBalance(addressN)1,000,000 times, thus hitting the node's database 1,000,000 times. – aguadoe Mar 08 '18 at 13:51getInputswithseedas argument. It will get all possible inputs from all 1,000,000 addresses of your seed and return them with the total balance. I think that this kind of operation can affect the load of the used fullnode but it doesn't affect the scalability of Tangle itself. – blockmined Mar 08 '18 at 15:21