Bitcoin Forum
April 25, 2024, 12:20:45 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [44] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 ... 96 »
  Print  
Author Topic: [ANNOUNCE] Electrum - Lightweight Bitcoin Client  (Read 274472 times)
flatfly
Legendary
*
Offline Offline

Activity: 1078
Merit: 1011

760930


View Profile
June 18, 2012, 09:41:47 PM
Last edit: June 18, 2012, 11:35:46 PM by flatfly
 #861

Could you add an at-a-glance way to see the current block number -- perhaps in the lower right corner?

You mean, something like this? Smiley


I have made a little patch for it and am currently fine-tuning it.
The patch is ready. If some find it useful and want to test it out, just let me know and I will post it.
(It's NOT included in my releases at this time.)

EDIT: Added a little hyperlink to the BlockExplorer count, for a quick comparison.

PS: bear with me, I'm still a beginner with Python and Qt Smiley

Could you give me a patch or a diff, want to try to patch my OS X version Smiley


Sure! To try it out, just back up your copy of gui_qt.py and replace it with this one:
 http://dre.tx0.org/gui_qt.py  (file size should be 53791 bytes)

Hopefully it should be OK on a Mac too, let us know Smiley

Thanks, seems to work fine, I hope this gets added to master.



It's not as pretty as on Windows but it will have to do Smiley

Thanks for the feedback!
If ThomasV decides to merge it, it's just 4 lines of code.
1714047645
Hero Member
*
Offline Offline

Posts: 1714047645

View Profile Personal Message (Offline)

Ignore
1714047645
Reply with quote  #2

1714047645
Report to moderator
1714047645
Hero Member
*
Offline Offline

Posts: 1714047645

View Profile Personal Message (Offline)

Ignore
1714047645
Reply with quote  #2

1714047645
Report to moderator
1714047645
Hero Member
*
Offline Offline

Posts: 1714047645

View Profile Personal Message (Offline)

Ignore
1714047645
Reply with quote  #2

1714047645
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714047645
Hero Member
*
Offline Offline

Posts: 1714047645

View Profile Personal Message (Offline)

Ignore
1714047645
Reply with quote  #2

1714047645
Report to moderator
1714047645
Hero Member
*
Offline Offline

Posts: 1714047645

View Profile Personal Message (Offline)

Ignore
1714047645
Reply with quote  #2

1714047645
Report to moderator
1714047645
Hero Member
*
Offline Offline

Posts: 1714047645

View Profile Personal Message (Offline)

Ignore
1714047645
Reply with quote  #2

1714047645
Report to moderator
Lumpy
Full Member
***
Offline Offline

Activity: 237
Merit: 100


View Profile
June 19, 2012, 01:58:44 AM
 #862

404 not found on that gui_qt.py link.
Tuxavant
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000

Bitcoin Mayor of Las Vegas


View Profile WWW
June 19, 2012, 02:23:21 AM
 #863

Can I get some love? FC16

Code:
2012-06-18:1919 PDT
[tux@powerball ~]$ sudo pip-python install http://ecdsa.org/electrum/Electrum-0.59b.tar.gz#md5=4254bad432f44d61904b93917860069b
Downloading/unpacking http://ecdsa.org/electrum/Electrum-0.59b.tar.gz#md5=4254bad432f44d61904b93917860069b
  Downloading Electrum-0.59b.tar.gz (214Kb): 214Kb downloaded
  Running setup.py egg_info for package from http://ecdsa.org/electrum/Electrum-0.59b.tar.gz#md5=4254bad432f44d61904b93917860069b
    
Downloading/unpacking slowaes (from Electrum==0.59b)
  Downloading slowaes-0.1a1.tar.gz
  Running setup.py egg_info for package slowaes
    
Downloading/unpacking ecdsa (from Electrum==0.59b)
  Downloading ecdsa-0.7.tar.gz
  Running setup.py egg_info for package ecdsa
    
Installing collected packages: slowaes, ecdsa, Electrum
  Running setup.py install for slowaes
    
  Running setup.py install for ecdsa
    
  Running setup.py install for Electrum
    changing mode of build/scripts-2.7/electrum from 640 to 755
    
    changing mode of /usr/bin/electrum to 755
Successfully installed slowaes ecdsa Electrum
Cleaning up...

2012-06-18:1920 PDT
[tux@powerball ~]$ electrum
python-ecdsa does not seem to be installed. Try 'sudo pip install ecdsa'

2012-06-18:1920 PDT
[tux@powerball ~]$

Additionally....

Code:
$ pip-python search ecdsa
ecdsa                     - ECDSA cryptographic signature library (pure python)
  INSTALLED: 0.7 (latest)

Topazan
Sr. Member
****
Offline Offline

Activity: 354
Merit: 250


View Profile
June 19, 2012, 02:31:44 AM
 #864

What key format does electrum use?  I just tried to import my wallet from blockchain.info using every format they provided, and none of them worked.  I keep getting an "unsupported key format message".  Furthermore, why do I have to provide both the address and private key?  Shouldn't the client be able to compute the address from the private key?

Save the last bitcoin for me!
Lumpy
Full Member
***
Offline Offline

Activity: 237
Merit: 100


View Profile
June 19, 2012, 02:40:20 AM
 #865

What key format does electrum use?  I just tried to import my wallet from blockchain.info using every format they provided, and none of them worked.  I keep getting an "unsupported key format message".  Furthermore, why do I have to provide both the address and private key?  Shouldn't the client be able to compute the address from the private key?

Uncompressed, WIF (starts with 5), the command is:

electrum import address:privkey

Where address and privkey are your actual pair.
Topazan
Sr. Member
****
Offline Offline

Activity: 354
Merit: 250


View Profile
June 19, 2012, 02:48:34 AM
 #866

Thanks, finally got it to work.

Is there a program that converts between different formats?  Or at least a set of algorithms?

Save the last bitcoin for me!
Lumpy
Full Member
***
Offline Offline

Activity: 237
Merit: 100


View Profile
June 19, 2012, 03:17:46 AM
 #867

Thanks, finally got it to work.

Is there a program that converts between different formats?  Or at least a set of algorithms?

I like brainwallet.org -- you can run it off the site to see what it can do, or run it offline by downloading the zip.

bitaddress.org can also do some tricks with its Wallet Details tab. Like brainwallet.org, you can download the HTML and run it offline to be secure.
flatfly
Legendary
*
Offline Offline

Activity: 1078
Merit: 1011

760930


View Profile
June 19, 2012, 06:25:23 AM
Last edit: June 19, 2012, 08:48:47 AM by flatfly
 #868

404 not found on that gui_qt.py link.

Sorry, you can try again now. Let me know if it works for you.
finway
Hero Member
*****
Offline Offline

Activity: 714
Merit: 500


View Profile
June 19, 2012, 02:53:29 PM
 #869

ThomasV,
    I've just updated Electrum/Translation wiki, add cn , mind merge that ?
          finway

Tuxavant
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000

Bitcoin Mayor of Las Vegas


View Profile WWW
June 19, 2012, 05:25:15 PM
Last edit: June 19, 2012, 09:10:12 PM by Tuxavant
 #870

Submitting a patch to allow batch create and restore functions. The getpass function breaks input from stdin so I inserted a check for tty.


Code:
diff -u  /tmp/electrum /usr/bin/electrum 
--- /tmp/electrum 2012-06-19 10:06:29.842304577 -0700
+++ /usr/bin/electrum 2012-06-19 10:16:58.050869673 -0700
@@ -173,9 +173,19 @@
         if wallet.file_exists:
             print "remove the existing wallet first!"
             sys.exit(0)
-        password = getpass.getpass("Password (hit return if you do not wish to encrypt your wallet):")
+
+        passStr = "Password (hit return if you do not wish to encrypt your wallet):"
+        if sys.stdin.isatty():
+          password = getpass.getpass(passStr)
+        else:
+          password = raw_input(passStr)
+        
         if password:
-            password2 = getpass.getpass("Confirm password:")
+            passStr = "Confirm password:"
+            if sys.stdin.isatty():
+              password2 = getpass.getpass(passStr)
+            else:
+              password2 = raw_input(passStr)
             if password != password2:
                 print "error"
                 sys.exit(1)

marcus_of_augustus
Legendary
*
Offline Offline

Activity: 3920
Merit: 2348


Eadem mutata resurgo


View Profile
June 19, 2012, 09:18:57 PM
 #871

Can I get some love? FC16

Code:
2012-06-18:1919 PDT
[tux@powerball ~]$ sudo pip-python install http://ecdsa.org/electrum/Electrum-0.59b.tar.gz#md5=4254bad432f44d61904b93917860069b
Downloading/unpacking http://ecdsa.org/electrum/Electrum-0.59b.tar.gz#md5=4254bad432f44d61904b93917860069b
  Downloading Electrum-0.59b.tar.gz (214Kb): 214Kb downloaded
  Running setup.py egg_info for package from http://ecdsa.org/electrum/Electrum-0.59b.tar.gz#md5=4254bad432f44d61904b93917860069b
    
Downloading/unpacking slowaes (from Electrum==0.59b)
  Downloading slowaes-0.1a1.tar.gz
  Running setup.py egg_info for package slowaes
    
Downloading/unpacking ecdsa (from Electrum==0.59b)
  Downloading ecdsa-0.7.tar.gz
  Running setup.py egg_info for package ecdsa
    
Installing collected packages: slowaes, ecdsa, Electrum
  Running setup.py install for slowaes
    
  Running setup.py install for ecdsa
    
  Running setup.py install for Electrum
    changing mode of build/scripts-2.7/electrum from 640 to 755
    
    changing mode of /usr/bin/electrum to 755
Successfully installed slowaes ecdsa Electrum
Cleaning up...

2012-06-18:1920 PDT
[tux@powerball ~]$ electrum
python-ecdsa does not seem to be installed. Try 'sudo pip install ecdsa'

2012-06-18:1920 PDT
[tux@powerball ~]$

Additionally....

Code:
$ pip-python search ecdsa
ecdsa                     - ECDSA cryptographic signature library (pure python)
  INSTALLED: 0.7 (latest)

Tuxuvant : did you follow my Install instructions for Fedora posted earlier in the thread https://bitcointalk.org/index.php?topic=50936.msg948023#msg948023

Would somebody mind posting them on the wiki or with the source or something for Fedora and other RH derivative users?

Tuxavant
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000

Bitcoin Mayor of Las Vegas


View Profile WWW
June 19, 2012, 09:22:50 PM
 #872

I did not (but might).. I've just been using the install commandline from the linux download option at ecdsa.org.

marcus_of_augustus
Legendary
*
Offline Offline

Activity: 3920
Merit: 2348


Eadem mutata resurgo


View Profile
June 19, 2012, 09:42:15 PM
Last edit: June 19, 2012, 10:09:05 PM by marcus_of_augustus
 #873

I did not (but might).. I've just been using the install commandline from the linux download option at ecdsa.org.

Yeah, it's a little generous to call it a "linux" download .... Debian-Ubuntu is known to work, I don't know what else it has been tested on ...


Edit: all right I tested the
Code:
sudo pip-python install http://ecdsa.org/electrum/Electrum-0.59b.tar.gz#md5=4254bad432f44d61904b93917860069b

on FC15 and it works. Note however though I already had the "slowaes" and "ecdsa" packages installed from previous deps on electrum work. I also tested downloading the .tar.gz manually, unpacking and running
Code:
sudo python setup.py install
inside the unpacked dir and that works also, but again with previous caveat about existing deps.

So known to work on FC will be something like this:

Code:
#
# use yum-ex and get packages PyQt4 PyQt4-devel
# or on command line

$ sudo yum install PyQt4 PyQt4-devel

# separately do same for packages python-setuptools python-pip

$ sudo yum install python-setuptools python-pip

# Install python modules ecdsa slowaes (crypto stuff)

$ sudo easy_install ecdsa
$ sudo easy_install slowaes

$ sudo pip-python install http://ecdsa.org/electrum/Electrum-0.59b.tar.gz#md5=4254bad432f44d61904b93917860069b

Note how the dep. packages need to be installed first, rather relying on electrum to install them. Anyway it is not good practice to "sudo" a whole lot of unknown packages onto your OS !!

ThomasV (OP)
Moderator
Legendary
*
Offline Offline

Activity: 1896
Merit: 1353



View Profile WWW
June 20, 2012, 08:49:54 AM
 #874

ThomasV,
    I've just updated Electrum/Translation wiki, add cn , mind merge that ?
          finway

that's very nice, thanks!
note that I still have to update that page; some new messages are missing.

Electrum: the convenience of a web wallet, without the risks
ThomasV (OP)
Moderator
Legendary
*
Offline Offline

Activity: 1896
Merit: 1353



View Profile WWW
June 23, 2012, 10:24:45 AM
 #875

Submitting a patch to allow batch create and restore functions. The getpass function breaks input from stdin so I inserted a check for tty.

thanks. there are 6 instances of getpass in the file.
is there a reason why you want to patch only 2 of them?

Electrum: the convenience of a web wallet, without the risks
ThomasV (OP)
Moderator
Legendary
*
Offline Offline

Activity: 1896
Merit: 1353



View Profile WWW
June 23, 2012, 10:50:39 AM
 #876

new release: 0.60

changes:
 - updated list of default servers
 - the client will not display servers that have not upgraded to version 0.1.
 - two new languages: chinese and dutch
 - improved help messages (tachik0ma)

Electrum: the convenience of a web wallet, without the risks
Tuxavant
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000

Bitcoin Mayor of Las Vegas


View Profile WWW
June 23, 2012, 11:06:58 AM
 #877

thanks. there are 6 instances of getpass in the file.
is there a reason why you want to patch only 2 of them?

#1 I barely knew what the hell I was doing.

#2 That was the only place I could find that "bothered me" at the moment.

#3 I will search for the other 5 and patch those too.

#4 Father, I am sorry I dissapoint. lol

edit: #5 I can't count. 4 other patches coming.

Tuxavant
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000

Bitcoin Mayor of Las Vegas


View Profile WWW
June 23, 2012, 12:27:41 PM
 #878

Here's a patch for .60 with all the getpass calls "fixed".

I was able to test (with success) all patch conditions with the exception of mktx and payto.

Code:
$ diff -u /tmp/electrum-60 /usr/bin/electrum 
--- /tmp/electrum-60 2012-06-23 04:17:48.760346152 -0700
+++ /usr/bin/electrum 2012-06-23 05:21:51.516348218 -0700
@@ -170,15 +170,29 @@
     
     if cmd in ['create', 'restore']:
         if wallet.file_exists:
-            print "remove the existing wallet first!"
-            sys.exit(0)
-        password = getpass.getpass("Password (hit return if you do not wish to encrypt your wallet):")
-        if password:
-            password2 = getpass.getpass("Confirm password:")
-            if password != password2:
-                print "error"
-                sys.exit(1)
+            print "Error: Wallet file exists. Remove the existing wallet first."
+            sys.exit(1)
+
+        # Get password once if stdin, confirmed if by atty
+        passStr = "Password (hit return if you do not wish to encrypt your wallet):"
+        if sys.stdin.isatty():
+            password = getpass.getpass(passStr)
+
+            if password:
+                passStr = "Confirm password:"
+                if sys.stdin.isatty():
+                    password2 = getpass.getpass(passStr)
+                else:
+                    password2 = raw_input(passStr)
+
+                if password != password2:
+                    print "Error: Passwords do not match."
+                    sys.exit(1)
+
         else:
+            password = raw_input(passStr)
+
+        if not password:
             password = None
 
         w_host, w_port, w_protocol = wallet.server.split(':')
@@ -263,12 +277,21 @@
                 
     # commands needing password
     if cmd in protected_commands or ( cmd=='addresses' and options.show_keys):
-        password = getpass.getpass('Password:') if wallet.use_encryption and not is_temporary else None
+        if wallet.use_encryption and not is_temporary:
+            passStr = "Password:"
+            if sys.stdin.isatty():
+                password = getpass.getpass(passStr)
+            else:
+                password = raw_input(passStr)
+        else:
+            password = None
+        #if wallet.use_encryption and not is_temporary else None
+
         # check password
         try:
             wallet.pw_decode( wallet.seed, password)
         except:
-            print "invalid password"
+            print "Error: Invalid password"
             exit(1)
 
     if cmd == 'import':
@@ -429,7 +452,13 @@
     elif cmd in ['payto', 'mktx']:
         if from_addr and is_temporary:
             if from_addr.find(":") == -1:
-                keypair = from_addr + ":" + getpass.getpass('Private key:')
+                passStr = "Private key:"
+                if sys.stdin.isatty():
+                    tmpKey = getpass.getpass(passStr)
+                else:
+                    tmpKey = raw_input(passStr)
+                keypair = from_addr + ":" + tmpKey
+                del tmpKey
             else:
                 keypair = from_addr
                 from_addr = keypair.split(':')[0]
@@ -478,13 +507,20 @@
         try:
             seed = wallet.pw_decode( wallet.seed, password)
         except:
-            print "sorry"
+            print "Error: Password failed to decode wallet."
             sys.exit(1)
-        new_password = getpass.getpass('New password:')
-        if new_password == getpass.getpass('Confirm new password:'):
-            wallet.update_password(seed, password, new_password)
+
+        passStr = "New password:"
+        if sys.stdin.isatty():
+            new_password = getpass.getpass(passStr)
+            new_password2 = getpass.getpass("Confirm new password:")
+            if not new_password == new_password2:
+                print "Error: Passwords do not match."
+                sys.exit(1)
         else:
-            print "error: mismatch"
+            new_password = raw_input(passStr)
+
+        wallet.update_password(seed, password, new_password)
 
     elif cmd == 'signmessage':
         address = args[1]

ThomasV (OP)
Moderator
Legendary
*
Offline Offline

Activity: 1896
Merit: 1353



View Profile WWW
June 23, 2012, 12:40:14 PM
 #879

Here's a patch for .60 with all the getpass calls "fixed".

I was able to test (with success) all patch conditions with the exception of mktx and payto.

why don't you define a unique getpass function, instead of repeating things six times?

Electrum: the convenience of a web wallet, without the risks
Tuxavant
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000

Bitcoin Mayor of Las Vegas


View Profile WWW
June 23, 2012, 01:00:16 PM
 #880

That's all the mojo-fu I have at the moment. But, challenge accepted. I'll give it a go when I have some time.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [44] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 ... 96 »
  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!