Pages:
Author

Topic: Electrum: the blockchain is the cloud - page 4. (Read 15925 times)

legendary
Activity: 1708
Merit: 1066
November 16, 2011, 02:51:32 PM
#2
What exactly is a sequence ?
Is it something like a process that can make a new address A(n+1) from A(n) that is valid for a fixed, maximum number of n ?

If it is, is there any mileage of having a "sequence sequence" / a "synchronisation sequence" so that one client can effectively say:

"I have run out of addresses I can create from my current sequence, can we move onto the next one please?"
and then any other client can see the switch to a new sequence and move in step.

If there is a finite length you can safely create in a sequence you will, of course, run to the end of a "synchronisation sequence" but that will be O(n^2) and hence not too frequent.

legendary
Activity: 1896
Merit: 1353
November 16, 2011, 10:15:50 AM
#1
The new Electrum Bitcoin client uses a deterministic wallet. This allows users to recover their complete list of addresses and transaction history from a secret seed.  (except for labels, which are not stored in the blockchain)

For the moment this feature allows users to restore their wallet in case of loss, or to easily transport their wallet on another machine. However, it does not automatically synchronize a wallet that is being used on two different machines. I would like to add this functionality. This would very much ressemble "cloud" services.

The idea, of course, is to use the blockchain as the only source of information; we do not want users to be tied to a third-party storage.

In order to achieve this, the client needs to watch the next addresses that are going to be used in its deterministic sequence. The Electrum wallet actually uses two distinct sequences: one for receiving addresses, one for change addresses. The sequence of receiving addresses might contain gaps (unused addresses), and the maximal size of these gaps is a parameter set by the user. The sequence of change addresses does not have gaps.

The problem of synchronization between two wallets is the following: If bitcoins are received at one of the addresses that are at the end of the current sequence, then the client needs to extend that sequence, in order to know whether the next addresses have been involved in transactions. For this, the client needs to generate new private keys, and therefore it needs the user's password.

So, we are left with the following dilemma: should the client pre-generate the next 100 addresses of its sequence and store them, or should it occasionally ask the user for his password when the wallet receives some bitcoins? both solutions seem awkward to me. Is there a third solution?

UPDATE: this question has been answered below. Version 0.34 of Electrum implements a "type 2" wallet and multiple instances of the same wallets are synchronized automatically.
Pages:
Jump to: