Pages:
Author

Topic: [ANNOUNCE] Electrum - Lightweight Bitcoin Client - page 87. (Read 274562 times)

hero member
Activity: 2086
Merit: 501
★Bitvest.io★ Play Plinko or Invest!
I have an old wallet.dat file (the one before encryption) can I recover the wallet using Electrum? If so, how?
no, you need to use the official bitcoin client in order to open wallet.dat; Electrum uses a different wallet format.
did you try with the official bitcoin client?


Yeah and it's not working. It just stays at 0 blocks downloaded no matter how long I wait. If I just start the original client with a new wallet it downloads the block chain with no problems.
legendary
Activity: 1896
Merit: 1353
I have an old wallet.dat file (the one before encryption) can I recover the wallet using Electrum? If so, how?
no, you need to use the official bitcoin client in order to open wallet.dat; Electrum uses a different wallet format.
did you try with the official bitcoin client?
hero member
Activity: 742
Merit: 500
Can you add support for green addresses?

Essentially its a list of addresses that you will trust even with 0 confirmations.
hero member
Activity: 2086
Merit: 501
★Bitvest.io★ Play Plinko or Invest!
I have an old wallet.dat file (the one before encryption) can I recover the wallet using Electrum? If so, how?
donator
Activity: 2772
Merit: 1019
Electrum doesn't seem to try to reconnect after that, just sits there.
what makes you believe that it did not reconnect ? did the icon remain red?

Didn't say the icon was red. I even assumed it stayed green.

I'm pretty sure it didn't reconnect, because I had some money sent and it didn't show in history (after many hours).

It showed right away after a restart.
legendary
Activity: 1896
Merit: 1353
Electrum doesn't seem to try to reconnect after that, just sits there.
what makes you believe that it did not reconnect ? did the icon remain red?
donator
Activity: 2772
Merit: 1019
I found a small annoyance:

Quote from: electrum

Traceback (most recent call last):
  File "/mnt/sda3/home/nick/bitcoin/electrum/client/gui.py", line 491, in update_wallet_thread
    self.wallet.new_session()
  File "client/electrum.py", line 474, in new_session
    self.session_id, self.message = ast.literal_eval( self.request( repr ( ('session', repr(self.addresses) ))))
  File "client/electrum.py", line 452, in request
    s.connect(( self.host, self.port))
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 101] Network is unreachable
Traceback (most recent call last):
  File "/mnt/sda3/home/nick/bitcoin/electrum/client/gui.py", line 491, in update_wallet_thread
    self.wallet.new_session()
  File "client/electrum.py", line 474, in new_session
    self.session_id, self.message = ast.literal_eval( self.request( repr ( ('session', repr(self.addresses) ))))
  File "client/electrum.py", line 452, in request
    s.connect(( self.host, self.port))
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 101] Network is unreachable

clearly the network is unrechable (which can happen at times, of course)

nothing more after that. I guess this happens when my dynamic ip changes.

Electrum doesn't seem to try to reconnect after that, just sits there.

An unsuspecting gui user might wait indefinitely for some money to show up, for example and start to worry. The gui doesn't show any problem, I think it even shows a "green light" (will observe that again)
legendary
Activity: 1386
Merit: 1097
Hope the Qt edition comes out quickly,

I'm spending much more time in my job than I expected, so Qt must wait few days, sorry Sad.
legendary
Activity: 1896
Merit: 1353
- Shouldn't the wallet store its own version number? Otherwise we'll need to
  guess it when we recover an old wallet.
the wallet stores its version number. see SEED_VERSION.
Also remember that the current version is not the final one.
there will be at lese one more change to the seed generation.

Quote
- It would be nice if a standard data format such as JSON was used to
  communicate with the server
indeed

Quote
- The 'for_change' thing in 'create_new_address' is a bit odd. I suggest
  considering the created address to be 'for change' when no password is
  provided.
I do not understand what you mean.
the password is necessary to create a new address (for now, until we have type 2 wallets)

Quote
- In the wallet, addresses should be stored in a dictionnary, not an array.
  Pretty much everything should be stored in a dictionnary anyway.
Yes this is one option. Someone else suggested using ParseConfig

hero member
Activity: 714
Merit: 500
Hope the Qt edition comes out quickly,
can't run it right now.  Angry
legendary
Activity: 1288
Merit: 1080
As I am translating the client, I have a few comments/suggestions:

- Shouldn't the wallet store its own version number? Otherwise we'll need to
  guess it when we recover an old wallet.
- It would be nice if a standard data format such as JSON was used to
  communicate with the server
- The 'for_change' thing in 'create_new_address' is a bit odd. I suggest
  considering the created address to be 'for change' when no password is
  provided.
- In the wallet, addresses should be stored in a dictionnary, not an array.
  Pretty much everything should be stored in a dictionnary anyway. We don't
  need sequential access, except maybe for the change_addresses index.
- There is way too many Object Orientation in the code, imho. Objects are
  useful when instanciation is needed. Otherwise packages or modules are just
  fine.

Other ideas I may forget may be seen in my repo:
http://github.com/grondilu/Perlectrum in Bitcoin/Electrum/Client.pm


legendary
Activity: 1896
Merit: 1353
lol, maybe I should read some book about this gui? Enter? Really? That works? I've been double-clicking the stuff in history to death Wink.

The tooltips (everywhere) only work very seldomly here.

Please enable double-click, so people can find this feature Wink
ok, that's done. thanks for the feedback, btw.

Quote
Any other hidden rooms or secret keys to press?
well, I guess you already noticed that labels can be edited Smiley
donator
Activity: 2772
Merit: 1019
A suggestion: it would be nice to see the number of confimations of each transaction in the history tab.

you have it in the tooltip, and also in the details of the transaction (navigate the history and press enter).
I did not want to display it directly, because it makes bitcoin look complicated,
and it becomes irrelevant after a few blocks (who wants to know if a tx has 452 or 435 confirmations?)

lol, maybe I should read some book about this gui? Enter? Really? That works? I've been double-clicking the stuff in history to death Wink.

The tooltips (everywhere) only work very seldomly here.

Please enable double-click, so people can find this feature Wink

Any other hidden rooms or secret keys to press?
sr. member
Activity: 252
Merit: 250
New (but not only) users might want to play with this Linux live USB, which includes Electrum: https://bitcointalksearch.org/topic/bitsafe-fork-with-electrum-included-54376
legendary
Activity: 1896
Merit: 1353
Litecoin has this nice clock-like icon for pending transactions. If it has 6 or more, it just shows a check-mark. If it has less, it's a pie-chart that fills up, and changes from red for no confirmations, to green for 5 confirmations.
yes, we could do that; for the moment there are only 2 icons (pending and confirmed) but we can add more
hero member
Activity: 714
Merit: 504
^SEM img of Si wafer edge, scanned 2012-3-12.
Litecoin has this nice clock-like icon for pending transactions. If it has 6 or more, it just shows a check-mark. If it has less, it's a pie-chart that fills up, and changes from red for no confirmations, to green for 5 confirmations.
legendary
Activity: 1896
Merit: 1353
A suggestion: it would be nice to see the number of confimations of each transaction in the history tab.

you have it in the tooltip, and also in the details of the transaction (navigate the history and press enter).
I did not want to display it directly, because it makes bitcoin look complicated,
and it becomes irrelevant after a few blocks (who wants to know if a tx has 452 or 435 confirmations?)
donator
Activity: 2772
Merit: 1019
A suggestion: it would be nice to see the number of confimations of each transaction in the history tab.
legendary
Activity: 1896
Merit: 1353
I don't quite understand this random number generation algorithm (the "randrange_from_seed_trytryagain").  It seems overly complicated to me.

this function call is not needed. It is still in the code because it was used in the first version of Electrum, where the key was derived from a user-chosen passphrase.
Since user-chosen passphrases are not secure enough, I replaced them with 128 bits random seeds, but I kept this function call in the code for backward compatibility.
I will remove it when we switch to type 2 wallets.
legendary
Activity: 1288
Merit: 1080

The more I think about it, the more I think this stuff is really good.  For at least two reasons:

1.  It separates the client code from the server code, making two clearly distinct applications.  What is good about this is that it gives much less possibility for a troyan to be harmful in the server code.

2.  This idea of generating keys deterministically from a seed that can be memorized is just a great idea.  The official bitcoin client should propose something like this as an option.

I'd like to nominate ThomasV for a Satoshi award or something Wink


Anyway, I have a question.

I don't quite understand this random number generation algorithm (the "randrange_from_seed_trytryagain").  It seems overly complicated to me.

If I must pick a random number from 0 to n, where n < 2**256, I would just do this:

x = randrange(0, 256)
for i in range(32 + 4):
     x = 256*x + rand(0, 256)
return x % n

Maybe there is something I miss mathematically here, but basically why can't I pick a number from 0 to p where p is fairly larger than 2**256 (say, 256**4 times), and then take the remainder modulo n?
Pages:
Jump to: