Bitcoin Forum
September 25, 2024, 06:17:16 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Re: Lost btc in change address, any help please? on: October 03, 2019, 07:35:11 PM
Indeed this is a very curious case... I've been trying to figure out scenarios where it's possible for the system to use a change address that isn't generated by the wallet... the options I have are:

1. The backup is using a different seed to the original wallet. I believe it is still true that the seed will still be changed when you enable encryption on the wallet... but that it doesn't if you simply change the passphrase.

How old was the backup wallet.dat file that you used? When did you create the backup? Did you encrypt the wallet AFTER you created the backups? Huh


2. A "custom" change address was used.

For this, "coin control" functionality needs to be switched on in the settings, and a custom change address needs to be entered into the appropriate textbox on the "send" tab.


3. There is some, as yet reported, bug in Bitcoin Core that is causing it to generate and/or use incorrect change addresses.


I created the backup wallet.dat this week and generated the wallets on an air gapped system in bitcoin-cli using the command: getnewaddress. For the record, I've run all commands on this original machine.
Then I shutdown bitcoind and after copied the wallet.dat file onto my USB.
The wallet was never encrypted in bitcoin-cli as I stored the files in an encrypted "file" partition on the drive.
"Coin control" is disabled. I did not specify a change address when sending the $10.


Air gapped system generated the wallet. -> Transferred onto encrypted "file" partition (on usb). -> Backed up the encrypted partition.

Later, on the second, online pc...
Copied encrypted partition from usb. -> Decrypt. -> Copy wallet.dat into its directory. -> Ran "bitcoin-qt.exe -rescan", waited -> Sent $10 to friend.
At that moment would the change address in theory still be pre-determined from wallet.dat or did it generate based off the seed of the second computer?



I have a feeling you corrupted your wallet.dat somehow? (Or, obviously, derived a different dataset of adresses.)

Can you check if you still have the keys for the adress you originally got your funds on?

https://www.blockchain.com/btc/address/3P2UsEAdCWAKNzLNqxybcELB78ihGsmP5n
Yes I have that key.
2  Bitcoin / Bitcoin Technical Support / Re: Lost btc in change address, any help please? on: October 02, 2019, 09:23:45 AM
Meanwhile, you can check that the change address shown in the image you posted belongs to your wallet, type in console:
 ismine "address"
not sure about the command syntax
Yes, Bitcoin core doesn't have "ismine" command use getaddressinfo "your_address" instead.
There's an "ismine" : true/false," somewhere in the middle of the results.


05:17:53

{
  "address": "36PSz3n9gj45GqHNPWEfDsxmZWXcnuFG3y",
  "scriptPubKey": "a91433860f9dbb431e433edb54006563ca5b1b659e7f87",
  "ismine": false,
  "solvable": false,
  "iswatchonly": false,
  "isscript": true,
  "iswitness": false,
  "ischange": false,
  "labels": [
  ]
}
Quote
Was the original address (3P2UsEAdCWAKNzLNqxybcELB78ihGsmP5n) an imported address? Huh Did you ever import a private key to this wallet?
3P2UsEAdCWAKNzLNqxybcELB78ihGsmP5n was generated on this exact instance of bitcoin-core v0.18.1. I have never imported any private keys in this wallet.

Wallet finished rescanblockchain and is showing the same. No change.
3  Bitcoin / Bitcoin Technical Support / Lost btc in change address, any help please? on: October 02, 2019, 12:01:47 AM
Here's the story of my dumb ass.
Transaction.

To preface, I have a wallet.dat file stored on a USB in a fireproof safe. I also have backups on backups so no way to lose this wallet.dat file.

I had about $45 btc in my wallet at the time. Sent $10 to a friend in a transaction. Since this was not my full btc balance, a change address was created which received the other $35 worth of BTC. I did not notice this.

Then, I simply deleted my wallet.dat, cleared recycle bin anticipating I would restore from my backup wallet.dat.

Fast forward to me restoring my wallet.dat and noticing $35 is gone. Now, I don't have the private key to this change address. I ran file recovery software but it did not pick up the (correct) wallet.dat from my emptied recycle bin which contained the private key.

I understand now receiving wallets are generated based off a seed. Cryptographically, I know that's no chance that seed will generate the same change address twice. So, am I fucked? $35 down the drain not so bad price for this lesson.

I used EaseUS for the recovery, found a deleted wallet.dat in my recycle bin, but it was newer then the deleted wallet.dat which occurred at about 11am this morning.

---

Bitcoin core says "HD key generation is enabled", and I ran the application with -rescan but it didn't find any new addresses.
Here's a screenshot of my "Transactions":
https://i.imgur.com/KDmnmYu.png
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!