Bitcoin Forum
December 11, 2016, 01:53:04 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 [6] 7 8 9 10 »  All
  Print  
Author Topic: [PULL] private key and wallet export/import  (Read 35920 times)
krepta3000
Member
**
Offline Offline

Activity: 92


View Profile
July 28, 2011, 10:41:04 PM
 #101

I got an error when I tried to use walletco.py, with your pywallet.py branch, JackJack. Sad
Code:
C:\Program Files\Bitcoin\pywallet>walletco.py --wpath=m:\bitcoin\old\ --nwpath=m
:\bitcoin\new\
Dumping...
Traceback (most recent call last):
  File "C:\Program Files\Bitcoin\pywallet\walletco.py", line 114, in <module>
    main()
  File "C:\Program Files\Bitcoin\pywallet\walletco.py", line 89, in main
    json_db = json.loads(a.read())
  File "C:\Python27\lib\json\__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 360, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Python27\lib\json\decoder.py", line 378, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
1481464384
Hero Member
*
Offline Offline

Posts: 1481464384

View Profile Personal Message (Offline)

Ignore
1481464384
Reply with quote  #2

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

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
July 28, 2011, 10:43:44 PM
 #102

You forgot the --pwpath argument Wink
Should be .\ on Windows I guess

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
krepta3000
Member
**
Offline Offline

Activity: 92


View Profile
July 28, 2011, 10:52:39 PM
 #103

I also tried it with that option.

Code:
--pwpath=.\


Same error.  I also tried it with the long form of the path.

Code:
--pwpath=c:\progra~1\bitcoin\pywallet\


Same error.
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
July 28, 2011, 11:01:30 PM
 #104

Ok I think I see the problem
Run '.\pywallet.py --dumpwallet --datadir m:\bitcoin\old\'
Does it looks like that: (don't post it)
Code:
        {
            "addr": "1lqksjiqsidj",
            "hexsec": "kkjqsdsd",
            "reserve": 1,
            "sec": "5vkkqsjdnqs"
        }
    ],
    "tx": "unsupported",
    "version": 32500
}

If not, run 'python pywallet.py --dumpwallet --datadir m:\bitcoin\old\'

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
krepta3000
Member
**
Offline Offline

Activity: 92


View Profile
July 28, 2011, 11:05:06 PM
 #105

Yes, it looks like that. Smiley
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
July 28, 2011, 11:06:20 PM
 #106

Which one?
The first?

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
krepta3000
Member
**
Offline Offline

Activity: 92


View Profile
July 28, 2011, 11:07:57 PM
 #107

Well, anyway, thanks to pywallet.py, whatever branch, I've got a wallet that isn't broken with 0/unconfirmed transactions that refuse to be processed by the bitcoin network, Yay! Smiley  And now I will run bitcoin more often, and backup my wallet more often too.
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
July 28, 2011, 11:40:02 PM
 #108

Thanks for the report, I'll investigate

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
krepta3000
Member
**
Offline Offline

Activity: 92


View Profile
July 28, 2011, 11:42:09 PM
 #109

Which one?
The first?

Yes, it looks like the first one. Smiley
BitcoinLocator
Jr. Member
*
Offline Offline

Activity: 31


www.BitcoinLocator.com


View Profile WWW
August 09, 2011, 11:53:55 PM
 #110

What is the status/eta of this pull request?  Unless integration is eminent we'd be willing to offer a bounty to help accelerate it's release. We really need this feature, our current workaround involving multiple bitcoind instances, and relaunch rescan per user session is catastrophically cumbersome.

Thanks!

Are you a BitcoinLocation? www.bitcoinlocator.com
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
August 10, 2011, 12:06:01 AM
 #111

What is the status/eta of this pull request?  Unless integration is eminent we'd be willing to offer a bounty to help accelerate it's release. We really need this feature, our current workaround involving multiple bitcoind instances, and relaunch rescan per user session is catastrophically cumbersome.

It will get pulled/released faster if you help test it.  Pull the patch, compile a custom bitcoind, then run it and report any bugs.  If you don't find any bugs, add a short note either here or in the PULL request.

Testing is currently the bottleneck for getting new features...

How often do you get the chance to work on a potentially world-changing project?
BitcoinLocator
Jr. Member
*
Offline Offline

Activity: 31


www.BitcoinLocator.com


View Profile WWW
August 10, 2011, 01:07:33 AM
 #112

It will get pulled/released faster if you help test it.

Not sure how competent we are at that, but we'll give it a shot.

If anyone else reading this thread wants to help with testing, we will gladly throw you some bitcoins to make it worth you while.


Are you a BitcoinLocation? www.bitcoinlocator.com
riush
Member
**
Offline Offline

Activity: 73


View Profile
August 10, 2011, 01:11:25 AM
 #113

I get an error with removeprivkey on encrypted wallets. Works fine on non-encrypted.

Quote
foo@bar:~/work/bitcoin/src$ ./bitcoind getnewaddress
mgVu7WXEdbCHnKiQW8q1g7ND5e6jR97NGX
foo@bar:~/work/bitcoin/src$ ./bitcoind dumpprivkey mgVu7WXEdbCHnKiQW8q1g7ND5e6jR97NGX
93AywmB22cb5H59m6vttmPUFCPf98sB7NEwj48q9RvbaMGQHzbd
foo@bar:~/work/bitcoin/src$ ./bitcoind removeprivkey 93AywmB22cb5H59m6vttmPUFCPf98sB7NEwj48q9RvbaMGQHzbd
foo@bar:~/work/bitcoin/src$ ./bitcoind importprivkey 93AywmB22cb5H59m6vttmPUFCPf98sB7NEwj48q9RvbaMGQHzbd
foo@bar:~/work/bitcoin/src$ ./bitcoind encryptwallet password
foo@bar:~/work/bitcoin/src$ ./bitcoind walletpassphrase password 1000
foo@bar:~/work/bitcoin/src$ ./bitcoind getnewaddress
msKK1iq6LYLxz8iUvovWMqh37T3U9fha4M
foo@bar:~/work/bitcoin/src$ ./bitcoind dumpprivkey msKK1iq6LYLxz8iUvovWMqh37T3U9fha4M
92isYRmvbjH7TcYnqKU3YZUmQvUatRCmYSPYsAoEku6Xv8s7qhy
foo@bar:~/work/bitcoin/src$ ./bitcoind removeprivkey 92isYRmvbjH7TcYnqKU3YZUmQvUatRCmYSPYsAoEku6Xv8s7qhy
error: {"code":-1,"message":"GetAllReserveKeyHashes() : unknown key in key pool"}

1MKKiJhUJgqKyfCLeo7bB1bvELNEM8wUbz
riush
Member
**
Offline Offline

Activity: 73


View Profile
August 10, 2011, 01:16:53 AM
 #114

What is the status/eta of this pull request?  Unless integration is eminent we'd be willing to offer a bounty to help accelerate it's release. We really need this feature, our current workaround involving multiple bitcoind instances, and relaunch rescan per user session is catastrophically cumbersome.

Maybe one bitcoind handling multiple (separately encrypted) wallets would even better suit your needs? I'd chip in on that too.
Any word on how realistic that would be?

1MKKiJhUJgqKyfCLeo7bB1bvELNEM8wUbz
nelisky
Legendary
*
Offline Offline

Activity: 1554


View Profile
August 10, 2011, 01:27:31 AM
 #115

What is the status/eta of this pull request?  Unless integration is eminent we'd be willing to offer a bounty to help accelerate it's release. We really need this feature, our current workaround involving multiple bitcoind instances, and relaunch rescan per user session is catastrophically cumbersome.

It will get pulled/released faster if you help test it.  Pull the patch, compile a custom bitcoind, then run it and report any bugs.  If you don't find any bugs, add a short note either here or in the PULL request.

Testing is currently the bottleneck for getting new features...


I have been running bitcoind, in the recent past master/HEAD with patches mentioned by sipa on bitcoin's github  and more recently sipa's own showwallet branch. Other than the one bug it had with the construction of the privkey for printing on dump (a typo, already fixed) and the fact that the import of each key takes multiple minutes (it scans all blocks for transactions, so that's expected, I would like to see a batch import in the future so a single sweep could verify multiple addresses) I can tell you it is working very well.

I'm using it quite heavily these days to organize offline wallets with a set amount kept on each address and then keeping the addresses and priv keys on paper in a safe.

My workflow only touches dumpprivkey and importprivkey. There is a glitch with the address balance listing after importing but it's a known bug and doesn't affect the global wallet balance consistency.

I would LOVE to see this pulled into bitcoin proper, and if you need any specific unittest written (there's a framework now, right?) I can try to find an hour to give it a shot soon.
samr7
Full Member
***
Offline Offline

Activity: 140

Firstbits: 1samr7


View Profile
August 10, 2011, 04:13:42 PM
 #116

I'd like to report a minor problem.

If I send coins to a specific address, and then import the private key for that address, the UI updates and reports the transaction as "Payment to yourself."  However, the total coin balance doesn't seem to update until after bitcoin is restarted.
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1344


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
August 10, 2011, 04:44:52 PM
 #117

I have tested it, and it works for me (aside from, I have encountered the aforementioned wallet dump glitch which is said to be a typo and now fixed).

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper wallets instead.
Eli
Full Member
***
Offline Offline

Activity: 128



View Profile
August 25, 2011, 06:42:24 AM
 #118

This is a bit ridiculous...

The idea is obviously useful enough that dozens of people are shown their support, and only a single few expressed their discontempt with reasons like "it's not safe for stupid users".

Right, I agree that it's not safe for stupid users, and I agree that sometimes you have to protect them. But creating this artificial entry barrier just to deter developers who are not familiar with compiling and patching C code is just plain evil, and bordering stupidity.

It's obviously a needed and wanted feature, you don't want people having this feature turned on by mistake, right? how about:

Code:
$ bitcoind -server -rpcuser=... -rpcpassword=... [b]-advanced[/b]

With this small flag, -advanced, users will be able to actively activate the feature, and only those who think that they know what they're doing will be able to harm themselves.

Now please, for the love of peace, pull this patch to the main client, and make it official. I'll write the documentation if needed.
joulesbeef
Sr. Member
****
Offline Offline

Activity: 476


moOo


View Profile
August 25, 2011, 06:55:21 AM
 #119

the paper wallets and casascius's real bitcoin or bitbillswhich would be great for promotion of bitcoin, could use something like this.

mooo for rent
thirdlight
Sr. Member
****
Offline Offline

Activity: 281



View Profile
August 25, 2011, 07:43:44 AM
 #120

No[w] please, for the love of peace, pull this patch to the main client, and make it official.

+1
Pages: « 1 2 3 4 5 [6] 7 8 9 10 »  All
  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!