7
1
I've been messing around with an empty wallet file using the 'pywallet' utility, and have come across something I can't understand.
A dump of the unencrypted wallet readily reveals a list containing entries such as:
"addr": "1NpYUPpz2E4fhYfoJRfUApa5hSPcrpCGaT",
"hexsec": "d38c1f602bc0bc90a54c5d743b3b75460c4aeeb1dc6ad62d3c6758c3714998a0",
"reserve": 1,
"sec": "5KRTGtTczAwef7vdDfm9knDyKMoaa8XHJURnMZnQFd5qkWVJtsB"
The second/fourth entries are obviously the private key. However, if I input this key at (for instance) bitaddress.org, it generates
1EEYqeJHkubdhcrHvH7ajpSBEALXMygoD8 (address)
1HoVqjG35pW3AQ7wtYtA72tSpyLyP4vDLp (compressed address)
neither of which match ANY of the other addresses listed in the dump. I can't find an explanation for this anywhere, and I'm wondering what the ramifications of losing, say, the first address in the key entry ('1NpYUP...') or the addresses in the pool are if they don't actually correspond to the private keys in the file.
Just a heads up - do not post your private key in public unless you'll no longer be using that Bitcoin address
Thanks in advance!
Have you tried sending 0.01 BTC to 1NpYUPpz2E4fhYfoJRfUApa5hSPcrpCGaT and to 1EEYqeJHkubdhcrHvH7ajpSBEALXMygoD8? – Samuel Tardieu – 2012-08-14T09:33:04.517
I have not, simply because I won't feel comfortable using Bitcoin until I get a really good grasp of how everything -- especially the client, which I would use most frequently -- works. Because of this, I have only the 5 mBTC I got from the Bitcoin Faucet; not enough to avoid incurring a fee I can't yet afford! – AFineTransform – 2012-08-14T13:03:22.633
You can get a tiny amount of daily free bitcoins if you can put up with ads. I don't do this much, but it's perfect for seeding addresses. DailyBitcoin and CoinAd are two places that do this.
Note: I have absolutely no interest in these site's success except for the few times I use them. – Daniel H – 2012-08-14T16:40:09.187
Importing the private key (d38c1f602bc0bc90a54c5d743b3b75460c4aeeb1dc6ad62d3c6758c3714998a0) into Blockchain.info/wallet also yields 1EEYqeJHkubdhcrHvH7ajpSBEALXMygoD8. – Stephen Gornick – 2012-08-14T21:56:11.660
I used my GoBit testing suite and it also yields 1EEYqeJHkubdhcrHvH7ajpSBEALXMygoD8 http://gobittest.appspot.com/Address
– ThePiachu – 2012-08-15T12:04:18.867Doing my own testing with pywallet, I find that 1. the output format is slightly different (no hexsec) and 2. I don't have this problem on a newly-generated wallet.
This makes me think you have a bad pywallet version, or a bad wallet file. Could you please post the pywallet version you're using? Also, could you try sending some of the bitcoins you got at this address to see if you really do have the right private key in the wallet? – Daniel H – 2012-08-17T17:02:24.783
I believe I'm using the latest version, pywallet.py 1.1. I've continued to experiment with this, most recently using the utility to add that same private key and the associated address (1EEYqe...) to the key pool. This did not overwrite the entry containing the same private key but erroneous address (1NpYUP...). Adding the private key manually a second time does result in an overwrite of the 1EEYqe... entry, but again, the original is untouched. Very interesting! – AFineTransform – 2012-08-21T00:07:24.027
Have you had any luck sending bitcoins from your 1NpYUPp... address? – Daniel H – 2012-08-22T00:12:29.933
Yes, I was able to send some from the 1NpYUPp... address to the default wallet address without problem. So the correct private key has to be in the wallet somewhere, right? – AFineTransform – 2012-08-22T15:48:40.837
I'd assume so. I'd try importing the wallet into another service and see what happens. Blockchain.info has at least two different ways you can import it, probably more; I'd check what those do. – Daniel H – 2012-08-22T19:01:13.383
Importing the pywallet dump into MyWallet doesn't seem to do anything. There will even be 'verified' and 'successful server sync' type notifications, but the BTC balance and transactions will not appear unless I import each private key individually. Oh, and I haven't mentioned this yet because yet as it seems irrelevant, but I do not have a working 'ecdsa' package installed. Could it also have a subtle influence on the mismatched key issue I'm experiencing? – AFineTransform – 2012-08-23T15:32:47.560
Just following up, I did get the 'ecdsa' package installed for Python 2.7. As expected, it had no impact of any relevance. – AFineTransform – 2012-08-25T02:23:35.887
What private key does the dumpprivkey command report (RPC call or console in Bitcoin-Qt)? Does it correspond to what pywallet is saying? – Pieter Wuille – 2012-12-27T23:44:32.903