I've been researching Armory and there is one question that I can't seem to find a satisfactory answer on: How does the deterministic backup know how many addresses you've created in your wallet?
I understand that the addresses are created deterministically, in order, but how does the client know how many of these addresses have ever been created? Does it create the next address and then look it up in the blockchain to see if it was ever used? If so, then what about addresses that are created by clicking on "receive funds" but then the window is cancelled... that address is never used and a new address is created the next time you click on "receive funds". This seems to indicate that you could have an arbitrarily large sequence of never-used addresses before an address that was used and contains bitcoins. This also seems to show that in normal daily use a wallet could contain thousands and thousands and thousands of addresses. There also appears to be some confusion out in the world as to how this works: the site at (
http://bitcoin.stackexchange.com/questions/9828/do-i-need-to-backup-a-wallet-every-time-i-generate-a-new-address) seemed to suggest that Armory only keeps track of the first one hundred addresses and if you go beyond your backup could lose bitcoins.
This is my main confusion about the Armory deterministic backup... just how does it know how many addresses have ever been used in the wallet and how how does it deal with addresses that were created but never used? Are all the addresses you will ever use safe in the paper backup?
For more illustration, imagine the following scenario/ thought experiment:
1. You create a new Armory wallet and create a paper backup
2. You create a new address for each transaction, and you go through 1,000,000 transactions
3. You then click on "Receive Bitcoins" button and cancel 1,000 times, so now there is a series of one thousand addresses that were created but never used.
4. You then go through another 1,000,000 transactions.
5. When you restore from the deterministic paper backup, how does it know to look for the 2,001,000 addresses that were created? Would you lose the last 1,000,000 addresses due the sequence of 1,000 unused addresses because they don't exist in the blockchain? In other words, would Armory count up to 1,000,000 addresses and then encounter the sequence of 1,000 unused addresses and assume that there are no more addresses after that sequence?
I appreciate any insight as how the Armory deterministic paper backup is a true backup of every possible future transaction made in the wallet.
Thanks!