So I was playing around with the Daedalus wallet - creating a new wallet, generating a couple of addresses without making any transaction, deleting the wallet and restoring it from the backup file. Of course, the previously generated addresses did not appear since they were empty and no blockchain record was associated with them. But out of curiosity I tried generating them again and I realized that they were totally different, which means that new addresses (i.e. their chain codes) are generated randomly.
So my question is - is there, from the algorithmical point of view, any efficient way to recover my wallet (if it had money on it) from the mnemonic or file backup?
Because the only way that I know of (and that is currently documented and implemented in Daedalus https://cardanodocs.com/technical/hd-wallets/ - “Import” section ), is, if I understand right, by iterating over all the unspent outputs in the block chain, which currently is probably not a big number, but it already takes a significant amount of time and the format of the addresses as documented and as I understand it (https://cardanodocs.com/cardano/addresses/) does not support any way to be efficiently indexed (to verify if an address is yours, you have to take the chain code (derivation path) from the address, try to derive an address with it from your root key and check for equality), so I’m a bit skeptical about how this problem could be addressed in the future if my assumptions are right.
I understand it’s probably for additional safety to generate the addresses randomly, but I find it quite discouraging to have a wallet, that over time, would be virtually unrecoverable, because I would have to check every single address out there whether it is not mine. I would be glad if anybody could disprove my concerns and explain me, what am I missing.
If I was right with my concerns, are there any plans on having wallets that have truly deterministically derived addresses, so they can be easily recovered just by generating the address chain again and checking the block chain records associated with them?