dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
|
June 25, 2011, 09:06:51 AM |
|
When I try to dump my wallet, I get an error: $ bitcoind -rpcuser='xxx' -rpcpassword='yyy' dumpwallet error: {"code":-1,"message":"CKEy::GetPrivKeyInner(): BN_bn2bin failed"}
I can dump a newly created wallet just fine, but my real one won't dump. Any idea why? Is it anything to worry about? Should I try spending all my coins to a new address?
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
Pieter Wuille (OP)
|
|
June 25, 2011, 09:43:27 AM |
|
When I try to dump my wallet, I get an error: $ bitcoind -rpcuser='xxx' -rpcpassword='yyy' dumpwallet error: {"code":-1,"message":"CKEy::GetPrivKeyInner(): BN_bn2bin failed"}
Sorry, yes, this is a known bug. It happens for 1 private key in 256. I'll fix it soon.
|
I do Bitcoin stuff.
|
|
|
AntiVigilante
Member
Offline
Activity: 98
Merit: 10
|
|
June 25, 2011, 11:57:17 AM |
|
When I try to dump my wallet, I get an error: $ bitcoind -rpcuser='xxx' -rpcpassword='yyy' dumpwallet error: {"code":-1,"message":"CKEy::GetPrivKeyInner(): BN_bn2bin failed"}
Sorry, yes, this is a known bug. It happens for 1 private key in 256. I'll fix it soon. How soon in the system in the main client? And how soon the default format?
|
|
|
|
Pieter Wuille (OP)
|
|
June 25, 2011, 05:07:55 PM |
|
Rebased against master, a few bugs fixed, and split off into separate source file.
TODO: known wrong balance cached when importing keys
|
I do Bitcoin stuff.
|
|
|
puddinpop
Member
Offline
Activity: 103
Merit: 17
|
|
June 26, 2011, 08:42:13 PM |
|
There's a crash caused by accessing an array element past the last one in base58.h, in the SecretToASecret function. vch.insert(vch.end(), &vchSecret[0], &vchSecret[vchSecret.size()]); vchSecret.size() is one past the last element, so it crashes here. Since vchSecret is just a vector anyway, we can use this safer alternative: vch.insert(vch.end(), vchSecret.begin(), vchSecret.end());
|
|
|
|
nelisky
Legendary
Offline
Activity: 1540
Merit: 1002
|
|
June 28, 2011, 03:04:27 AM |
|
I've cherry picked the two commits sipa mentions on the pull request onto bitcoin HEAD, compiling on a linux x64 machine (xubuntu 11.04) and while it compiles almost cleanly: g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -DNOPCH -DFOURWAYSSE2 -DUSE_SSL -o obj/nogui/rpcdump.o rpcdump.cpp rpcdump.cpp: In function ‘void GetWalletDump(std::map<uint160, CKeyDump>&)’: rpcdump.cpp:116:82: warning: converting ‘false’ to pointer type for argument 2 of ‘bool ExtractPubKey(const CScript&, const CKeyStore*, std::vector<unsigned char>&)’
But then calling dumpprivkey on *any* address will output I didn't debug the code, too tired to do that now, but maybe it's something obvious
|
|
|
|
nelisky
Legendary
Offline
Activity: 1540
Merit: 1002
|
|
June 28, 2011, 02:30:06 PM |
|
There's a crash caused by accessing an array element past the last one in base58.h, in the SecretToASecret function. vch.insert(vch.end(), &vchSecret[0], &vchSecret[vchSecret.size()]); vchSecret.size() is one past the last element, so it crashes here. Since vchSecret is just a vector anyway, we can use this safer alternative: vch.insert(vch.end(), vchSecret.begin(), vchSecret.end()); So the issue I posted above is a simple typo on sipa's commit. Instead of puddinpop's proposed change: vch.insert(vch.end(), vchSecret.begin(), vchSecret.end()); You changed the code to vch.insert(vch.end(), vch.begin(), vch.end()); The secret "vchSecret" was never being used.
|
|
|
|
Pieter Wuille (OP)
|
|
June 28, 2011, 08:26:54 PM |
|
You changed the code to vch.insert(vch.end(), vch.begin(), vch.end()); The secret "vchSecret" was never being used. Sorry, I must have been tired. Thanks for spotting the typo!
|
I do Bitcoin stuff.
|
|
|
krepta3000
Member
Offline
Activity: 92
Merit: 10
|
|
June 29, 2011, 07:38:38 PM |
|
I don't understand how to use these RPC commands to dump my screwed up wallet, and import the undamaged portion into a new wallet. In other words, manually construct a wallet that doesn't include the hung transactions. I have looked at the RPC commands my bitcoin client accepts, and these commands you list on this thread are not included. What do I do?
|
|
|
|
krepta3000
Member
Offline
Activity: 92
Merit: 10
|
|
July 01, 2011, 06:50:08 AM |
|
Hello? Anyone ever look at this thread anymore? I downloaded the tarball for this, extracted it into my bitcoin folder, and ran bitcoin, only to find that these new RPC commands are not included/installed. What do I do? I don't know C++, I'm not a great programmer, I don't know how to make this work. Help? Please?
|
|
|
|
EricJ2190
|
|
July 01, 2011, 07:02:45 AM |
|
Hello? Anyone ever look at this thread anymore? I downloaded the tarball for this, extracted it into my bitcoin folder, and ran bitcoin, only to find that these new RPC commands are not included/installed. What do I do? I don't know C++, I'm not a great programmer, I don't know how to make this work. Help? Please?
For now, you need to recompile Bitcoin from its source code to use this. Hopefully this patch will be included in the next release. But as for your corrupt wallet, I recommend bitcointools. There is a nice guide here: http://forum.bitcoin.org/index.php?topic=11331.0
|
|
|
|
krepta3000
Member
Offline
Activity: 92
Merit: 10
|
|
July 01, 2011, 06:54:50 PM |
|
Hello? Anyone ever look at this thread anymore? I downloaded the tarball for this, extracted it into my bitcoin folder, and ran bitcoin, only to find that these new RPC commands are not included/installed. What do I do? I don't know C++, I'm not a great programmer, I don't know how to make this work. Help? Please?
For now, you need to recompile Bitcoin from its source code to use this. Hopefully this patch will be included in the next release. But as for your corrupt wallet, I recommend bitcointools. There is a nice guide here: http://forum.bitcoin.org/index.php?topic=11331.0Darn it, I don't know how to recompile things on windows. It's easy on linux, just type make, and everything is pre-scripted and it just works. On windows I have no clue. As for bitcointools, I tried that already, those hung transactions still are not announcing and being processed, so I want them Gone, deleted, removed. How do I do that with bitcointools? The only way I can see is to dump my wallet as a text file, then import that into a new wallet, not including the hung transactions and whatever it is that is causing the problem. But, I can't do that without "dumpwallet" and the other great RPC commands that I have no ability to use at the moment.
|
|
|
|
Dynotor
Newbie
Offline
Activity: 17
Merit: 0
|
|
July 03, 2011, 05:07:17 PM |
|
Can anyone help a git and github newbie like me figure out how to get a diff from the pull request? Just pointing me towards relevant documentation would be fine... I'm just having trouble finding it. I'm using linux.
|
|
|
|
Pieter Wuille (OP)
|
|
July 04, 2011, 01:20:13 PM |
|
Can anyone help a git and github newbie like me figure out how to get a diff from the pull request? Just pointing me towards relevant documentation would be fine... I'm just having trouble finding it. I'm using linux.
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
|
I do Bitcoin stuff.
|
|
|
krepta3000
Member
Offline
Activity: 92
Merit: 10
|
|
July 05, 2011, 12:33:19 AM |
|
So, uhm, I'm not a developer, and I've never used GIT. I'm downloading GIT for windows, msysgit, and I'm going to install it. Will this enable me to somehow get a version of bitcoin running that will let me do dumpwallet, and import wallet?
|
|
|
|
Dynotor
Newbie
Offline
Activity: 17
Merit: 0
|
|
July 05, 2011, 10:31:16 PM |
|
Can anyone help a git and github newbie like me figure out how to get a diff from the pull request? Just pointing me towards relevant documentation would be fine... I'm just having trouble finding it. I'm using linux.
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
Thanks so much, Pieter!!!!! So, uhm, I'm not a developer, and I've never used GIT. I'm downloading GIT for windows, msysgit, and I'm going to install it. Will this enable me to somehow get a version of bitcoin running that will let me do dumpwallet, and import wallet?
Krepta3000, before you bother trying to get git to work on windows, you might just make sure you can compile from the source first. I haven't tried to do so for windows for bitcoin before, but based on my experience with other open source projects the tool chain requirements for compiling under windows usually is much harder to satisfy than for Linux. My experience has shown me that using a VM running Linux (using virtualization software like VBox if you don't have a linux box handy) is usually a much easier route. But... since I don't have experience with bitcoin in this area, I'll defer to anyone else with more direct experience...
|
|
|
|
rabit
Member
Offline
Activity: 62
Merit: 10
|
|
July 07, 2011, 09:51:24 PM Last edit: July 08, 2011, 09:22:53 AM by rabit |
|
Can i also remove a key from the wallet with this patch?
If not how many BTCs would it cost to motivate someone to add this feature?
|
|
|
|
Hans0
Member
Offline
Activity: 91
Merit: 10
|
|
July 08, 2011, 05:29:00 PM |
|
I am not sure this a suitable to be on by default. This will cause a great amount of lost bitcoins because unsophisticated users are careless.
|
|
|
|
SgtSpike
Legendary
Offline
Activity: 1400
Merit: 1005
|
|
July 08, 2011, 05:58:37 PM |
|
I am not sure this a suitable to be on by default. This will cause a great amount of lost bitcoins because unsophisticated users are careless.
+1 This is fine living in a separate branch. Being able to recompile a branch is a nice barrier of entry for the tech. clueless. This SHOULD be included in the default client. Reason being, it is incredibly useful for people who know how to use it, and not all of us know how to use linux or feel like spending hours on Windows attempting to compile the source with all of the dependencies. Discluding a feature like this from anyone who doesn't know how to compile c code would be a terrible thing.
|
|
|
|
molecular
Donator
Legendary
Offline
Activity: 2772
Merit: 1019
|
|
July 08, 2011, 06:53:09 PM |
|
I am not sure this a suitable to be on by default. This will cause a great amount of lost bitcoins because unsophisticated users are careless.
+1 This is fine living in a separate branch. Being able to recompile a branch is a nice barrier of entry for the tech. clueless. This SHOULD be included in the default client. Reason being, it is incredibly useful for people who know how to use it, and not all of us know how to use linux or feel like spending hours on Windows attempting to compile the source with all of the dependencies. Discluding a feature like this from anyone who doesn't know how to compile c code would be a terrible thing. +1 I'm actively using this feature and I would love to give out qr-codes (sealed) of privkeys to friends. Actually I gave one to a friend, but he's not supposed to open it before 6/17/2012. So I'd really love to have the feature in default client by that time Otherwise I'd have to compile bitcoin for windows, which I really would like to avoid. Most "normal" users don't even know they can use RPC commands. I think compiling a branch is too high a barrier. This is also needed for bitbills, btw, which is a pretty cool project as I think.
|
PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0 3F39 FC49 2362 F9B7 0769
|
|
|
|