bitlotto
|
|
July 13, 2011, 02:51:11 AM |
|
pulled into upstream
GREAT! I can't wait!!
|
*Next Draw Feb 1* BitLotto: monthly raffle (0.25 BTC per ticket) Completely transparent and impossible to manipulate who wins. TOR TOR2WEB Donations to: 1JQdiQsjhV2uJ4Y8HFtdqteJsZhv835a8J are appreciated.
|
|
|
Shevek
|
|
July 13, 2011, 07:50:09 AM Last edit: July 13, 2011, 08:47:35 AM by Shevek |
|
Until its added: check what Joric made: https://github.com/joric/pywalletIt makes exporting/importing keys easy without recompiling Bitcoin. It does it right to the wallet using a python script! Still new but pretty cool and easy! Nice tool! But it only works on freshly created wallet.dat files. If you try to dump, or to add a priv. key on to long-term used wallet, the program yields an error message.
|
Proposals for improving bitcoin are like asses: everybody has one 1SheveKuPHpzpLqSvPSavik9wnC51voBa
|
|
|
Pieter Wuille (OP)
|
|
July 13, 2011, 09:40:38 AM |
|
pulled into upstream
Eh no, not yet...
|
I do Bitcoin stuff.
|
|
|
jgarzik
Legendary
Offline
Activity: 1596
Merit: 1100
|
|
July 13, 2011, 06:43:59 PM |
|
pulled into upstream
Eh no, not yet... Sorry, cross-thread stupidity on my part. Wallet encryption was pulled, not import/export -- though we do want to merge import/export soon!
|
Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own. Visit bloq.com / metronome.io Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
|
|
|
SgtSpike
Legendary
Offline
Activity: 1400
Merit: 1005
|
|
July 13, 2011, 07:58:42 PM |
|
pulled into upstream
Eh no, not yet... Sorry, cross-thread stupidity on my part. Wallet encryption was pulled, not import/export -- though we do want to merge import/export soon! You made my day, then killed it.
|
|
|
|
Pieter Wuille (OP)
|
|
July 17, 2011, 09:11:04 PM |
|
I just pushed a new version to github that contains a 'removeprivkey' that requires the *private* key to be removed to be passed.
It is untested for now, so use at your own risk. It should remove the key and irrelevant transactions from the wallet, the address from the address book, and from the key pool. It will not be removed from accounts (yet).
|
I do Bitcoin stuff.
|
|
|
molecular
Donator
Legendary
Offline
Activity: 2772
Merit: 1019
|
|
July 18, 2011, 07:03:43 AM |
|
I just pushed a new version to github that contains a 'removeprivkey' that requires the *private* key to be removed to be passed.
It is untested for now, so use at your own risk. It should remove the key and irrelevant transactions from the wallet, the address from the address book, and from the key pool. It will not be removed from accounts (yet).
awesome! I was going to test, but I'm having trouble compiling: util.cpp: In function ‘std::string FormatFullVersion()’: util.cpp:903: error: invalid conversion from ‘const wxChar*’ to ‘char’
|
PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0 3F39 FC49 2362 F9B7 0769
|
|
|
riush
Member
Offline
Activity: 73
Merit: 10
|
|
July 18, 2011, 10:13:15 PM |
|
Nice! much better than what I tried to do I'm just having a 'little' problem with importing keys; the import fails, and even if I didn't remove the key, it is not listed anymore; but it seems to be there somehow... foo@bar:~/work/bitcoin/src$ ./bitcoind getaddressesbyaccount foobar [ "mogyeNDBngfYGdbmc49QnTmDpbwgkbn2oK" ] foo@bar:~/work/bitcoin/src$ ./bitcoind dumpprivkey mogyeNDBngfYGdbmc49QnTmDpbwgkbn2oK 92k6iexNDbUVjKdkE5YtcukbtDK6VWg9NAXxwakvviWc4RhoWNh ( foo@bar:~/work/bitcoin/src$ ./bitcoind removeprivkey 92k6iexNDbUVjKdkE5YtcukbtDK6VWg9NAXxwakvviWc4RhoWNh ) foo@bar:~/work/bitcoin/src$ ./bitcoind importprivkey 92k6iexNDbUVjKdkE5YtcukbtDK6VWg9NAXxwakvviWc4RhoWNh error: {"code":-4,"message":"Error adding key to wallet"} foo@bar:~/work/bitcoin/src$ ./bitcoind getaddressesbyaccount foobar [ ] foo@bar:~/work/bitcoin/src$ ./bitcoind getaccountaddress foobar mogyeNDBngfYGdbmc49QnTmDpbwgkbn2oK
Behaves the same no matter if I removed the key or not; AFAIS it shouldn't be in getaccountaddress if I did, and should be in getaddressesbyaccount if i didn't. Am I understanding or doing something wrong here?
|
1MKKiJhUJgqKyfCLeo7bB1bvELNEM8wUbz
|
|
|
SgtSpike
Legendary
Offline
Activity: 1400
Merit: 1005
|
|
July 18, 2011, 10:35:46 PM |
|
Private keys always start with 5 though, right?
|
|
|
|
riush
Member
Offline
Activity: 73
Merit: 10
|
|
July 18, 2011, 10:41:18 PM |
|
Private keys always start with 5 though, right?
Yes, in the 'real' net. I was trying on testnet.
|
1MKKiJhUJgqKyfCLeo7bB1bvELNEM8wUbz
|
|
|
sirky
|
|
July 19, 2011, 01:09:09 AM |
|
I want to say that I will be really excited when this makes its way into the client!
|
|
|
|
Pieter Wuille (OP)
|
|
July 19, 2011, 02:42:15 PM |
|
Nice! much better than what I tried to do I'm just having a 'little' problem with importing keys; the import fails, and even if I didn't remove the key, it is not listed anymore; but it seems to be there somehow... It seems there was a bug: keys were not removed from disk, so re-adding them failed. This should be fixed now - could you test again? Behaves the same no matter if I removed the key or not; AFAIS it shouldn't be in getaccountaddress if I did, and should be in getaddressesbyaccount if i didn't.
Am I understanding or doing something wrong here?
Well, removing addresses from accounts is just not supported yet. It may cause inccorrect account balances, but not invalid total balances
|
I do Bitcoin stuff.
|
|
|
riush
Member
Offline
Activity: 73
Merit: 10
|
|
July 19, 2011, 10:40:47 PM |
|
It seems there was a bug: keys were not removed from disk, so re-adding them failed. This should be fixed now - could you test again?
Ah, now it seems to work. Great! Well, removing addresses from accounts is just not supported yet. It may cause inccorrect account balances, but not invalid total balances
Even getbalance for the account shows 0 after the keys are removed, even though getaccountaddress still knows it. Are you planning on adding that? (Not that I find it important, just curious what to expect ) Another question: is there a way to check the 'balance' of a single address/key?
|
1MKKiJhUJgqKyfCLeo7bB1bvELNEM8wUbz
|
|
|
SgtSpike
Legendary
Offline
Activity: 1400
Merit: 1005
|
|
July 19, 2011, 11:07:47 PM |
|
It seems there was a bug: keys were not removed from disk, so re-adding them failed. This should be fixed now - could you test again?
Ah, now it seems to work. Great! Well, removing addresses from accounts is just not supported yet. It may cause inccorrect account balances, but not invalid total balances
Even getbalance for the account shows 0 after the keys are removed, even though getaccountaddress still knows it. Are you planning on adding that? (Not that I find it important, just curious what to expect ) Another question: is there a way to check the 'balance' of a single address/key? Blockexplorer is probably the best way to check an address balance.
|
|
|
|
dserrano5
Legendary
Offline
Activity: 1974
Merit: 1029
|
|
July 26, 2011, 12:09:19 PM |
|
git clone git://github.com/bitcoin/bitcoin cd bitcoin git remote add sipa git://github.com/sipa/bitcoin git fetch --all git diff master..sipa/showwallet
(Warning: I'm a subversion user and haven't worked with git at all) I've followed these steps successfully with 0.3.23 (or maybe it was 22). In the last step I actually did 'git diff master..sipa/showwallet |patch -p1', then 'cd src' and 'make bitcoind' as usual. Funny having to patch things, but I guess that's how git does things. Now, what should I do to update to 0.3.24 without starting from scratch? A quick google revealed 'git pull' but that failed with "Your local changes to 'contrib/gitian.yml' would be overwritten by merge. Aborting". Must I revert those changes (the applied patch, I suppose) before doing 'git pull'? For now I just removed everything and started over, but I'd like to be cleaner next time. Already running "0.3.25-beta" .
|
|
|
|
jackjack
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
July 26, 2011, 12:42:30 PM |
|
git clone git://github.com/bitcoin/bitcoin cd bitcoin git remote add sipa git://github.com/sipa/bitcoin git fetch --all git diff master..sipa/showwallet
(Warning: I'm a subversion user and haven't worked with git at all) I've followed these steps successfully with 0.3.23 (or maybe it was 22). In the last step I actually did 'git diff master..sipa/showwallet |patch -p1', then 'cd src' and 'make bitcoind' as usual. Funny having to patch things, but I guess that's how git does things. Now, what should I do to update to 0.3.24 without starting from scratch? A quick google revealed 'git pull' but that failed with "Your local changes to 'contrib/gitian.yml' would be overwritten by merge. Aborting". Must I revert those changes (the applied patch, I suppose) before doing 'git pull'? For now I just removed everything and started over, but I'd like to be cleaner next time. Already running "0.3.25-beta" . From http://help.github.com/fork-a-repo/git remote add upstream git://github.com/bitcoin/bitcoin git fetch upstream git merge upstream/master
|
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
Activity: 92
Merit: 10
|
|
July 28, 2011, 08:55:37 PM Last edit: July 28, 2011, 10:03:55 PM by krepta3000 |
|
Until its added: check what Joric made: https://github.com/joric/pywalletIt makes exporting/importing keys easy without recompiling Bitcoin. It does it right to the wallet using a python script! Still new but pretty cool and easy! Thank you so much bitlotto, or whoever you really are! I'm going to try out pyWallet, yay! I've been using python for various things for a while, I'm very happy with pyTiVo for instance. Ok, I have downloaded pywallet.py, I've run it and told it to dump my wallet in JSON format, and it dumped keys to my screen. So, I told it to dump the output text to a file I called wallet.json.... now what? How do I import into a new, clean and undamaged, wallet? Usage: pywallet.py [options]
Options: --version show program's version number and exit -h, --help show this help message and exit --dumpwallet dump wallet in json format --importprivkey=KEY import private key from vanitygen --datadir=DATADIR wallet directory (defaults to bitcoin default) --testnet use testnet subdirectory and address type
Thank goodness for advanced text editors like Notepad++ and Textpad that have macro recording functionality. I created macros to edit the json text file to create a batch file that would run all of the key importing quick and easy.
|
|
|
|
jackjack
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
July 28, 2011, 09:49:07 PM Last edit: July 28, 2011, 10:08:06 PM by jackjack |
|
Until its added: check what Joric made: https://github.com/joric/pywalletIt makes exporting/importing keys easy without recompiling Bitcoin. It does it right to the wallet using a python script! Still new but pretty cool and easy! Thank you so much bitlotto, or whoever you really are! I'm going to try out pyWallet, yay! I've been using python for various things for a while, I'm very happy with pyTiVo for instance. Ok, I have downloaded pywallet.py, I've run it and told it to dump my wallet in JSON format, and it dumped keys to my screen. So, I told it to dump the output text to a file I called wallet.json.... now what? How do I import into a new, clean and undamaged, wallet? Usage: pywallet.py [options]
Options: --version show program's version number and exit -h, --help show this help message and exit --dumpwallet dump wallet in json format --importprivkey=KEY import private key from vanitygen --datadir=DATADIR wallet directory (defaults to bitcoin default) --testnet use testnet subdirectory and address type
I know that these are the command line options, I just don't know what to do from here. Do I grab each key individually from the text file I created and tell this to import it into my new wallet file? That could take a long time. To copy an entire wallet, I think this might help you: http://forum.bitcoin.org/index.php?topic=31418.0It is based on my pywallet fork (for label and reserve key support) and a script I made to use it
|
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
Activity: 92
Merit: 10
|
|
July 28, 2011, 10:06:02 PM |
|
Thanks jackjack. I didn't see this message till after I'd recorded the necessary macros to convert the json text into a batch importing file. It's now working on importing all my keys, nice and easy. I'll go download that script and work with it, some other time. I'll just wait till the importing is all done and see what happens.
|
|
|
|
krepta3000
Member
Offline
Activity: 92
Merit: 10
|
|
July 28, 2011, 10:41:04 PM |
|
I got an error when I tried to use walletco.py, with your pywallet.py branch, JackJack. 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
|
|
|
|
|