Bitcoin Forum
May 26, 2024, 02:23:17 AM *
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 »
  Print  
Author Topic: Electrum - Bitcoin client for the common users (friendly and instant)  (Read 110004 times)
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
September 19, 2012, 07:30:22 AM
 #121

1. A setting that allows starting up in Pro Mode and skipping what I see as the useless small window currently the default.

This is something I'm already working on in master, sorta. If you edit config.json and setup gui: qt it should boot up in pro mode every time. There just isn't a preference window to set it yet, only via editing the config file.

2. SOCKS proxy support so the client can get to the server via an ssh tunnel when at public wifi locations (amongst other uses).
3. Have the current balance in local currency (fiat) on the Pro Mode window (like on the small regular startup window).
4. Have main window remember it's size and location on the desktop.

These would be a very welcome pull requests, preferable in separate commits so it's easier to code review.

Thanks for your involvement Smiley

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
ThomasV
Moderator
Legendary
*
Offline Offline

Activity: 1896
Merit: 1353



View Profile WWW
September 19, 2012, 08:12:46 AM
 #122

could you also fix the regression I have reported in the main Electrum thread? https://bitcointalk.org/index.php?topic=50936.msg1192980#msg1192980

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

Activity: 938
Merit: 1000



View Profile WWW
September 19, 2012, 08:20:21 AM
 #123

could you also fix the regression I have reported in the main Electrum thread? https://bitcointalk.org/index.php?topic=50936.msg1192980#msg1192980

Sure thing, but please note that master is overall considered unstable. So most of the time bug reports like these are not needed until the release is merged into a stable branch and ready for testing.

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
OneEyed
aka aurele
Full Member
***
Offline Offline

Activity: 154
Merit: 100



View Profile WWW
September 19, 2012, 08:39:30 AM
 #124

Sure thing, but please note that master is overall considered unstable. So most of the time bug reports like these are not needed until the release is merged into a stable branch and ready for testing.

Maybe you should adopt the same terminology and branch naming as most software around here:
  • the "master" branch always compile, but is not well tested enough to be deemed stable for everyday use
  • release branches are created from time to time from the master branch when developers think master is stable enough; they are thoroughly tested; when a point fix for a release (maybe leading to a minor release) is committed into the release branch, this branch is then merged immediately into the master branch to acquire the fix there as well, or to make git record that the fix is not needed in the master branch so that it doesn't propose to merge it again later
  • feature branches are used to develop features that might temporarily break working code or that are unfinished, and those are merged into the master branch when they are ready to be tested

Sticking to this well-known scheme also helps you test the new features once they are incorporated into the master branch, as, for example, some ArchLinux users will install "electrum-git" instead of "electrum". By doing so, they acknowledge that they want to use the current development version with a certain possibility of breakage, and will allow you to fix bugs before they go into a release.

You should have a look at git flow, which is both a model and a tool. It helps developing software in a collaborative way and sticks to the above-described invariants (master contains all the fixes from release branches and always compiles, releases aren't touched except for fixing bugs leading to minor releases, feature branches allow early testing of potentially breaking or bad changes).

Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
September 19, 2012, 08:43:08 AM
 #125

I've already brought up Git flow since I use that for all my day-job related code. It's an awesome system and makes it very easy for all parties to know what to except. Sadly Genjix has been very busy these last few weeks with the conf stuff so I haven't had the time to really discuss it. I will bring it up again once he surfaces Smiley 

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
September 19, 2012, 08:47:00 AM
 #126

Ah yes, after digging thru the code a bit I saw the new SimpleConfig stuff. I'm using the "gui":"qt"  value now and it works. I'll just work on adding a checkbox for this in expert mode settings.

I have SOCKS support working now. I am currently testing it and working out how to do the settings. I've added defaults in SimpleConfig to support this and also added cmdline proxy option.

I could have proxy values in main settings dlg or put them in server connect dlg. Seems like socks works but is limited by not supporting unicode string for url in the socks module. I'm not sure how much unicode DNS lookup is needed but I guess ideally this should only affect proxy and not normal connections.

I'm a bit confused as to whether I'm working from master or 1.0 branch. I guess this only matters when it gets pulled back later?


Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
September 19, 2012, 08:48:26 AM
 #127

Ah yes, after digging thru the code a bit I saw the new SimpleConfig stuff. I'm using the "gui":"qt"  value now and it works. I'll just work on adding a checkbox for this in expert mode settings.

I have SOCKS support working now. I am currently testing it and working out how to do the settings. I've added defaults in SimpleConfig to support this and also added cmdline proxy option.

I could have proxy values in main settings dlg or put them in server connect dlg. Seems like socks works but is limited by not supporting unicode string for url in the socks module. I'm not sure how much unicode DNS lookup is needed but I guess ideally this should only affect proxy and not normal connections.

I'm a bit confused as to whether I'm working from master or 1.0 branch. I guess this only matters when it gets pulled back later?



I would try to work from master, 1.0 is pretty far behind.

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
ThomasV
Moderator
Legendary
*
Offline Offline

Activity: 1896
Merit: 1353



View Profile WWW
September 19, 2012, 08:48:42 AM
 #128

Sure thing, but please note that master is overall considered unstable.

I would prefer if the master branch was considered stable. Things should be merged only after they have been tested.

Quote
bug reports like these are not needed [...]

well... are you sure that's the right approach?

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

Activity: 1896
Merit: 1353



View Profile WWW
September 19, 2012, 08:53:39 AM
 #129

Sure thing, but please note that master is overall considered unstable. So most of the time bug reports like these are not needed until the release is merged into a stable branch and ready for testing.

Maybe you should adopt the same terminology and branch naming as most software around here:
  • the "master" branch always compile, but is not well tested enough to be deemed stable for everyday use
  • release branches are created from time to time from the master branch when developers think master is stable enough; they are thoroughly tested; when a point fix for a release (maybe leading to a minor release) is committed into the release branch, this branch is then merged immediately into the master branch to acquire the fix there as well, or to make git record that the fix is not needed in the master branch so that it doesn't propose to merge it again later
  • feature branches are used to develop features that might temporarily break working code or that are unfinished, and those are merged into the master branch when they are ready to be tested

Sticking to this well-known scheme also helps you test the new features once they are incorporated into the master branch, as, for example, some ArchLinux users will install "electrum-git" instead of "electrum". By doing so, they acknowledge that they want to use the current development version with a certain possibility of breakage, and will allow you to fix bugs before they go into a release.

You should have a look at git flow, which is both a model and a tool. It helps developing software in a collaborative way and sticks to the above-described invariants (master contains all the fixes from release branches and always compiles, releases aren't touched except for fixing bugs leading to minor releases, feature branches allow early testing of potentially breaking or bad changes).

I agree. things that are being developed/unfinished/likely to break things/ should not be in master.

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

Activity: 938
Merit: 1000



View Profile WWW
September 19, 2012, 08:55:49 AM
 #130


I would prefer if the master branch was considered stable. Things should be merged only after they have been tested.

I can understand that, that's why we should really about git-flow.

Quote
bug reports like these are not needed [...]

well... are you sure that's the right approach?

Once we move over to Gitflow this problem is solved since every feature will be in it's own branch, once it's merged into master it should be stable and bug reports make sense. The problem is I merged this feature in master too soon, without proper testing it myself.

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
September 20, 2012, 06:24:43 AM
Last edit: September 20, 2012, 06:39:33 AM by BkkCoins
 #131

I just tried testing out Electrum's ability to restore a lost wallet and it didn't work  Cry

I created a wallet (cmd line) and wrote down the seed words. Then I deleted the wallet file and tried a restore. It asked for the seed and I gave it the words. It said it was not hex and would decode the input and created a wallet file.

But any attempt to list addresses or do anything on the wallet just do nothing. It returns to prompt with no output.

Am I missing something here or is this a fail? I used a Gap of 10 originally and likewise when restoring. I used a password originally but not when restoring. Is that it? Hmmm.

(now tried with same pwd on restore too - still no go)

Ok. On further investigation - if I start Electrum in GUI mode it has 10 addresses and they are correct but on the cmdline it does nothing - same wallet. Then I noticed that actually the first original address was not there. It's lost but the remaining ones are there. Going back and counting I see when I first created the wallet it dumped out 11 addresses not 10. And now there is 10 but the first is missing but the 10 present are ok.

Something weird going on here.

---
Now going back to the cmdline the addresses show up and the 11th one is the change address. I guess that's why it didn't show. So it looks ok but why didn't it work until using the GUI mode? I would want to be able to use the client offline on a cmdline only system to do recovery. Still a little fishy there.

Opening with the GUI changed the file size from 685 bytes to 1555 bytes.

ThomasV
Moderator
Legendary
*
Offline Offline

Activity: 1896
Merit: 1353



View Profile WWW
September 20, 2012, 06:41:53 AM
 #132

Now going back to the cmdline the addresses show up and the 11th one is the change address. I guess that's why it didn't show. So it looks ok but why didn't it work until using the GUI mode? I would want to be able to use the client offline on a cmdline only system to do recovery. Still a little fishy there.

Opening with the GUI changed the file size from 685 bytes to 1555 bytes.

this looks like a bug.
what is your OS?
I use Linux, and it it works fine for me, both in text and gui mode.

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

Activity: 1078
Merit: 1016

760930


View Profile
September 20, 2012, 06:48:36 AM
Last edit: September 20, 2012, 07:38:07 AM by flatfly
 #133

Now going back to the cmdline the addresses show up and the 11th one is the change address. I guess that's why it didn't show. So it looks ok but why didn't it work until using the GUI mode? I would want to be able to use the client offline on a cmdline only system to do recovery. Still a little fishy there.

Opening with the GUI changed the file size from 685 bytes to 1555 bytes.

this looks like a bug.
what is your OS?
I use Linux, and it it works fine for me, both in text and gui mode.


I'm suspecting it could be related  to the known issues with server selection at startup. Until they are fixed, for consistent results, I would suggest to always use the -o switch when doing a recovery at the command line. So, try: electrum -o restore

Does this work better?
BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
September 20, 2012, 07:30:42 AM
Last edit: September 20, 2012, 08:01:10 AM by BkkCoins
 #134

Tried again. Same result. I'm on Linux 11.04 (natty)
Code:
$ rm savings.dat 
~/.electrum$ electrum -o restore -w savings.dat
Password (hit return if you do not wish to encrypt your wallet):
server (default:ecdsa.org):
port (default:50001):
protocol [t=tcp;h=http;n=native] (default:t):
fee (default:0.001):
gap limit (default 5):10
seed:cease chair natural crave week flip lightning stolen people respond enjoy somewhere
Warning: Not hex, trying decode.
Wallet saved in 'savings.dat
~/.electrum$ electrum addresses -w savings.dat
~/.electrum$
Next I tried running electrum -w savings.dat to get GUI but it won't connect. Then I tried electrum with no -w wallet arg and it started my normal wallet and connected fine.

Code:
~/.electrum$ electrum -w savings.dat
Install zbar package to enable QR scans
Not connected
Poking
Not connected
Poking
Not connected
Poking

This is the version from "deb http://apt.bitcoins.sk/ precise main" installed with apt-get. It has worked fine with my desktop wallet and still does. I just tried again with current master branch (which I have in another dev directory) and it behaves the same with both this and my normal wallet, ie. works with normal but doesn't with this restored one.

If you want to try this you can see above my seed words to test.
Is there a debug option that might spit out some verbose logging?

---
ok. Digging into the code I see that the wallet file reads but has an empty array for wallet.addresses. I see the wallet file itself has no addresses but does have the seed value (and it looks ok) and a master_public_key. The addresses array is empty and presumably should be generated upon opening but isn't. Still looking...

flatfly
Legendary
*
Offline Offline

Activity: 1078
Merit: 1016

760930


View Profile
September 20, 2012, 08:14:15 AM
 #135

Tried again. Same result. I'm on Linux 11.04 (natty)

$ rm savings.dat
~/.electrum$ electrum -o restore -w savings.dat
Password (hit return if you do not wish to encrypt your wallet):
server (default:ecdsa.org):
port (default:50001):
protocol [t=tcp;h=http;n=native] (default:t):
fee (default:0.001):
gap limit (default 5):10
seed:cease chair natural crave week flip lightning stolen people respond enjoy somewhere
Warning: Not hex, trying decode.
Wallet saved in 'savings.dat
~/.electrum$ electrum addresses -w savings.dat
~/.electrum$

Next I tried running electrum -w savings.dat to get GUI but it won't connect. Then I tried electrum with no -w wallet arg and it started my normal wallet and connected fine.

Code:
~/.electrum$ electrum -w savings.dat
Install zbar package to enable QR scans
Not connected
Poking
Not connected
Poking
Not connected
Poking

This is the version from "deb http://apt.bitcoins.sk/ precise main" installed with apt-get. It has worked fine with my desktop wallet and still does. I just tried again with current master branch (which I have in another dev directory) and it behaves the same with both this and my normal wallet, ie. works with normal but doesn't with this restored one.

If you want to try this you can see above my seed words to test.
Is there a debug option that might spit out some verbose logging?

---
ok. Digging into the code I see that the wallet file reads but has an empty array for wallet.addresses. I see the wallet file itself has no addresses but does have the seed value (and it looks ok) and a master_public_key. The addresses array is empty and presumably should be generated upon opening but isn't. Still looking...

I think the root cause is this: the default server (highlighted above in red) that your version of electrum has used to configure the wallet file is no longer online as far as I can tell.
Can you try the recovery again and manually enter a server name from the below list when prompted?

uncle-enzo.info
electrum.bitfoo.org
electrum.novit.ro
electrum.bitcoins.sk

Hopefully this part of the code will be made more robust soon.
flatfly
Legendary
*
Offline Offline

Activity: 1078
Merit: 1016

760930


View Profile
September 20, 2012, 08:22:26 AM
 #136

By the way the default server list is configured at line 27 of the interface.py file, in case you want to take out the obsolete server name directly.
BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
September 20, 2012, 08:32:12 AM
 #137

Actually I tracked down the bug. Seems not much testing was done with restoring a wallet offline as it's not possible for it to work.

When you choose to restore and also offline it will not call the wallet.synchronize() function.
I added an else: clause that calls synchronize when offline (instead of WalletSynchronizer when online). This fixed the issue and now the addresses get added to the wallet.

How do you want me to handle this for bug fix? I have a fork I'm using for SOCKS support but it's already dirty with that code. I could just create a patch and post here. Or is there a simple way to do it on github without having to merge from my SOCKS code?

edit: the fix is in my electrum fork at bkkcoins/electrum - I just need a way to send back just those two lines changed.

electrum: line 254 insert
 
Code:
           else:
                wallet.synchronize()

JompinDox
Member
**
Offline Offline

Activity: 107
Merit: 10


View Profile
September 20, 2012, 08:59:20 AM
Last edit: September 20, 2012, 09:40:33 AM by JompinDox
 #138

Great, thanks for contributing! I'm not totally familiar with the new Github so I'll let others chime in.

Tips? 1ELECeJompinDox61L73eAUyaWpe3Q5HZB
Down with socks!
BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
September 20, 2012, 10:32:31 AM
Last edit: September 20, 2012, 12:14:54 PM by BkkCoins
 #139

Great, thanks for contributing! I'm not totally familiar with the new Github so I'll let others chime in.
I figured out how to clean my fork and branch separately. So now I have a fix-offline-restore branch and socks-support branch.
On the first one I have created a pull request to bring those two lines back into spesmilo.
Starting to understand github and now realize when I forked I should have kept a clean master and a branch for each set of changes I want against master. All sorted now.

Github:  bkkcoins/electrum branch fix-offline-restore (not the default master branch)

BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
September 20, 2012, 12:09:11 PM
 #140

I have a working version of Electrum with SOCKS and HTTP proxy support now in my fork. If anyone wants to try it / test it and give feedback I'd welcome that before going for a pull request to merge it in.

I've tested it with SOCKS4 and SOCK5 a fair bit using an ssh tunnel to my server at amazon. This was quite reliable and seemed to have no issues. I tried an HTTP proxy off a free-list and it worked as well but I found it was more inconsistent and once it had an error it usually could not recover except by restarting. This seems to be due to how the polling code is done and it doesn't handle an error condition and recuperate. I tested mostly with TCP mode but a few times with HTTP mode too.

This proxy support uses the Socksipy wrapper available from google code (apparently a fixed version of the old 2006 code). The license on that code is a bit vague. It's not explicitly based off a known entity but seems to say, well, use it but leave the notice intact is all. One drawback of this code is that it doesn't support unicode host urls. I'm not sure if that's very important for proxies as in most cases people probably use localhost anyway.

Does Tor use a SOCKS proxy? Could someone test if this allows Electrum to run over tor then? I don't know anything about that but it would be good if it worked.

To find this for testing goto my fork at bkkcoins/electrum and get the socks-support branch (NOT the master branch which is default).

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 »
  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!