Bitcoin Forum
April 27, 2024, 03:03:35 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Missing addresses after restore  (Read 158 times)
night_driver (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 14


View Profile
November 14, 2023, 09:38:00 PM
Merited by o_e_l_e_o (4), ABCbits (2)
 #1

Hello,

I would like to understand better the restore process of a wallet on a node.

To give a bit of context, i had only one wallet on a bitcoin node with multiples addresses (almost 30).
I re-import this wallet from the "importprvkey" method and all works fine my wallet was restored.

This issue is I lost all the addresses except the main address of this wallet. For example i send a transaction to one the addresses i had before the import and i cannot list the transactions for this address my node telling me that is cannot retrieve from this address.

My question is : How to restore a wallet including all the addresses i had created in the past ?

Thank you for help !
 

The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714230215
Hero Member
*
Offline Offline

Posts: 1714230215

View Profile Personal Message (Offline)

Ignore
1714230215
Reply with quote  #2

1714230215
Report to moderator
LucyFurr
Jr. Member
*
Online Online

Activity: 50
Merit: 10

PoW>>>PoS


View Profile
November 14, 2023, 09:41:29 PM
 #2

If you import the private key it only retrieve the coins stored in that address so did you imported 30 privkeys?

You need to use the recovery seeds/mnemonic phrase/seed phrase to import the wallet.
night_driver (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 14


View Profile
November 14, 2023, 09:52:42 PM
 #3

If you import the private key it only retrieve the coins stored in that address so did you imported 30 privkeys?

You need to use the recovery seeds/mnemonic phrase/seed phrase to import the wallet.

Hello,

Thank you for your reply !

The 30 addresses were on the same wallet.
Because a wallet can have one or more addresses but at the end it's the same and only one wallet file.

So when i restore this wallet i except that it will re-import all the addresses also.

The "dumpprvkey" also return only one private key even if you have 30 addresses so i cannot restore 30 wallets even if i wanted.

Thank you !
LucyFurr
Jr. Member
*
Online Online

Activity: 50
Merit: 10

PoW>>>PoS


View Profile
November 14, 2023, 10:03:12 PM
Merited by o_e_l_e_o (4)
 #4


The "dumpprvkey" also return only one private key even if you have 30 addresses so i cannot restore 30 wallets even if i wanted.

Thank you !

"dumpprvkey" <address> will give private key of the specific address only in qt. AFAIK you can't retrieve seeds in qt wallet so either you can recover the wallet using wallet.dat file or 30 addresses with 30 private keys. Please correct me if I am wrong guys.
night_driver (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 14


View Profile
November 14, 2023, 10:06:54 PM
 #5


The "dumpprvkey" also return only one private key even if you have 30 addresses so i cannot restore 30 wallets even if i wanted.

Thank you !

"dumpprvkey" <address> will give private key of the specific address only in qt. AFAIK you can't retrieve seeds in qt wallet so either you can recover the wallet using wallet.dat file or 30 addresses with 30 private keys. Please correct me if I am wrong guys.

What mean's qt please ?

Thanks
seek3r
Legendary
*
Offline Offline

Activity: 1260
Merit: 1954



View Profile
November 14, 2023, 10:11:21 PM
 #6

My question is : How to restore a wallet including all the addresses i had created in the past ?
Which version of Bitcoin Core are you using?

You might wanna try the prompt "rescan" after importing ur private key.  It tells Bitcoin Core to scan the blockchain for transactions associated with the imported private key.
This process might take some time but once it is successfully completed, all addresses corresponding to the imported private key should now be part of your wallet.

Another consideration would be the import of the wallet.dat because importing HD wallets via "importprvkey" might not restore all addresses that were associated.
With the release of v0.13.0 all created wallets were HD wallets by default.



.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
night_driver (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 14


View Profile
November 15, 2023, 06:15:38 PM
Merited by vapourminer (1)
 #7

My question is : How to restore a wallet including all the addresses i had created in the past ?
Which version of Bitcoin Core are you using?

You might wanna try the prompt "rescan" after importing ur private key.  It tells Bitcoin Core to scan the blockchain for transactions associated with the imported private key.
This process might take some time but once it is successfully completed, all addresses corresponding to the imported private key should now be part of your wallet.

Another consideration would be the import of the wallet.dat because importing HD wallets via "importprvkey" might not restore all addresses that were associated.
With the release of v0.13.0 all created wallets were HD wallets by default.




Thank you for your reply !

I tried the -rescan option but it's seems it's not existing anymore since the v21 version.
I also read that normally this scan should be automatic now that why they remove the flag.

The problem is i still don't have all my addresses.

An other solution would be to backup directly the file "*.dat" but that's mean each time i generate a new address  i need to backup the last version of this file right ?

Or maybe someone has bettter solution ?

Thanks you !
seek3r
Legendary
*
Offline Offline

Activity: 1260
Merit: 1954



View Profile
November 16, 2023, 06:43:11 AM
Merited by El duderino_ (6), LoyceV (2), vapourminer (1), tyz (1), ABCbits (1)
 #8

I tried the -rescan option but it's seems it's not existing anymore since the v21 version.
I also read that normally this scan should be automatic now that why they remove the flag.
Oh yes in the latest versions of Bitcoin Core the rescanning method got automatically initiated when its neccessary.
But you can still do this manually if u wish. The command for that would be rescanblockchain - you can specify start and block heights for that aswell. This would look like this "rescanblockchain [start_block] [stop_block]"


An other solution would be to backup directly the file "*.dat" but that's mean each time i generate a new address  i need to backup the last version of this file right ?
No its not neccessary to do that because all future addresses can be generated from the existing seed with HD wallets.
But I would highly recommend to backup ur wallet.dat at regular intervals. Especially with big changes regarding balance or something similar.


You can also try the command "listreceivedbyaddress 0 true" which lists all addresses that received atleast a single transaction including those with zero balances.


.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Cricktor
Hero Member
*****
Offline Offline

Activity: 742
Merit: 1073


Crypto Swap Exchange


View Profile
November 26, 2023, 08:32:59 PM
Merited by vapourminer (2), ABCbits (2)
 #9

I would like to understand better the restore process of a wallet on a node.

To give a bit of context, i had only one wallet on a bitcoin node with multiples addresses (almost 30).
I re-import this wallet from the "importprvkey" method and all works fine my wallet was restored.

Do you remember with what version of Bitcoin Core you created your wallet?

Was it a HD wallet?


This issue is I lost all the addresses except the main address of this wallet. For example i send a transaction to one the addresses i had before the import and i cannot list the transactions for this address my node telling me that is cannot retrieve from this address.

I would say there's no "main address" in a Bitcoin Core wallet. You have external addresses which are used when you request a receive address and there are internal addresses which are used for change coins, e.g. when you have an transaction input of 0.1BTC and you want to send Bob 0.06BTC with a transaction fee of 0.00002BTC, your wallet will create automatically a change output to return the excess of 0.03998BTC as change into an internal change address of your wallet.

I hope for you that you still have the original wallet.dat file OR you have dumped all your keys with bitcoin-cli dumpwallet "filename". It's important to dump all keys if you have a non-HD legacy wallet and if you dare to deal with unprotected private keys (not recommended on an online device). bitcoin-cli dumpprivkey "address" only gives you the private key for one particular address, which is definitely not enough in your case.

To restore a non-HD legacy Bitcoin Core wallet you would need all private keys and key types (external and internal) to import.

A HD wallet does generate all private keys, public keys and addresses from a single HD seed key (a specially marked private key with hdseed=1 in wallet dump file). I haven't done such a restore myself yet, but if you have a dump of such a HD seed key, it should be possible to open an empty HD wallet with no keys, import that HD seed key with bitcoin-cli sethdseed "true" "HD-seed-in-WIF-format" and a subsequent bitcoin-cli keypoolrefill would generate by default 1000 receive and change addresses which should be identical to your initial wallet.

A bitcoin-cli rescanblockchain should then find all UTXOs of such a restaured wallet.

Bitcoin Core descriptor wallets can be restaured quite easily if you have the correct private key descriptor and derivation path. The devil lies in details but to my knowledge it's even possible to restore a BIP-39 mnemonic words wallet in Bitcoin Core (with additional tools like the Iancoleman-script (download from Github, verify authenticity, use only offline on permanently air-gapped or disposable or agnostic devices!).

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!