Bitcoin Forum
December 05, 2016, 02:51:10 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
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 ... 96 »
  Print  
Author Topic: [ANNOUNCE] Electrum - Lightweight Bitcoin Client  (Read 243012 times)
Deafboy
Hero Member
*****
Offline Offline

Activity: 484



View Profile WWW
November 21, 2011, 11:37:25 PM
 #61

Any idea what's the package name of module I am missing?
Code:
[user@N900 user]$ python /opt/Electrum-0.26b/client/electrum.py
Traceback (most recent call last):
  File "/opt/Electrum-0.26b/client/electrum.py", line 20, in <module>
    import sys, base64, os, re, hashlib, socket, getpass, copy, operator, ast
ImportError: No module named ast
[user@N900 user]$
1480949470
Hero Member
*
Offline Offline

Posts: 1480949470

View Profile Personal Message (Offline)

Ignore
1480949470
Reply with quote  #2

1480949470
Report to moderator
1480949470
Hero Member
*
Offline Offline

Posts: 1480949470

View Profile Personal Message (Offline)

Ignore
1480949470
Reply with quote  #2

1480949470
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480949470
Hero Member
*
Offline Offline

Posts: 1480949470

View Profile Personal Message (Offline)

Ignore
1480949470
Reply with quote  #2

1480949470
Report to moderator
1480949470
Hero Member
*
Offline Offline

Posts: 1480949470

View Profile Personal Message (Offline)

Ignore
1480949470
Reply with quote  #2

1480949470
Report to moderator
1480949470
Hero Member
*
Offline Offline

Posts: 1480949470

View Profile Personal Message (Offline)

Ignore
1480949470
Reply with quote  #2

1480949470
Report to moderator
Red Emerald
Hero Member
*****
Offline Offline

Activity: 742



View Profile WWW
November 22, 2011, 12:36:35 AM
 #62

Great! I'll test when I'll have some free time and put up a public server online.

Ditto.

I have so many projects tho, it might be a while.

Keep up the great work.  The readability of python is a great benefit.

slush
Legendary
*
Offline Offline

Activity: 1358



View Profile WWW
November 22, 2011, 01:42:24 AM
 #63

Thomas, excellent work! I finally found some time to test everything and read (most of) the code. I really appreciate small footprint of client. There's lot of things which I like on your client, namely deterministic wallet (no need for periodic backup is awesome feature) and client-server architecture, which makes client really lightweight and very fast to use.

Few comment though.

1. Consider to switch to Qt. It's much modern gui toolkit and looks better especially on Windows. Thanks to minimalistic GUI it's still pretty easy to switch. Your client has great potential but GTK looks weird on Win and it's wrong to focus only on linux users (although I'm 100% linux user).

2. Consider better network interface and wallet format. Using 'repr' may break things in future as this isn't supposed to be platform-independent serializing method ;-). I see potential in using server side with some mobile clients, however implementing repr in java might be real hell. Although I don't recommend Json, it would be better than repr and it does not need new dependency as json parser is in stock python. Also thinking about pub/sub mechanism which can avoid server polling would be great. pubsub can make updates on client instant and yet vastly save server resources (as common client does not receive transaction all day long).

3. Consider to move to Github. I'd like to submit some fixes time to time and I finally need to learn with Git & Github :-). So migration to github would be good reason for me to go thru git manual (I'm mercurial user for years).

I can imagine that I'll install electrum to my friends instead of standard client when electrum matures a bit, because handling blockchain is simply big overhead for occasional users. Once again - really good work so far!

OT: If I remember well, we made OTC trade on 1st January together, right? It was my first sell-off and your first buy :-D.

slush
Legendary
*
Offline Offline

Activity: 1358



View Profile WWW
November 22, 2011, 03:21:47 AM
 #64

I knocked up first version of QR code support, feature which I'm missing in official client. It is using 3rd party library from googlecode, which isn't available thru easy_install, so I decided to add it directly to sources and do not create some weird dependency. Alsp PIL (python imaging library) is necessary for rendering image.

QR code is displaying in separate window instead directly in GUI because I'm lacking some high-level concept of GUI (and, honestly, I feel like GUI need a lot of work Wink ). I just made it as simple as possible, but I'm open to make QR code as part of main window if you tell me where you want to show it. But I still hope you decide to go to Qt so I won't need to fiddle with Gtk (and I'll finally learn Qt instead).

http://mining.bitcoin.cz/media/download/qrsupport.tgz

BTCurious
Hero Member
*****
Offline Offline

Activity: 714


^SEM img of Si wafer edge, scanned 2012-3-12.


View Profile
November 22, 2011, 06:16:11 AM
 #65

It seems this is generating some interest now. Cool!

Any idea what's the package name of module I am missing?
Code:
[user@N900 user]$ python /opt/Electrum-0.26b/client/electrum.py
Traceback (most recent call last):
  File "/opt/Electrum-0.26b/client/electrum.py", line 20, in <module>
    import sys, base64, os, re, hashlib, socket, getpass, copy, operator, ast
ImportError: No module named ast
[user@N900 user]$
As far as I can tell, this is an abstract syntax tree, which is supposedly part of native python. What version are you running? Try downloading python 2.7, see if that helps.

3. Consider to move to Github. I'd like to submit some fixes time to time and I finally need to learn with Git & Github :-). So migration to github would be good reason for me to go thru git manual (I'm mercurial user for years).
The code is hosted on Gitorius (Link) which in practice is nearly the same thing as Github. In any case you should be able to do clones and merge requests and such (although I don't have any experience with Gitorius).


Deafboy
Hero Member
*****
Offline Offline

Activity: 484



View Profile WWW
November 22, 2011, 09:00:02 AM
 #66

Quote
Try downloading python 2.7
I have only python 2.5 on Maemo5 and there is no easy way to upgrade it, but I have somehow managed to install all necessary dependencies on chrooted debian image with python 2.6

Screenshot
slush
Legendary
*
Offline Offline

Activity: 1358



View Profile WWW
November 22, 2011, 10:33:58 AM
 #67

One more finding: As far as I understand fee calculations in official client, it is "fee per kB", not "fee per transaction" as is implemented in Electrum. Normal transaction is usually under 1kB, however sometimes there are strange multi-kB transactions - especially when miners are consolidating their 0.01 payouts from pool to one address. Then static fee in Electrum can lead to some unexpected behaviour.

slush
Legendary
*
Offline Offline

Activity: 1358



View Profile WWW
November 22, 2011, 10:36:37 AM
 #68

Any idea what's the package name of module I am missing?

Module AST has been introduced into standard python library in version 2.6, which is the reason why python 2.5 throws such error. I think electrum can safely expect python 2.6 as minimal version, as 2.5 is beeing obsolete in almost every distribution.

jago25_98
Hero Member
*****
Offline Offline

Activity: 871


http://moneybutnofixedabode.blogspot.com


View Profile WWW
November 22, 2011, 10:37:52 AM
 #69

Any tips for getting it working with Symbian non touch screen phones?
BTCurious
Hero Member
*****
Offline Offline

Activity: 714


^SEM img of Si wafer edge, scanned 2012-3-12.


View Profile
November 22, 2011, 10:41:06 AM
 #70

Any tips for getting it working with Symbian non touch screen phones?
I think it has not really been developed for phones like that yet. It's just the concept that would work rather well on phones, as you don't need the blockchain and such.

So no, I don't think that will be easy to use, for now.

ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
November 22, 2011, 10:43:20 AM
 #71

Thomas, excellent work! I finally found some time to test everything and read (most of) the code. I really appreciate small footprint of client. There's lot of things which I like on your client, namely deterministic wallet (no need for periodic backup is awesome feature) and client-server architecture, which makes client really lightweight and very fast to use.

Few comment though.

1. Consider to switch to Qt. It's much modern gui toolkit and looks better especially on Windows. Thanks to minimalistic GUI it's still pretty easy to switch. Your client has great potential but GTK looks weird on Win and it's wrong to focus only on linux users (although I'm 100% linux user).

2. Consider better network interface and wallet format. Using 'repr' may break things in future as this isn't supposed to be platform-independent serializing method ;-). I see potential in using server side with some mobile clients, however implementing repr in java might be real hell. Although I don't recommend Json, it would be better than repr and it does not need new dependency as json parser is in stock python. Also thinking about pub/sub mechanism which can avoid server polling would be great. pubsub can make updates on client instant and yet vastly save server resources (as common client does not receive transaction all day long).

3. Consider to move to Github. I'd like to submit some fixes time to time and I finally need to learn with Git & Github :-). So migration to github would be good reason for me to go thru git manual (I'm mercurial user for years).

I can imagine that I'll install electrum to my friends instead of standard client when electrum matures a bit, because handling blockchain is simply big overhead for occasional users. Once again - really good work so far!

hi slush, thanks for the feedback!

1. Concerning Qt, I do not think we need to switch to Qt, we can just provide both Qt and gtk :-)  I will not do it myself, because I am not familiar with Qt, but I will be very happy to include an alternative GUI if someone decides to write it. Note that someone already made the same proposal: https://bitcointalk.org/index.php?topic=50936.msg618488#msg618488 . Please also note that in the current GUI, I made sure that all functions can be accessed with the keyboard, with no need to reach for the mouse; if you design a Qt gui, I would love to keep the same accessibility.

2. wallet format: you are right. any patch is welcome.

2. server polling versus push: I disagree here. I decided to use polling instead of push for a reason. Many people have difficulties configuring with firewalls and opening ports. I wanted Electrum to be as easy to use as possible, and to require as little configuration as possible. I do not think that minimizing bandwidth is an issue at this point. Now, if you really want Electrum to use a push protocol, we can add it, but do not think that it should be the default.

3. the project is on gitorious. My username was already taken at github. not at gitorious :-)

Electrum: the convenience of a web wallet, without the risks
ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
November 22, 2011, 10:51:02 AM
 #72

One more finding: As far as I understand fee calculations in official client, it is "fee per kB", not "fee per transaction" as is implemented in Electrum. Normal transaction is usually under 1kB, however sometimes there are strange multi-kB transactions - especially when miners are consolidating their 0.01 payouts from pool to one address. Then static fee in Electrum can lead to some unexpected behaviour.

Indeed. well, the fee calculation in the official bitcoin client is quite complicated, and I did not take the time to reproduce it. However, when I first used the official client, it took me some time to realize that the fee was "per kB". In any case, I think that the fee should be visible from the user before they press the "send" button. Maybe we should display the suggested fee, and give the user the option to increase or decrease it.

Electrum: the convenience of a web wallet, without the risks
ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
November 22, 2011, 11:39:17 AM
 #73

Quote
Try downloading python 2.7
I have only python 2.5 on Maemo5 and there is no easy way to upgrade it, but I have somehow managed to install all necessary dependencies on chrooted debian image with python 2.6

Screenshot

cute!

Electrum: the convenience of a web wallet, without the risks
ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
November 22, 2011, 11:53:00 AM
 #74

Any idea what's the package name of module I am missing?

Module AST has been introduced into standard python library in version 2.6, which is the reason why python 2.5 throws such error. I think electrum can safely expect python 2.6 as minimal version, as 2.5 is beeing obsolete in almost every distribution.


A quick and dirty fix could be to replace all instances of ast.literal_eval() with eval(), but doing so exposes your client to messages containing code sent by a malicious server.
I guess some sanitization is possible using regular expressions.

Electrum: the convenience of a web wallet, without the risks
slush
Legendary
*
Offline Offline

Activity: 1358



View Profile WWW
November 22, 2011, 12:11:00 PM
 #75

A quick and dirty fix could be to replace all instances of ast.literal_eval() with eval(), but doing so exposes your client to messages containing code sent by a malicious server.
I guess some sanitization is possible using regular expressions.

I think using eval is really bad idea as it literally open the door for mitm attackers (you can do almost everything with eval like accessing local filesystem). I still re-read documentation for ast yesterday to be sure there's no possibility to attack clients with modified payload and so far it looks safe.

ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
November 22, 2011, 01:49:55 PM
 #76

I knocked up first version of QR code support, feature which I'm missing in official client. It is using 3rd party library from googlecode, which isn't available thru easy_install, so I decided to add it directly to sources and do not create some weird dependency. Alsp PIL (python imaging library) is necessary for rendering image.

QR code is displaying in separate window instead directly in GUI because I'm lacking some high-level concept of GUI (and, honestly, I feel like GUI need a lot of work Wink ). I just made it as simple as possible, but I'm open to make QR code as part of main window if you tell me where you want to show it. But I still hope you decide to go to Qt so I won't need to fiddle with Gtk (and I'll finally learn Qt instead).

http://mining.bitcoin.cz/media/download/qrsupport.tgz

nice, thanks. I just added it to Electrum, and released version 0.27
note that I reimplemented the rendering with pygtk, because I did not want to create another dependency with IM


Electrum: the convenience of a web wallet, without the risks
ovidiusoft
Sr. Member
****
Offline Offline

Activity: 252


View Profile
November 22, 2011, 04:43:42 PM
 #77

This shouldn't be posted here, but I don't see any bug tracker on gitorius, so here:

#1. Config file should be (in order): ~/electum.conf, /etc/electum.conf, or the hardcoded defaults if neither exist.

#2. The server readme file refers to the patch bitcoinrpc_connection.py.diff agains bitcoinrpc (https://gitorious.org/python-bitcoin), but the file it modifies doesn't exist in that project (src/bitcoinrpc/connection.py). Please advise/fix.

Also, there should be documentation about how to run Electrum and all deps from a single directory. For example, I don't want to install bitcoin-abe and other stuff that doesnt's exist in Debian system-wide. I want to have them all under the user 'bitcoin', for security and ease of administration reasons. After I'm done testing, I'll write my own howto, for the moment I'm stuck Smiley
ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
November 22, 2011, 05:15:12 PM
 #78

#2. The server readme file refers to the patch bitcoinrpc_connection.py.diff agains bitcoinrpc (https://gitorious.org/python-bitcoin), but the file it modifies doesn't exist in that project (src/bitcoinrpc/connection.py). Please advise/fix.

Sorry, it's not python-bitcoin but bitcoin-python.
You can get it from here: https://github.com/toomanysecrets0/bitcoin-python
I had both installed at some point, hence the confusion

Electrum: the convenience of a web wallet, without the risks
slush
Legendary
*
Offline Offline

Activity: 1358



View Profile WWW
November 22, 2011, 05:18:33 PM
 #79

#1. Config file should be (in order): ~/electum.conf, /etc/electum.conf, or the hardcoded defaults if neither exist.

I don't think /etc/electrum.conf is good place, because client need write access to that (as it contains private keys). And give any non-root user access to /etc/ is imho bad thing (tm).

ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
November 22, 2011, 05:23:55 PM
 #80

#1. Config file should be (in order): ~/electum.conf, /etc/electum.conf, or the hardcoded defaults if neither exist.

I don't think /etc/electrum.conf is good place, because client need write access to that (as it contains private keys). And give any non-root user access to /etc/ is imho bad thing (tm).

no, this file is only for the server.

Electrum: the convenience of a web wallet, without the risks
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 ... 96 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!