Bitcoin Forum
November 17, 2024, 10:07:30 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How does Armory paper backup know how many addresses have been used?  (Read 1592 times)
aquapurity (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0



View Profile
May 31, 2013, 05:54:02 PM
 #1

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!

xxjs
Sr. Member
****
Offline Offline

Activity: 280
Merit: 250


View Profile
July 05, 2013, 12:23:33 PM
 #2

I want to know this too.
picobit
Hero Member
*****
Offline Offline

Activity: 547
Merit: 500


Decor in numeris


View Profile
July 07, 2013, 10:59:07 PM
 #3

As far as I know Armory will create 100 addresses beyond the last one having activity on the block chain before deciding that it has reached the end of the list of relevant addresses.  You can increase this number manually somewhere in the user interface (perhaps only in expert mode).
xxjs
Sr. Member
****
Offline Offline

Activity: 280
Merit: 250


View Profile
July 09, 2013, 01:17:39 PM
 #4

As far as I know Armory will create 100 addresses beyond the last one having activity on the block chain before deciding that it has reached the end of the list of relevant addresses.  You can increase this number manually somewhere in the user interface (perhaps only in expert mode).


Sounds reasonable. Thanks.
SimonBelmond
Full Member
***
Offline Offline

Activity: 226
Merit: 100



View Profile
July 12, 2013, 05:53:29 AM
 #5

I always thoght that Armory will just scann all addresses during startup and checks in which the private key fits. Then on the other hand, how would that work for a watching only wallet? Is it maybe possible to know which addresses are all deriving from the private key without knowing the private key as such?
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1104


View Profile
August 07, 2013, 12:08:24 AM
 #6

I always thoght that Armory will just scann all addresses during startup and checks in which the private key fits. Then on the other hand, how would that work for a watching only wallet? Is it maybe possible to know which addresses are all deriving from the private key without knowing the private key as such?

You need the chaincode to generate the next key.

If you have a private key + chaincode, you can get the next private key.

If you have a public key + chaincode, you can get the next public key. 

A watching wallet knows the public keys and chaincode, so it can generate all the public keys.

Each key must be generated in sequence.  You have to generate the 1000th key before you can generate the 1001st key.

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!